global_registry 1.5.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/lib/global_registry.rb +1 -0
- data/lib/global_registry/base.rb +4 -4
- data/lib/global_registry/exceptions.rb +8 -0
- data/lib/global_registry/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1c876ff50d829edab59bb8618f8d9a4124a98c4c
|
4
|
+
data.tar.gz: f8c89d43a06b421535f50e9ea573a51e943731da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df3d776f687217538074ba2ceb9858b8a6a8cf82960d13a283886af253553fc3a1e798e7af5bf82a38e888b567c9cc8aa4a92385197d3c87e36056af3e72000b
|
7
|
+
data.tar.gz: f52bdad13304137d9be8bf785469b525fa4c5487511562322cbd97469017c824d8b7b30a450ade0add5f6348a251f91185299215dc6e8390dafc538b22747dcd
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.1
|
data/lib/global_registry.rb
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, response
|
125
125
|
when 404
|
126
|
-
raise
|
126
|
+
raise GlobalRegistry::ResourceNotFound, response
|
127
127
|
when 500
|
128
|
-
raise
|
128
|
+
raise GlobalRegistry::InternalServerError, 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
|
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.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Starcher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-01 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
|
@@ -149,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
150
|
version: '0'
|
150
151
|
requirements: []
|
151
152
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.6.11
|
153
154
|
signing_key:
|
154
155
|
specification_version: 4
|
155
156
|
summary: Push and pull data from the Global Registry
|