global_registry 1.5.1 → 1.7.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
  SHA256:
3
- metadata.gz: bebd0d6bcebf1f582c44b677737c4f1e80453e191f05088763a98f2375b76bd5
4
- data.tar.gz: efdd57c7d6d83ead1a549b3f2b2b9aab7699a6477b7c9e4d95561c63ae8fe9da
3
+ metadata.gz: e93da0073c39cfe7e3eba14f4ab788b9c9597912b86924a96bb897f4ba493d6a
4
+ data.tar.gz: 6752d48b7e9f365a4a4ff3d8ae8d65499e44dcb8a2c1cc4a51d008c747439f7e
5
5
  SHA512:
6
- metadata.gz: 9f51491147a629f9db225ec31b245f33f9ec29e771a384540ffafea05d4115a7160f36d08852bfee3145eea2c83684422a997b7ac5968fc543a2c32e0c34c4da
7
- data.tar.gz: de1b59a0dce712d5d91a03d6fd6a5a1d933f846665f7cb6b8740708f65914bff65d0992c38585bec877a7372d382c0accb5acaf9949c4401799af8f8ad2741d2
6
+ metadata.gz: f6bde8c52979ae1bc24297d0ba517bc55fc3fe2d524c295819516115ac80cfb49cce0c60957fa021d1f4f7a5631d01095d7a4f278b1c397ea87e1e13bdff8412
7
+ data.tar.gz: dd6d5a4659bbe3bd1fbf4bd81dd17f46b287534bad72bc07b382c7a5b050f057739f7f746cbd65f196a2493dd9eba0b8860653a01d0d3da7eb4060eea9ca7353
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.5
1
+ 2.4.1
data/.travis.yml CHANGED
@@ -2,6 +2,6 @@ sudo: false
2
2
  cache: bundler
3
3
  language: ruby
4
4
  rvm:
5
- - 2.4.1
5
+ - 3.0.5
6
6
  script:
7
- - bundle exec rspec spec
7
+ - bundle exec rspec spec
@@ -121,15 +121,15 @@ module GlobalRegistry
121
121
  when 200..299
122
122
  Oj.load(response)
123
123
  when 400
124
- raise RestClient::BadRequest, response
124
+ raise GlobalRegistry::BadRequest.new(response)
125
125
  when 404
126
- raise RestClient::ResourceNotFound, response
126
+ raise GlobalRegistry::ResourceNotFound.new(response)
127
127
  when 500
128
- raise RestClient::InternalServerError, response
128
+ raise GlobalRegistry::InternalServerError.new(response)
129
129
  else
130
130
  puts response.inspect
131
131
  puts request.inspect
132
- raise result.to_s
132
+ raise GlobalRegistry::OtherError, response
133
133
  end
134
134
  end
135
135
 
@@ -0,0 +1,8 @@
1
+ module GlobalRegistry #:nodoc:
2
+ class BadRequest < ::RestClient::BadRequest; end
3
+ class ResourceNotFound < ::RestClient::ResourceNotFound; end
4
+ class InternalServerError < ::RestClient::InternalServerError; end
5
+ class OtherError < ::RestClient::Exception; end
6
+
7
+ EXCEPTIONS = [BadRequest, ResourceNotFound, InternalServerError, OtherError].freeze
8
+ end
@@ -1,3 +1,3 @@
1
1
  module GlobalRegistry
2
- VERSION = '1.5.1'
2
+ VERSION = '1.7.0'
3
3
  end
@@ -1,5 +1,6 @@
1
1
  require 'active_support/core_ext/string/inflections'
2
2
  require 'global_registry/base'
3
+ require 'global_registry/exceptions'
3
4
 
4
5
  Dir[File.dirname(__FILE__) + '/global_registry/*.rb'].each do |file|
5
6
  require file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: global_registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Starcher
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-07 00:00:00.000000000 Z
11
+ date: 2023-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -120,6 +120,7 @@ files:
120
120
  - lib/global_registry/entity.rb
121
121
  - lib/global_registry/entity_type.rb
122
122
  - lib/global_registry/enum_value.rb
123
+ - lib/global_registry/exceptions.rb
123
124
  - lib/global_registry/measurement.rb
124
125
  - lib/global_registry/measurement_type.rb
125
126
  - lib/global_registry/relationship.rb
@@ -133,7 +134,7 @@ files:
133
134
  homepage: ''
134
135
  licenses: []
135
136
  metadata: {}
136
- post_install_message:
137
+ post_install_message:
137
138
  rdoc_options: []
138
139
  require_paths:
139
140
  - lib
@@ -148,9 +149,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
149
  - !ruby/object:Gem::Version
149
150
  version: '0'
150
151
  requirements: []
151
- rubyforge_project:
152
- rubygems_version: 2.7.6.2
153
- signing_key:
152
+ rubygems_version: 3.3.26
153
+ signing_key:
154
154
  specification_version: 4
155
155
  summary: Push and pull data from the Global Registry
156
156
  test_files: