bamboo-id 0.1.2 → 0.1.3

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
- SHA1:
3
- metadata.gz: c2965ada9a5a5ff58b5dc8e97e07f72b210dc3b4
4
- data.tar.gz: e8d53f891cb512ea5f6bbc86a87421a8c567b8c4
2
+ SHA256:
3
+ metadata.gz: 1191832c1502da4b328bd8d7735c267e1836c46de29ac3f1ba8c6e396c030dfe
4
+ data.tar.gz: 1b01f268eb04119a52c6bf18faa2bf28454eb3860bb714ed1f8536afe2f7e426
5
5
  SHA512:
6
- metadata.gz: 3ec2cd5c6a177f898e0944cd18f3c9a0aaa721292b5bf8a0e67c9e31be76ac7b44069566cdbbf70bda5b569e85f46332b437b716b7c8e3c814e7c9794518d994
7
- data.tar.gz: 39fa07ef73e6104bcefb9e6eacfca7a2b7fd0947c1ab21c8176876a5578869f414eac2f5848798a122ca1967164779b6eae7315b4f30c78a9b3249ee5003290f
6
+ metadata.gz: 613d6fdd7eb3a7deb332281f6be8c022120528a2ab0f7f0eef7e9e29f062994f7a78335654b197c5c02f9459723da294078e221f99e60d1137ffba13dbfa2919
7
+ data.tar.gz: 210be3bc43d5a93e81967c5d24e84192fb5730454ab4baa2906d25d2b991ad2e3a535457e207a940e9a677c5ae60695a60f5bb83f13888fc6f6a909b2e3e0646
@@ -0,0 +1,3 @@
1
+ ## 0.1.3
2
+
3
+ Handle Bamboo returning a string instead of JSON more gracefully.
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.require_paths = ["lib"]
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.14"
25
- spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "rake", ">= 12.3.3"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
27
  spec.add_development_dependency "webmock"
28
28
 
@@ -11,7 +11,13 @@ module BambooId
11
11
  private
12
12
 
13
13
  def response
14
- @response ||= OpenStruct.new(self.class.post(url.to_s, body: url.params, headers: headers))
14
+ @response ||= OpenStruct.new(http_response)
15
+ rescue NoMethodError, JSON::ParserError
16
+ OpenStruct.new(error: 'Invalid response from Bamboo. Please try again.')
17
+ end
18
+
19
+ def http_response
20
+ @http_response ||= self.class.post(url.to_s, body: url.params, headers: headers)
15
21
  end
16
22
 
17
23
  def headers
@@ -1,3 +1,3 @@
1
1
  module BambooId
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bamboo-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Evans
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-08 00:00:00.000000000 Z
11
+ date: 2020-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 12.3.3
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 12.3.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -90,6 +90,7 @@ files:
90
90
  - ".gitignore"
91
91
  - ".rspec"
92
92
  - ".travis.yml"
93
+ - CHANGELOG.md
93
94
  - CODE_OF_CONDUCT.md
94
95
  - Gemfile
95
96
  - LICENSE.txt
@@ -132,8 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
133
  - !ruby/object:Gem::Version
133
134
  version: '0'
134
135
  requirements: []
135
- rubyforge_project:
136
- rubygems_version: 2.6.11
136
+ rubygems_version: 3.0.3
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Wrapper classes around the OpenID connect process.