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 +4 -4
- data/.travis.yml +2 -2
- data/README.md +10 -7
- data/Rakefile +2 -0
- data/gemfiles/sprockets-rails_2_3.gemfile +6 -0
- data/gemfiles/sprockets-rails_3_0.gemfile +6 -0
- data/lib/sassc/rails/railtie.rb +4 -4
- data/lib/sassc/rails/version.rb +1 -1
- data/sassc-rails.gemspec +2 -1
- data/test/sassc_rails_test.rb +7 -14
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8e181d753caff3b8d856141415fe34c5ee4db99
|
4
|
+
data.tar.gz: 5eda510505ce682f9810373749913a14513395ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 [](https://travis-ci.org/sass/sassc-rails) [](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/
|
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/
|
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/
|
93
|
-
- [Prevent sass-rails railtie from running](https://github.com/
|
94
|
-
- [CSS compression may be disabled in test mode](https://github.com/
|
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/
|
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
data/lib/sassc/rails/railtie.rb
CHANGED
@@ -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
|
-
|
48
|
-
|
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
|
-
|
54
|
-
|
53
|
+
env.register_engine '.sass', SassC::Rails::SassTemplate
|
54
|
+
env.register_engine '.scss', SassC::Rails::ScssTemplate
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
data/lib/sassc/rails/version.rb
CHANGED
data/sassc-rails.gemspec
CHANGED
data/test/sassc_rails_test.rb
CHANGED
@@ -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
|
-
|
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
|
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.
|
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:
|
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:
|
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
|