sassc-rails 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9f9f7ce0cfdb948ecfe56cab3ad90db02cf4603
4
- data.tar.gz: d51725341429faa4dd874313e4a9e9533c17d5f1
3
+ metadata.gz: d8e181d753caff3b8d856141415fe34c5ee4db99
4
+ data.tar.gz: 5eda510505ce682f9810373749913a14513395ff
5
5
  SHA512:
6
- metadata.gz: 97eec89c5c5f7ab9affa4398531e3d186239370ca2deaf4fbcff873f5705cb0006bb302ac933ae7c7e58183497c3a329c398ba30e0affe3599b812fcb6a05f38
7
- data.tar.gz: 6261bfb163c20d242753f7adfd858a045dddb9fab76d30fe084926458aa29e37f23449ce8d117fe855cb0895da1b88f6a138d9beb13cc1bf704d3c8edb9561f3
6
+ metadata.gz: fcfbc60c0b4dce8070ac5dad8d40af71e2d6f21c4fe5988b33216d8d68986ad785e61efb09cb809402d8bbd4f9aebc613a426bea0ec3198bba726513f68e6263
7
+ data.tar.gz: 86902d162430660a120b025ec8003d7e16ca7e78d9817ffd4919a029bb0a606543ba475422a6928af2c7bd6568bdde9414bf7e8fb28b4db5a10220886ee5302b
data/.travis.yml CHANGED
@@ -7,14 +7,14 @@ script: "bundle exec rake test"
7
7
  gemfile:
8
8
  - gemfiles/sprockets_2_12.gemfile
9
9
  - gemfiles/sprockets_3_0.gemfile
10
+ - gemfiles/sprockets-rails_3_0.gemfile
10
11
  - gemfiles/rails_4_2.gemfile
11
12
  - gemfiles/rails_4_1.gemfile
12
13
  - gemfiles/rails_4_0.gemfile
13
14
 
14
15
  rvm:
15
- - 2.0.0
16
- - 2.1.6
17
16
  - 2.2.2
17
+ - 2.3.0
18
18
 
19
19
  notifications:
20
20
  email: false
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # SassC::Rails [![Build Status](https://travis-ci.org/bolandrm/sassc-rails.svg)](https://travis-ci.org/bolandrm/sassc-rails) [![Gem Version](https://badge.fury.io/rb/sassc-rails.svg)](http://badge.fury.io/rb/sassc-rails)
1
+ # SassC::Rails [![Build Status](https://travis-ci.org/sass/sassc-rails.svg)](https://travis-ci.org/sass/sassc-rails) [![Gem Version](https://badge.fury.io/rb/sassc-rails.svg)](http://badge.fury.io/rb/sassc-rails)
2
2
 
3
3
  We all love working with Sass, but compilation can take quite a long time for larger
4
4
  codebases. This gem integrates the C implementation of Sass,
@@ -75,23 +75,26 @@ Upgrading to Cedar-14 is usually a painless process.
75
75
 
76
76
  Libraries explicitly depending on Sass-Rails, such as ActiveAdmin, can cause
77
77
  conflicts with installation of SassC-Rails. While we have no built-in solution
