Skip to content

Commit

Permalink
Bump dependencies to use Rails 7.1 as the current Rails version (#311)
Browse files Browse the repository at this point in the history
* Bump dependencies to use Rails 7.1 as the current Rails version

* Add `render_views` to reports_controller

Without this change, rspec was failing with this:

```
  4) ReportsController#show using HTML response format shows the attributes for the right project
     Failure/Error: raise TypeError, "#{path.inspect} is not a valid path: must be a String, Pathname, or Resolver"

     TypeError:
       #<RSpec::Rails::ViewRendering::EmptyTemplateResolver::ResolverDecorator:0x0000000113c167e0 @resolver=#<ActionView::FileSystemResolver:0x0000000109e1bb80 @unbound_templates=#<Concurrent::Map:0x0000000109e1bb58 entries=41 default_proc=nil>, @path_parser=#<ActionView::Resolver::PathParser:0x0000000110133308 @regex=/
                 \A
                 (?:(?<prefix>.*)\/)?
                 (?<partial>_)?
                 (?<action>.*?)
                 (?:\.(?<locale>(?-mix:ar|bg|ca\-CAT|ca|da\-DK|de\-AT|de\-CH|de|ee|en|en\-AU|en\-BORK|en\-CA|en\-GB|en\-IND|en\-MS|en\-NEP|en\-NG|en\-NZ|en\-PAK|en\-SG|en\-TH|en\-UG|en\-US|en\-ZA|en\-au\-ocker|es\-AR|es\-MX|es|fa|fi\-FI|fr|fr\-CA|fr\-CH|he|hy|id|it|ja|ko|lt|lv|mi\-NZ|nb\-NO|nl|no\-NO|pl|pt\-BR|pt|ru|sk|sv|th|tr|uk|vi|zh\-CN|zh\-TW|(?-mix:[a-z]{2}(?:[-_][A-Z]{2})?))))??
                 (?:\.(?<format>(?-mix:html|text|js|css|ics|csv|vcf|vtt|png|jpeg|gif|bmp|tiff|svg|webp|mpeg|mp3|ogg|m4a|webm|mp4|otf|ttf|woff|woff2|xml|rss|atom|yaml|multipart_form|url_encoded_form|json|pdf|zip|gzip)))??
                 (?:\+(?<variant>[^.]*))??
                 (?:\.(?<handler>(?-mix:raw|erb|html|builder|ruby|jbuilder)))?
                 \z
               /x>, @path="/Users/etagwerker/Projects/fastruby/points/app/views">> is not a valid path: must be a String, Pathname, or Resolver
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.1.0/lib/action_view/path_set.rb:79:in `block in typecast'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.1.0/lib/action_view/path_set.rb:68:in `map'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.1.0/lib/action_view/path_set.rb:68:in `typecast'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.1.0/lib/action_view/path_set.rb:19:in `initialize'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.1.0/lib/action_view/view_paths.rb:35:in `new'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.1.0/lib/action_view/view_paths.rb:35:in `_build_view_paths'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/actionview-7.1.0/lib/action_view/view_paths.rb:69:in `view_paths='
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-rails-4.0.2/lib/rspec/rails/view_rendering.rb:153:in `block (2 levels) in <module:ViewRendering>'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:365:in `run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:529:in `block in run_owned_hooks_for'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:528:in `each'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:528:in `run_owned_hooks_for'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:615:in `block in run_example_hooks_for'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:614:in `reverse_each'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:614:in `run_example_hooks_for'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:484:in `run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:505:in `run_before_example'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:261:in `block in run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:486:in `block in run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-rails-4.0.2/lib/rspec/rails/example/controller_example_group.rb:191:in `block (2 levels) in <module:ControllerExampleGroup>'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:390:in `execute_with'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-rails-4.0.2/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:457:in `instance_exec'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:390:in `execute_with'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:352:in `call'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/hooks.rb:486:in `run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:468:in `with_around_example_hooks'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example.rb:259:in `run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:646:in `block in run_examples'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:642:in `map'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:642:in `run_examples'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:607:in `run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `block in run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `map'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/example_group.rb:608:in `run'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:121:in `map'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
     # /Users/etagwerker/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rspec-core-3.12.2/lib/rspec/core/configuration.rb:2070:in `with_suite_hooks'
Add `render_views` to reports_controller
```

* Start using Rails 7.1 defaults

* Use rspec-rails 6.0.x from now on

* Remove duplicated group from Gemfile

* bundle update and next bundle update to be consistent

* Add platform for GitHub CI

`bundle lock --add-platform x86_64-linux`

* Remove usage of uglifier

* Start using yui-compressor

* Add Java build pack

* ROAD-556 Use sass and terser for assets minification

* ROAD-556 Remove java buildpack

---------

Co-authored-by: Juan Vasquez <[email protected]>
Co-authored-by: Ariel Juodziukynas <[email protected]>
  • Loading branch information
3 people authored Oct 11, 2023
1 parent f6bc154 commit c881448
Show file tree
Hide file tree
Showing 7 changed files with 418 additions and 332 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ coverage
.byebug_history
.tool-versions
.DS_Store
public/assets

node_modules
yarn-error.log
Expand Down
16 changes: 6 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ if next?
# to make it work with ruby 3.1
# read more about it here: https://github.com/rails/rails/issues/43998,
# and here: https://gist.github.com/claudiug/bdc2fb70b10d19513208c816588aed92
gem "rails", github: "rails/rails", branch: "7-0-stable"
gem "rails", github: "rails/rails", branch: "main"
else
gem "rails", "~> 7.0.2"
gem "rails", "~> 7.1.0"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'

Expand All @@ -30,8 +30,6 @@ gem "bootstrap-sass", "3.4.1"
gem "puma", "~> 6.3"
# Use SCSS for stylesheets
gem "sass-rails", "~> 5.0"
# Use Uglifier as compressor for JavaScript assets
gem "uglifier", ">= 1.3.0"

gem "bourbon"
gem "matrix"
Expand Down Expand Up @@ -65,26 +63,28 @@ gem "rack-mini-profiler"

group :production do
gem "newrelic_rpm"
gem "terser"
end

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem "byebug", platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem "rspec-rails", "~> 4.0.2"
gem "rspec-rails", "~> 6.0.3"
gem "faker"
gem "shoulda-matchers", "~> 3.1"
gem "rails-controller-testing"
gem "dotenv-rails"
gem "recursive-open-struct"
gem "factory_bot_rails"
gem "next_rails"
end

group :test do
gem "apparition", git: "https://github.com/twalpole/apparition.git", ref: "7db58cc6b0e4ca4141b074ff27d5936a1b8874bf"
gem "capybara"
gem "webdrivers"
gem "database_cleaner"
gem "database_cleaner-active_record", ">= 2.1.0"
gem "capybara-screenshot"
gem "simplecov", require: false
end
Expand All @@ -98,10 +98,6 @@ group :development do
gem "standardrb", require: false
end

group :development, :test do
gem "next_rails"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Expand Down
Loading

0 comments on commit c881448

Please sign in to comment.