#1 Update to sass-rails 6.0.0.
Merged 2 years ago by pvalena. Opened 2 years ago by pvalena.
rpms/ pvalena/rubygem-sass-rails rebase  into  master

file modified
+1 -16
@@ -1,16 +1,1 @@ 

- /sass-rails-3.2.5.gem

- /sass-rails-3.2.6.gem

- /sass-rails-4.0.0.gem

- /sass-rails-4.0.3.gem

- /sass-rails-5.0.1-tests.tgz

- /sass-rails-5.0.1.gem

- /sass-rails-5.0.3-tests.tgz

- /sass-rails-5.0.3.gem

- /sass-rails-5.0.4-tests.tgz

- /sass-rails-5.0.4.gem

- /sass-rails-5.0.5-tests.tgz

- /sass-rails-5.0.5.gem

- /sass-rails-5.0.6-tests.tgz

- /sass-rails-5.0.6.gem

- /sass-rails-5.0.7-tests.tgz

- /sass-rails-5.0.7.gem

+ /sass-rails-*.gem

@@ -1,151 +0,0 @@ 

- From 5cf04df33646a5db0ee6753fc701b6239304cff5 Mon Sep 17 00:00:00 2001

- From: Gustavo Bazan <gustavo@swiftcomply.com>

- Date: Wed, 3 Oct 2018 09:36:02 +0100

- Subject: [PATCH] Update travis test matrix

- 

- Drop support for EOL version of ruby and add support for 2.5

- Add support for rails 5.2

- 

- Some updates needed for travis

- ---

-  .../fixtures/alternate_config_project/Gemfile |  2 +-

-  .../config/application.rb                     |  4 ++

-  .../config/initializers/secret_token.rb       |  8 +++-

-  test/fixtures/sass_project/Gemfile            |  2 +-

-  .../config/initializers/secret_token.rb       |  7 ++-

-  test/fixtures/scss_project/Gemfile            |  2 +-

-  .../scss_project/config/application.rb        |  4 ++

-  .../config/initializers/secret_token.rb       |  7 ++-

-  test/test_helper.rb                           |  4 +-

-  9 files changed, 32 insertions(+), 8 deletions(-)

-  create mode 100644 gemfiles/Gemfile-rails-5-2

- 

- diff --git a/test/fixtures/alternate_config_project/Gemfile b/test/fixtures/alternate_config_project/Gemfile

- index c965db0..ab02893 100644

- --- a/test/fixtures/alternate_config_project/Gemfile

- +++ b/test/fixtures/alternate_config_project/Gemfile

- @@ -1,6 +1,6 @@

-  source 'https://rubygems.org'

-  

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

- +gem 'rails', '>= 4.2', '< 6'

-  gem 'sqlite3'

-  

-  # Asset template engines

- diff --git a/test/fixtures/alternate_config_project/config/application.rb b/test/fixtures/alternate_config_project/config/application.rb

- index 30f90f0..5d09d70 100644

- --- a/test/fixtures/alternate_config_project/config/application.rb

- +++ b/test/fixtures/alternate_config_project/config/application.rb

- @@ -45,5 +45,9 @@ class Application < Rails::Application

-  

-      # Enable the asset pipeline

-      config.assets.enabled = true

- +

- +    if Rails.version >= '5.1.0' && config.active_record.sqlite3.present?

- +      config.active_record.sqlite3.represent_boolean_as_integer = true

- +    end

-    end

-  end

- diff --git a/test/fixtures/alternate_config_project/config/initializers/secret_token.rb b/test/fixtures/alternate_config_project/config/initializers/secret_token.rb

- index e91c7e2..f81a731 100644

- --- a/test/fixtures/alternate_config_project/config/initializers/secret_token.rb

- +++ b/test/fixtures/alternate_config_project/config/initializers/secret_token.rb

- @@ -4,4 +4,10 @@

-  # 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'

- +

- +secret = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849'

- +if AlternateConfigProject::Application.config.respond_to? :secret_key_base

- +  AlternateConfigProject::Application.config.secret_key_base = secret

- +else

- +  AlternateConfigProject::Application.config.secret_token = secret

- +end

- diff --git a/test/fixtures/sass_project/Gemfile b/test/fixtures/sass_project/Gemfile

