dmao_api 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb6855ebeb3df109d747a4e5153c91735df68bdd
4
- data.tar.gz: 873620f2bd988a331dc6d6a8da2013ce4b77ce80
3
+ metadata.gz: a485b3df76cbd3eb98c1f9797616abff184281ce
4
+ data.tar.gz: 20b8b40f8647ed0aabdabc275fd21e5494746d9c
5
5
  SHA512:
6
- metadata.gz: 1102a0b85199d723e567c34caefb160f20fc8769552580b67fa56c8f306059e02fc3dfd2d276de4fbdcafbbe64d9c43225ae249181fa8c46c03830cb0635c799
7
- data.tar.gz: e5939a3a23114804ee4b1d3c87939a3047f8c33da6999dbf188ffb2a0a58056d27387e65671b0fc27ffceacd0cfd0dd2955d45e63f854eb8bf875865441dfc10
6
+ metadata.gz: 53a7ba99fcffab27b57411ab74fab6643228fcedb560e2424078a588273a051b9b241b4a81c6a48e366084d363251750f4cb42fc84103385d8dfbe51f1650cc3
7
+ data.tar.gz: a555bb2029ecfe89064d554cc68e89a13d05c443234ea97bae0114e5988abea45e40a22de8381a7aa7ebfb604001c4b8e57df3aaf8692b46b00b4665b8fe9492
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class DatasetFileNotFound < StandardError
7
+ class DatasetFileNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid dataset file id specified, id does not exist for requesting institution.")
8
10
 
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class DatasetNotFound < StandardError
7
+ class DatasetNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid dataset id specified, id does not exist for requesting institution.")
8
10
 
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class DMPNotFound < StandardError
7
+ class DMPNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid DMP id specified, id does not exist for requesting institution.")
8
10
 
@@ -0,0 +1,17 @@
1
+ module DMAO
2
+ module API
3
+ module Errors
4
+
5
+ class EntityNotFound < StandardError
6
+
7
+ def initialize(msg="Invalid entity 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
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class FunderNotFound < StandardError
7
+ class FunderNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid funder id specified, id does not exist for requesting institution.")
8
10
 
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class OrganisationUnitNotFound < StandardError
7
+ class OrganisationUnitNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid organisation unit id specified, id does not exist for requesting institution.")
8
10
 
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class PersonNotFound < StandardError
7
+ class PersonNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid person id specified, id does not exist for requesting institution.")
8
10
 
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class ProjectNotFound < StandardError
7
+ class ProjectNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid project id specified, id does not exist for requesting institution.")
8
10
 
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class ProjectParticipantNotFound < StandardError
7
+ class ProjectParticipantNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid project participant id specified, id does not exist for requesting institution.")
8
10
 
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class PublicationDatasetNotFound < StandardError
7
+ class PublicationDatasetNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid publication dataset id specified, id does not exist for requesting institution.")
8
10
 
@@ -1,8 +1,10 @@
1
+ require_relative 'entity_not_found'
2
+
1
3
  module DMAO
2
4
  module API
3
5
  module Errors
4
6
 
5
- class PublicationNotFound < StandardError
7
+ class PublicationNotFound < EntityNotFound
6
8
 
7
9
  def initialize(msg="Invalid publication id specified, id does not exist for requesting institution.")
8
10
 
@@ -1,5 +1,5 @@
1
1
  module DMAO
2
2
  module API
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
data/lib/dmao_api.rb CHANGED
@@ -1,6 +1,15 @@
1
1
  require "dmao/api/version"
2
2
  require "dmao/api/configuration"
3
+ require "dmao/api/dataset"
4
+ require "dmao/api/dataset_file"
5
+ require "dmao/api/dmp"
6
+ require "dmao/api/funder"
3
7
  require "dmao/api/organisation_unit"
8
+ require "dmao/api/person"
9
+ require "dmao/api/project"
10
+ require "dmao/api/project_participant"
11
+ require "dmao/api/publication"
12
+ require "dmao/api/publication_dataset"
4
13
 
5
14
  module DMAO
6
15
  module API
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dmao_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Robinson
@@ -161,6 +161,7 @@ files:
161
161
  - lib/dmao/api/errors/dataset_file_not_found.rb
162
162
  - lib/dmao/api/errors/dataset_not_found.rb
163
163
  - lib/dmao/api/errors/dmp_not_found.rb
164
+ - lib/dmao/api/errors/entity_not_found.rb
164
165
  - lib/dmao/api/errors/funder_not_found.rb
165
166
  - lib/dmao/api/errors/institution_not_found.rb
166
167
  - lib/dmao/api/errors/invalid_api_base_url.rb