iron_bank 5.1.1 → 5.2.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
2
  SHA256:
3
- metadata.gz: 717f79f19195a17039f32fcc0904ad38536b5fff464d70e82e1904ccae2dfae1
4
- data.tar.gz: 5ab23d9bfc1ebfcb86a51a11f91e6c03cb5ed59cfa43970deb4c10cf03c4f5dc
3
+ metadata.gz: 14e87c406e0f4ae3a6f3c1de8b84039a5d48ccf0ee8a1d208839fc9181160d36
4
+ data.tar.gz: 6b6d4418d571a17bb38a5fd551eaf6f7de5763a5a918e6c933d8e6bca8b20a8b
5
5
  SHA512:
6
- metadata.gz: a8667f6dc6eec4fa269e7fce909615353e4afc58d472c587790abfca71d02199fcd7aa4909e75b1d7267521492a16ac5ce3dc1884b7735bc1b5edc2263da6ce3
7
- data.tar.gz: 34dd5db61b474c445de6027c7548dfe8b735e56a595c98c1d14aea6b0b3966557eb592355972cb2a6e45379b935dba5832c3e2d4d125d248c4bfb5820e764b23
6
+ metadata.gz: 1afbd350670d0709e6bcf6b84a33ba1a37525e9254de39dd6efb2af4f2793d467f61e0f175006e246b41f6130784abb67a89112a132d8132b98cfb003c9c4afb
7
+ data.tar.gz: a196e9dcc5c18d3130df47715efa357b400500b9e0a7bbdca4a279642ae99f45f29c169be258b77c1c50f384525bb66fcdee966d0beb036ea6611fffd2c8bbb5
@@ -18,6 +18,7 @@ jobs:
18
18
  - 2.5
19
19
  - 2.6
20
20
  - 2.7
21
+ - 3.0
21
22
 
22
23
  runs-on: ubuntu-latest
23
24
 
data/.rubocop.yml CHANGED
@@ -4,6 +4,7 @@ AllCops:
4
4
  DisplayCopNames: true
5
5
  DisplayStyleGuide: true
6
6
  NewCops: enable
7
+ SuggestExtensions: false
7
8
 
8
9
  Layout/DotPosition:
9
10
  EnforcedStyle: trailing
@@ -12,6 +13,10 @@ Layout/HashAlignment:
12
13
  EnforcedHashRocketStyle: table
13
14
  EnforcedColonStyle: table
14
15
 
16
+ Lint/EmptyBlock:
17
+ Exclude:
18
+ - spec/**/*.rb
19
+
15
20
  Lint/UselessAssignment:
16
21
  Exclude:
17
22
  - bin/console
data/Gemfile CHANGED
@@ -4,3 +4,17 @@ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in zuora.gemspec
6
6
  gemspec
7
+
8
+ gem "bump", "~> 0.5"
9
+ gem "bundler", "~> 2.0"
10
+ gem "dotenv", "~> 2.2"
11
+ gem "factory_bot", "~> 6.0"
12
+ gem "pry-byebug", "~> 3.4"
13
+ gem "rake", "~> 13.0"
14
+ gem "reek", "~> 6.0"
15
+ gem "rspec", "~> 3.0"
16
+ gem "rubocop", "~> 1.0"
17
+ gem "rubocop-performance", "~> 1.0"
18
+ gem "shoulda-matchers", "~> 4.0"
19
+ gem "simplecov", "~> 0.15"
20
+ gem "timecop", "~> 0.9"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iron_bank (5.1.1)
4
+ iron_bank (5.2.0)
5
5
  faraday (~> 1)
6
6
  faraday_middleware (~> 1)
7
7
  nokogiri (~> 1)
