Skip to content

Commit 08fa8b4

Browse files
committed
Fix offenses exposed by RuboCop 1.87 and keep ~> 1.80 version pin
1 parent 79db808 commit 08fa8b4

5 files changed

Lines changed: 171 additions & 14 deletions

File tree

.rubocop_todo.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
3-
# using RuboCop version 1.80.2.
3+
# using RuboCop version 1.87.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -161,7 +161,7 @@ Naming/MethodParameterName:
161161
# Offense count: 2
162162
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
163163
# AllowedMethods: call
164-
# WaywardPredicates: nonzero?
164+
# WaywardPredicates: infinite?, nonzero?
165165
Naming/PredicateMethod:
166166
Exclude:
167167
- 'lib/xeroizer/models/invoice.rb'
@@ -345,7 +345,7 @@ Style/ZeroLengthPredicate:
345345

346346
# Offense count: 23
347347
# This cop supports safe autocorrection (--autocorrect).
348-
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
348+
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
349349
# URISchemes: http, https
350350
Layout/LineLength:
351351
Max: 380

Gemfile.lock

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
PATH
2+
remote: .
3+
specs:
4+
xeroizer (3.0.1)
5+
activesupport (>= 7.0)
6+
builder (>= 2.1.2)
7+
i18n
8+
nokogiri
9+
oauth2 (>= 2.0, < 3.0)
10+
tzinfo
11+
12+
GEM
13+
remote: https://rubygems.org/
14+
specs:
15+
activesupport (7.2.3.1)
16+
base64
17+
benchmark (>= 0.3)
18+
bigdecimal
19+
concurrent-ruby (~> 1.0, >= 1.3.1)
20+
connection_pool (>= 2.2.5)
21+
drb
22+
i18n (>= 1.6, < 2)
23+
logger (>= 1.4.2)
24+
minitest (>= 5.1, < 6)
25+
securerandom (>= 0.3)
26+
tzinfo (~> 2.0, >= 2.0.5)
27+
addressable (2.9.0)
28+
public_suffix (>= 2.0.2, < 8.0)
29+
ast (2.4.3)
30+
auth-sanitizer (0.2.1)
31+
version_gem (~> 1.1, >= 1.1.10)
32+
base64 (0.3.0)
33+
benchmark (0.5.0)
34+
bigdecimal (4.1.2)
35+
builder (3.3.0)
36+
cgi (0.5.1)
37+
concurrent-ruby (1.3.6)
38+
connection_pool (2.5.5)
39+
crack (1.0.1)
40+
bigdecimal
41+
rexml
42+
date (3.5.1)
43+
drb (2.2.3)
44+
erb (4.0.4.1)
45+
cgi (>= 0.3.3)
46+
faraday (2.14.2)
47+
faraday-net_http (>= 2.0, < 3.5)
48+
json
49+
logger
50+
faraday-net_http (3.4.4)
51+
net-http (~> 0.5)
52+
hashdiff (1.2.1)
53+
hashie (5.1.0)
54+
logger
55+
i18n (1.14.8)
56+
concurrent-ruby (~> 1.0)
57+
json (2.19.8)
58+
jwt (3.2.0)
59+
base64
60+
language_server-protocol (3.17.0.5)
61+
lint_roller (1.1.0)
62+
logger (1.7.0)
63+
minitest (5.27.0)
64+
mocha (3.1.0)
65+
ruby2_keywords (>= 0.0.5)
66+
multi_xml (0.6.0)
67+
net-http (0.9.1)
68+
uri (>= 0.11.1)
69+
nokogiri (1.18.10-arm64-darwin)
70+
racc (~> 1.4)
71+
oauth2 (2.0.22)
72+
auth-sanitizer (~> 0.2, >= 0.2.1)
73+
faraday (>= 0.17.3, < 4.0)
74+
jwt (>= 1.0, < 4.0)
75+
logger (~> 1.2)
76+
multi_xml (~> 0.5)
77+
rack (>= 1.2, < 4)
78+
snaky_hash (~> 2.0, >= 2.0.5)
79+
version_gem (~> 1.1, >= 1.1.11)
80+
parallel (2.1.0)
81+
parser (3.3.11.1)
82+
ast (~> 2.4.1)
83+
racc
84+
prism (1.9.0)
85+
psych (5.4.0)
86+
date
87+
stringio
88+
public_suffix (6.0.2)
89+
racc (1.8.1)
90+
rack (3.2.6)
91+
rainbow (3.1.1)
92+
rake (13.4.2)
93+
rdoc (7.2.0)
94+
erb
95+
psych (>= 4.0.0)
96+
tsort
97+
redcarpet (3.6.1)
98+
regexp_parser (2.12.0)
99+
rexml (3.4.4)
100+
rubocop (1.87.0)
101+
json (~> 2.3)
102+
language_server-protocol (~> 3.17.0.2)
103+
lint_roller (~> 1.1.0)
104+
parallel (>= 1.10)
105+
parser (>= 3.3.0.2)
106+
rainbow (>= 2.2.2, < 4.0)
107+
regexp_parser (>= 2.9.3, < 3.0)
108+
rubocop-ast (>= 1.49.0, < 2.0)
109+
ruby-progressbar (~> 1.7)
110+
unicode-display_width (>= 2.4.0, < 4.0)
111+
rubocop-ast (1.49.1)
112+
parser (>= 3.3.7.2)
113+
prism (~> 1.7)
114+
ruby-progressbar (1.13.0)
115+
ruby2_keywords (0.0.5)
116+
securerandom (0.4.1)
117+
shoulda-context (2.0.0)
118+
snaky_hash (2.0.5)
119+
hashie (>= 0.1.0, < 6)
120+
version_gem (>= 1.1.8, < 3)
121+
stringio (3.2.0)
122+
tsort (0.2.0)
123+
tzinfo (2.0.6)
124+
concurrent-ruby (~> 1.0)
125+
unicode-display_width (3.2.0)
126+
unicode-emoji (~> 4.1)
127+
unicode-emoji (4.2.0)
128+
uri (1.1.1)
129+
vcr (6.4.0)
130+
version_gem (1.1.11)
131+
webmock (3.26.2)
132+
addressable (>= 2.8.0)
133+
crack (>= 0.3.2)
134+
hashdiff (>= 0.4.0, < 2.0.0)
135+
yard (0.9.44)
136+
137+
PLATFORMS
138+
arm64-darwin
139+
140+
DEPENDENCIES
141+
bundler
142+
minitest
143+
mocha
144+
rake
145+
rdoc
146+
redcarpet
147+
rubocop (~> 1.80)
148+
shoulda-context (~> 2.0)
149+
vcr
150+
webmock
151+
xeroizer!
152+
yard
153+
154+
BUNDLED WITH
155+
2.6.9

