Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.0 #1055

Merged
merged 37 commits into from Nov 6, 2020
Merged

Release 2.0 #1055

merged 37 commits into from Nov 6, 2020

Commits on Oct 21, 2020

  1. Require Rubocop >= 1.0

    bquorning committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    5e8e32f View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2020

  1. Change department name of "nested" cops

    To avoid name and department clash issues, RuboCop decided to grant each
    extension its own department.
    For those cops that already have the department matching the extension
    name, no changes are needed.
    
    More info rubocop/rubocop#8490
    
    The changed cop names are:
    
    * `Capybara/CurrentPathExpectation` -> `RSpec/Capybara/CurrentPathExpectation`
    * `Capybara/FeatureMethods` -> `RSpec/Capybara/FeatureMethods`
    * `Capybara/VisibilityMatcher` -> `RSpec/Capybara/VisibilityMatcher`
    * `FactoryBot/AttributeDefinedStatically` -> `RSpec/FactoryBot/AttributeDefinedStatically`
    * `FactoryBot/CreateList` -> `RSpec/FactoryBot/CreateList`
    * `FactoryBot/FactoryClassName` -> `RSpec/FactoryBot/FactoryClassName`
    * `Rails/HttpStatus` -> `RSpec/Rails/HttpStatus`
    pirj authored and bquorning committed Oct 22, 2020
    3 Configuration menu
    Copy the full SHA
    ccf11f7 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1019 from rubocop-hq/uber-department

    Add an uber-department
    bquorning committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    0f09adb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e4db5ec View commit details
    Browse the repository at this point in the history
  4. Merge pull request #1054 from rubocop-hq/release

    Release v2.0.0-pre, compatible with RuboCop v1.0
    bquorning committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    28d7d9c View commit details
    Browse the repository at this point in the history
  5. Rename 2.0.0-pre to 2.0.0.pre

    Only dots are used when separating versions in Rubygems.
    bquorning committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    ec9c8b9 View commit details
    Browse the repository at this point in the history
  6. Retire TopLevelDescribe

    Why?
    
     - it was slow #925 (comment)
     - it ignored non-describe top-level example groups #925 (comment)
    
    `TopLevelGroup` is a modern replacement for `TopLevelDescribe`.
    
    Examples how to migrate cops from TopLevelDescribe to TopLevelGroup:
    
     - #932
     - #977
    pirj committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    b08c95b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1af1ec2 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #968 from rubocop-hq/remove-old-cop-baseclass

    Remove old Cop baseclass
    bquorning committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    1b9b8a2 View commit details
    Browse the repository at this point in the history
  9. Merge pull request #978 from rubocop-hq/retire-top_level_describe

    Retire TopLevelDescribe
    bquorning committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    15aa5d3 View commit details
    Browse the repository at this point in the history
  10. Retire RSpec/InvalidPredicateMatcher

    Fixes #938
    pirj authored and bquorning committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    f2d59bb View commit details
    Browse the repository at this point in the history
  11. Merge pull request #940 from rubocop-hq/reture-invalid-predicate-cop

    Retire RSpec/InvalidPredicateMatcher
    bquorning committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    21e4cb7 View commit details
    Browse the repository at this point in the history
  12. Add mixins folder

    This moves several files to a new `mixins/` folder. I was going to add
    some new macros, per [this comment][1], but thought it might clutter
    things up a bit to put them in the root folder. I thought of adding a
    `macros/` folder, but decided to emulate the [rubocop source][2]
    instead.
    
    [1]: #934 (comment)
    [2]: https://github.com/rubocop-hq/rubocop/tree/master/lib/rubocop/cop/mixin
    mockdeep authored and bquorning committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    9f4d7fa View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2020

  1. Use config context for all cop specs

    * Add shared context for all cop specs.
    * Remove redundant `config` metadata for cop specs.
    * Remove redundant `cop` subjects from cop specs.
    sl4vr authored and bquorning committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    45bd976 View commit details
    Browse the repository at this point in the history
  2. Fix find_all_in_scope method docs

    sl4vr authored and bquorning committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    6a6a367 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #1060 from rubocop-hq/fix-documentation

    Fix find_all_in_scope method docs
    pirj committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    b42f401 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #1056 from rubocop-hq/rf-mixins

    Add mixins folder
    pirj committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    912ae66 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #1059 from rubocop-hq/cop-specs-config-metadata

    Use config context for all cop specs
    pirj committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    5e23ee2 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2020

  1. Refactor a spec

    'autocorrect' shared example group does not pass a correct file name to
    the cop, and if this cop is tweaked to only inspect factories, this spec
    fails because the default file name/path is skipped, since it's not a
    factory path.
    pirj committed Oct 27, 2020
    Configuration menu
    Copy the full SHA
    9ea14b9 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2020

  1. Merge pull request #1064 from rubocop-hq/refactor-a-spec

    Refactor a spec
    pirj committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    abe73f0 View commit details
    Browse the repository at this point in the history
  2. Stop using newly added cops

        lib/rubocop/cop/rspec/multiple_expectations.rb:73:32: W: Lint/ToEnumArguments: Ensure you correctly provided all the arguments.
                  expectations_count = to_enum(:find_expectation, node).count
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    We'd still love to use OUR new cops while working on our codebase, let's
    see how this option works when set under RSpec namespace when we
    introduce the first pending cop.
    pirj committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    c758ebf View commit details
    Browse the repository at this point in the history
  3. Merge pull request #1065 from rubocop-hq/stop-using-edge-cops

    Stop using newly added cops
    bquorning committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    d0588f2 View commit details
    Browse the repository at this point in the history
  4. Remove relevance detection code

    We have had problems with it:
     - it was slow
     - it is a non-standard extension of RuboCop's config
     - Include option exists
     - department-specific (e.g. FactoryBot) config was ignored
    pirj committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    4920879 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2020

  1. Merge pull request #1063 from rubocop-hq/remove-relevance-detection-code

    Remove relevance detection code
    bquorning committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    2cd7639 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2020

  1. Implement dynamic matchers

    sl4vr authored and pirj committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    e515d21 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #956 from sl4vr/rspec-aliases_runtime-matchers

    RSpec aliases runtime matchers
    pirj committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    13cb62f View commit details
    Browse the repository at this point in the history
  3. Remove customization from RSpec/EmptyExampleGroup

    The customization is now made via .rubocop.yml configuration, i.e.:
    
        RSpec:
          Language:
            Includes:
              Example:
              - it_has_special_behavior
    pirj committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    2e3ed04 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #1007 from rubocop-hq/drop-empty-example-group-cus…

    …tomization
    
    Drop RSpec/EmptyExampleGroup customization
    pirj committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    a434245 View commit details
    Browse the repository at this point in the history
  5. Enable pending cop(s)

    pirj committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    06d6abd View commit details
    Browse the repository at this point in the history
  6. Merge pull request #1071 from rubocop-hq/enable-pending-2.0-cops

    Enable pending cop(s)
    pirj committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    9a5d604 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2020

  1. Add v2 update docs

    pirj committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    f3849e0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    60afe4c View commit details
    Browse the repository at this point in the history
  3. Fix shared example name

    pirj committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    5a9714e View commit details
    Browse the repository at this point in the history
  4. Use case instead of if

    It reads nicer, and `flog` agrees. Before:
    
    ❯ flog lib/rubocop/cop/rspec/mixin/top_level_group.rb
        29.7: flog total
         5.0: flog/method average
    
         9.8: RuboCop::Cop::RSpec::TopLevelGroup#top_level_nodes lib/rubocop/cop/rspec/mixin/top_level_group.rb:36-44
         7.6: RuboCop::Cop::RSpec::TopLevelGroup#on_new_investigation lib/rubocop/cop/rspec/mixin/top_level_group.rb:10-16
         4.9: RuboCop::Cop::RSpec::TopLevelGroup#top_level_groups lib/rubocop/cop/rspec/mixin/top_level_group.rb:20-22
    
    After:
    
    ❯ flog lib/rubocop/cop/rspec/mixin/top_level_group.rb
        25.8: flog total
         4.3: flog/method average
    
         7.2: RuboCop::Cop::RSpec::TopLevelGroup#top_level_nodes lib/rubocop/cop/rspec/mixin/top_level_group.rb:35-44
         6.3: RuboCop::Cop::RSpec::TopLevelGroup#on_new_investigation lib/rubocop/cop/rspec/mixin/top_level_group.rb:10-15
         4.9: RuboCop::Cop::RSpec::TopLevelGroup#top_level_groups lib/rubocop/cop/rspec/mixin/top_level_group.rb:19-21
    bquorning committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    c61929a View commit details
    Browse the repository at this point in the history
  5. Merge pull request #1013 from rubocop-hq/add-v2-migration-docs

    Add v2 update docs
    pirj committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    38be753 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #1075 from rubocop-hq/refactor-top-level-group

    Use `case` instead of `if`
    Darhazer committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    cc09e7d View commit details
    Browse the repository at this point in the history
  7. Bump version to 2.0.0

    - Add explicit dependency on rubocop-ast >= 1.1.0.
    - Rename the "Change log" to "Changelog".
    - Remove mention of "potentially breaking" changes. All changes between
      1.x and 2.0 should be regarded as potentially breaking, so no need to
      highlight one over the rest.
    - Link to the upgrade document from README.
    bquorning committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    056ee5a View commit details
    Browse the repository at this point in the history