iron_bank 5.1.0 → 5.1.1

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: d2f3acd4487a9055c531b900c036ed447a4e927b3d252d402f17c564fa4437a6
4
- data.tar.gz: 43527d8b678d5a51fbb8e3a47b29c01e49f2eb5b465f4e4f7448e0c74d40ab26
3
+ metadata.gz: 717f79f19195a17039f32fcc0904ad38536b5fff464d70e82e1904ccae2dfae1
4
+ data.tar.gz: 5ab23d9bfc1ebfcb86a51a11f91e6c03cb5ed59cfa43970deb4c10cf03c4f5dc
5
5
  SHA512:
6
- metadata.gz: ded3330ecc633a5132bb893130099e9d87d75c40ece1375359cbfbc7e6066f3b2b6395c3bfd1176a325f657749247f70a77825ddf9e2c7165527122115293a7a
7
- data.tar.gz: 71444baba4cb57bd4d81ab1e89499fe37d2d45b4d5e0f7f57d890f3b6854ec4ea5428db7ff0d31a20f09eb6fb791c80bbb1b1b0485942f3e147b5213c9dbec20
6
+ metadata.gz: a8667f6dc6eec4fa269e7fce909615353e4afc58d472c587790abfca71d02199fcd7aa4909e75b1d7267521492a16ac5ce3dc1884b7735bc1b5edc2263da6ce3
7
+ data.tar.gz: 34dd5db61b474c445de6027c7548dfe8b735e56a595c98c1d14aea6b0b3966557eb592355972cb2a6e45379b935dba5832c3e2d4d125d248c4bfb5820e764b23
@@ -1 +1 @@
1
- * @zendesk/narwhals @zendesk/walrus
1
+ * @zendesk/billing
@@ -3,32 +3,15 @@ require: rubocop-performance
3
3
  AllCops:
4
4
  DisplayCopNames: true
5
5
  DisplayStyleGuide: true
6
+ NewCops: enable
6
7
 
7
8
  Layout/DotPosition:
8
9
  EnforcedStyle: trailing
9
10
 
10
- Layout/EmptyLinesAroundAttributeAccessor:
11
- Enabled: true
12
-
13
11
  Layout/HashAlignment:
14
12
  EnforcedHashRocketStyle: table
15
13
  EnforcedColonStyle: table
16
14
 
17
- Layout/SpaceAroundMethodCallOperator:
18
- Enabled: true
19
-
20
- Lint/DeprecatedOpenSSLConstant:
21
- Enabled: true
22
-
23
- Lint/MixedRegexpCaptureTypes:
24
- Enabled: true
25
-
26
- Lint/RaiseException:
27
- Enabled: true
28
-
29
- Lint/StructNewOverride:
30
- Enabled: true
31
-
32
15
  Lint/UselessAssignment:
33
16
  Exclude:
34
17
  - bin/console
@@ -66,30 +49,12 @@ Style/MixinUsage:
66
49
  Style/StringLiterals:
67
50
  EnforcedStyle: double_quotes
68
51
 
69
- Style/ExponentialNotation:
70
- Enabled: true
71
-
72
- Style/HashEachMethods:
73
- Enabled: true
74
-
75
- Style/HashTransformKeys:
76
- Enabled: true
77
-
78
- Style/HashTransformValues:
79
- Enabled: true
80
-
81
52
  Style/OptionalArguments:
82
53
  Exclude:
83
54
  - lib/iron_bank/local.rb
84
55
  - lib/iron_bank/queryable.rb
85
56
  - lib/iron_bank/resource.rb
86
57
 
87
- Style/RedundantRegexpCharacterClass:
88
- Enabled: true
89
-
90
- Style/RedundantRegexpEscape:
91
- Enabled: true
92
-
93
58
  Style/RegexpLiteral:
94
59
  Exclude:
95
60
  - lib/iron_bank/describe/excluded_fields.rb
@@ -97,6 +62,3 @@ Style/RegexpLiteral:
97
62
  Style/RescueStandardError:
98
63
  Exclude:
99
64
  - lib/iron_bank/csv.rb
100
-
101
- Style/SlicingWithRange:
102
- Enabled: true
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iron_bank (5.1.0)
4
+ iron_bank (5.1.1)
5
5
  faraday (~> 1)
