sass-rails 5.0.2 → 5.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55c513a3f71507fc677d283899588f96f322dd7a
4
- data.tar.gz: 1b7ab12d457febdd1fec746079ad8cda768b1a97
3
+ metadata.gz: c1d34629de675da617d727e6b8502a012ca5f46b
4
+ data.tar.gz: de6e6167a78b09dc019051dddfdb6fffa19609df
5
5
  SHA512:
6
- metadata.gz: 96b3c395fb7fecfd7d0a08643adacff06e931963f29bfaa90a72053d0eea23c19d182a35a4dfa289faa02a1e042232bab1b657663ac71cf1a298fa6e02529165
7
- data.tar.gz: c60f85f493872acb97cea17863a5b4dbbe22607b0cea6e98c0a83e7d6173ab9749798352400793d7b0e2a79f87ee85549db4509dbaf5d239a6ce2d12555f6a0a
6
+ metadata.gz: 325f1a37f0bb71780d1d648a017a801a3d3dba8aefc3d2f4b3d42ef806f1ec91498579394e2e1af9b57b0fd57ca0fee29a0ee89717626937b52f2a703575ffe6
7
+ data.tar.gz: eca92024b783f9214a6a57576723dec07acf3d071a95cf402f00190b46c416b9b385a37e85f4e30f74c9ca0a1bf79b53f0b2ab1b721855e762b4df735fce8b05
data/README.md CHANGED
@@ -68,24 +68,24 @@ in Sass):
68
68
  #### `asset-path($relative-asset-path)`
69
69
  Returns a string to the asset.
70
70
 
71
- * `asset-path("rails.png")` becomes `"/assets/rails.png"`
71
+ * `asset-path("rails.png")` returns `"/assets/rails.png"`
72
72
 
73
73
  #### `asset-url($relative-asset-path)`
74
74
  Returns a url reference to the asset.
75
75
 
76
- * `asset-url("rails.png")` becomes `url(/assets/rails.png)`
76
+ * `asset-url("rails.png")` returns `url(/assets/rails.png)`
77
77
 
78
78
  As a convenience, for each of the following asset classes there are
79
79
  corresponding `-path` and `-url` helpers:
80
80
  image, font, video, audio, javascript, stylesheet.
81
81
 
82
- * `image-path("rails.png")` becomes `"/assets/rails.png"`
83
- * `image-url("rails.png")` becomes `url(/assets/rails.png)`
82
+ * `image-path("rails.png")` returns `"/assets/rails.png"`
83
+ * `image-url("rails.png")` returns `url(/assets/rails.png)`
84
84
 
85
85
  #### `asset-data-url($relative-asset-path)`
86
86
  Returns a url reference to the Base64-encoded asset at the specified path.
87
87
 
88
- * `asset-data-url("rails.png")` becomes `url(data:image/png;base64,iVBORw0K...)`
88
+ * `asset-data-url("rails.png")` returns `url(data:image/png;base64,iVBORw0K...)`
89
89
 
90
90
  ## Running Tests
91
91
 
@@ -54,8 +54,22 @@ module Sass::Rails
54
54
  end
55
55
 
56
56
  config.assets.configure do |env|
57
- env.register_engine '.sass', Sass::Rails::SassTemplate
58
- env.register_engine '.scss', Sass::Rails::ScssTemplate
57
+ if env.respond_to?(:register_engine)
58
+ args = ['.sass', Sass::Rails::SassTemplate]
59
+ args << { silence_deprecation: true } if env.method(:register_engine).arity.abs > 2
60
+ env.register_engine(*args)
61
+
62
+ args = ['.scss', Sass::Rails::ScssTemplate]
63
+ args << { silence_deprecation: true } if env.method(:register_engine).arity.abs > 2
64
+ env.register_engine(*args)
65
+ end
66
+
67
+ if env.respond_to?(:register_transformer)
68
+ env.register_transformer 'text/sass', 'text/css',
69
+ Sprockets::SassProcessor.new(importer: SassImporter, sass_config: app.config.sass)
70
+ env.register_transformer 'text/scss', 'text/css',
71
+ Sprockets::ScssProcessor.new(importer: SassImporter, sass_config: app.config.sass)
72
+ end
59
73
 
60
74
  env.context_class.class_eval do
61
75
  class_attribute :sass_config
@@ -67,11 +81,13 @@ module Sass::Rails
67
81
  end
68
82
 
69
83
  initializer :setup_compression, group: :all do |app|
70
- unless Rails.env.development?
71
- app.config.assets.css_compressor ||= :sass
72
- else
84
+ if Rails.env.development?
73
85
  # Use expanded output instead of the sass default of :nested unless specified
74
86
  app.config.sass.style ||= :expanded
87
+ else
88
+ # config.assets.css_compressor may be set to nil in non-dev environments.
89
+ # otherwise, the default is sass compression.
90
+ app.config.assets.css_compressor = :sass unless app.config.assets.has_key?(:css_compressor)
75
91
  end
76
92
  end
77
93
  end
@@ -1,5 +1,5 @@
1
1
  module Sass
2
2
  module Rails
3
- VERSION = "5.0.2"
3
+ VERSION = "5.0.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - wycats
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-30 00:00:00.000000000 Z
12
+ date: 2016-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: 4.0.0
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '5.0'
23
+ version: '6'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: 4.0.0
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.0'
33
+ version: '6'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: sass
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -89,16 +89,22 @@ dependencies:
89
89
  name: tilt
90
90
  requirement: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - "~>"
92
+ - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: '1.1'
95
+ - - "<"
96
+ - !ruby/object:Gem::Version
97
+ version: '3'
95
98
  type: :runtime
96
99
  prerelease: false
97
100
  version_requirements: !ruby/object:Gem::Requirement
98
101
  requirements:
99
- - - "~>"
102
+ - - ">="
100
103
  - !ruby/object:Gem::Version
101
104
  version: '1.1'
105
+ - - "<"
106
+ - !ruby/object:Gem::Version
107
+ version: '3'
102
108
  - !ruby/object:Gem::Dependency
103
109
  name: sqlite3
104
110
  requirement: !ruby/object:Gem::Requirement
@@ -159,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
165
  version: '0'
160
166
  requirements: []
161
167
  rubyforge_project:
162
- rubygems_version: 2.4.5
168
+ rubygems_version: 2.5.1
163
169
  signing_key:
164
170
  specification_version: 4
165
171
  summary: Sass adapter for the Rails asset pipeline.