rails / sass-rails

Ruby on Rails stylesheet engine for Sass
MIT License
860 stars 333 forks source link

Support Rails 5.0 #356

Closed k0kubun closed 8 years ago

k0kubun commented 8 years ago

I want to test rails 5.0.0.beta1 in my rails app. But sass-rails's dependency blocks bundle install. I confirmed we could pass all tests with rails 5.0.0.beta1. This PR includes fixes to pass them, using config.public_file_server instead of deprecated APIs.

rails-bot commented 8 years ago

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @arthurnn (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

rafaelfranca commented 8 years ago

That is weird. I can use sass-rails with Rails 5.0.0.beta1 without any changes here. Can you please provide a sample application that reproduces the error?

BenMorganIO commented 8 years ago

@rafaelfranca this is what I got when I did an update. You'll see a lot of noise too which I'll keep in the code since maybe one of them went hand in hand with the change.

$ bundle update rails
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.....
Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    coffee-rails (~> 4.1.0) was resolved to 4.1.1, which depends on
      railties (< 5.1.x, >= 4.0.0)

    devise was resolved to 3.5.3, which depends on
      railties (< 5, >= 3.2.6)

    factory_girl_rails was resolved to 4.5.0, which depends on
      railties (>= 3.0.0)

    jquery-rails was resolved to 4.0.5, which depends on
      railties (>= 4.2.0)

    minitest-rails was resolved to 2.2.0, which depends on
      railties (~> 4.1)

    rails (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
      railties (= 5.0.0.beta1)

    devise was resolved to 3.5.3, which depends on
      responders was resolved to 2.1.1, which depends on
        railties (< 5.1, >= 4.2.0)

    sass-rails (~> 5.0) was resolved to 5.0.4, which depends on
      railties (< 5.0, >= 4.0.0)

    slim-rails was resolved to 3.0.1, which depends on
      railties (< 5.0, >= 3.1)

    slim-rails was resolved to 3.0.1, which depends on
      railties (< 5.0, >= 3.1)
# Gemfile
source 'https://rubygems.org'
ruby '2.3.0'

gem 'rails', '5.0.0.beta1'

gem 'pg'

gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'bootstrap'

...
rafaelfranca commented 8 years ago
minitest-rails was resolved to 2.2.0, which depends on
      railties (~> 4.1)

is your culprit

BenMorganIO commented 8 years ago

@rafaelfranca Thanks!

BenMorganIO commented 8 years ago

I see some work with using config.respond_to?(:public_file_server). Wondering about these changes.

rafaelfranca commented 8 years ago

That is only in tests. There is no required changes in sass-rails to work with Rails 5.0.0.beta1. It will be required with Rails 5.0.0 final, but we will change it when needed.

BenMorganIO commented 8 years ago

Ah, KK

connorshea commented 8 years ago

@rafaelfranca now that Rails 5.0.0.rc1 is out, is this going to be merged and released? I can't test Rails 5 without it because of the gemspec. :)

arthurnn commented 8 years ago

thanks.. i will add rails5 test file to travis