Skip to content

Commit

Permalink
Merge branch 'rm-test-with-rails-6' into 5-0-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Aug 16, 2019
2 parents e2e189a + 72e9e21 commit bcc0725
Show file tree
Hide file tree
Showing 35 changed files with 86 additions and 186 deletions.
31 changes: 7 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
language: ruby

rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2.5
- 2.3.1
- rbx-2
- 2.4.6
- 2.5.5
- 2.6.3

gemfile:
- gemfiles/Gemfile-rails-4-0
- gemfiles/Gemfile-rails-4-1
- gemfiles/Gemfile-rails-4-2
- gemfiles/Gemfile-rails-5-0
- gemfiles/Gemfile-rails-5-2
- gemfiles/Gemfile-rails-6-0
- gemfiles/Gemfile-sprockets-2-11
- gemfiles/Gemfile-sprockets-2-12
- gemfiles/Gemfile-sprockets-2-8
Expand All @@ -32,24 +27,12 @@ cache: bundler
script: bundle exec rake test

matrix:
allow_failures:
- rvm: rbx-2
exclude:
- gemfile: gemfiles/Gemfile-sass-3-4
rvm: 1.9.3
- gemfile: gemfiles/Gemfile-sprockets-4-0
rvm: 1.9.3
- gemfile: gemfiles/Gemfile-rails-5-0
rvm: 1.9.3
- gemfile: gemfiles/Gemfile-rails-5-0
rvm: 2.0.0
- gemfile: gemfiles/Gemfile-rails-5-0
rvm: 2.1
include:
- gemfile: Gemfile
rvm: 2.2.5
rvm: 2.5.5
- gemfile: Gemfile
rvm: 2.3.1
rvm: 2.6.3

notifications:
email: false
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ source "https://rubygems.org"
gemspec

gem "rails", github: "rails/rails"
gem "arel", github: "rails/arel"
9 changes: 0 additions & 9 deletions gemfiles/Gemfile-rails-4-0

This file was deleted.

9 changes: 0 additions & 9 deletions gemfiles/Gemfile-rails-4-1

This file was deleted.

10 changes: 0 additions & 10 deletions gemfiles/Gemfile-rails-4-2

This file was deleted.

7 changes: 0 additions & 7 deletions gemfiles/Gemfile-rails-5-0

This file was deleted.

6 changes: 6 additions & 0 deletions gemfiles/Gemfile-rails-5-2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

gem "rails", github: 'rails/rails', branch: '5-2-stable'
6 changes: 6 additions & 0 deletions gemfiles/Gemfile-rails-6-0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

gem "rails", github: 'rails/rails', branch: '6-0-stable'
3 changes: 0 additions & 3 deletions gemfiles/Gemfile-sass-3-1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ else
gem "rails"
end
gem "sass", "~> 3.1.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sass-3-2
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,5 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sass", "~> 3.2.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sass-3-3
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,5 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sass", "~> 3.3.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sass-3-4
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,5 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sass", "~> 3.4.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sprockets-2-11
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sprockets", "~> 2.11.0"
gem "sass", "~> 3.3.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sprockets-2-12
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sprockets", "~> 2.12.0"
gem "sass", "~> 3.3.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sprockets-2-8
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sprockets", "~> 2.8.0"
gem "sass", "~> 3.3.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sprockets-3-0
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sprockets", "~> 3.0.0"
gem "sass", "~> 3.3.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sprockets-4-0
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,5 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sprockets", "~> 4.x"
gem 'mime-types', '< 3', require: false if RUBY_VERSION.start_with?('1.9')
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sprockets-rails-2-2
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sprockets-rails", "~> 2.2.0"
gem "sass", "~> 3.3.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
9 changes: 1 addition & 8 deletions gemfiles/Gemfile-sprockets-rails-master
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "rails", "~> 4.2.0"
else
gem "rails"
end
gem "rails"
gem "sprockets-rails", github: "rails/sprockets-rails"
gem "sass", "~> 3.3.0"
gem "mime-types", "< 2"
gem "rack", "< 2" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2")
gem "nokogiri", "~> 1.6.8" if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1")
4 changes: 3 additions & 1 deletion sass-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Gem::Specification.new do |s|
s.description = %q{Sass adapter for the Rails asset pipeline.}
s.license = %q{MIT}

s.add_dependency 'railties', '>= 4.0.0', '< 6'
s.required_ruby_version = ">= 2.4.0"