6
6
  faraday_middleware (~> 1)
7
7
  nokogiri (~> 1)
@@ -9,38 +9,38 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (6.0.3.1)
12
+ activesupport (6.0.3.3)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
14
  i18n (>= 0.7, < 2)
15
15
  minitest (~> 5.1)
16
16
  tzinfo (~> 1.1)
17
17
  zeitwerk (~> 2.2, >= 2.2.2)
18
- ast (2.4.0)
18
+ ast (2.4.1)
19
19
  bump (0.9.0)
20
20
  byebug (11.1.3)
21
21
  coderay (1.1.3)
22
- concurrent-ruby (1.1.6)
23
- diff-lcs (1.3)
22
+ concurrent-ruby (1.1.7)
23
+ diff-lcs (1.4.4)
24
24
  docile (1.3.2)
25
- dotenv (2.7.5)
25
+ dotenv (2.7.6)
26
26
  factory_bot (5.2.0)
27
27
  activesupport (>= 4.2.0)
28
28
  faraday (1.0.1)
29
29
  multipart-post (>= 1.2, < 3)
30
30
  faraday_middleware (1.0.0)
31
31
  faraday (~> 1.0)
32
- i18n (1.8.2)
32
+ i18n (1.8.5)
33
33
  concurrent-ruby (~> 1.0)
34
34
  kwalify (0.7.2)
35
35
  method_source (1.0.0)
36
36
  mini_portile2 (2.4.0)
37
- minitest (5.14.1)
37
+ minitest (5.14.2)
38
38
  multipart-post (2.1.1)
39
39
  nokogiri (1.10.10)
40
40
  mini_portile2 (~> 2.4.0)
41
- parallel (1.19.1)
42
- parser (2.7.1.3)
43
- ast (~> 2.4.0)
41
+ parallel (1.19.2)
42
+ parser (2.7.1.5)
43
+ ast (~> 2.4.1)
44
44
  pry (0.13.1)
45
45
  coderay (~> 1.1)
46
46
  method_source (~> 1.0)
@@ -55,7 +55,7 @@ GEM
55
55
  parser (>= 2.5.0.0, < 2.8, != 2.5.1.1)
56
56
  psych (~> 3.1.0)
57
57
  rainbow (>= 2.0, < 4.0)
58
- regexp_parser (1.7.0)
58
+ regexp_parser (1.8.1)
59
59
  rexml (3.2.4)
60
60
  rspec (3.9.0)
61
61
  rspec-core (~> 3.9.0)
@@ -70,32 +70,33 @@ GEM
70
70
  diff-lcs (>= 1.2.0, < 2.0)
71
71
  rspec-support (~> 3.9.0)
72
72
  rspec-support (3.9.3)
73
- rubocop (0.85.0)
73
+ rubocop (0.92.0)
74
74
  parallel (~> 1.10)
75
- parser (>= 2.7.0.1)
75
+ parser (>= 2.7.1.5)
76
76
  rainbow (>= 2.2.2, < 4.0)
77
77
  regexp_parser (>= 1.7)
78
78
  rexml
79
- rubocop-ast (>= 0.0.3)
79
+ rubocop-ast (>= 0.5.0)
80
80
  ruby-progressbar (~> 1.7)
81
81
  unicode-display_width (>= 1.4.0, < 2.0)
82
- rubocop-ast (0.0.3)
83
- parser (>= 2.7.0.1)
84
- rubocop-performance (1.6.0)
85
- rubocop (>= 0.71.0)
82
+ rubocop-ast (0.7.1)
83
+ parser (>= 2.7.1.5)
84
+ rubocop-performance (1.8.1)
85
+ rubocop (>= 0.87.0)
86
+ rubocop-ast (>= 0.4.0)
86
87
  ruby-progressbar (1.10.1)
87
- shoulda-matchers (4.3.0)
88
+ shoulda-matchers (4.4.1)
88
89
  activesupport (>= 4.2.0)
89
- simplecov (0.18.5)
90
+ simplecov (0.19.0)
90
91
  docile (~> 1.1)
91
92
  simplecov-html (~> 0.11)
