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 +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +2 -2
- data/lib/global_registry/base.rb +4 -4
- data/lib/global_registry/exceptions.rb +8 -0
- data/lib/global_registry/version.rb +1 -1
- data/lib/global_registry.rb +1 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e93da0073c39cfe7e3eba14f4ab788b9c9597912b86924a96bb897f4ba493d6a
|
4
|
+
data.tar.gz: 6752d48b7e9f365a4a4ff3d8ae8d65499e44dcb8a2c1cc4a51d008c747439f7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6bde8c52979ae1bc24297d0ba517bc55fc3fe2d524c295819516115ac80cfb49cce0c60957fa021d1f4f7a5631d01095d7a4f278b1c397ea87e1e13bdff8412
|
7
|
+
data.tar.gz: dd6d5a4659bbe3bd1fbf4bd81dd17f46b287534bad72bc07b382c7a5b050f057739f7f746cbd65f196a2493dd9eba0b8860653a01d0d3da7eb4060eea9ca7353
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.1
|
data/.travis.yml
CHANGED
data/lib/global_registry/base.rb
CHANGED
@@ -121,15 +121,15 @@ module GlobalRegistry
|
|
121
121
|
when 200..299
|
122
122
|
Oj.load(response)
|
123
123
|
when 400
|
124
|
-
raise
|
124
|
+
raise GlobalRegistry::BadRequest.new(response)
|
125
125
|
when 404
|
126
|
-
raise
|
126
|
+
raise GlobalRegistry::ResourceNotFound.new(response)
|
127
127
|
when 500
|
128
|
-
raise
|
128
|
+
raise GlobalRegistry::InternalServerError.new(response)
|
129
129
|
else
|
130
130
|
puts response.inspect
|
131
131
|
puts request.inspect
|
132
|
-
raise
|
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
|
data/lib/global_registry.rb
CHANGED
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.
|
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:
|
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
|
-
|
152
|
-
|
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:
|