autoprefixer-rails 7.1.2 → 7.1.2.1

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: c047228a39a5e24a65a0649f469b7c841e951584
4
- data.tar.gz: c0d3a054eda6662afa84187b8d809336f03c7ae1
3
+ metadata.gz: 826f9c1316c29dcb569dc5227862fcf351db1740
4
+ data.tar.gz: 88e202fe812d9b0ec3099043bd71b0b1efe50a4a
5
5
  SHA512:
6
- metadata.gz: ac40a8261687770952e20d0804527ae0165de83ece3f210f09e993581db9a53e7dfc62d1f415aa883917427d94ff1402adb8a705eda36d5dda709f6c8f460422
7
- data.tar.gz: 7cb967d48bd664e89c32182b4a06bb224da053679fc93939642337a08b596a6efd43ba89a470aa91580ffd835df8b7bd5c363f8abf4fe4b6387f6a8e9758dd98
6
+ metadata.gz: 4f68f9a483ffaa446f2b1e122f3af9138e158b0ff0527786c0135bfea1a7d97e3449aa929a5651b62455d4f62f26434f95f52aefe3e67745ca870a40523285ea
7
+ data.tar.gz: f6bd0a43bb260bf76f1b5005b264c0cdd41ba0e9301aebcc478d3c693f6b7768d1f39a3fdf960c25ca2051ebe7d701ea4ac77ce8d1a04db5e0e75a03ba2e38ca
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ ## 7.1.2.1
4
+ * Fix loading `autoprefixer.yml` from engines (by Jim Ryan).
5
+
3
6
  ## 7.1.2
4
7
  * Fix `text-decoration` shortcut support.
5
8
 
@@ -5,30 +5,43 @@ begin
5
5
  class Railtie < ::Rails::Railtie
6
6
  rake_tasks do |app|
7
7
  require 'rake/autoprefixer_tasks'
8
- Rake::AutoprefixerTasks.new( config(app.root) ) if defined? app.assets
8
+ Rake::AutoprefixerTasks.new( config ) if defined? app.assets
9
9
  end
10
10
 
11
11
  if config.respond_to?(:assets) and not config.assets.nil?
12
12
  config.assets.configure do |env|
13
- AutoprefixerRails.install(env, config(env.root))
13
+ AutoprefixerRails.install(env, config)
14
14
  end
15
15
  else
16
16
  initializer :setup_autoprefixer, group: :all do |app|
17
17
  if defined? app.assets and not app.assets.nil?
18
- AutoprefixerRails.install(app.assets, config(app.root))
18
+ AutoprefixerRails.install(app.assets, config)
19
19
  end
20
20
  end
21
21
  end
22
22
 
23
- # Read browsers requirements from application config
24
- def config(root)
25
- file = File.join(root, 'config/autoprefixer.yml')
26
- params = ::YAML.load_file(file) if File.exist?(file)
27
- params ||= {}
23
+ # Read browsers requirements from application or engine config
24
+ def config
25
+ params = {}
26
+
27
+ roots.each do |root|
28
+ file = File.join(root, 'config/autoprefixer.yml')
29
+
30
+ if File.exist?(file)
31
+ params = ::YAML.load_file(file)
32
+
33
+ break
34
+ end
35
+ end
36
+
28
37
  params = params.symbolize_keys
29
38
  params[:env] ||= Rails.env.to_s
30
39
  params
31
40
  end
41
+
42
+ def roots
43
+ [Rails.application.root] + Rails::Engine.subclasses.map(&:root)
44
+ end
32
45
  end
33
46
  end
34
47
  rescue LoadError
@@ -1,3 +1,3 @@
1
1
  module AutoprefixerRails
2
- VERSION = '7.1.2'.freeze unless defined? AutoprefixerRails::VERSION
2
+ VERSION = '7.1.2.1'.freeze unless defined? AutoprefixerRails::VERSION
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoprefixer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.2
4
+ version: 7.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Sitnik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-06 00:00:00.000000000 Z
11
+ date: 2017-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs