Skip to content

Commit f5ab1cb

Browse files
authored
Merge pull request #109 from sass/rmb/drop_sass
drop ruby sass requirement
2 parents bfca465 + c314d1c commit f5ab1cb

15 files changed

+84
-114
lines changed

.travis.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ bundler_args: "--binstubs --standalone --without documentation --path ../bundle"
55
script: "bundle exec rake test"
66

77
gemfile:
8-
- gemfiles/sprockets_2_12.gemfile
8+
- gemfiles/sprockets-rails_3_0.gemfile
9+
- gemfiles/sprockets-rails_2_3.gemfile
910
- gemfiles/sprockets_3_0.gemfile
1011
- gemfiles/sprockets_4_0.gemfile
11-
- gemfiles/sprockets-rails_3_0.gemfile
1212
- gemfiles/rails_4_2.gemfile
13-
- gemfiles/rails_4_1.gemfile
14-
- gemfiles/rails_4_0.gemfile
13+
- gemfiles/rails_5_2.gemfile
1514

1615
rvm:
17-
- 2.2.2
18-
- 2.3.0
16+
- 2.4.4
17+
- 2.5.1
1918

2019
notifications:
2120
email: false

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ is maintained by [Ryan Boland](https://ryanboland.com) and [awesome contributors
8585

8686
## Changelog
8787

88+
- **2.0.0**
89+
- [Drop support for Sprockets 2](https://github.com/sass/sassc-rails/pull/109)
90+
- [Remove dependency on Ruby Sass](https://github.com/sass/sassc-rails/pull/109)
8891
- **1.3.0**
8992
- [Silence Sprockets deprecation warnings](https://github.com/sass/sassc-rails/pull/76)
9093
- [Sprockets 4 compatibility](https://github.com/sass/sassc-rails/pull/65)

Rakefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ namespace :tests do
1010
gemfiles = %w[
1111
sprockets-rails_3_0
1212
sprockets-rails_2_3
13-
sprockets_2_12
1413
sprockets_3_0
14+
sprockets_4_0
1515
rails_4_2
16-
rails_4_1
17-
rails_4_0
18-
with_sass_rails
16+
rails_5_2
1917
]
2018

2119
gemfiles.each do |gemfile|

gemfiles/rails_4_1.gemfile

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
gem "rails", "~> 4.0.0"
3+
gem "rails", "~> 5.2.1"
44

55
# Specify your gem's dependencies in sassc-rails.gemspec
66
gemspec path: "../"

gemfiles/sprockets-rails_2_3.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
gem "sprockets-rails", "~> 2.3.0"
3+
gem "sprockets-rails", "~> 2.3.3"
44

55
# Specify your gem's dependencies in sassc-rails.gemspec
66
gemspec path: "../"

gemfiles/sprockets_2_12.gemfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

gemfiles/with_sass_rails.gemfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

lib/sassc-rails.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
# frozen_string_literal: true
22

3-
begin
4-
require "sass-rails"
5-
Rails::Railtie.subclasses.delete Sass::Rails::Railtie
6-
rescue LoadError
7-
end
8-
93
require_relative "sassc/rails"
104

lib/sassc/rails/compressor.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# frozen_string_literal: true
22

33
require 'sprockets/sass_compressor'
4+
require 'securerandom'
45

56
class Sprockets::SassCompressor
7+
def initialize(options = {})
8+
@options = {
9+
syntax: :scss,
10+
cache: false,
11+
read_cache: false,
12+
style: :compressed
13+
}.merge(options).freeze
14+
@cache_key = SecureRandom.uuid
15+
end
16+
617
def call(*args)
718
input = if defined?(data)
819
data # sprockets 2.x

0 commit comments

Comments
 (0)