-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into remove-default-id
- Loading branch information
Showing
54 changed files
with
482 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: CI RSpec Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: >- | ||
${{ matrix.ruby }} | ||
env: | ||
CI: true | ||
TESTOPTS: -v | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
matrix: | ||
ruby: [2.5, 2.6, 2.7, 3.0, jruby, truffleruby] | ||
mongoid: [7] | ||
experimental: [false] | ||
include: | ||
- ruby: 2.7 | ||
mongoid: HEAD | ||
experimental: true | ||
- ruby: 3.0 | ||
mongoid: HEAD | ||
experimental: true | ||
- ruby: head | ||
mongoid: 7 | ||
experimental: true | ||
- ruby: head | ||
mongoid: HEAD | ||
experimental: true | ||
- ruby: jruby-head | ||
mongoid: 7 | ||
experimental: true | ||
- ruby: truffleruby-head | ||
mongoid: 7 | ||
experimental: true | ||
|
||
steps: | ||
- name: repo checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: start mongodb | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.4 | ||
mongodb-replica-set: rs0 | ||
|
||
- name: load ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler: 2 | ||
|
||
- name: bundle install | ||
run: bundle install --jobs 4 --retry 3 | ||
env: | ||
MONGOID_VERSION: ${{ matrix.mongoid }} | ||
|
||
- name: rubocop | ||
timeout-minutes: 5 | ||
run: bundle exec rubocop | ||
continue-on-error: ${{ matrix.experimental }} | ||
env: | ||
MONGOID_VERSION: ${{ matrix.mongoid }} | ||
|
||
- name: test | ||
timeout-minutes: 10 | ||
run: bundle exec rake spec | ||
continue-on-error: ${{ matrix.experimental }} | ||
env: | ||
MONGOID_VERSION: ${{ matrix.mongoid }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.* | ||
.idea | ||
pkg | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
inherit_from: .rubocop_todo.yml | ||
|
||
AllCops: | ||
Exclude: | ||
- vendor/**/* | ||
TargetRubyVersion: 2.5 | ||
NewCops: enable | ||
SuggestExtensions: false | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
inherit_from: .rubocop_todo.yml | ||
Style/DoubleNegation: | ||
Enabled: false | ||
|
||
Style/ModuleFunction: | ||
EnforcedStyle: extend_self | ||
|
||
Style/OptionalBooleanParameter: | ||
Enabled: false | ||
|
||
Style/Semicolon: | ||
Exclude: | ||
- 'spec/**/*.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,53 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2018-08-16 08:14:07 -0400 using RuboCop version 0.58.2. | ||
# on 2021-08-11 17:20:10 UTC using RuboCop version 1.18.4. | ||
# 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: 6 | ||
# Configuration parameters: Include. | ||
# Include: **/*.gemfile, **/Gemfile, **/gems.rb | ||
Bundler/DuplicatedGem: | ||
# Offense count: 5 | ||
# Configuration parameters: AllowedMethods. | ||
# AllowedMethods: enums | ||
Lint/ConstantDefinitionInBlock: | ||
Exclude: | ||
- 'Gemfile' | ||
- 'spec/mongoid/slug_spec.rb' | ||
- 'spec/tasks/mongoid_slug_rake_spec.rb' | ||
|
||
# Offense count: 5 | ||
# Offense count: 4 | ||
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes. | ||
Metrics/AbcSize: | ||
Max: 40 | ||
Max: 44 | ||
|
||
# Offense count: 23 | ||
# Configuration parameters: CountComments, ExcludedMethods. | ||
# ExcludedMethods: refine | ||
# Offense count: 24 | ||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. | ||
# IgnoredMethods: refine | ||
Metrics/BlockLength: | ||
Max: 532 | ||
Max: 525 | ||
|
||
# Offense count: 2 | ||
# Configuration parameters: IgnoredMethods. | ||
Metrics/CyclomaticComplexity: | ||
Max: 9 | ||
Max: 10 | ||
|
||
# Offense count: 6 | ||
# Configuration parameters: CountComments. | ||
# Offense count: 7 | ||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. | ||
Metrics/MethodLength: | ||
Max: 23 | ||
|
||
# Offense count: 2 | ||
# Configuration parameters: CountComments. | ||
# Configuration parameters: CountComments, CountAsOne. | ||
Metrics/ModuleLength: | ||
Max: 959 | ||
Max: 937 | ||
|
||
# Offense count: 2 | ||
# Offense count: 1 | ||
# Configuration parameters: IgnoredMethods. | ||
Metrics/PerceivedComplexity: | ||
Max: 10 | ||
Max: 11 | ||
|
||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: braces, no_braces, context_dependent | ||
Style/BracesAroundHashParameters: | ||
Exclude: | ||
- 'lib/mongoid/slug/criteria.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: AllowOnConstant. | ||
Style/CaseEquality: | ||
Exclude: | ||
- 'lib/mongoid/slug/unique_slug.rb' | ||
|
||
# Offense count: 1 | ||
Style/DoubleNegation: | ||
Exclude: | ||
- 'lib/mongoid/slug.rb' | ||
|
||
# Offense count: 9 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: AllowAsExpressionSeparator. | ||
Style/Semicolon: | ||
Exclude: | ||
- 'spec/mongoid/criteria_spec.rb' | ||
|
||
# Offense count: 151 | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. | ||
# URISchemes: http, https | ||
Metrics/LineLength: | ||
Max: 138 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# frozen_string_literal: true | ||
|
||
danger.import_dangerfile(gem: 'mongoid-danger') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'bundler' | ||
require 'rspec/core/rake_task' | ||
|
||
|
Oops, something went wrong.