@@ -9,37 +9,41 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (6.0.3.3)
12
+ activesupport (6.1.1)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
- i18n (>= 0.7, < 2)
15
- minitest (~> 5.1)
16
- tzinfo (~> 1.1)
17
- zeitwerk (~> 2.2, >= 2.2.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ zeitwerk (~> 2.3)
18
18
  ast (2.4.1)
19
- bump (0.9.0)
19
+ bump (0.10.0)
20
20
  byebug (11.1.3)
21
21
  coderay (1.1.3)
22
22
  concurrent-ruby (1.1.7)
23
23
  diff-lcs (1.4.4)
24
- docile (1.3.2)
24
+ docile (1.3.4)
25
25
  dotenv (2.7.6)
26
- factory_bot (5.2.0)
27
- activesupport (>= 4.2.0)
28
- faraday (1.0.1)
26
+ factory_bot (6.1.0)
27
+ activesupport (>= 5.0.0)
28
+ faraday (1.3.0)
29
+ faraday-net_http (~> 1.0)
29
30
  multipart-post (>= 1.2, < 3)
31
+ ruby2_keywords
32
+ faraday-net_http (1.0.1)
30
33
  faraday_middleware (1.0.0)
31
34
  faraday (~> 1.0)
32
- i18n (1.8.5)
35
+ i18n (1.8.7)
33
36
  concurrent-ruby (~> 1.0)
34
37
  kwalify (0.7.2)
35
38
  method_source (1.0.0)
36
- mini_portile2 (2.4.0)
37
- minitest (5.14.2)
39
+ mini_portile2 (2.5.0)
40
+ minitest (5.14.3)
38
41
  multipart-post (2.1.1)
39
- nokogiri (1.10.10)
40
- mini_portile2 (~> 2.4.0)
41
- parallel (1.19.2)
42
- parser (2.7.1.5)
42
+ nokogiri (1.11.1)
43
+ mini_portile2 (~> 2.5.0)
44
+ racc (~> 1.4)
45
+ parallel (1.20.1)
46
+ parser (3.0.0.0)
43
47
  ast (~> 2.4.1)
44
48
  pry (0.13.1)
45
49
  coderay (~> 1.1)
@@ -47,56 +51,59 @@ GEM
47
51
  pry-byebug (3.9.0)
48
52
  byebug (~> 11.0)
49
53
  pry (~> 0.13.0)
50
- psych (3.1.0)
54
+ psych (3.3.0)
55
+ racc (1.5.2)
51
56
  rainbow (3.0.0)
52
- rake (13.0.1)
53
- reek (6.0.1)
57
+ rake (13.0.3)
58
+ reek (6.0.3)
54
59
  kwalify (~> 0.7.0)
55
- parser (>= 2.5.0.0, < 2.8, != 2.5.1.1)
56
- psych (~> 3.1.0)
60
+ parser (~> 3.0.0)
61
+ psych (~> 3.1)
57
62
  rainbow (>= 2.0, < 4.0)
58
- regexp_parser (1.8.1)
63
+ regexp_parser (2.0.3)
59
64
  rexml (3.2.4)
60
- rspec (3.9.0)
61
- rspec-core (~> 3.9.0)
62
- rspec-expectations (~> 3.9.0)
63
- rspec-mocks (~> 3.9.0)
64
- rspec-core (3.9.2)
65
- rspec-support (~> 3.9.3)
66
- rspec-expectations (3.9.2)
65
+ rspec (3.10.0)
66
+ rspec-core (~> 3.10.0)
67
+ rspec-expectations (~> 3.10.0)
68
+ rspec-mocks (~> 3.10.0)
69
+ rspec-core (3.10.1)
70
+ rspec-support (~> 3.10.0)
71
+ rspec-expectations (3.10.1)
67
72
  diff-lcs (>= 1.2.0, < 2.0)
68
- rspec-support (~> 3.9.0)
69
- rspec-mocks (3.9.1)
73
+ rspec-support (~> 3.10.0)
74
+ rspec-mocks (3.10.1)
70
75
  diff-lcs (>= 1.2.0, < 2.0)
71
- rspec-support (~> 3.9.0)
72
- rspec-support (3.9.3)
73
- rubocop (0.92.0)
76
+ rspec-support (~> 3.10.0)
77
+ rspec-support (3.10.1)
78
+ rubocop (1.8.1)
74
79
  parallel (~> 1.10)
75
- parser (>= 2.7.1.5)
80
+ parser (>= 3.0.0.0)
76
81
  rainbow (>= 2.2.2, < 4.0)
77
- regexp_parser (>= 1.7)
82
+ regexp_parser (>= 1.8, < 3.0)
78
83
  rexml
79
- rubocop-ast (>= 0.5.0)
84
+ rubocop-ast (>= 1.2.0, < 2.0)
80
85
  ruby-progressbar (~> 1.7)
81
- unicode-display_width (>= 1.4.0, < 2.0)
82
- rubocop-ast (0.7.1)
86
+ unicode-display_width (>= 1.4.0, < 3.0)
87
+ rubocop-ast (1.4.0)
83
88
  parser (>= 2.7.1.5)
84
- rubocop-performance (1.8.1)
85
- rubocop (>= 0.87.0)
89
+ rubocop-performance (1.9.2)
90
+ rubocop (>= 0.90.0, < 2.0)
86
91
  rubocop-ast (>= 0.4.0)
87
- ruby-progressbar (1.10.1)
88
- shoulda-matchers (4.4.1)
92
+ ruby-progressbar (1.11.0)
93
+ ruby2_keywords (0.0.4)
94
+ shoulda-matchers (4.5.0)
89
95
  activesupport (>= 4.2.0)
90
- simplecov (0.19.0)
96
+ simplecov (0.21.2)
91
97
  docile (~> 1.1)
92
98
  simplecov-html (~> 0.11)
99
+ simplecov_json_formatter (~> 0.1)
93
100
  simplecov-html (0.12.3)
94
- thread_safe (0.3.6)
95
- timecop (0.9.1)
96
- tzinfo (1.2.7)
97
- thread_safe (~> 0.1)
98
- unicode-display_width (1.7.0)
99
- zeitwerk (2.4.0)
101
+ simplecov_json_formatter (0.1.2)
102
+ timecop (0.9.2)
103
+ tzinfo (2.0.4)
104
+ concurrent-ruby (~> 1.0)
105
+ unicode-display_width (2.0.0)
106
+ zeitwerk (2.4.2)
100
107
 
101
108
  PLATFORMS
102
109
  ruby
@@ -105,17 +112,17 @@ DEPENDENCIES
105
112
  bump (~> 0.5)
106
113
  bundler (~> 2.0)
107
114
  dotenv (~> 2.2)
108
- factory_bot (~> 5.0)
115
+ factory_bot (~> 6.0)
109
116
  iron_bank!
110
117
  pry-byebug (~> 3.4)
111
118
  rake (~> 13.0)
112
119
  reek (~> 6.0)
113
120
  rspec (~> 3.0)
114
- rubocop (~> 0.67)
121
+ rubocop (~> 1.0)
115
122
  rubocop-performance (~> 1.0)
116
123
  shoulda-matchers (~> 4.0)
117
124
  simplecov (~> 0.15)
118
125
  timecop (~> 0.9)
119
126
 
120
127
  BUNDLED WITH
121
- 2.1.4
128
+ 2.2.6
data/iron_bank.gemspec CHANGED
@@ -29,21 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_development_dependency "bump", "~> 0.5"
33
- spec.add_development_dependency "bundler", "~> 2.0"
34
- spec.add_development_dependency "dotenv", "~> 2.2"
35
- spec.add_development_dependency "factory_bot", "~> 5.0"
36
- spec.add_development_dependency "pry-byebug", "~> 3.4"
37
- spec.add_development_dependency "rake", "~> 13.0"
38
- spec.add_development_dependency "reek", "~> 6.0"
39
- spec.add_development_dependency "rspec", "~> 3.0"
40
- spec.add_development_dependency "rubocop", "~> 0.67"
41
- spec.add_development_dependency "rubocop-performance", "~> 1.0"
42
- spec.add_development_dependency "shoulda-matchers", "~> 4.0"
43
- spec.add_development_dependency "simplecov", "~> 0.15"
44
- spec.add_development_dependency "timecop", "~> 0.9"
45
-
46
- spec.add_runtime_dependency "faraday", "~> 1"
47
- spec.add_runtime_dependency "faraday_middleware", "~> 1"
48
- spec.add_runtime_dependency "nokogiri", "~> 1"
32
+ spec.add_dependency "faraday", "~> 1"
33
+ spec.add_dependency "faraday_middleware", "~> 1"
34
+ spec.add_dependency "nokogiri", "~> 1"
49
35
  end
data/lib/iron_bank.rb CHANGED
@@ -60,7 +60,9 @@ require "iron_bank/faraday_middleware/response/raise_error"
60
60
  require "iron_bank/faraday_middleware/response/renew_auth"
61
61
 
62
62
  # Use default configuration
63
+ # rubocop:disable Lint/EmptyBlock
63
64
  IronBank.configure {}
65
+ # rubocop:enable Lint/EmptyBlock
64
66
 
65
67
  # Actions
66
68
  require "iron_bank/action"
@@ -40,9 +40,11 @@ module IronBank
40
40
 
41
41
  def response_object
42
42
  @response_object ||= begin
43
- return {} unless body.is_a?(Array)
44
-
45
- ::IronBank::Object.new(body.first).deep_underscore
43
+ if body.is_a?(Array)
44
+ ::IronBank::Object.new(body.first).deep_underscore
45
+ else
46
+ {}
47
+ end
46
48
  end
47
49
  end
48
50
 
@@ -82,7 +82,7 @@ module IronBank
82
82
  def valid_query?
83
83
  # Querying using the ID (which is an indexed field) should return an
84
84
  # empty collection very quickly when successful
85
- object.where(id: INVALID_OBJECT_ID)
85
+ object.where({ id: INVALID_OBJECT_ID })
86
86
 
87
87
  info "Successful query for #{object_name}"
88
88
 
@@ -9,8 +9,6 @@ module IronBank
9
9
  # This class raises an exception based on the HTTP status code and the
10
10
  # `success` flag (if present in the response) from Zuora.
11
11
  class RaiseError < Faraday::Response::Middleware
12
- private
13
-
14
12
  def on_complete(env)
15
13
  (error = IronBank::Error.from_response(env.response)) && raise(error)
16
14
  end
@@ -9,7 +9,7 @@ module IronBank
9
9
  end
10
10
 
11
11
  def find_each(&block)
12
- return enum_for(:find_each) unless block_given?
12
+ return enum_for(:find_each) unless block
13
13
 
14
14
  values = store.values
15
15
  values.any? ? values.each(&block) : super
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IronBank
4
- VERSION = "5.1.1"
4
+ VERSION = "5.2.0"
5
5
  API_VERSION = "v1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.1
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickael Pham
@@ -11,190 +11,8 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2020-09-29 00:00:00.000000000 Z
14
+ date: 2021-03-03 00:00:00.000000000 Z
15
15
  dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: bump
18
- requirement: !ruby/object:Gem::Requirement
19
- requirements:
20
- - - "~>"
21
- - !ruby/object:Gem::Version
22
- version: '0.5'
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '0.5'
30
- - !ruby/object:Gem::Dependency
31
- name: bundler
32
- requirement: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - "~>"
35
- - !ruby/object:Gem::Version
36
- version: '2.0'
37
- type: :development
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '2.0'
44
- - !ruby/object:Gem::Dependency
45
- name: dotenv
46
- requirement: !ruby/object:Gem::Requirement
47
- requirements:
48
- - - "~>"
49
- - !ruby/object:Gem::Version
50
- version: '2.2'
51
- type: :development
52
- prerelease: false
53
- version_requirements: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - "~>"
56
- - !ruby/object:Gem::Version
57
- version: '2.2'
58
- - !ruby/object:Gem::Dependency
59
- name: factory_bot
60
- requirement: !ruby/object:Gem::Requirement
61
- requirements:
62
- - - "~>"
63
- - !ruby/object:Gem::Version
64
- version: '5.0'
65
- type: :development
66
- prerelease: false
67
- version_requirements: !ruby/object:Gem::Requirement
68
- requirements:
69
- - - "~>"
70
- - !ruby/object:Gem::Version
71
- version: '5.0'
72
- - !ruby/object:Gem::Dependency
73
- name: pry-byebug
74
- requirement: !ruby/object:Gem::Requirement
75
- requirements:
76
- - - "~>"
77
- - !ruby/object:Gem::Version
78
- version: '3.4'
79
- type: :development
80
- prerelease: false
81
- version_requirements: !ruby/object:Gem::Requirement
82
- requirements:
83
- - - "~>"
84
- - !ruby/object:Gem::Version
85
- version: '3.4'
86
- - !ruby/object:Gem::Dependency
87
- name: rake
88
- requirement: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - "~>"
91
- - !ruby/object:Gem::Version
92
- version: '13.0'
93
- type: :development
94
- prerelease: false
95
- version_requirements: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - "~>"
98
- - !ruby/object:Gem::Version
99
- version: '13.0'
100
- - !ruby/object:Gem::Dependency
101
- name: reek
102
- requirement: !ruby/object:Gem::Requirement
103
- requirements:
104
- - - "~>"
105
- - !ruby/object:Gem::Version
106
- version: '6.0'
107
- type: :development
108
- prerelease: false
109
- version_requirements: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - "~>"
112
- - !ruby/object:Gem::Version
113
- version: '6.0'
114
- - !ruby/object:Gem::Dependency
115
- name: rspec
116
- requirement: !ruby/object:Gem::Requirement
117
- requirements:
118
- - - "~>"
119
- - !ruby/object:Gem::Version
120
- version: '3.0'
121
- type: :development
122
- prerelease: false
123
- version_requirements: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - "~>"
126
- - !ruby/object:Gem::Version
127
- version: '3.0'
128
- - !ruby/object:Gem::Dependency
129
- name: rubocop
130
- requirement: !ruby/object:Gem::Requirement
131
- requirements:
132
- - - "~>"
133
- - !ruby/object:Gem::Version
134
- version: '0.67'
135
- type: :development
136
- prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
138
- requirements:
139
- - - "~>"
140
- - !ruby/object:Gem::Version
141
- version: '0.67'
142
- - !ruby/object:Gem::Dependency
143
- name: rubocop-performance
144
- requirement: !ruby/object:Gem::Requirement
145
- requirements:
146
- - - "~>"
147
- - !ruby/object:Gem::Version
148
- version: '1.0'
149
- type: :development
150
- prerelease: false
151
- version_requirements: !ruby/object:Gem::Requirement
152
- requirements:
153
- - - "~>"
154
- - !ruby/object:Gem::Version
155
- version: '1.0'
156
- - !ruby/object:Gem::Dependency
157
- name: shoulda-matchers
158
- requirement: !ruby/object:Gem::Requirement
159
- requirements:
160
- - - "~>"
161
- - !ruby/object:Gem::Version
162
- version: '4.0'
163
- type: :development
164
- prerelease: false
165
- version_requirements: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - "~>"
168
- - !ruby/object:Gem::Version
169
- version: '4.0'
170
- - !ruby/object:Gem::Dependency
171
- name: simplecov
172
- requirement: !ruby/object:Gem::Requirement
173
- requirements:
174
- - - "~>"
175
- - !ruby/object:Gem::Version
176
- version: '0.15'
177
- type: :development
178
- prerelease: false
179
- version_requirements: !ruby/object:Gem::Requirement
180
- requirements:
181
- - - "~>"
182
- - !ruby/object:Gem::Version
183
- version: '0.15'
184
- - !ruby/object:Gem::Dependency
185
- name: timecop
186
- requirement: !ruby/object:Gem::Requirement
187
- requirements:
188
- - - "~>"
189
- - !ruby/object:Gem::Version
190
- version: '0.9'
191
- type: :development
192
- prerelease: false
193
- version_requirements: !ruby/object:Gem::Requirement
194
- requirements:
195
- - - "~>"
196
- - !ruby/object:Gem::Version
197
- version: '0.9'
198
16
  - !ruby/object:Gem::Dependency
199
17
  name: faraday
200
18
  requirement: !ruby/object:Gem::Requirement
@@ -352,7 +170,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
352
170
  - !ruby/object:Gem::Version
353
171
  version: '0'
354
172
  requirements: []
355
- rubygems_version: 3.1.3
173
+ rubyforge_project:
174
+ rubygems_version: 2.7.6.2
356
175
  signing_key:
357
176
  specification_version: 4
358
177
  summary: An opinionated Ruby interface to the Zuora API.