g5_authentication_client 0.5.4 → 0.5.5

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: 8d60929baecf0592863290945161331d89e59338
4
- data.tar.gz: 9eedd2320dad57293882e6ca9f1941a0bdce3884
3
+ metadata.gz: 7523b2253fa2e4cfdfe44aa19f90dd2fd723b145
4
+ data.tar.gz: 1a6c444984028cd945ea9b5655406eabf265435c
5
5
  SHA512:
6
- metadata.gz: 2431eeb76a1c45b38d2b83bb0fc463182dd537554ff19b1c4c2e4fbcad021e12f7eaf80dac95631d84e8d8cab8ab5bc01c0a3f10f81116bd4591e2f37285ec01
7
- data.tar.gz: f8968bae4f7abfb7ed3f03a0dd20f63c18f6150cb34fa39767a7935d4351b4b54d03d9b2a01a4ab978f637b6b619dd94a244e410e1e45ad62ec92a98aceebd1d
6
+ metadata.gz: 472b9698483a47e942b7759d40fe27fb0da0b58007fbe998aa3e2235c870e27596c904ddf6a91e4bbd757131a5d0b73b4200c5428007fff61ed99a54c136c93a
7
+ data.tar.gz: 03f326c50c7bca637cb5c2173eed08e4983137aff76ec753239c79e985174a5911012a1b79c21678482c7affe0844322cd85f6e2d23cfd23cce849287d992d15
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.6
1
+ 2.3.3
data/.travis.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
4
- - 2.1.6
5
- - 2.2.2
3
+ - 2.2.6
4
+ - 2.3.3
6
5
  script:
7
6
  - bundle exec rspec spec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v0.5.5 (2017-01-30)
2
+
3
+ * RestClient raises errors on 401.
4
+ ([#32](https://github.com/G5/g5_authentication_client/pull/32))
5
+
1
6
  ## v0.5.4 (2016-02-25)
2
7
 
3
8
  * Add support for token `created_at` timestamp
@@ -2,8 +2,12 @@ module G5AuthenticationClient::AuthTokenHelper
2
2
  # Return response to 'yield'
3
3
  # Yield response should have a 'code' method for the http status code
4
4
  def do_with_username_pw_access_token
5
- response = yield cached_username_pw_access_token
6
- if 401 == response.code.to_i
5
+ begin
6
+ response = yield cached_username_pw_access_token
7
+ rescue RestClient::ExceptionWithResponse => e
8
+ response = e.response
9
+ end
10
+ if response.code.to_i == 401
7
11
  @cached_username_pw_access_token = nil
8
12
  response = yield cached_username_pw_access_token
9
13
  end
@@ -13,4 +17,4 @@ module G5AuthenticationClient::AuthTokenHelper
13
17
  def cached_username_pw_access_token
14
18
  @cached_username_pw_access_token ||= G5AuthenticationClient::Client.new.username_pw_access_token.token
15
19
  end
16
- end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module G5AuthenticationClient
2
- VERSION = '0.5.4'
2
+ VERSION = '0.5.5'
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,6 @@
1
1
  require 'simplecov'
2
- SimpleCov.start 'test_frameworks'
3
-
4
2
  require 'codeclimate-test-reporter'
5
- CodeClimate::TestReporter.start
3
+ SimpleCov.start 'test_frameworks'
6
4
 
7
5
  require 'rspec'
8
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: g5_authentication_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Revels
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-25 00:00:00.000000000 Z
12
+ date: 2017-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: modelish
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
249
249
  version: '0'
250
250
  requirements: []
251
251
  rubyforge_project: g5_authentication_client
252
- rubygems_version: 2.4.6
252
+ rubygems_version: 2.6.8
253
253
  signing_key:
254
254
  specification_version: 4
255
255
  summary: Client for the G5 Auth service
@@ -264,4 +264,3 @@ test_files:
264
264
  - spec/spec_helper.rb
265
265
  - spec/support/module_configured_attribute.rb
266
266
  - spec/support/oauth_protected_resource.rb
267
- has_rdoc: