Skip to content

Commit

Permalink
Merge with upstream activemerchant master
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffschuil committed Jun 20, 2024
2 parents b06262b + 5bd880f commit b5bd5fa
Show file tree
Hide file tree
Showing 814 changed files with 164,365 additions and 34,388 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ruby-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
pull_request:
branches:
- '**'
push:
branches:
- master

jobs:
build:
name: Ruby ${{ matrix.version }} ${{ matrix.gemfile }}
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
strategy:
matrix:
version:
- 3.1
gemfile:
- gemfiles/Gemfile.rails50
- gemfiles/Gemfile.rails51
- gemfiles/Gemfile.rails52
- gemfiles/Gemfile.rails60
- gemfiles/Gemfile.rails_master
exclude:
- version: 2.6
gemfile: gemfiles/Gemfile.rails_master
- version: 2.5
gemfile: gemfiles/Gemfile.rails_master
steps:
- uses: actions/checkout@v2

- name: Set up Ruby ${{ matrix.version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.version }}
bundler-cache: true

- name: Test
run: bundle exec rake test
- name: Linter
run: bundle exec rubocop
19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
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!'
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!'
days-before-close: 14
exempt-draft-pr: true
105 changes: 104 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,114 @@ AllCops:
- "lib/active_merchant/billing/gateways/paypal_express.rb"
- "vendor/**/*"
ExtraDetails: false
TargetRubyVersion: 2.3
TargetRubyVersion: 3.1

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

Metrics/ModuleLength:
Enabled: false

Layout/ParameterAlignment:
EnforcedStyle: with_fixed_indentation

Layout/DotPosition:
EnforcedStyle: trailing

Layout/CaseIndentation:
EnforcedStyle: end

Layout/FirstHashElementIndentation:
EnforcedStyle: consistent

Naming/PredicateName:
Exclude:
- "lib/active_merchant/billing/gateways/payeezy.rb"
- 'lib/active_merchant/billing/gateways/airwallex.rb'

Gemspec/DateAssignment: # (new in 1.10)
Enabled: true
Layout/SpaceBeforeBrackets: # (new in 1.7)
Enabled: true
Lint/AmbiguousAssignment: # (new in 1.7)
Enabled: true
Lint/DeprecatedConstants: # (new in 1.8)
Enabled: true # update later in next Update Rubocop PR
Lint/DuplicateBranch: # (new in 1.3)
Enabled: false
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
Enabled: true
Lint/EmptyBlock: # (new in 1.1)
Enabled: false # update later in next Update Rubocop PR
Exclude:
- 'lib/active_merchant/billing/gateways/authorize_net.rb'
- 'lib/active_merchant/billing/gateways/secure_net.rb'
Lint/EmptyClass: # (new in 1.3)
Enabled: true
Lint/FloatComparison:
Exclude:
- 'lib/active_merchant/billing/gateways/payu_latam.rb'
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
Enabled: true
Lint/NonDeterministicRequireOrder:
Exclude:
- 'script/generate'
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
Enabled: true
Exclude:
- 'lib/active_merchant/billing/gateways/fat_zebra.rb'
- 'lib/active_merchant/billing/gateways/netbanx.rb'
- 'lib/active_merchant/billing/gateways/payway_dot_com.rb'
Lint/NumberedParameterAssignment: # (new in 1.9)
Enabled: true
Lint/OrAssignmentToConstant: # (new in 1.9)
Enabled: true
Lint/RedundantDirGlobSort: # (new in 1.8)
Enabled: true
Lint/SymbolConversion: # (new in 1.9)
Enabled: true
Lint/ToEnumArguments: # (new in 1.1)
Enabled: true
Lint/TripleQuotes: # (new in 1.9)
Enabled: true
Lint/UnexpectedBlockArity: # (new in 1.5)
Enabled: true
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
Enabled: true
Style/ArgumentsForwarding: # (new in 1.1)
Enabled: true
Style/CollectionCompact: # (new in 1.2)
Enabled: false # update later in next Update Rubocop PR
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
Enabled: true
Exclude:
- 'lib/active_merchant/billing/credit_card.rb'
- 'lib/active_merchant/billing/response.rb'
Style/EndlessMethod: # (new in 1.8)
Enabled: true
Style/HashConversion: # (new in 1.10)
Enabled: true
Exclude:
- 'lib/active_merchant/billing/gateways/payscout.rb'
- 'lib/active_merchant/billing/gateways/pac_net_raven.rb'
Style/HashExcept: # (new in 1.7)
Enabled: true
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
Enabled: false # update later in next Update Rubocop PR
Style/NegatedIfElseCondition: # (new in 1.2)
Enabled: true
Style/NilLambda: # (new in 1.3)
Enabled: true
Style/RedundantArgument: # (new in 1.4)
Enabled: false # update later in next Update Rubocop PR
Style/StringChars: # (new in 1.12)
Enabled: false # update later in next Update Rubocop PR
Style/SwapValues: # (new in 1.1)
Enabled: true
Naming/VariableNumber:
Enabled: false
Style/OptionalBooleanParameter:
Enabled: false
Style/RedundantRegexpEscape:
Enabled: false
Loading

0 comments on commit b5bd5fa

Please sign in to comment.