- index c965db0..ab02893 100644

- --- a/test/fixtures/sass_project/Gemfile

- +++ b/test/fixtures/sass_project/Gemfile

- @@ -1,6 +1,6 @@

-  source 'https://rubygems.org'

-  

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

- +gem 'rails', '>= 4.2', '< 6'

-  gem 'sqlite3'

-  

-  # Asset template engines

- diff --git a/test/fixtures/sass_project/config/initializers/secret_token.rb b/test/fixtures/sass_project/config/initializers/secret_token.rb

- index e8888a2..0b80506 100644

- --- a/test/fixtures/sass_project/config/initializers/secret_token.rb

- +++ b/test/fixtures/sass_project/config/initializers/secret_token.rb

- @@ -4,4 +4,9 @@

-  # 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'

- +secret = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849'

- +if ScssProject::Application.config.respond_to? :secret_key_base

- +  ScssProject::Application.config.secret_key_base = secret

- +else

- +  ScssProject::Application.config.secret_token = secret

- +end

- diff --git a/test/fixtures/scss_project/Gemfile b/test/fixtures/scss_project/Gemfile

- index c965db0..ab02893 100644

- --- a/test/fixtures/scss_project/Gemfile

- +++ b/test/fixtures/scss_project/Gemfile

- @@ -1,6 +1,6 @@

-  source 'https://rubygems.org'

-  

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

- +gem 'rails', '>= 4.2', '< 6'

-  gem 'sqlite3'

-  

-  # Asset template engines

- diff --git a/test/fixtures/scss_project/config/application.rb b/test/fixtures/scss_project/config/application.rb

- index 9565048..a26f068 100644

- --- a/test/fixtures/scss_project/config/application.rb

- +++ b/test/fixtures/scss_project/config/application.rb

- @@ -45,5 +45,9 @@ class Application < Rails::Application

-  

-      # Enable the asset pipeline

-      config.assets.enabled = true

- +

- +    if Rails.version >= '5.1.0' && config.active_record.sqlite3.present?

- +      config.active_record.sqlite3.represent_boolean_as_integer = true

- +    end

-    end

-  end

- diff --git a/test/fixtures/scss_project/config/initializers/secret_token.rb b/test/fixtures/scss_project/config/initializers/secret_token.rb

- index e8888a2..0b80506 100644

- --- a/test/fixtures/scss_project/config/initializers/secret_token.rb

- +++ b/test/fixtures/scss_project/config/initializers/secret_token.rb

- @@ -4,4 +4,9 @@

-  # 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'

- +secret = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849'

- +if ScssProject::Application.config.respond_to? :secret_key_base

- +  ScssProject::Application.config.secret_key_base = secret

- +else

- +  ScssProject::Application.config.secret_token = secret

- +end

- diff --git a/test/test_helper.rb b/test/test_helper.rb

- index 521de86..6fc3757 100644

- --- a/test/test_helper.rb

- +++ b/test/test_helper.rb

- @@ -11,7 +11,7 @@

-  # If developing against local dependencies, this code will ensure they get picked up

-  # in the project fixtures that have their own bundle environment

-  $gem_options = {}

- -possible_dev_dependencies = %w(sass-rails sass rails arel actionpack railties sprockets journey sprockets-rails activerecord-deprecated_finders)

- +possible_dev_dependencies = %w(sass-rails sass rails arel actionpack rack railties sprockets sprockets-rails)

-  Bundler.load.specs.each do |s|

-    if possible_dev_dependencies.include?(s.name)

-       gem_path = s.full_gem_path

- @@ -24,4 +24,4 @@

-  # Load support files

-  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

-  

- -ActiveSupport::TestCase.test_order = :random if ActiveSupport::TestCase.respond_to?(:test_order=)

- +ActiveSupport::TestCase.test_order = :random

file modified
+8 -25
@@ -2,18 +2,12 @@ 

  %global gem_name sass-rails

  

  Name: rubygem-%{gem_name}

- Version: 5.0.7

- Release: 7%{?dist}

+ Version: 6.0.0

+ Release: 1%{?dist}

  Summary: Sass adapter for the Rails asset pipeline

  License: MIT

  URL: https://github.com/rails/sass-rails

  Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem

- # git clone https://github.com/rails/sass-rails.git && cd sass-rails

