Commit 5c4a7806 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

modify all gem structure to add tests and binary files

parent 56363fe7
\ No newline at end of file
language: ruby
- 2.2.0
before_install: gem install bundler -v 1.10.6
# Contributor Code of Conduct
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
This Code of Conduct is adapted from the [Contributor Covenant](, version 1.0.0, available at [](
source ''
# Specify your gem's dependencies in mark.gemspec
# Copyright (C) 2004-2008 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
# dspace-rest-client is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
# DSpace REST Client
# Mark
DSpace REST Client is a ruby gem that integrates DSpace servers with your application.
For now, the gem is under development, so some features are missing.
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/mark`. To experiment with that code, run `bin/console` for an interactive prompt.
## Example of use:
TODO: Delete this and the text above, and describe your gem
## Installation
Add this line to your application's Gemfile:
require 'dspace-rest-client'
gem 'mark'
client ='')
client.login '', 'dspace'
And then execute:
# check the status after authentication
puts client.status
$ bundle
List communities
Or install it yourself as:
require 'dspace-rest-client'
$ gem install mark
client ='')
community_repository = client.repository.community_repository
all_communities = community_repository.get_all_communities
## Usage
all_communities.each do |c|
TODO: Write usage instructions here
#### Bitstreams features:
- √ GET /bitstreams - Return all bitstreams in DSpace.
- √ GET /bitstreams/{bitstream id} - Return bitstream.
- GET /bitstreams/{bitstream id}/policy - Return bitstream policies.
- √ GET /bitstreams/{bitstream id}/retrieve - Return data of bitstream.
- POST /bitstreams/{bitstream id}/policy - Add policy to item. You must post a ResourcePolicy
- PUT /bitstreams/{bitstream id}/data - Update data/file of bitstream. You must put the data
- √ PUT /bitstreams/{bitstream id} - Update metadata of bitstream. You must put a Bitstream, does not alter the file/data
- DELETE /bitstreams/{bitstream id} - Delete bitstream from DSpace.
- DELETE /bitstreams/{bitstream id}/policy/{policy_id} - Delete bitstream policy.
#### Collections features:
- √ GET /communities/{communityId}/collections - Returns array of collections of community.
- √ GET /collections - Return all collections of DSpace in array.
- √ GET /collections/{collectionId} - Return collection with id.
- √ GET /collections/{collectionId}/items - Return all items of collection.
- √ POST /communities/{communityId}/collections - Create new collections in community. You must post Collection.
- √ POST /collections/{collectionId}/items - Create posted item in collection. You must post an Item
- POST /collections/find-collection - Find collection by passed name.
- PUT /collections/{collectionId} - Update collection. You must put Collection.
- DELETE /collections/{collectionId} - Delete collection from DSpace.
- DELETE /collections/{collectionId}/items/{itemId} - Delete item in collection.
- DELETE /communities/{communityId}/collections/{collectionId} - Delete collection in community.
#### Community features:
- √ GET /communities - Returns array of all communities in DSpace.
- √ GET /communities/top-communities - Returns array of all top communities in DSpace
- √ GET /communities/{communityId} - Returns community
- √ GET /communities/{communityId}/communities - Returns array of subcommunities of community.
- √ POST /communities - Create new community at top level. You must post community.
- √ POST /communities/{communityId}/communities - Create new subcommunity in community. You must post Community.
- PUT /communities/{communityId} - Update community. You must put Community
- DELETE /communities/{communityId} - Delete community.
- DELETE /communities/{communityId}/communities/{communityId2} - Delete subcommunity in community.
#### Item features:
- √ GET /items - Return list of items.
- √ GET /items/{item id} - Return item.
- √ GET /items/{item id}/metadata - Return item metadata.
- √ GET /items/{item id}/bitstreams - Return item bitstreams.
- POST /items/find-by-metadata-field - Find items by metadata entry. You must post a MetadataEntry. DS-2501 - wrong SQL in REST /items/find-by-metadata-field CLOSED
- √ POST /items/{item id}/metadata - Add metadata to item. You must post an array of MetadataEntry
- √ POST /items/{item id}/bitstreams - Add bitstream to item. You must post a Bitstream
- √ PUT /items/{item id}/metadata - Update metadata in item. You must put a MetadataEntry
- √ DELETE /items/{item id} - Delete item.
- DELETE /items/{item id}/metadata - Clear item metadata.
- DELETE /items/{item id}/bitstreams/{bitstream id} - Delete item bitstream.
### Version
### Contributors
> - Mauricio Giacomini Girardello <>
> - Bruno Zanette <>
### Installation
You need compile the gem:
$ gem build dspace-rest-client.gemspec
## Development
To install:
gem install --local dspace-rest-client-1.0.0.gem
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
### Development
Want to contribute? Great!
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [](
## Contributing
Bug reports and pull requests are welcome on GitHub at[USERNAME]/mark. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant]( code of conduct.
**Free Software, Hell Yeah!**
\ No newline at end of file
require "bundler/gem_tasks"
require "rake/testtask" do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList['test/**/*_test.rb']
task :default => :test
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment