Skip to content

Commit

Permalink
Merge pull request #10 from FundingCircle/update-a-bit
Browse files Browse the repository at this point in the history
Update a bit
  • Loading branch information
bliof-fc authored Apr 21, 2023
2 parents 6634f4c + 2cee335 commit 441e5cc
Show file tree
Hide file tree
Showing 15 changed files with 445 additions and 528 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Ruby CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
ruby-version: ['3.1', '2.7', '2.5']

steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake
- name: Run rubocop
run: bundle exec rubocop
8 changes: 8 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
inherit_from: .rubocop_todo.yml

AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
ExtraDetails: true
UseCache: true
NewCops: enable
78 changes: 78 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 99999999`
# on 2023-04-19 12:16:33 UTC using RuboCop version 1.28.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
Exclude:
- 'ruby-postcodeanywhere.gemspec'

# Offense count: 1
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/spec_helper.rb'

# Offense count: 1
Lint/MissingSuper:
Exclude:
- 'lib/postcode_anywhere/bank_account_validation.rb'

# Offense count: 2
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 58

# Offense count: 1
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
# IgnoredMethods: refine
Metrics/BlockLength:
Max: 82

# Offense count: 2
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
Metrics/MethodLength:
Max: 26

# Offense count: 1
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
Exclude:
- 'lib/ruby-postcodeanywhere.rb'

# Offense count: 5
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
# SupportedStyles: snake_case, normalcase, non_integer
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
Naming/VariableNumber:
Exclude:
- 'lib/ruby-postcodeanywhere.rb'

# Offense count: 2
Style/ClassVars:
Exclude:
- 'lib/ruby-postcodeanywhere.rb'

# Offense count: 5
# Configuration parameters: AllowedConstants.
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/postcode_anywhere/bank_account_validation.rb'
- 'lib/ruby-postcodeanywhere.rb'

# Offense count: 2
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 200
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.5.9
18 changes: 8 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
source "http://rubygems.org"
# frozen_string_literal: true

gem "httparty"
source 'http://rubygems.org'

gem "activesupport"
gem "i18n"
gemspec

group :development do
gem "rspec"
gem "bundler"
gem "jeweler", "~> 1.6.2"
gem "rcov", ">= 0"
gem "webmock", :require => false
group :development, :test do
gem 'rake'
gem 'rspec'
gem 'rubocop'
gem 'webmock', require: false
end
109 changes: 76 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,43 +1,86 @@
PATH
remote: .
specs:
ruby-postcodeanywhere (0.2.0)
activesupport
httparty

GEM
remote: http://rubygems.org/
specs:
activesupport (3.1.1)
multi_json (~> 1.0)
addressable (2.2.7)
crack (0.1.8)
diff-lcs (1.1.3)
git (1.2.5)
httparty (0.7.8)
crack (= 0.1.8)
i18n (0.6.0)
jeweler (1.6.2)
bundler (~> 1.0)
git (>= 1.2.5)
rake
multi_json (1.0.4)
rake (0.9.2)
rcov (0.9.9)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
rspec-mocks (~> 2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
webmock (1.8.0)
addressable (>= 2.2.7)
crack (>= 0.1.7)
activesupport (6.1.7.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
concurrent-ruby (1.2.2)
crack (0.4.5)
rexml
diff-lcs (1.5.0)
hashdiff (1.0.1)
httparty (0.21.0)
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
mini_mime (1.1.2)
minitest (5.15.0)
multi_xml (0.6.0)
parallel (1.23.0)
parser (3.2.2.0)
ast (~> 2.4.1)
public_suffix (4.0.7)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.0)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.28.2)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.17.0)
parser (>= 3.1.1.0)
ruby-progressbar (1.13.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
zeitwerk (2.6.7)

PLATFORMS
ruby

DEPENDENCIES
activesupport
bundler
httparty
i18n
jeweler (~> 1.6.2)
rcov
rake
rspec
rubocop
ruby-postcodeanywhere!
webmock

BUNDLED WITH
1.17.3
Loading

0 comments on commit 441e5cc

Please sign in to comment.