turbo-sprockets-rails4 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +10 -0
- data/README.md +50 -0
- data/Rakefile +23 -0
- data/lib/turbo-sprockets-rails4.rb +9 -0
- data/lib/turbo-sprockets/parallel_compiler.rb +100 -0
- data/lib/turbo-sprockets/railtie.rb +15 -0
- data/lib/turbo-sprockets/version.rb +3 -0
- data/spec/app/assets/javascripts/file1.js +3 -0
- data/spec/app/assets/javascripts/file2.js +3 -0
- data/spec/config/application.rb +13 -0
- data/spec/log/test.log +0 -0
- data/spec/parallel_compiler_spec.rb +55 -0
- data/spec/public/assets/file1-9461265d541718e5776632b202c4ccdd21f13d9cd7d0b4d92c1b43131292749a.js +4 -0
- data/spec/public/assets/file1-9461265d541718e5776632b202c4ccdd21f13d9cd7d0b4d92c1b43131292749a.js.gz +0 -0
- data/spec/public/assets/file2-e2a24754a5ca8cb2f9c645a80ad4d4ca375c4d9914f1d962b4fb3e779dc4ad34.js +4 -0
- data/spec/public/assets/file2-e2a24754a5ca8cb2f9c645a80ad4d4ca375c4d9914f1d962b4fb3e779dc4ad34.js.gz +0 -0
- data/spec/spec_helper.rb +66 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/-m/-mYOrHQQw4eQz_Ht_LzLRCkKUaiPsHUZnmBchCOMAQU.cache +0 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/0g/0geAvurz1AX0xI67Ou6WBG0HEnHLFZG5Rbvog7JuFh8.cache +1 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/F9/F9uLDkuCpwXDtwzIob92yhwmsuBy0NUF2GnJGRiyWF4.cache +0 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/FA/FA7o1GffPYj_2A2EsHqBM8vMKfdSdGYJzMYpjhkXAxE.cache +0 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/Ny/Ny4Hng5x4A-TVYWIKr0AjzqV9U32nMfeROjIYX3t1zc.cache +1 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/Oo/OoRDv9ysw5g18-975bcUUGTFBnb0-ShhbDgUqo-VuOU.cache +2 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/Py/PyP_Z86btB-ByMXeasgN-buL98MfdATp8WPzc8AWy6c.cache +1 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/Yi/Yi_k91msAv7kbymP50BwVfhkKwo_XMEZIJmMf6LgTAA.cache +1 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/_4/_4pm9XADf-SWLKsx4Qea0XRAZetvbGWa8MQf_aMqcm0.cache +3 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/b8/b8XCYwFHJAQi_UQnYIe_rPgE6W5gMlmY69smkT7lUUg.cache +1 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/c5/c5fWyhSDQYpk5wBXxoIj4L8d8VRI5fx8BA-Vusc-Tm8.cache +3 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/fi/fide8IvH1RAoWxoK8yipcMFLPqQym3YmbZs93J5nyGM.cache +2 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/rs/rsmYKfF63AJstBxp9BfJQ_Alz93hJXeRW6AlZasgAg8.cache +0 -0
- data/spec/tmp/cache/assets/sprockets/v3.0/sk/skLSgxSN-gAyttjzKsGZfvS6147mrFxxK3ztXCqNNP8.cache +1 -0
- data/turbo-sprockets-rails4.gemspec +22 -0
- metadata +123 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1854ff556095ce844de7a1c0a0220bc604343cff
|
4
|
+
data.tar.gz: 0f526c593fc25dee2804ec227fa4da3924262015
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9d634af0655938051494b90372b40a497248c443c548f232cab6c813603b0cad5e3f3c16edd810a4fa32dd17df168e90ce0292e070953c79f46f55a00ee19591
|
7
|
+
data.tar.gz: 94c3356a12c24d286825a77f8d2ff2bc985cac3552019a5040f84875648ae50ea7e77e990c6cd847400be3b60f21be6f5da22f113bb7a73d56fce7d24a9f6771
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
## turbo-sprockets-rails4
|
2
|
+
Speed up asset precompliation by compiling assets in parallel.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
`gem install turbo-sprockets-rails4`
|
7
|
+
|
8
|
+
or put it in your Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'turbo-sprockets-rails4'
|
12
|
+
```
|
13
|
+
|
14
|
+
### Rationale
|
15
|
+
|
16
|
+
In a large Rails application, assets can take a very long time to precompile. It can be a real drag on productivity and deployments to have to wait until your assets are done precompiling. Although the slowness can be attributed to a number of factors, one of the most significant has to do with Ruby's single-threaded execution model. Most servers and laptops these days come with multiple processors or cores, but Rails doesn't take advantage of them. Wouldn't it be nice if we could put all our CPU cores to work precompiling assets?
|
17
|
+
|
18
|
+
That's where this gem comes in. turbo-sprockets is capable of precompiling assets in parallel, using all the CPU cores available on your laptop or server. Generally this translates into a substantial speed increase. In one of the large codebases I've worked on, turbo-sprockets decreased the total precompile time from ~12 minutes to ~2 minutes using the four cores on my laptop.
|
19
|
+
|
20
|
+
### Getting Started
|
21
|
+
|
22
|
+
turbo-sprockets is designed to work as a drop-in addition to your Rails app. Adding it to your Gemfile and running `bundle install` should be all that's necessary to enable your application to precompile assets in parallel.
|
23
|
+
|
24
|
+
### Configuration
|
25
|
+
|
26
|
+
Rather than guess how many CPU cores your computer has (which can be error prone), turbo-sprockets asks that you set the `SPROCKETS_WORKER_COUNT` environment variable (2 cores are used by default). For example, to precompile using 4 workers, you might run:
|
27
|
+
|
28
|
+
```bash
|
29
|
+
SPROCKETS_WORKER_COUNT=4 bundle exec rake assets:precompile
|
30
|
+
```
|
31
|
+
|
32
|
+
### How Does it Work?
|
33
|
+
|
34
|
+
Under the hood, turbo-sprockets uses the [parallel](https://github.com/grosser/parallel) gem to divide your assets up amongst the available CPUs. It works by [forking](https://en.wikipedia.org/wiki/Fork_(system_call)) into multiple system processes which are executed in parallel by your operating system.
|
35
|
+
|
36
|
+
### Supported Platforms
|
37
|
+
|
38
|
+
turbo-sprockets works with any Ruby that supports `Process#fork` such as the Rubies that run on most flavors of Unix, Linux, BSD, and MacOS. It won't work on Windows. Specifically, if `Process#fork` isn't available, turbo-sprockets won't raise an error, but it also won't provide any sort of speed improvement.
|
39
|
+
|
40
|
+
### Disclaimer
|
41
|
+
|
42
|
+
Everybody's setup is a little different, so please remember that, with respect to turbo-sprockets, your mileage may vary. You may see an increase in precompliation speed or none at all depending on the mix of assets in your application.
|
43
|
+
|
44
|
+
## License
|
45
|
+
|
46
|
+
Licensed under the MIT license. See LICENSE for details.
|
47
|
+
|
48
|
+
## Authors
|
49
|
+
|
50
|
+
* Cameron C. Dutro: http://github.com/camertron
|
data/Rakefile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
$:.unshift File.join(File.dirname(__FILE__), 'lib')
|
4
|
+
|
5
|
+
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
6
|
+
|
7
|
+
require 'bundler'
|
8
|
+
require 'pry-byebug'
|
9
|
+
require 'rspec/core/rake_task'
|
10
|
+
require 'rubygems/package_task'
|
11
|
+
|
12
|
+
require 'rails'
|
13
|
+
require 'sprockets/railtie'
|
14
|
+
require 'turbo-sprockets-rails4'
|
15
|
+
|
16
|
+
Bundler::GemHelper.install_tasks
|
17
|
+
|
18
|
+
task default: :spec
|
19
|
+
|
20
|
+
desc 'Run specs'
|
21
|
+
RSpec::Core::RakeTask.new do |t|
|
22
|
+
t.pattern = './spec/**/*_spec.rb'
|
23
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'benchmark'
|
2
|
+
require 'parallel'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module TurboSprockets
|
6
|
+
class ParallelCompiler
|
7
|
+
DEFAULT_WORKER_COUNT = 2
|
8
|
+
|
9
|
+
attr_reader :manifest
|
10
|
+
|
11
|
+
def initialize(manifest)
|
12
|
+
@manifest = manifest
|
13
|
+
end
|
14
|
+
|
15
|
+
def compile(*args)
|
16
|
+
logger.warn "Precompiling with #{worker_count} workers"
|
17
|
+
|
18
|
+
time = Benchmark.measure do
|
19
|
+
results = compile_in_parallel(find_precompile_paths(*args))
|
20
|
+
write_manifest(results)
|
21
|
+
end
|
22
|
+
|
23
|
+
logger.info "Completed precompiling assets (#{time.real.round(2)}s)"
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def write_manifest(results)
|
29
|
+
File.write(manifest.filename, results.to_json)
|
30
|
+
end
|
31
|
+
|
32
|
+
def compile_in_parallel(paths)
|
33
|
+
flatten_precomp_results(
|
34
|
+
Parallel.map(paths, in_processes: worker_count) do |path|
|
35
|
+
manifest.compile_without_parallelism([path])
|
36
|
+
|
37
|
+
{ 'files' => {}, 'assets' => {} }.tap do |data|
|
38
|
+
manifest.find([path]) do |asset|
|
39
|
+
logger.info("Writing #{asset.digest_path}")
|
40
|
+
|
41
|
+
data['files'][asset.digest_path] = properties_for(asset)
|
42
|
+
data['assets'][asset.logical_path] = asset.digest_path
|
43
|
+
|
44
|
+
if alias_logical_path = manifest.class.compute_alias_logical_path(asset.logical_path)
|
45
|
+
data['assets'][alias_logical_path] = asset.digest_path
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
def flatten_precomp_results(results)
|
54
|
+
results.each_with_object({}) do |result, ret|
|
55
|
+
result.each_pair do |key, data|
|
56
|
+
(ret[key] ||= {}).merge!(data)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def find_precompile_paths(*args)
|
62
|
+
paths, filters = args.flatten.partition do |pre|
|
63
|
+
manifest.class.simple_logical_path?(pre)
|
64
|
+
end
|
65
|
+
|
66
|
+
filters = filters.map do |filter|
|
67
|
+
manifest.class.compile_match_filter(filter)
|
68
|
+
end
|
69
|
+
|
70
|
+
environment.logical_paths.each do |logical_path, filename|
|
71
|
+
if filters.any? { |f| f.call(logical_path, filename) }
|
72
|
+
paths << filename
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
paths
|
77
|
+
end
|
78
|
+
|
79
|
+
def properties_for(asset)
|
80
|
+
{
|
81
|
+
'logical_path' => asset.logical_path,
|
82
|
+
'mtime' => asset.mtime.iso8601,
|
83
|
+
'size' => asset.bytesize,
|
84
|
+
'digest' => asset.hexdigest,
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
88
|
+
def worker_count
|
89
|
+
@worker_count ||= ENV.fetch('SPROCKETS_WORKER_COUNT', DEFAULT_WORKER_COUNT).to_i
|
90
|
+
end
|
91
|
+
|
92
|
+
def environment
|
93
|
+
manifest.environment
|
94
|
+
end
|
95
|
+
|
96
|
+
def logger
|
97
|
+
::TurboSprockets.logger
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module TurboSprockets
|
2
|
+
class Railtie < ::Rails::Railtie
|
3
|
+
initializer 'turbo-sprockets' do
|
4
|
+
unless Sprockets::Manifest.method_defined?(:compile_with_parallelism)
|
5
|
+
Sprockets::Manifest.class_eval do
|
6
|
+
def compile_with_parallelism(*args)
|
7
|
+
::TurboSprockets::ParallelCompiler.new(self).compile(*args)
|
8
|
+
end
|
9
|
+
|
10
|
+
alias_method_chain :compile, :parallelism
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module TurboSprockets
|
2
|
+
class DummyApplication < ::Rails::Application
|
3
|
+
config.eager_load = false
|
4
|
+
config.active_support.deprecation = :stderr
|
5
|
+
|
6
|
+
config.assets.enabled = true
|
7
|
+
config.assets.compile = true
|
8
|
+
config.assets.allow_debugging = true
|
9
|
+
config.assets.digest = true
|
10
|
+
config.assets.manifest = 'spec/public/assets/.sprockets-manifest.json'
|
11
|
+
config.assets.precompile += %w(file1.js file2.js)
|
12
|
+
end
|
13
|
+
end
|
data/spec/log/test.log
ADDED
File without changes
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe TurboSprockets::ParallelCompiler do
|
4
|
+
def precompile!
|
5
|
+
Rake::Task['assets:precompile'].reenable
|
6
|
+
Rake::Task['assets:precompile'].invoke
|
7
|
+
end
|
8
|
+
|
9
|
+
def with_env(env)
|
10
|
+
# ENV can't be duped, so use select instead to make a copy
|
11
|
+
old_env = ENV.select { true }
|
12
|
+
env.each_pair { |k, v| ENV[k] = v }
|
13
|
+
yield
|
14
|
+
ensure
|
15
|
+
# reset back to old vars
|
16
|
+
env.each_pair { |k, _| ENV[k] = old_env[k] }
|
17
|
+
end
|
18
|
+
|
19
|
+
let(:files) do
|
20
|
+
{
|
21
|
+
'file1.js' => 'file1-9461265d541718e5776632b202c4ccdd21f13d9cd7d0b4d92c1b43131292749a.js',
|
22
|
+
'file2.js' => 'file2-e2a24754a5ca8cb2f9c645a80ad4d4ca375c4d9914f1d962b4fb3e779dc4ad34.js'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'precompiles all assets' do
|
27
|
+
# make sure we have _some_ way of knowing parallel compliation is happening
|
28
|
+
expect(Parallel).to receive(:map).and_call_original
|
29
|
+
|
30
|
+
precompile!
|
31
|
+
|
32
|
+
files.each do |logical_path, digest_path|
|
33
|
+
expect(assets_dir.join(digest_path)).to exist
|
34
|
+
expect(assets_dir.join("#{digest_path}.gz")).to exist
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'writes a manifest' do
|
39
|
+
precompile!
|
40
|
+
expect(Pathname(app.config.assets.manifest)).to exist
|
41
|
+
manifest = JSON.parse(File.read(app.config.assets.manifest))
|
42
|
+
expect(manifest['assets']).to eq(files)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'uses the specified number of workers' do
|
46
|
+
logger = CapturingLogger.new
|
47
|
+
allow(TurboSprockets).to receive(:logger).and_return(logger)
|
48
|
+
|
49
|
+
with_env('SPROCKETS_WORKER_COUNT' => '4') do
|
50
|
+
precompile!
|
51
|
+
end
|
52
|
+
|
53
|
+
expect(logger.messages).to include([:warn, 'Precompiling with 4 workers'])
|
54
|
+
end
|
55
|
+
end
|
data/spec/public/assets/file1-9461265d541718e5776632b202c4ccdd21f13d9cd7d0b4d92c1b43131292749a.js.gz
ADDED
Binary file
|
data/spec/public/assets/file2-e2a24754a5ca8cb2f9c645a80ad4d4ca375c4d9914f1d962b4fb3e779dc4ad34.js.gz
ADDED
Binary file
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
$:.push(File.dirname(__FILE__))
|
4
|
+
|
5
|
+
require 'rspec'
|
6
|
+
require 'pry-byebug'
|
7
|
+
|
8
|
+
require 'rails'
|
9
|
+
require 'rake'
|
10
|
+
require 'sprockets/railtie'
|
11
|
+
|
12
|
+
ENV['RAILS_ENV'] ||= 'test'
|
13
|
+
|
14
|
+
require 'turbo-sprockets-rails4'
|
15
|
+
|
16
|
+
Dir.chdir('spec') do
|
17
|
+
require File.expand_path('../config/application', __FILE__)
|
18
|
+
TurboSprockets::DummyApplication.initialize!
|
19
|
+
TurboSprockets::DummyApplication.load_tasks # used by precompilation specs
|
20
|
+
end
|
21
|
+
|
22
|
+
module LetDeclarations
|
23
|
+
extend RSpec::SharedContext
|
24
|
+
|
25
|
+
let(:app) do
|
26
|
+
Rails.application
|
27
|
+
end
|
28
|
+
|
29
|
+
let(:assets_dir) do
|
30
|
+
TurboSprockets::DummyApplication.root.join('public/assets')
|
31
|
+
end
|
32
|
+
|
33
|
+
let(:tmp_dir) do
|
34
|
+
TurboSprockets::DummyApplication.root.join('tmp')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
class CapturingLogger
|
39
|
+
attr_reader :messages
|
40
|
+
|
41
|
+
def initialize
|
42
|
+
@messages = []
|
43
|
+
end
|
44
|
+
|
45
|
+
def info(msg)
|
46
|
+
messages << [:info, msg]
|
47
|
+
end
|
48
|
+
|
49
|
+
def warn(msg)
|
50
|
+
messages << [:warn, msg]
|
51
|
+
end
|
52
|
+
|
53
|
+
def error(msg)
|
54
|
+
messages << [:error, msg]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
RSpec.configure do |config|
|
59
|
+
config.include(LetDeclarations)
|
60
|
+
|
61
|
+
config.before(:each) do
|
62
|
+
FileUtils.rm_rf(tmp_dir)
|
63
|
+
FileUtils.rm_rf(assets_dir)
|
64
|
+
FileUtils.mkdir_p(assets_dir)
|
65
|
+
end
|
66
|
+
end
|
data/spec/tmp/cache/assets/sprockets/v3.0/-m/-mYOrHQQw4eQz_Ht_LzLRCkKUaiPsHUZnmBchCOMAQU.cache
ADDED
Binary file
|
data/spec/tmp/cache/assets/sprockets/v3.0/0g/0geAvurz1AX0xI67Ou6WBG0HEnHLFZG5Rbvog7JuFh8.cache
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"%h,t�[�J�!�R����S$I�9Q�F2��^g�
|
data/spec/tmp/cache/assets/sprockets/v3.0/F9/F9uLDkuCpwXDtwzIob92yhwmsuBy0NUF2GnJGRiyWF4.cache
ADDED
Binary file
|
data/spec/tmp/cache/assets/sprockets/v3.0/FA/FA7o1GffPYj_2A2EsHqBM8vMKfdSdGYJzMYpjhkXAxE.cache
ADDED
Binary file
|
data/spec/tmp/cache/assets/sprockets/v3.0/Ny/Ny4Hng5x4A-TVYWIKr0AjzqV9U32nMfeROjIYX3t1zc.cache
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
I"app/assets/javascripts/file1.js?type=application/javascript&id=fd26267e172201fa2d3b128fce4cb1a53c227f28aa0b693ac2708a9ab0b44ea2:ET
|
data/spec/tmp/cache/assets/sprockets/v3.0/Oo/OoRDv9ysw5g18-975bcUUGTFBnb0-ShhbDgUqo-VuOU.cache
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
[o:Set:
|
2
|
+
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"2file-digest://app/assets/javascripts/file1.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTF
|
data/spec/tmp/cache/assets/sprockets/v3.0/Py/PyP_Z86btB-ByMXeasgN-buL98MfdATp8WPzc8AWy6c.cache
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
I"app/assets/javascripts/file2.js?type=application/javascript&id=8e7ad17b3e9d5262767b265f3b265c1f5fc9742a2782ce3232b8087632963d4d:ET
|
data/spec/tmp/cache/assets/sprockets/v3.0/Yi/Yi_k91msAv7kbymP50BwVfhkKwo_XMEZIJmMf6LgTAA.cache
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"%N�a�t�%�چ�e�o/���H.����t⠝
|
data/spec/tmp/cache/assets/sprockets/v3.0/b8/b8XCYwFHJAQi_UQnYIe_rPgE6W5gMlmY69smkT7lUUg.cache
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
I"�app/assets/javascripts/file2.js?type=application/javascript&pipeline=self&id=93fac2a2152bd5b89fdb8f97fd3fac83e8b82a3621681c1f077981a977775fcf:ET
|
data/spec/tmp/cache/assets/sprockets/v3.0/fi/fide8IvH1RAoWxoK8yipcMFLPqQym3YmbZs93J5nyGM.cache
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
[o:Set:
|
2
|
+
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"2file-digest://app/assets/javascripts/file2.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTF
|
data/spec/tmp/cache/assets/sprockets/v3.0/rs/rsmYKfF63AJstBxp9BfJQ_Alz93hJXeRW6AlZasgAg8.cache
ADDED
Binary file
|
data/spec/tmp/cache/assets/sprockets/v3.0/sk/skLSgxSN-gAyttjzKsGZfvS6147mrFxxK3ztXCqNNP8.cache
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
I"�app/assets/javascripts/file1.js?type=application/javascript&pipeline=self&id=18ce48382a6f42ab81da8c115f1e4c686ad07b2fec30a431a20e627dd718ae7f:ET
|
@@ -0,0 +1,22 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), 'lib')
|
2
|
+
require 'turbo-sprockets/version'
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'turbo-sprockets-rails4'
|
6
|
+
s.version = ::TurboSprockets::VERSION
|
7
|
+
s.authors = ['Cameron Dutro']
|
8
|
+
s.email = ['camertron@gmail.com']
|
9
|
+
s.homepage = 'http://github.com/camertron'
|
10
|
+
|
11
|
+
s.description = s.summary = 'Speed up asset precompliation by compiling assets in parallel.'
|
12
|
+
|
13
|
+
s.platform = Gem::Platform::RUBY
|
14
|
+
s.has_rdoc = true
|
15
|
+
|
16
|
+
s.add_dependency 'parallel', '~> 1.0'
|
17
|
+
s.add_dependency 'railties', '>= 4', '< 5'
|
18
|
+
s.add_dependency 'sprockets', '~> 3.0'
|
19
|
+
|
20
|
+
s.require_path = 'lib'
|
21
|
+
s.files = Dir['{lib,spec}/**/*', 'Gemfile', 'README.md', 'Rakefile', 'turbo-sprockets-rails4.gemspec']
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: turbo-sprockets-rails4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Cameron Dutro
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-05-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: parallel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: railties
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '5'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '4'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '5'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sprockets
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3.0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3.0'
|
61
|
+
description: Speed up asset precompliation by compiling assets in parallel.
|
62
|
+
email:
|
63
|
+
- camertron@gmail.com
|
64
|
+
executables: []
|
65
|
+
extensions: []
|
66
|
+
extra_rdoc_files: []
|
67
|
+
files:
|
68
|
+
- Gemfile
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- lib/turbo-sprockets-rails4.rb
|
72
|
+
- lib/turbo-sprockets/parallel_compiler.rb
|
73
|
+
- lib/turbo-sprockets/railtie.rb
|
74
|
+
- lib/turbo-sprockets/version.rb
|
75
|
+
- spec/app/assets/javascripts/file1.js
|
76
|
+
- spec/app/assets/javascripts/file2.js
|
77
|
+
- spec/config/application.rb
|
78
|
+
- spec/log/test.log
|
79
|
+
- spec/parallel_compiler_spec.rb
|
80
|
+
- spec/public/assets/file1-9461265d541718e5776632b202c4ccdd21f13d9cd7d0b4d92c1b43131292749a.js
|
81
|
+
- spec/public/assets/file1-9461265d541718e5776632b202c4ccdd21f13d9cd7d0b4d92c1b43131292749a.js.gz
|
82
|
+
- spec/public/assets/file2-e2a24754a5ca8cb2f9c645a80ad4d4ca375c4d9914f1d962b4fb3e779dc4ad34.js
|
83
|
+
- spec/public/assets/file2-e2a24754a5ca8cb2f9c645a80ad4d4ca375c4d9914f1d962b4fb3e779dc4ad34.js.gz
|
84
|
+
- spec/spec_helper.rb
|
85
|
+
- spec/tmp/cache/assets/sprockets/v3.0/-m/-mYOrHQQw4eQz_Ht_LzLRCkKUaiPsHUZnmBchCOMAQU.cache
|
86
|
+
- spec/tmp/cache/assets/sprockets/v3.0/0g/0geAvurz1AX0xI67Ou6WBG0HEnHLFZG5Rbvog7JuFh8.cache
|
87
|
+
- spec/tmp/cache/assets/sprockets/v3.0/F9/F9uLDkuCpwXDtwzIob92yhwmsuBy0NUF2GnJGRiyWF4.cache
|
88
|
+
- spec/tmp/cache/assets/sprockets/v3.0/FA/FA7o1GffPYj_2A2EsHqBM8vMKfdSdGYJzMYpjhkXAxE.cache
|
89
|
+
- spec/tmp/cache/assets/sprockets/v3.0/Ny/Ny4Hng5x4A-TVYWIKr0AjzqV9U32nMfeROjIYX3t1zc.cache
|
90
|
+
- spec/tmp/cache/assets/sprockets/v3.0/Oo/OoRDv9ysw5g18-975bcUUGTFBnb0-ShhbDgUqo-VuOU.cache
|
91
|
+
- spec/tmp/cache/assets/sprockets/v3.0/Py/PyP_Z86btB-ByMXeasgN-buL98MfdATp8WPzc8AWy6c.cache
|
92
|
+
- spec/tmp/cache/assets/sprockets/v3.0/Yi/Yi_k91msAv7kbymP50BwVfhkKwo_XMEZIJmMf6LgTAA.cache
|
93
|
+
- spec/tmp/cache/assets/sprockets/v3.0/_4/_4pm9XADf-SWLKsx4Qea0XRAZetvbGWa8MQf_aMqcm0.cache
|
94
|
+
- spec/tmp/cache/assets/sprockets/v3.0/b8/b8XCYwFHJAQi_UQnYIe_rPgE6W5gMlmY69smkT7lUUg.cache
|
95
|
+
- spec/tmp/cache/assets/sprockets/v3.0/c5/c5fWyhSDQYpk5wBXxoIj4L8d8VRI5fx8BA-Vusc-Tm8.cache
|
96
|
+
- spec/tmp/cache/assets/sprockets/v3.0/fi/fide8IvH1RAoWxoK8yipcMFLPqQym3YmbZs93J5nyGM.cache
|
97
|
+
- spec/tmp/cache/assets/sprockets/v3.0/rs/rsmYKfF63AJstBxp9BfJQ_Alz93hJXeRW6AlZasgAg8.cache
|
98
|
+
- spec/tmp/cache/assets/sprockets/v3.0/sk/skLSgxSN-gAyttjzKsGZfvS6147mrFxxK3ztXCqNNP8.cache
|
99
|
+
- turbo-sprockets-rails4.gemspec
|
100
|
+
homepage: http://github.com/camertron
|
101
|
+
licenses: []
|
102
|
+
metadata: {}
|
103
|
+
post_install_message:
|
104
|
+
rdoc_options: []
|
105
|
+
require_paths:
|
106
|
+
- lib
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
requirements: []
|
118
|
+
rubyforge_project:
|
119
|
+
rubygems_version: 2.5.2
|
120
|
+
signing_key:
|
121
|
+
specification_version: 4
|
122
|
+
summary: Speed up asset precompliation by compiling assets in parallel.
|
123
|
+
test_files: []
|