Skip to content

Commit b5bd5fa

Browse files
committed
Merge with upstream activemerchant master
2 parents b06262b + 5bd880f commit b5bd5fa

File tree

814 files changed

+164365
-34388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

814 files changed

+164365
-34388
lines changed

.github/workflows/ruby-ci.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
name: Ruby ${{ matrix.version }} ${{ matrix.gemfile }}
14+
runs-on: ubuntu-latest
15+
env:
16+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
17+
strategy:
18+
matrix:
19+
version:
20+
- 3.1
21+
gemfile:
22+
- gemfiles/Gemfile.rails50
23+
- gemfiles/Gemfile.rails51
24+
- gemfiles/Gemfile.rails52
25+
- gemfiles/Gemfile.rails60
26+
- gemfiles/Gemfile.rails_master
27+
exclude:
28+
- version: 2.6
29+
gemfile: gemfiles/Gemfile.rails_master
30+
- version: 2.5
31+
gemfile: gemfiles/Gemfile.rails_master
32+
steps:
33+
- uses: actions/checkout@v2
34+
35+
- name: Set up Ruby ${{ matrix.version }}
36+
uses: ruby/setup-ruby@v1
37+
with:
38+
ruby-version: ${{ matrix.version }}
39+
bundler-cache: true
40+
41+
- name: Test
42+
run: bundle exec rake test
43+
- name: Linter
44+
run: bundle exec rubocop

.github/workflows/stale.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *'
5+
6+
permissions:
7+
issues: write
8+
pull-requests: write
9+
10+
jobs:
11+
stale:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/stale@v8
15+
with:
16+
stale-issue-message: 'To provide a cleaner slate for the maintenance of the library, this PR/Issue is being labeled stale after 60 days without activity. It will be closed in 14 days unless you comment with an update regarding its applicability to the current build. Thank you!'
17+
stale-pr-message: 'To provide a cleaner slate for the maintenance of the library, this PR/Issue is being labeled stale after 60 days without activity. It will be closed in 14 days unless you comment with an update regarding its applicability to the current build. Thank you!'
18+
days-before-close: 14
19+
exempt-draft-pr: true

.rubocop.yml

+104-1
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,114 @@ AllCops:
1515
- "lib/active_merchant/billing/gateways/paypal_express.rb"
1616
- "vendor/**/*"
1717
ExtraDetails: false
18-
TargetRubyVersion: 2.3
18+
TargetRubyVersion: 3.1
1919

2020
# Active Merchant gateways are not amenable to length restrictions
2121
Metrics/ClassLength:
2222
Enabled: false
2323

2424
Metrics/ModuleLength:
2525
Enabled: false
26+
27+
Layout/ParameterAlignment:
28+
EnforcedStyle: with_fixed_indentation
29+
30+
Layout/DotPosition:
31+
EnforcedStyle: trailing
32+
33+
Layout/CaseIndentation:
34+
EnforcedStyle: end
35+
36+
Layout/FirstHashElementIndentation:
37+
EnforcedStyle: consistent
38+
39+
Naming/PredicateName:
40+
Exclude:
41+
- "lib/active_merchant/billing/gateways/payeezy.rb"
42+
- 'lib/active_merchant/billing/gateways/airwallex.rb'
43+
44+
Gemspec/DateAssignment: # (new in 1.10)
45+
Enabled: true
46+
Layout/SpaceBeforeBrackets: # (new in 1.7)
47+
Enabled: true
48+
Lint/AmbiguousAssignment: # (new in 1.7)
49+
Enabled: true
50+
Lint/DeprecatedConstants: # (new in 1.8)
51+
Enabled: true # update later in next Update Rubocop PR
52+
Lint/DuplicateBranch: # (new in 1.3)
53+
Enabled: false
54+
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
55+
Enabled: true
56+
Lint/EmptyBlock: # (new in 1.1)
57+
Enabled: false # update later in next Update Rubocop PR
58+
Exclude:
59+
- 'lib/active_merchant/billing/gateways/authorize_net.rb'
60+
- 'lib/active_merchant/billing/gateways/secure_net.rb'
61+
Lint/EmptyClass: # (new in 1.3)
62+
Enabled: true
63+
Lint/FloatComparison:
64+
Exclude:
65+
- 'lib/active_merchant/billing/gateways/payu_latam.rb'
66+
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
67+
Enabled: true
68+
Lint/NonDeterministicRequireOrder:
69+
Exclude:
70+
- 'script/generate'
71+
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
72+
Enabled: true
73+
Exclude:
74+
- 'lib/active_merchant/billing/gateways/fat_zebra.rb'
75+
- 'lib/active_merchant/billing/gateways/netbanx.rb'
76+
- 'lib/active_merchant/billing/gateways/payway_dot_com.rb'
77+
Lint/NumberedParameterAssignment: # (new in 1.9)
78+
Enabled: true
79+
Lint/OrAssignmentToConstant: # (new in 1.9)
80+
Enabled: true
81+
Lint/RedundantDirGlobSort: # (new in 1.8)
82+
Enabled: true
83+
Lint/SymbolConversion: # (new in 1.9)
84+
Enabled: true
85+
Lint/ToEnumArguments: # (new in 1.1)
86+
Enabled: true
87+
Lint/TripleQuotes: # (new in 1.9)
88+
Enabled: true
89+
Lint/UnexpectedBlockArity: # (new in 1.5)
90+
Enabled: true
91+
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
92+
Enabled: true
93+
Style/ArgumentsForwarding: # (new in 1.1)
94+
Enabled: true
95+
Style/CollectionCompact: # (new in 1.2)
96+
Enabled: false # update later in next Update Rubocop PR
97+
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
98+
Enabled: true
99+
Exclude:
100+
- 'lib/active_merchant/billing/credit_card.rb'
101+
- 'lib/active_merchant/billing/response.rb'
102+
Style/EndlessMethod: # (new in 1.8)
103+
Enabled: true
104+
Style/HashConversion: # (new in 1.10)
105+
Enabled: true
106+
Exclude:
107+
- 'lib/active_merchant/billing/gateways/payscout.rb'
108+
- 'lib/active_merchant/billing/gateways/pac_net_raven.rb'
109+
Style/HashExcept: # (new in 1.7)
110+
Enabled: true
111+
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
112+
Enabled: false # update later in next Update Rubocop PR
113+
Style/NegatedIfElseCondition: # (new in 1.2)
114+
Enabled: true
115+
Style/NilLambda: # (new in 1.3)
116+
Enabled: true
117+
Style/RedundantArgument: # (new in 1.4)
118+
Enabled: false # update later in next Update Rubocop PR
119+
Style/StringChars: # (new in 1.12)
120+
Enabled: false # update later in next Update Rubocop PR
121+
Style/SwapValues: # (new in 1.1)
122+
Enabled: true
123+
Naming/VariableNumber:
124+
Enabled: false
125+
Style/OptionalBooleanParameter:
126+
Enabled: false
127+
Style/RedundantRegexpEscape:
128+
Enabled: false

0 commit comments

Comments
 (0)