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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: bebd0d6bcebf1f582c44b677737c4f1e80453e191f05088763a98f2375b76bd5
4
- data.tar.gz: efdd57c7d6d83ead1a549b3f2b2b9aab7699a6477b7c9e4d95561c63ae8fe9da
2
+ SHA1:
3
+ metadata.gz: 1c876ff50d829edab59bb8618f8d9a4124a98c4c
4
+ data.tar.gz: f8c89d43a06b421535f50e9ea573a51e943731da
5
5
  SHA512:
6
- metadata.gz: 9f51491147a629f9db225ec31b245f33f9ec29e771a384540ffafea05d4115a7160f36d08852bfee3145eea2c83684422a997b7ac5968fc543a2c32e0c34c4da
7
- data.tar.gz: de1b59a0dce712d5d91a03d6fd6a5a1d933f846665f7cb6b8740708f65914bff65d0992c38585bec877a7372d382c0accb5acaf9949c4401799af8f8ad2741d2
6
+ metadata.gz: df3d776f687217538074ba2ceb9858b8a6a8cf82960d13a283886af253553fc3a1e798e7af5bf82a38e888b567c9cc8aa4a92385197d3c87e36056af3e72000b
7
+ data.tar.gz: f52bdad13304137d9be8bf785469b525fa4c5487511562322cbd97469017c824d8b7b30a450ade0add5f6348a251f91185299215dc6e8390dafc538b22747dcd
@@ -1 +1 @@
1
- 2.5.5
1
+ 2.4.1
@@ -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
@@ -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, response
125
125
  when 404
126
- raise RestClient::ResourceNotFound, response
126
+ raise GlobalRegistry::ResourceNotFound, response
127
127
  when 500
128
- raise RestClient::InternalServerError, response
128
+ raise GlobalRegistry::InternalServerError, 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.6.0'
3
3
  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.5.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: 2019-06-07 00:00:00.000000000 Z
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.7.6.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