From 032d766e955fa61cba1b43955777d74e2b450543 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Thu, 30 Jun 2016 16:07:09 -0400 Subject: [PATCH 1/3] Fix deprecation warnings for config options These config options changed in Rails so they were causing errors in the sass-rails tests. This updates the config options with the expected settings. --- .../config/environments/production.rb | 4 ++-- .../alternate_config_project/config/environments/test.rb | 6 +++--- .../test/dummy/config/environments/production.rb | 4 ++-- .../engine_project/test/dummy/config/environments/test.rb | 6 +++--- .../fixtures/sass_project/config/environments/production.rb | 4 ++-- test/fixtures/sass_project/config/environments/test.rb | 6 +++--- .../fixtures/scss_project/config/environments/production.rb | 4 ++-- test/fixtures/scss_project/config/environments/test.rb | 6 +++--- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/test/fixtures/alternate_config_project/config/environments/production.rb b/test/fixtures/alternate_config_project/config/environments/production.rb index 71f2cff..1f0d946 100644 --- a/test/fixtures/alternate_config_project/config/environments/production.rb +++ b/test/fixtures/alternate_config_project/config/environments/production.rb @@ -11,8 +11,8 @@ config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) - if config.respond_to?(:serve_static_files) - config.serve_static_files = false + if config.respond_to?(:public_file_server) + config.public_file_server.enabled = false else config.serve_static_assets = false end diff --git a/test/fixtures/alternate_config_project/config/environments/test.rb b/test/fixtures/alternate_config_project/config/environments/test.rb index 055730d..ecbcb86 100644 --- a/test/fixtures/alternate_config_project/config/environments/test.rb +++ b/test/fixtures/alternate_config_project/config/environments/test.rb @@ -8,12 +8,12 @@ config.cache_classes = true # Configure static asset server for tests with Cache-Control for performance - if config.respond_to?(:serve_static_files) - config.serve_static_files = true + if config.respond_to?(:public_file_server) + config.public_file_server.enabled = true else config.serve_static_assets = true end - config.static_cache_control = "public, max-age=3600" + config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } config.eager_load = false diff --git a/test/fixtures/engine_project/test/dummy/config/environments/production.rb b/test/fixtures/engine_project/test/dummy/config/environments/production.rb index 515dcda..e70e2e3 100644 --- a/test/fixtures/engine_project/test/dummy/config/environments/production.rb +++ b/test/fixtures/engine_project/test/dummy/config/environments/production.rb @@ -20,8 +20,8 @@ # config.action_dispatch.rack_cache = true # Disable Rails's static asset server (Apache or nginx will already do this). - if config.respond_to?(:serve_static_files) - config.serve_static_files = false + if config.respond_to?(:public_file_server) + config.public_file_server.enabled = false else config.serve_static_assets = false end diff --git a/test/fixtures/engine_project/test/dummy/config/environments/test.rb b/test/fixtures/engine_project/test/dummy/config/environments/test.rb index 97c5c2b..72f2652 100644 --- a/test/fixtures/engine_project/test/dummy/config/environments/test.rb +++ b/test/fixtures/engine_project/test/dummy/config/environments/test.rb @@ -13,12 +13,12 @@ config.eager_load = false # Configure static asset server for tests with Cache-Control for performance. - if config.respond_to?(:serve_static_files) - config.serve_static_files = true + if config.respond_to?(:public_file_server) + config.public_file_server.enabled = false else config.serve_static_assets = true end - config.static_cache_control = "public, max-age=3600" + config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } # Show full error reports and disable caching. config.consider_all_requests_local = true diff --git a/test/fixtures/sass_project/config/environments/production.rb b/test/fixtures/sass_project/config/environments/production.rb index 9f2f678..c671f74 100644 --- a/test/fixtures/sass_project/config/environments/production.rb +++ b/test/fixtures/sass_project/config/environments/production.rb @@ -12,8 +12,8 @@ config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) - if config.respond_to?(:serve_static_files) - config.serve_static_files = false + if config.respond_to?(:public_file_server) + config.public_file_server.enabled = false else config.serve_static_assets = false end diff --git a/test/fixtures/sass_project/config/environments/test.rb b/test/fixtures/sass_project/config/environments/test.rb index e1219be..4c5a552 100644 --- a/test/fixtures/sass_project/config/environments/test.rb +++ b/test/fixtures/sass_project/config/environments/test.rb @@ -11,12 +11,12 @@ config.eager_load = false # Configure static asset server for tests with Cache-Control for performance - if config.respond_to?(:serve_static_files) - config.serve_static_files = true + if config.respond_to?(:public_file_server) + config.public_file_server.enabled = false else config.serve_static_assets = true end - config.static_cache_control = "public, max-age=3600" + config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } # Show full error reports and disable caching config.consider_all_requests_local = true diff --git a/test/fixtures/scss_project/config/environments/production.rb b/test/fixtures/scss_project/config/environments/production.rb index 9825b59..c2c2b28 100644 --- a/test/fixtures/scss_project/config/environments/production.rb +++ b/test/fixtures/scss_project/config/environments/production.rb @@ -11,8 +11,8 @@ config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) - if config.respond_to?(:serve_static_files) - config.serve_static_files = false + if config.respond_to?(:public_file_server) + config.public_file_server.enabled = false else config.serve_static_assets = false end diff --git a/test/fixtures/scss_project/config/environments/test.rb b/test/fixtures/scss_project/config/environments/test.rb index d1544b4..c6f1853 100644 --- a/test/fixtures/scss_project/config/environments/test.rb +++ b/test/fixtures/scss_project/config/environments/test.rb @@ -10,12 +10,12 @@ config.eager_load = false # Configure static asset server for tests with Cache-Control for performance - if config.respond_to?(:serve_static_files) - config.serve_static_files = true + if config.respond_to?(:public_file_server) + config.public_file_server.enabled = true else config.serve_static_assets = true end - config.static_cache_control = "public, max-age=3600" + config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } # Show full error reports and disable caching config.consider_all_requests_local = true From 4413aa6ea2bc013fde6bce7af09db458a7590c9e Mon Sep 17 00:00:00 2001 From: eileencodes Date: Thu, 30 Jun 2016 16:09:31 -0400 Subject: [PATCH 2/3] Fix errors from gem defaults Gems are no longer allowed to leave the default TODO's in place. This replaces all the ones that can't be TODO anymore with something that is acceptable. ``` Error: bundler: failed to load command: rails (Users/eileen/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bin/rails) Gem::InvalidSpecificationException: The gemspec at /private/var/folders/fy/rml6_y9x3b392jpmpy160g7r0000gn/T/d20160630-25961-h3mf6o/engine_project.gemspec is not valid. Please fix this gemspec. The validation error was '"FIXME" or "TODO" is not an author' ``` --- test/fixtures/engine_project/engine_project.gemspec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/fixtures/engine_project/engine_project.gemspec b/test/fixtures/engine_project/engine_project.gemspec index 3098f51..2e9a82f 100644 --- a/test/fixtures/engine_project/engine_project.gemspec +++ b/test/fixtures/engine_project/engine_project.gemspec @@ -7,16 +7,16 @@ require "engine_project/version" Gem::Specification.new do |s| s.name = "engine_project" s.version = EngineProject::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] - s.homepage = "TODO" - s.summary = "TODO: Summary of EngineProject." - s.description = "TODO: Description of EngineProject." + s.authors = ["Your name"] + s.email = ["Your email"] + s.homepage = "http://example.com" + s.summary = "Summary of EngineProject." + s.description = "Description of EngineProject." 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", "< 5.0" + s.add_dependency "rails", ">= 4.0.0.beta", "< 6" # s.add_dependency "jquery-rails" s.add_development_dependency "sqlite3" From 86e6055fa255ac369916f65c1d7f6c81ed9ec7ab Mon Sep 17 00:00:00 2001 From: eileencodes Date: Thu, 30 Jun 2016 16:12:52 -0400 Subject: [PATCH 3/3] Bump version --- lib/sass/rails/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sass/rails/version.rb b/lib/sass/rails/version.rb index 1ca222a..3774380 100644 --- a/lib/sass/rails/version.rb +++ b/lib/sass/rails/version.rb @@ -1,5 +1,5 @@ module Sass module Rails - VERSION = "5.0.4" + VERSION = "5.0.5" end end