rails / jbuilder

Jbuilder: generate JSON objects with a Builder-style DSL
MIT License
4.34k stars 440 forks source link

CI build issue #479

Closed olleolleolle closed 4 years ago

olleolleolle commented 4 years ago

https://travis-ci.org/github/rails/jbuilder/jobs/663172103?utm_medium=notification&utm_source=github_status

# Running:

...../home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.2.0/gems/rack-2.1.2/lib/rack/media_type.rb:18: warning: `&' interpreted as argument prefix

E

Error:

JbuilderTemplateTest#test_array_of_partials:

SyntaxError: /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.2.0/gems/actionpack-5.2.4.1/lib/action_dispatch/request/session.rb:96: syntax error, unexpected '.'

          id&.public_id

              ^

    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.2.0/gems/actionpack-5.2.4.1/lib/action_dispatch/http/request.rb:358:in `session='

    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.2.0/gems/actionpack-5.2.4.1/lib/action_controller/test_case.rb:57:in `initialize'

    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.2.0/gems/actionpack-5.2.4.1/lib/action_controller/test_case.rb:46:in `new'

    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.2.0/gems/actionpack-5.2.4.1/lib/action_controller/test_case.rb:46:in `create'

    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.2.0/gems/actionview-5.2.4.1/lib/action_view/test_case.rb:29:in `initialize'

    /home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:299:in `new'

    /home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:299:in `build_view'

    /home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:292:in `render_without_parsing'

    /home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:288:in `render'

    /home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:101:in `block in <class:JbuilderTemplateTest>'

bin/rails test home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:100
rafaelfranca commented 4 years ago

Update the gemfiles/rails_5_2.gemfile to point to 5.2 stable and the build will be fixed.

olleolleolle commented 4 years ago

The 5-2-stable branch: contains a gemspec which says ">= 2.2.0" required_ruby_version. Its last commit is "prepare for 5.2.4.1 release". Seems like safe navigation (a 2.3+ feature) has crept in without a bump to required_ruby_version in the gemspec..

olleolleolle commented 4 years ago

I was hasty in my reading. A PR which does what was suggested works. Thanks!