rspec / rspec-rails

RSpec for Rails 6+
https://rspec.info
MIT License
5.16k stars 1.03k forks source link

Release rspec-rails 4 #2265

Closed benoittgt closed 4 years ago

benoittgt commented 4 years ago

Hello

This is an issue to follow the release of rspec-rails 4.

As mentioned in https://github.com/rspec/rspec-rails/pull/2242#issuecomment-574546068 we have pending PR/issue that needs review or work.

I think we should tag them with v4.0 or set a milestone to help us to work on.

At the moment I don't know where I could help.

Thanks ๐ŸŒ

JonRowe commented 4 years ago

I think its just #2242 and #1938 that are really holding me off releasing

klyonrad commented 4 years ago

I think that this behaviour (scaffolding creates controller specs and empty request spec that I introduced would irritate some users. Please check if you can confirm this problem

micodel commented 4 years ago

Why update the README to state 4.0 before its release?

Could not find gem 'rspec-rails (~> 4.0)' in any of the gem sources listed in your Gemfile.

JonRowe commented 4 years ago

Readme refers to the current branch and commit, the relevant branches refer to their relevant versions.

@micodel I've added a note making this more clear. Its common practise however.

micodel commented 4 years ago

I'm sure you are more experienced than me ๐Ÿ˜…, but what about having some sort of versioned 4.0 rc branch with a living README, and letting master (aka the main page README) reflect the latest stable release? I have seen this implemented in other gems and its a nice touch

JonRowe commented 4 years ago

Thats really not how Github works, the default branch is the target of all PRs and is thus expected to be the core development branch, you can change what that branch is but it is always the default landing branch. Thus you should always assume the README.md is for the development branch and check the releasing strategy accordingly.

JonRowe commented 4 years ago

We could not have the current version being worked on in the readme but we've been on the verge of releasing 4.0.0 for months so we updated it when we merged that branch ready to release and it just hasn't happened yet :joy:

benoittgt commented 4 years ago

I think we can already release the 4.0. Then iterate for the upcoming features.

But maybe @JonRowe you want to fix the remaning issue/pr first? https://github.com/rspec/rspec-rails/labels/v4.0

klyonrad commented 4 years ago

As mentioned, I introduced a bug with the generate request specs PR

this behaviour (scaffolding creates controller specs and empty request spec

So maybe we should revert it, release and then iterate

JonRowe commented 4 years ago

So we need to release those remaining issues in a major release, so if not 4.0.0 then they'll have to wait until 5.0.0 however I really don't want to ship controller specs generated in 4.0.0

JonRowe commented 4 years ago

I'm going to ship the latest changes as rc1 at some point today, and maybe look towards releasing fully next week.

JonRowe commented 4 years ago

So 4.0.0 is on rubygems (๐ŸŽ‰ ) but these still need doing:

pirj commented 4 years ago

Hooray!

benoittgt commented 4 years ago

Thanks a lot. Do you need help for the remaining tasks @JonRowe?

JonRowe commented 4 years ago

@benoittgt do you want to tackle the docs onto rspec.info? and if anyone has bits for the blog post, I'm going to try to tackle that tomorrow evening...

JonRowe commented 4 years ago

@pirj are you looking at how to get jruby green again? I might just push up a temporary allow-failures setting...

benoittgt commented 4 years ago

@JonRowe yes for rdoc!

pirj commented 4 years ago

I'm waiting for Travis to pick up newer JRuby for their RVM cache, still not there. However, I'm not 100% certain it will fix all the problems in JRuby build jobs. Allow-failures sounds good ๐Ÿ‘

benoittgt commented 4 years ago

Doc is merged and deployed. http://rspec.info/documentation/4.0/rspec-rails/RSpec/Rails.html

https://github.com/rspec/rspec.github.io/pull/136

choosen commented 4 years ago

There is no info about activecable generators: https://relishapp.com/rspec/rspec-rails/docs/generators

pirj commented 4 years ago

@choosen Pull request is welcome! https://github.com/rspec/rspec-rails/blob/8c6c9590b94916199950dc8a91a9741d3be30c7c/features/Generators.md

choosen commented 4 years ago

https://relishapp.com/rspec/rspec-rails/v/4-0/docs/generator-specs we don't cover here the specs:

~system~ I was wrong about them: they are last on the list

I'm not familiar with that to compose content for those pages : )

Edit: Should I add it as an issue?

benoittgt commented 4 years ago

Can I help on this? https://github.com/rspec/rspec-rails/issues/2265#issuecomment-603510989

JonRowe commented 4 years ago

@benoittgt theres a rake task to run to gather the stats for the blog post, theres also a need to outline some of the new features, I've not had time to sit down and do that, if you're keen to start it that'd be a great help

benoittgt commented 4 years ago

Stats

Ok. I read https://github.com/rspec/rspec-dev/issues/43#issue-17918326

Use rake version_stats[vX.(Y - 1).0...vX.Y] to get version stats for post.

In the case of Rails I did rake version_stats[v3.9.1...v4.0.0]. It gives me:

### rspec-rails:

* **Total Commits**: 258
* **Merged pull requests**: 56
* **27 contributors**: Andrew White, Anton Rieder, Benoit Tigeot, Jon Rowe, David Revelo, Giovanni Kock Bonetti, Ignatius Reza, James Dabbs, Joel AZEMAR, John Hawthorn, Jonathan Rochkind, Kieran O'Grady, Moshe Kamensky, OKURA Masafumi, Olle Jonsson, Pedro Paiva, Phil Pirozhkov, Sam Phippen, Seb Jacobs, Tanbir Hasan, Viacheslav Bobrov, Vladimir Dementyev, Xavier Shay, alpaca-tc, pavel, ta1kt0me

Reduced changelog

Enhancements:

* Adds support for Rails 6. (Penelope Phippen, Benoit Tigeot, Jon Rowe, #2071)
* Adds support for JRuby on Rails 5.2 and 6
* Add support for parameterised mailers (Ignatius Reza, #2125)
* Add ActionMailbox spec helpers and test type (James Dabbs, #2119)
* Add ActionCable spec helpers and test type (Vladimir Dementyev, #2113)
* Default to generating request specs rather than controller specs when generating a controller (Luka Lรผdicke, #2222)
* Add routing spec template as an option for generating controller specs.
  (David Revelo, #2134)
* Add argument matcher support to `have_enqueued_*` matchers. (Phil Pirozhkov, #2206)
* Switch generated templates to use ruby 1.9 hash keys. (Tanbir Hasan, #2224)
* Add `have_been_performed`/`have_performed_job`/`perform_job` ActiveJob
  matchers (Isaac Seymour, #1785)
* The scaffold generator now generates request specs in preference to controller specs. (Luka Luฬˆdicke, #2288)
* Add configuration option to disable ActiveRecord. (Jon Rowe, Phil Pirozhkov, Hermann Mayer, #2266)
*  Set `ActionDispatch::SystemTesting::Server.silence_puma = true` when running system specs to avoid displaying logs. (ta1kt0me, Benoit Tigeot, #2289)

Bug Fixes:

* Replace `before_teardown` as well as `after_teardown` to ensure screenshots
  are generated correctly. (Jon Rowe, #2164)
* Restore previous conditional check for setting `default_url_options` in feature specs, prevents a `NoMethodError` in some scenarios. (Eugene Kenny, #2277)
* Allow changing `ActiveJob::Base.queue_adapter` inside a system spec. (Jonathan Rochkind, #2242)
* `rails generate generator` command now creates related spec file (Joel Azemar, #2217)
* Relax upper `capybara` version constraint to allow for Capybara 3.x (Phil Pirozhkov, #2281)
* Clear ActionMailer test mailbox after each example (Benoit Tigeot, #2293)

Breaking Changes:

* Drops support for Rails below 5.0
* Drops support for Ruby below 2.3

Is it ok for you?

pirj commented 4 years ago

Co-Authored-By: Jon Rowe

Seems redundant. Might need a manual recalc after removal ๐Ÿ˜†

benoittgt commented 4 years ago

@pirj Thanks. Removed :)

JonRowe commented 4 years ago

Its a good start for a PR! Generally we talk about what the change log means rather than just printing it, so we wouldn't mention things like Adds support for JRuby on Rails 5.2 and 6 as an item on their own as they are pretty self explanatory but we would prehaps mention it in a paragraph about rails 6 support.

Do you want to chuck it up on a pr on the website and then prehaps we can make contributions as we go