78
- for this, please check out [this issue](https://github.com/bolandrm/sassc-rails/issues/6)
78
+ for this, please check out [this issue](https://github.com/sass/sassc-rails/issues/6)
79
79
  for a workaround.
80
80
 
81
81
 
82
82
  ## Credits
83
83
 
84
84
  This gem is based on [sass-rails](https://github.com/rails/sass-rails), and
85
- is maintained by [Ryan Boland](https://ryanboland.com) and [awesome contributors](https://github.com/bolandrm/sassc-rails/graphs/contributors).
85
+ is maintained by [Ryan Boland](https://ryanboland.com) and [awesome contributors](https://github.com/sass/sassc-rails/graphs/contributors).
86
86
 
87
87
 
88
88
  ## Changelog
89
89
 
90
+ - **1.2.0**
91
+ - [Support sprockets-rails 3](https://github.com/sass/sassc-rails/pull/41)
92
+ - [Only depend on Railties instead of full Rails](https://github.com/sass/sassc-rails/pull/52)
90
93
  - **1.1.0**
91
94
  - Moved under the official sass organization!
92
- - [Source line comments](https://github.com/bolandrm/sassc-rails/pull/24) (`app.config.sass.line_comments`)
93
- - [Prevent sass-rails railtie from running](https://github.com/bolandrm/sassc-rails/pull/34)
94
- - [CSS compression may be disabled in test mode](https://github.com/bolandrm/sassc-rails/issues/33). Special thanks to [this Sass-Rails PR](https://github.com/rails/sass-rails/pull/338) for inspiration.
95
+ - [Source line comments](https://github.com/sass/sassc-rails/pull/24) (`app.config.sass.line_comments`)
96
+ - [Prevent sass-rails railtie from running](https://github.com/sass/sassc-rails/pull/34)
97
+ - [CSS compression may be disabled in test mode](https://github.com/sass/sassc-rails/issues/33). Special thanks to [this Sass-Rails PR](https://github.com/rails/sass-rails/pull/338) for inspiration.
95
98
  - **1.0.0**
96
99
  - Initial Release
97
100
  - Add support for inline source maps
@@ -100,7 +103,7 @@ is maintained by [Ryan Boland](https://ryanboland.com) and [awesome contributors
100
103
 
101
104
  ## Contributing
102
105
 
103
- 1. Fork it ( https://github.com/[my-github-username]/sassc-rails/fork )
106
+ 1. Fork it ( https://github.com/sass/sassc-rails/fork )
104
107
  1. Create your feature branch (`git checkout -b my-new-feature`)
105
108
  1. Commit your changes (`git commit -am 'Add some feature'`)
106
109
  1. Add Tests
data/Rakefile CHANGED
@@ -7,6 +7,8 @@ end
7
7
 
8
8
  namespace :tests do
9
9
  gemfiles = %w[
10
+ sprockets-rails_3_0
11
+ sprockets-rails_2_3
10
12
  sprockets_2_12
11
13
  sprockets_3_0
12
14
  rails_4_2
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "sprockets-rails", "~> 2.3.0"
4
+
5
+ # Specify your gem's dependencies in sassc-rails.gemspec
6
+ gemspec path: "../"
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "sprockets-rails", "~> 3.0.0"
4
+
5
+ # Specify your gem's dependencies in sassc-rails.gemspec
6
+ gemspec path: "../"
@@ -44,14 +44,14 @@ module SassC::Rails
44
44
  # config.sass.full_exception = app.config.consider_all_requests_local
45
45
  # end
46
46
 
47
- if app.assets
48
- app.assets.context_class.class_eval do
47
+ app.config.assets.configure do |env|
48
+ env.context_class.class_eval do
49
49
  class_attribute :sass_config
50
50
  self.sass_config = app.config.sass
51
51
  end
52
52
 
53
- app.assets.register_engine '.sass', SassC::Rails::SassTemplate
54
- app.assets.register_engine '.scss', SassC::Rails::ScssTemplate
53
+ env.register_engine '.sass', SassC::Rails::SassTemplate
54
+ env.register_engine '.scss', SassC::Rails::ScssTemplate
55
55
  end
56
56
  end
57
57
 
@@ -1,5 +1,5 @@
1
1
  module SassC
2
2
  module Rails
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
data/sassc-rails.gemspec CHANGED
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
30
30
 
31
31
  spec.add_dependency "tilt"
32
32
 
33
- spec.add_dependency 'rails', '>= 4.0.0'
33
+ spec.add_dependency 'railties', '>= 4.0.0'
34
34
  spec.add_dependency 'sprockets', '> 2.11'
35
+ spec.add_dependency 'sprockets-rails'
35
36
  end
@@ -22,7 +22,7 @@ class SassRailsTest < MiniTest::Unit::TestCase
22
22
  @app.config.sass.line_comments = false
23
23
 
24
24
  # Add a fake compressor for testing purposes
25
- @app.assets.register_compressor "text/css", :test, TestCompressor
25
+ Sprockets.register_compressor "text/css", :test, TestCompressor
26
26
 
27
27
  Rails.backtrace_cleaner.remove_silencers!
28
28
  end
@@ -39,26 +39,16 @@ class SassRailsTest < MiniTest::Unit::TestCase
39
39
  def initialize!
40
40
  Rails.env = "test"
41
41
  @app.initialize!
42
- handle_sass_rails
43
42
  end
44
43
 
45
44
  def initialize_dev!
46
45
  Rails.env = "development"
47
46
  @app.initialize!
48
- handle_sass_rails
49
47
  end
50
48
 
51
49
  def initialize_prod!
52
50
  Rails.env = "production"
53
51
  @app.initialize!
54
- handle_sass_rails
55
- end
56
-
57
- def handle_sass_rails
58
- if defined?(Sass::Rails)
59
- Rails.application.assets.register_engine '.sass', SassC::Rails::SassTemplate
60
- Rails.application.assets.register_engine '.scss', SassC::Rails::ScssTemplate
61
- end
62
52
  end
63
53
 
64
54
  def test_setup_works
@@ -230,11 +220,12 @@ class SassRailsTest < MiniTest::Unit::TestCase
230
220
  end
231
221
 
232
222
  def test_sassc_compression_is_used
233
- initialize_prod!
234
-
235
223
  engine = stub(render: "")
236
224
  SassC::Engine.expects(:new).returns(engine)
237
225
  SassC::Engine.expects(:new).with("", {style: :compressed}).returns(engine)
226
+
227
+ initialize_prod!
228
+
238
229
  render_asset("application.scss")
239
230
  end
240
231
 
@@ -322,5 +313,7 @@ class SassRailsTest < MiniTest::Unit::TestCase
322
313
  end
323
314
  end
324
315
 
325
- class TestCompressor; end
316
+ class TestCompressor
317
+ def self.call(*); end
318
+ end
326
319
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassc-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Boland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-29 00:00:00.000000000 Z
11
+ date: 2016-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rails
112
+ name: railties
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - ">"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '2.11'
139
+ - !ruby/object:Gem::Dependency
140
+ name: sprockets-rails
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
139
153
  description: Integrate SassC-Ruby into Rails.
140
154
  email:
141
155
  - ryan@tanookilabs.com
@@ -152,6 +166,8 @@ files:
152
166
  - gemfiles/rails_4_0.gemfile
153
167
  - gemfiles/rails_4_1.gemfile
154
168
  - gemfiles/rails_4_2.gemfile
169
+ - gemfiles/sprockets-rails_2_3.gemfile
170
+ - gemfiles/sprockets-rails_3_0.gemfile
155
171
  - gemfiles/sprockets_2_12.gemfile
156
172
  - gemfiles/sprockets_3_0.gemfile
157
173
  - gemfiles/with_sass_rails.gemfile