turbo-sprockets-rails3 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  [![Build Status](https://secure.travis-ci.org/ndbroadbent/turbo-sprockets-rails3.png)](http://travis-ci.org/ndbroadbent/turbo-sprockets-rails3)
4
4
 
5
- * Speeds up the Rails 3 asset pipeline by only recompiling changed assets, based on a hash of their source files
6
- * Generates both non-fingerprinted and fingerprinted assets from a single compile
5
+ * Speeds up your Rails 3 `rake assets:precompile` by only recompiling changed assets, based on a hash of their source files
6
+ * Only compiles once to generate both fingerprinted and non-fingerprinted assets
7
7
 
8
8
  This is a backport of the work I've done for Rails 4.0.0, released as
9
9
  a gem for Rails 3.2.x. (See [sprockets-rails #21](https://github.com/rails/sprockets-rails/pull/21) and [sprockets #367](https://github.com/sstephenson/sprockets/pull/367) for the Rails 4 pull requests.)
@@ -22,7 +22,6 @@ All versions of Ruby that are supported by Rails `3.2.x`, including `1.9.3`, `1.
22
22
  ### Rails
23
23
 
24
24
  This gem only supports Rails `3.2.0` or higher.
25
- Rails `3.1.x` support is not available at this time, because it depends on an outdated version of `sprockets`.
26
25
 
27
26
  ## Usage
28
27
 
@@ -41,6 +40,17 @@ Go on, run `rake assets:precompile` again, and it should be a whole lot faster t
41
40
 
42
41
  Enjoy your lightning fast deploys!
43
42
 
43
+ ## Compatibility
44
+
45
+ ### [asset_sync](https://github.com/rumblelabs/asset_sync)
46
+
47
+ Fully compatible. Just don't use the experimental `AssetSync.config.manifest = true` configuration option until
48
+ [my asset_sync patch](https://github.com/rumblelabs/asset_sync/pull/110) has been merged.
49
+
50
+ <hr/>
51
+
52
+ Please let me know if you have any problems with other gems, and I will either fix it, or make a note of the problem here.
53
+
44
54
  ## Deployments
45
55
 
46
56
  ### Capistrano
@@ -36,13 +36,16 @@ if defined?(Sprockets::StaticCompiler)
36
36
  # to calculate a digest of the concatenated source files
37
37
  asset = env.find_asset(logical_path, :process => false)
38
38
 
39
- # Force digest to UTF-8 for Ruby 1.9, otherwise YAML dumps ASCII-8BIT as !binary
40
- @source_digests[logical_path] = if RUBY_VERSION.to_f >= 1.9
41
- asset.digest.force_encoding("UTF-8")
39
+ # Force digest and path to UTF-8 for Ruby 1.9, otherwise YAML dumps ASCII-8BIT as !binary
40
+ if RUBY_VERSION.to_f >= 1.9
41
+ utf8_digest = asset.digest.force_encoding("UTF-8")
42
+ utf8_path = logical_path.force_encoding("UTF-8")
42
43
  else
43
- asset.digest
44
+ utf8_digest, utf8_path = asset.digest, logical_path
44
45
  end
45
46
 
47
+ @source_digests[utf8_path] = utf8_digest
48
+
46
49
  # Recompile if digest has changed or compiled digest file is missing
47
50
  current_digest_file = @current_digest_files[logical_path]
48
51
 
@@ -64,9 +64,7 @@ namespace :assets do
64
64
  # if assets have been previously compiled with digests.
65
65
  if !config.assets.digest && config.assets.digest_files.any?
66
66
  generator = Sprockets::StaticNonDigestGenerator.new(env, target, config.assets.precompile,
67
- :digest_files => config.assets.digest_files,
68
- :source_digests => config.assets.source_digests
69
- )
67
+ :digest_files => config.assets.digest_files)
70
68
  generator.generate
71
69
  else
72
70
  compiler = Sprockets::StaticCompiler.new(env, target, config.assets.precompile,
@@ -1,3 +1,3 @@
1
1
  module TurboSprockets
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo-sprockets-rails3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-02 00:00:00.000000000 Z
12
+ date: 2012-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets
@@ -135,3 +135,4 @@ test_files:
135
135
  - test/assets_debugging_test.rb
136
136
  - test/sprockets_helper_with_routes_test.rb
137
137
  - test/abstract_unit.rb
138
+ has_rdoc: