asset_precompilation_finder 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,25 +6,16 @@ module AssetPrecompilationFinder
6
6
  @app = app
7
7
  end
8
8
 
9
- def each(&blk)
10
- # don't compile list until last possible moment, as the asset engine might not be initialized yet.
11
- list.each { |v| blk.call(v) }
12
- end
13
-
14
- private
15
-
16
9
  def list
17
- @list ||= begin
18
- paths = @app.assets.each_logical_path
19
- paths = paths.reject { |p| File.basename(p).starts_with?("_") } # don't compile partials
20
- paths = paths.sort { |a,b| a.ends_with?(".css") ? 1 : -1 } # compile css last, as it may depend on other assets, like images
21
- end
10
+ paths = @app.assets.each_logical_path
11
+ paths = paths.reject { |p| File.basename(p).starts_with?("_") } # don't compile partials
12
+ paths = paths.sort { |a,b| a.ends_with?(".css") ? 1 : -1 } # compile css last, as it may depend on other assets, like images
22
13
  end
23
14
  end
24
15
 
25
16
  class Railtie < ::Rails::Railtie
26
- initializer :set_assets_precompile_list do |app|
27
- app.config.assets.precompile = Finder.new app
17
+ config.after_initialize do |app|
18
+ app.config.assets.precompile = Finder.new(app).list
28
19
  end
29
20
  end
30
21
  end
@@ -1,3 +1,3 @@
1
1
  module AssetPrecompilationFinder
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asset_precompilation_finder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 0
9
8
  - 1
10
- version: 0.0.1
9
+ - 0
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Micah Geisel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-22 00:00:00 Z
18
+ date: 2012-11-13 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  requirements: []
78
78
 
79
79
  rubyforge_project: asset_precompilation_finder
80
- rubygems_version: 1.8.11
80
+ rubygems_version: 1.8.24
81
81
  signing_key:
82
82
  specification_version: 3
83
83
  summary: Railtie to set asset precompilation paths to a better default