racing-sprockets 0.0.1 → 0.0.2

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.
@@ -12,7 +12,6 @@ Sprockets::Manifest.class_eval do
12
12
  end
13
13
 
14
14
  def compile(*args)
15
- pool = Thread.pool(10)
16
15
  unless environment
17
16
  raise Error, "manifest requires environment for compilation"
18
17
  end
@@ -20,8 +19,10 @@ Sprockets::Manifest.class_eval do
20
19
  paths = environment.each_logical_path(*args).to_a +
21
20
  args.flatten.select { |fn| Pathname.new(fn).absolute? if fn.is_a?(String)}
22
21
 
22
+ thread_pool = Thread.pool(10)
23
+
23
24
  paths.each do |path|
24
- pool.process do
25
+ thread_pool.process do
25
26
  if asset = find_asset(path)
26
27
  files[asset.digest_path] = {
27
28
  'logical_path' => asset.logical_path,
@@ -43,7 +44,8 @@ Sprockets::Manifest.class_eval do
43
44
  end
44
45
  end
45
46
  end
46
- pool.shutdown
47
+ thread_pool.wait_done
48
+
47
49
  save
48
50
  paths
49
51
  end
@@ -1,5 +1,5 @@
1
1
  module Racing
2
2
  module Sprockets
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: racing-sprockets
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Craig McNamara
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-13 00:00:00.000000000 Z
12
+ date: 2013-11-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  version_requirements: !ruby/object:Gem::Requirement