Skip to content

Commit

Permalink
Merge pull request #173 from rails-on-services/development
Browse files Browse the repository at this point in the history
**Implemented enhancements:**

- #112 - Allow a list of schemas when switching using schemas - #154
- Create schema between different versions of DB - #155 

**Fixed bugs:**

- #170 - Cache Key breaks on rails 6.0.4 - #171 

**Closed issues:**

- Add ruby 3 to the build matrix - #162 
- update rubocop and fixed broken rules - #157 
- added junit formatter and saving test output in circle - #172
  • Loading branch information
rpbaltazar committed Sep 13, 2021
2 parents ac0fbb2 + 1929f5f commit cf60dd2
Show file tree
Hide file tree
Showing 33 changed files with 478 additions and 372 deletions.
18 changes: 8 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: 2.1

orbs:
rubocop: hanachin/[email protected]

jobs:
build:
docker:
Expand Down Expand Up @@ -61,18 +58,19 @@ jobs:
- run:
name: Run tests
command: bundle exec rspec
command: bundle exec rspec --format progress --format RspecJunitFormatter -o ~/test-results/rspec/rspec.xml

- store_test_results:
path: ~/test-results/rspec/

workflows:
tests:
jobs:
- build:
matrix:
parameters:
ruby_version: ["ruby:2.6-buster", "ruby:2.7-buster"]
ruby_version: ["ruby:2.6-buster", "ruby:2.7-buster", "ruby:3.0-buster"]
gemfile: ["gemfiles/rails_5_2.gemfile", "gemfiles/rails_6_0.gemfile", "gemfiles/rails_6_1.gemfile"]

rubocop:
jobs:
- rubocop/rubocop:
version: 0.88.0
exclude:
- ruby_version: "ruby:3.0-buster"
gemfile: "gemfiles/rails_5_2.gemfile"
22 changes: 22 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: reviewdog
on: [push, pull_request]
jobs:
rubocop:
name: runner / rubocop
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Read ruby version
run: echo ::set-output name=RUBY_VERSION::$(cat .ruby-version | cut -f 1,2 -d .)
id: rv
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ steps.rv.outputs.RUBY_VERSION }}"
- uses: reviewdog/action-rubocop@v1
with:
filter_mode: nofilter
reporter: github-check
rubocop_version: 0.93.1
github_token: ${{ secrets.github_token }}
rubocop_extensions: rubocop-performance:1.10.2 rubocop-rails:2.9.1 rubocop-rspec:1.44.1
98 changes: 17 additions & 81 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,96 +1,32 @@
inherit_from: .rubocop_todo.yml

AllCops:
Exclude:
- 'gemfiles/**/*.gemfile'
- 'gemfiles/vendor/**/*'
- 'spec/dummy_engine/dummy_engine.gemspec'

Gemspec/RequiredRubyVersion:
Exclude:
- 'ros-apartment.gemspec'
require:
- rubocop-rails
- rubocop-performance
- rubocop-rspec

Style/WordArray:
AllCops:
Exclude:
- gemfiles/**/*.gemfile
- gemfiles/vendor/**/*
- spec/dummy_engine/dummy_engine.gemspec
- spec/schemas/**/*.rb

Style/NumericLiterals:
Exclude:
- spec/schemas/**/*.rb
NewCops: enable

Layout/EmptyLineAfterMagicComment:
Gemspec/RequiredRubyVersion:
Exclude:
- spec/schemas/**/*.rb
- 'ros-apartment.gemspec'

Metrics/BlockLength:
Exclude:
- spec/**/*.rb

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true

Layout/SpaceAroundMethodCallOperator:
Enabled: true

Lint/DeprecatedOpenSSLConstant:
Enabled: true

Lint/DuplicateElsifCondition:
Enabled: true

Lint/MixedRegexpCaptureTypes:
Enabled: true

Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: true

Style/AccessorGrouping:
Enabled: true

Style/ArrayCoercion:
Enabled: true

Style/BisectedAttrAccessor:
Enabled: true

Style/CaseLikeIf:
Enabled: true

Style/ExponentialNotation:
Enabled: true

Style/HashAsLastArrayItem:
Enabled: true

Style/HashEachMethods:
Enabled: true

Style/HashLikeCase:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true

Style/RedundantAssignment:
Enabled: true

Style/RedundantFetchBlock:
Enabled: true

Style/RedundantFileExtensionInRequire:
Enabled: true

Style/RedundantRegexpCharacterClass:
Enabled: true
Rails/RakeEnvironment:
Enabled: false

Style/RedundantRegexpEscape:
Enabled: true
Rails/ApplicationRecord:
Enabled: false

Style/SlicingWithRange:
Enabled: true
Rails/Output:
Enabled: false
Loading

0 comments on commit cf60dd2

Please sign in to comment.