92
- simplecov-html (0.12.2)
93
+ simplecov-html (0.12.3)
93
94
  thread_safe (0.3.6)
94
95
  timecop (0.9.1)
95
96
  tzinfo (1.2.7)
96
97
  thread_safe (~> 0.1)
97
98
  unicode-display_width (1.7.0)
98
- zeitwerk (2.3.0)
99
+ zeitwerk (2.4.0)
99
100
 
100
101
  PLATFORMS
101
102
  ruby
@@ -24,6 +24,8 @@ module IronBank
24
24
  def initialize(zoql, limit)
25
25
  @zoql = zoql
26
26
  @limit = limit
27
+
28
+ super(zoql: zoql, limit: limit)
27
29
  end
28
30
 
29
31
  def params
@@ -12,7 +12,7 @@ module IronBank
12
12
  :resource_name,
13
13
  IronBank::Utils.camelize(name)
14
14
  )
15
- foreign_key = options.fetch(:foreign_key, name.to_s + "_id")
15
+ foreign_key = options.fetch(:foreign_key, "#{name}_id")
16
16
 
17
17
  define_method(name) do
18
18
  return unless (foreign_key_value = public_send(foreign_key))
@@ -37,7 +37,7 @@ module IronBank
37
37
 
38
38
  foreign_key = options.fetch(
39
39
  :foreign_key,
40
- IronBank::Utils.underscore(object_name) + "_id"
40
+ "#{IronBank::Utils.underscore(object_name)}_id"
41
41
  )
42
42
 
43
43
  define_method(name) do
@@ -87,7 +87,7 @@ module IronBank
87
87
  info "Successful query for #{object_name}"
88
88
 
89
89
  true
90
- rescue IronBank::InternalServerError => e
90
+ rescue IronBank::InternalServerError, IronBank::BadRequestError => e
91
91
  @last_failed_fields = extract_fields_from_exception(e)
92
92
 
93
93
  false
@@ -8,11 +8,11 @@ module IronBank
8
8
  store[id] || super
9
9
  end
10
10
 
11
- def find_each
11
+ def find_each(&block)
12
12
  return enum_for(:find_each) unless block_given?
13
13
 
14
14
  values = store.values
15
- values.any? ? values.each { |record| yield record } : super
15
+ values.any? ? values.each(&block) : super
16
16
  end
17
17
 
18
18
  def all
@@ -14,7 +14,7 @@ module IronBank
14
14
 
15
15
  def_delegators :@logger, :debug, :info, :warn, :error, :fatal
16
16
 
17
- def initialize(logger: ::Logger.new(STDOUT), level: LEVEL)
17
+ def initialize(logger: ::Logger.new($stdout), level: LEVEL)
18
18
  @logger = logger
19
19
  @logger.progname = PROGNAME
20
20
  @logger.level = level
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IronBank
4
- VERSION = "5.1.0"
4
+ VERSION = "5.1.1"
5
5
  API_VERSION = "v1"
6
6
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickael Pham
8
8
  - Cheng Cui
9
9
  - Ryan Ringler
10
10
  - Mustafa Turan
11
- autorequire:
11
+ autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2020-09-26 00:00:00.000000000 Z
14
+ date: 2020-09-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bump
@@ -237,7 +237,7 @@ dependencies:
237
237
  - - "~>"
238
238
  - !ruby/object:Gem::Version
239
239
  version: '1'
240
- description:
240
+ description:
241
241
  email:
242
242
  - mickael@zendesk.com
243
243
  - ccui@zendesk.com
@@ -337,7 +337,7 @@ homepage: https://github.com/zendesk/iron_bank
337
337
  licenses:
338
338
  - Apache-2.0
339
339
  metadata: {}
340
- post_install_message:
340
+ post_install_message:
341
341
  rdoc_options: []
342
342
  require_paths:
343
343
  - lib
@@ -353,7 +353,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
353
353
  version: '0'
354
354
  requirements: []
355
355
  rubygems_version: 3.1.3
356
- signing_key:
356
+ signing_key:
357
357
  specification_version: 4
358
358
  summary: An opinionated Ruby interface to the Zuora API.
359
359
  test_files: []