s.add_dependency 'railties', '>= 5.2.0'
s.add_dependency 'sass', '~> 3.1'
s.add_dependency 'sprockets-rails', '>= 2.0', '< 4.0'
s.add_dependency 'sprockets', '>= 2.8', '< 4.0'
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/alternate_config_project/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'rails', '>= 4.0.0.beta', '< 5.0'
gem 'rails', '>= 4.0.0.beta'
gem 'sqlite3'

# Asset template engines
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/alternate_config_project/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ class Application < Rails::Application

# Enable the asset pipeline
config.assets.enabled = true

if Rails.gem_version < Gem::Version.new('6.0.0')
config.active_record.sqlite3.represent_boolean_as_integer = true
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
AlternateConfigProject::Application.config.secret_token = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849'
AlternateConfigProject::Application.config.secret_key_base = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849'
2 changes: 1 addition & 1 deletion test/fixtures/engine_project/engine_project.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]

s.add_dependency "rails", ">= 4.0.0.beta", "< 6"
s.add_dependency "rails", ">= 4.0.0.beta"
# s.add_dependency "jquery-rails"

s.add_development_dependency "sqlite3"
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/sass_project/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'rails', '>= 4.0.0.beta', '< 5.0'
gem 'rails', '>= 4.0.0.beta'
gem 'sqlite3'

# Asset template engines
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/sass_project/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,9 @@ class Application < Rails::Application

# Prefer sass for generated assets.
config.sass.preferred_syntax = :sass

if Rails.gem_version < Gem::Version.new('6.0.0')
config.active_record.sqlite3.represent_boolean_as_integer = true
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
ScssProject::Application.config.secret_token = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849'
ScssProject::Application.config.secret_key_base = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849'
2 changes: 1 addition & 1 deletion test/fixtures/scss_project/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'rails', '>= 4.0.0.beta', '< 5.0'
gem 'rails', '>= 4.0.0.beta'
gem 'sqlite3'

# Asset template engines
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/scss_project/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ class Application < Rails::Application

# Enable the asset pipeline
config.assets.enabled = true

if Rails.gem_version < Gem::Version.new('6.0.0')
config.active_record.sqlite3.represent_boolean_as_integer = true
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
ScssProject::Application.config.secret_token = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849'
ScssProject::Application.config.secret_key_base = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849'
8 changes: 4 additions & 4 deletions test/sass_rails_generators_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ScaffoldGeneratorTest < Sass::Rails::TestCase
generate_scaffold
assert_file_exists "app/assets/stylesheets/foos.scss"
assert_file_exists "app/assets/stylesheets/scaffolds.scss"
assert_not_output /conflict/
assert_not_output(/conflict/)
end
end

Expand All @@ -15,7 +15,7 @@ class ScaffoldGeneratorTest < Sass::Rails::TestCase
generate_scaffold
assert_file_exists "app/assets/stylesheets/foos.sass"
assert_file_exists "app/assets/stylesheets/scaffolds.sass"
assert_not_output /conflict/
assert_not_output(/conflict/)
end
end

Expand All @@ -24,7 +24,7 @@ class ScaffoldGeneratorTest < Sass::Rails::TestCase
generate_scaffold "--stylesheet-engine=scss"
assert_file_exists "app/assets/stylesheets/engine_project/foos.scss"
assert_file_exists "app/assets/stylesheets/scaffolds.scss"
assert_not_output /conflict/
assert_not_output(/conflict/)
end
end

Expand All @@ -33,7 +33,7 @@ class ScaffoldGeneratorTest < Sass::Rails::TestCase
generate_scaffold "--stylesheet-engine=sass"
assert_file_exists "app/assets/stylesheets/engine_project/foos.sass"
assert_file_exists "app/assets/stylesheets/scaffolds.sass"
assert_not_output /conflict/
assert_not_output(/conflict/)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/sass_rails_logger_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SassRailsLoggerTest < Sass::Rails::TestCase
"Sass::logger.log_level = :#{level}; Sass::logger.log(:#{level}, %Q|#{message}|)"
end

assert File.exists?("#{app_root}/log/development.log"), "log file was not created"
assert File.exist?("#{app_root}/log/development.log"), "log file was not created"

log_output = File.open("#{app_root}/log/development.log").read
assert log_output.include?(message), "the #{level} log message was not found in the log file"
Expand Down
Loading

0 comments on commit bcc0725

Please sign in to comment.