- # git checkout v5.0.7 && tar czvf sass-rails-5.0.7-tests.tgz ./test

- Source1: sass-rails-%{version}-tests.tgz

- # Fix the test suite compatibility with Rails 5.2.

- # https://github.com/rails/sass-rails/pull/421

- Patch0: rubygem-sass-rails-5.0.7-Rails-5-2-compatibility.patch

  BuildRequires: ruby(release)

  BuildRequires: rubygems-devel

  BuildRequires: ruby
@@ -37,11 +31,7 @@ 

  Documentation for %{name}.

  

  %prep

- %setup -q -n %{gem_name}-%{version} -b 1

- 

- pushd %{_builddir}

- %patch0 -p1

- popd

+ %setup -q -n %{gem_name}-%{version}

  

  %build

  # Create the gem as gem install only works on a gem file
@@ -56,18 +46,7 @@ 

  

  %check

  pushd .%{gem_instdir}

- ln -s %{_builddir}/test test

- 

- # Copy in .gemspec and use the sass-rails sources

- cp %{buildroot}%{gem_spec} sass-rails.gemspec

- echo 'gem "sass-rails", :path => "."' >> Gemfile

- 

- # Disable Ruby 2.7 warnings to make the test suite pass (e.g.

- # SassRailsTest#test_sass_allows_compressor_override_in_test_mode). Please

- # revisit with newer Rails as things should get better.

- export RUBYOPT='-W:no-deprecated'

- 

- ruby -I.:test -e 'Dir.glob "test/**/*_test.rb", &method(:require)'

+ # There is no test suite

  popd

  

  %files
@@ -82,6 +61,10 @@ 

  %doc %{gem_instdir}/README.md

  

  %changelog

+ * Fri Sep 25 14:13:20 CEST 2020 Pavel Valena <pvalena@redhat.com> - 6.0.0-1

+ - Update to sass-rails 6.0.0.

+   Resolves: rhbz#1742817

+ 

  * Mon Aug 03 2020 Vít Ondruch <vondruch@redhat.com> - 5.0.7-7

  - Disable Ruby 2.7 warnings to make the test suite pass.

    Resolves: rhbz#1863733

file modified
+1 -2
@@ -1,2 +1,1 @@ 

- SHA512 (sass-rails-5.0.7-tests.tgz) = 97104981d0073fb6804eb6168effb0afd803e71029528da3842735945f8d219857949b42094fd3e270baefb3e36273abb55347dd7ee792634b4bbab7f6d9640f

- SHA512 (sass-rails-5.0.7.gem) = a4226aa4bb991cd4437fca400505c1030f076c2ae30978509f91bbb83a2275e5991b6b9e59cfbb971532c38e4efb41c285819d199ef91e5f5474c72883f28306

+ SHA512 (sass-rails-6.0.0.gem) = 0818c25e6c1ef6c5251f685f40793aebbf1a219ef022fe333e720d1378a25f7c246d657f9b0c05023436adf4edbd8ab1866e3a93d12ca1c02a3c243cce8083f9

The packaged is effectively replaced with sassc-rails.

Resolves: rhbz#1742817


It's needed used with Rails 6.0 (although rails can run without it).

The functionality is required transitively, via rubygem-sassc (new package), which is required:
rubygem(sassc-rails) >= 2.1 with rubygem(sassc-rails) < 3 with rubygem(sassc-rails) >= 2.1.1


To have latest sass-rails gem in Fedora.

Up-to-date Koji scratch-build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=54316338

Up-to-date Copr build:
https://copr.fedorainfracloud.org/coprs/build/1722763

Checks:

  • Tests: no tests, package runtime was removed as well
  • Syntax check: ok
  • Dependent packages: ok
  • Smoke test: ok
  • rpmlint: ok

Test log: cpr/rubygem-sass-rails_test.log
gem2rpm diff: cpr/rubygem-sass-rails_gem2rpm.diff

Updated, retested, LGTM.

@vondruch could you please @ruby-packagers-sig to commiters for this package?

I'll build it in side-tag f34-build-side-32997 together with sassc-rails.

@vondruch could you please @ruby-packagers-sig to commiters for this package?

Done, sry for the delay.

Pull-Request has been merged by pvalena

2 years ago