lib/xeroizer/record/model_definition_helper.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ def define_simple_attribute(field_name, field_type, options, value_if_nil = nil)
6262
self.fields ||= {}
6363

6464
internal_field_name = options[:internal_name] || field_name
65-
self.fields[field_name] = options.merge({
66-
internal_name: internal_field_name,
67-
api_name: options[:api_name] || field_name.to_s.camelize,
68-
type: field_type
69-
})
65+
fields[field_name] = options.merge({
66+
internal_name: internal_field_name,
67+
api_name: options[:api_name] || field_name.to_s.camelize,
68+
type: field_type
69+
})
7070
define_method internal_field_name do
7171
@attributes[field_name].nil? ? value_if_nil : @attributes[field_name]
7272
end

lib/xeroizer/record/validation_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def validates_with_validator(validator, args)
1919

2020
self.validators ||= []
2121
args.flatten.each do |attribute|
22-
self.validators << validator.new(attribute, options)
22+
validators << validator.new(attribute, options)
2323
end
2424
end
2525

test/integration/bank_transaction_reference_data.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ def new_bank_transaction
1616
type: 'SPEND',
1717
contact: { name: 'Jazz Kang' },
1818
line_items: [
19-
description: 'Bike shorts made of clear, unbreathable material',
20-
quantity: 1,
21-
unit_amount: 39.99,
22-
account_code: account.code,
23-
tax_type: account.tax_type
19+
{
20+
description: 'Bike shorts made of clear, unbreathable material',
21+
quantity: 1,
22+
unit_amount: 39.99,
23+
account_code: account.code,
24+
tax_type: account.tax_type
25+
}
2426
],
2527
bank_account: { account_id: bank_account.account_id },
2628
reference: 'BTF323'

0 commit comments

Comments
 (0)