dmao_api 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +40 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/dmao_api.gemspec +43 -0
- data/lib/dmao/api/base.rb +28 -0
- data/lib/dmao/api/configuration.rb +13 -0
- data/lib/dmao/api/errors/institution_not_found.rb +17 -0
- data/lib/dmao/api/errors/invalid_api_base_url.rb +17 -0
- data/lib/dmao/api/errors/invalid_api_token.rb +17 -0
- data/lib/dmao/api/errors/invalid_organisation_unit.rb +21 -0
- data/lib/dmao/api/errors/invalid_organisation_unit_id.rb +19 -0
- data/lib/dmao/api/errors/invalid_parent_id.rb +17 -0
- data/lib/dmao/api/errors/invalid_response_length.rb +17 -0
- data/lib/dmao/api/errors/invalid_system_uuid.rb +19 -0
- data/lib/dmao/api/errors/organisation_unit_not_found.rb +17 -0
- data/lib/dmao/api/organisation_unit.rb +199 -0
- data/lib/dmao/api/version.rb +5 -0
- data/lib/dmao_api.rb +14 -0
- metadata +193 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a4d4d59aea24941e21ef566967555157cd0e820d
|
4
|
+
data.tar.gz: fec338ce10acfb8f1640679be699534281562a0f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dc57d3df3778c501ed90865cc0cb91f2724f9e8bab8901364cee58074724d7409fb453157c8b1b845c0bf58dfdc5852c3ce6fb5cbf4c42327f561afba1db0723
|
7
|
+
data.tar.gz: f56542b9e1fc6acfee1579fadd007a2b6d0832f908b28fa153305fcec7029971bb074a4fec5b3d611d11720ed5433677b033bbfecc32f6678b9a30d8551b8599
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Lancaster University Library
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# DMAO-API-rb
|
2
|
+
|
3
|
+
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/dmao_api`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'dmao_api'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install dmao_api
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Write usage instructions here
|
25
|
+
|
26
|
+
## Development
|
27
|
+
|
28
|
+
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.
|
29
|
+
|
30
|
+
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 [rubygems.org](https://rubygems.org).
|
31
|
+
|
32
|
+
## Contributing
|
33
|
+
|
34
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/lulibrary/DMAO-API-rb.
|
35
|
+
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
40
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "dmao_api"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/dmao_api.gemspec
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'dmao/api/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "dmao_api"
|
8
|
+
spec.version = DMAO::API::VERSION
|
9
|
+
spec.authors = ["Stephen Robinson"]
|
10
|
+
spec.email = ["library.dit@lancaster.ac.uk"]
|
11
|
+
|
12
|
+
spec.summary = %q{Ruby API Client for DMA Online API}
|
13
|
+
spec.description = %q{}
|
14
|
+
spec.homepage = "https://github.com/lulibrary/DMAO-API-rb"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
21
|
+
else
|
22
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
"public gem pushes."
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_dependency "rest-client", "~> 2.0.0"
|
34
|
+
|
35
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
36
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
37
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
38
|
+
spec.add_development_dependency "mocha", "~> 1.1"
|
39
|
+
spec.add_development_dependency "vcr", "~> 3.0.3"
|
40
|
+
spec.add_development_dependency "webmock", "~> 2.1"
|
41
|
+
spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0"
|
42
|
+
spec.add_development_dependency "byebug"
|
43
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'rest-client'
|
2
|
+
require 'dmao/api/errors/invalid_api_base_url'
|
3
|
+
require 'dmao/api/errors/invalid_api_token'
|
4
|
+
|
5
|
+
module DMAO
|
6
|
+
module API
|
7
|
+
|
8
|
+
class Base
|
9
|
+
|
10
|
+
def self.api
|
11
|
+
|
12
|
+
raise Errors::InvalidApiBaseUrl.new if DMAO::API.base_url.nil? || DMAO::API.base_url.empty?
|
13
|
+
raise Errors::InvalidApiToken.new if DMAO::API.api_token.nil? || DMAO::API.api_token.empty?
|
14
|
+
|
15
|
+
if DMAO::API.institution_id.nil?
|
16
|
+
base_url = DMAO::API.base_url
|
17
|
+
else
|
18
|
+
base_url = DMAO::API.base_url + "/institutions/#{DMAO::API.institution_id}"
|
19
|
+
end
|
20
|
+
|
21
|
+
RestClient::Resource.new(base_url, headers: { content_type: :json, authorization: "Bearer #{DMAO::API.api_token}" })
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module DMAO
|
2
|
+
module API
|
3
|
+
module Errors
|
4
|
+
|
5
|
+
class InstitutionNotFound < StandardError
|
6
|
+
|
7
|
+
def initialize(msg="Invalid institution id specified, must be an existing DMA Online institution.")
|
8
|
+
|
9
|
+
super(msg)
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module DMAO
|
2
|
+
module API
|
3
|
+
module Errors
|
4
|
+
|
5
|
+
class InvalidApiBaseUrl < StandardError
|
6
|
+
|
7
|
+
def initialize(msg="Api base url is invalid, please check the DMAO::API.configure has been called.")
|
8
|
+
|
9
|
+
super(msg)
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module DMAO
|
2
|
+
module API
|
3
|
+
module Errors
|
4
|
+
|
5
|
+
class InvalidOrganisationUnit < StandardError
|
6
|
+
|
7
|
+
attr_reader :errors
|
8
|
+
|
9
|
+
def initialize(msg="Invalid organisation unit details passed in, please see errors.", errors=nil)
|
10
|
+
|
11
|
+
@errors = errors
|
12
|
+
|
13
|
+
super(msg)
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module DMAO
|
2
|
+
module API
|
3
|
+
module Errors
|
4
|
+
|
5
|
+
class OrganisationUnitNotFound < StandardError
|
6
|
+
|
7
|
+
def initialize(msg="Invalid organisation unit id specified, id does not exist for requesting institution.")
|
8
|
+
|
9
|
+
super(msg)
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,199 @@
|
|
1
|
+
require 'rest-client'
|
2
|
+
require 'dmao/api/base'
|
3
|
+
require 'dmao/api/errors/institution_not_found'
|
4
|
+
require 'dmao/api/errors/invalid_parent_id'
|
5
|
+
require 'dmao/api/errors/invalid_organisation_unit'
|
6
|
+
require 'dmao/api/errors/organisation_unit_not_found'
|
7
|
+
require 'dmao/api/errors/invalid_system_uuid'
|
8
|
+
require 'dmao/api/errors/invalid_response_length'
|
9
|
+
require 'byebug'
|
10
|
+
|
11
|
+
module DMAO
|
12
|
+
module API
|
13
|
+
|
14
|
+
class OrganisationUnit < Base
|
15
|
+
|
16
|
+
VALID_ATTRIBUTES = [:id, :institution_id, :name, :description, :url, :system_uuid, :system_modified_at, :isni, :unit_type, :parent_id]
|
17
|
+
attr_reader(*VALID_ATTRIBUTES)
|
18
|
+
|
19
|
+
def initialize(attributes)
|
20
|
+
|
21
|
+
@id = attributes[:id]
|
22
|
+
@institution_id = attributes[:institution_id]
|
23
|
+
@name = attributes[:name]
|
24
|
+
@description = attributes[:description]
|
25
|
+
@url = attributes[:url]
|
26
|
+
@system_uuid = attributes[:system_uuid]
|
27
|
+
@system_modified_at = attributes[:system_modified_at]
|
28
|
+
@isni = attributes[:isni]
|
29
|
+
@unit_type = attributes[:unit_type]
|
30
|
+
|
31
|
+
if attributes[:parent_id]
|
32
|
+
@parent_id = attributes[:parent_id]
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.all
|
38
|
+
|
39
|
+
begin
|
40
|
+
response = self.api['organisation_units'].get
|
41
|
+
rescue RestClient::NotFound
|
42
|
+
raise DMAO::API::Errors::InstitutionNotFound.new
|
43
|
+
end
|
44
|
+
|
45
|
+
org_units = []
|
46
|
+
|
47
|
+
response_data = JSON.parse(response)["data"]
|
48
|
+
|
49
|
+
return org_units if response_data.length == 0
|
50
|
+
|
51
|
+
response_data.each do |data|
|
52
|
+
|
53
|
+
org_units.push instance_from_api_data(data)
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
org_units
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.get id
|
62
|
+
|
63
|
+
validate_organisation_unit_id id
|
64
|
+
|
65
|
+
begin
|
66
|
+
response = self.api["organisation_units/#{id}"].get
|
67
|
+
rescue RestClient::NotFound
|
68
|
+
raise DMAO::API::Errors::OrganisationUnitNotFound.new
|
69
|
+
end
|
70
|
+
|
71
|
+
instance_from_response response
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.find_by_system_uuid system_uuid
|
76
|
+
|
77
|
+
validate_system_uuid system_uuid
|
78
|
+
|
79
|
+
response = self.api["organisation_units?system_uuid=#{system_uuid}"].get
|
80
|
+
|
81
|
+
response_data = JSON.parse(response)["data"]
|
82
|
+
|
83
|
+
raise DMAO::API::Errors::OrganisationUnitNotFound.new if response_data.length == 0
|
84
|
+
raise DMAO::API::Errors::InvalidResponseLength.new("Expected 1 element in response there were #{response_data.length}") if response_data.length != 1
|
85
|
+
|
86
|
+
data = response_data[0]
|
87
|
+
|
88
|
+
instance_from_api_data data
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.create attributes
|
93
|
+
|
94
|
+
validate_attributes attributes
|
95
|
+
|
96
|
+
begin
|
97
|
+
response = self.api['organisation_units'].post attributes.to_json
|
98
|
+
rescue RestClient::NotFound
|
99
|
+
raise DMAO::API::Errors::InstitutionNotFound.new
|
100
|
+
rescue RestClient::UnprocessableEntity => e
|
101
|
+
handle_unprocessable_entity e
|
102
|
+
end
|
103
|
+
|
104
|
+
instance_from_response response
|
105
|
+
|
106
|
+
end
|
107
|
+
|
108
|
+
def self.update id, attributes
|
109
|
+
|
110
|
+
validate_organisation_unit_id id
|
111
|
+
|
112
|
+
validate_attributes attributes
|
113
|
+
|
114
|
+
begin
|
115
|
+
response = self.api["organisation_units/#{id}"].patch attributes.to_json
|
116
|
+
rescue RestClient::NotFound
|
117
|
+
raise DMAO::API::Errors::OrganisationUnitNotFound.new
|
118
|
+
rescue RestClient::UnprocessableEntity => e
|
119
|
+
handle_unprocessable_entity e
|
120
|
+
end
|
121
|
+
|
122
|
+
instance_from_response response
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
def self.delete id
|
127
|
+
|
128
|
+
validate_organisation_unit_id id
|
129
|
+
|
130
|
+
begin
|
131
|
+
self.api["organisation_units/#{id}"].delete
|
132
|
+
rescue RestClient::NotFound
|
133
|
+
raise DMAO::API::Errors::OrganisationUnitNotFound.new
|
134
|
+
rescue RestClient::UnprocessableEntity => e
|
135
|
+
handle_unprocessable_entity e
|
136
|
+
end
|
137
|
+
|
138
|
+
true
|
139
|
+
|
140
|
+
end
|
141
|
+
|
142
|
+
def self.instance_from_response response_body
|
143
|
+
|
144
|
+
data = JSON.parse(response_body)["data"]
|
145
|
+
|
146
|
+
instance_from_api_data data
|
147
|
+
|
148
|
+
end
|
149
|
+
|
150
|
+
def self.instance_from_api_data data
|
151
|
+
|
152
|
+
parent_id = data["relationships"]["parent"]["data"].nil? ? nil : data["relationships"]["parent"]["data"]["id"]
|
153
|
+
|
154
|
+
attributes = {
|
155
|
+
id: data["id"],
|
156
|
+
institution_id: data["relationships"]["institution"]["data"]["id"],
|
157
|
+
name: data["attributes"]["name"],
|
158
|
+
description: data["attributes"]["description"],
|
159
|
+
url: data["attributes"]["url"],
|
160
|
+
system_uuid: data["attributes"]["system-uuid"],
|
161
|
+
system_modified_at: data["attributes"]["system-modified-at"],
|
162
|
+
isni: data["attributes"]["isni"],
|
163
|
+
unit_type: data["attributes"]["unit-type"],
|
164
|
+
parent_id: parent_id
|
165
|
+
}
|
166
|
+
|
167
|
+
new(attributes)
|
168
|
+
|
169
|
+
end
|
170
|
+
|
171
|
+
def self.validate_attributes attributes
|
172
|
+
attributes.keep_if { |k, _v| VALID_ATTRIBUTES.include? k }
|
173
|
+
end
|
174
|
+
|
175
|
+
def self.validate_organisation_unit_id id
|
176
|
+
if id.nil? || id.to_s.empty?
|
177
|
+
raise DMAO::API::Errors::InvalidOrganisationUnitID.new
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
def self.validate_system_uuid system_uuid
|
182
|
+
if system_uuid.nil? || system_uuid.to_s.empty?
|
183
|
+
raise DMAO::API::Errors::InvalidSystemUUID.new
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
def self.handle_unprocessable_entity error_response
|
188
|
+
|
189
|
+
errors = JSON.parse(error_response.response.body)["errors"]
|
190
|
+
|
191
|
+
raise DMAO::API::Errors::InvalidParentId.new if errors.keys.include? "parent"
|
192
|
+
raise DMAO::API::Errors::InvalidOrganisationUnit.new("Invalid organisation unit details, please see errors.", errors)
|
193
|
+
|
194
|
+
end
|
195
|
+
|
196
|
+
end
|
197
|
+
|
198
|
+
end
|
199
|
+
end
|
data/lib/dmao_api.rb
ADDED
metadata
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dmao_api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Stephen Robinson
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-01-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rest-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.13'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.13'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: mocha
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.1'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: vcr
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 3.0.3
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 3.0.3
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webmock
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.1'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.1'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: codeclimate-test-reporter
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: byebug
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: ''
|
140
|
+
email:
|
141
|
+
- library.dit@lancaster.ac.uk
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- Gemfile
|
148
|
+
- LICENSE.txt
|
149
|
+
- README.md
|
150
|
+
- Rakefile
|
151
|
+
- bin/console
|
152
|
+
- bin/setup
|
153
|
+
- dmao_api.gemspec
|
154
|
+
- lib/dmao/api/base.rb
|
155
|
+
- lib/dmao/api/configuration.rb
|
156
|
+
- lib/dmao/api/errors/institution_not_found.rb
|
157
|
+
- lib/dmao/api/errors/invalid_api_base_url.rb
|
158
|
+
- lib/dmao/api/errors/invalid_api_token.rb
|
159
|
+
- lib/dmao/api/errors/invalid_organisation_unit.rb
|
160
|
+
- lib/dmao/api/errors/invalid_organisation_unit_id.rb
|
161
|
+
- lib/dmao/api/errors/invalid_parent_id.rb
|
162
|
+
- lib/dmao/api/errors/invalid_response_length.rb
|
163
|
+
- lib/dmao/api/errors/invalid_system_uuid.rb
|
164
|
+
- lib/dmao/api/errors/organisation_unit_not_found.rb
|
165
|
+
- lib/dmao/api/organisation_unit.rb
|
166
|
+
- lib/dmao/api/version.rb
|
167
|
+
- lib/dmao_api.rb
|
168
|
+
homepage: https://github.com/lulibrary/DMAO-API-rb
|
169
|
+
licenses:
|
170
|
+
- MIT
|
171
|
+
metadata:
|
172
|
+
allowed_push_host: https://rubygems.org
|
173
|
+
post_install_message:
|
174
|
+
rdoc_options: []
|
175
|
+
require_paths:
|
176
|
+
- lib
|
177
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
requirements: []
|
188
|
+
rubyforge_project:
|
189
|
+
rubygems_version: 2.5.1
|
190
|
+
signing_key:
|
191
|
+
specification_version: 4
|
192
|
+
summary: Ruby API Client for DMA Online API
|
193
|
+
test_files: []
|