opal-rails 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddabe95eaa8e0f4d729df7a754cd5c966c88af58
4
- data.tar.gz: d4c69cdd6223476840d62002e8305cdd72662b66
3
+ metadata.gz: 8fed15fdb17a5c9efd8ebd4797a10db2da7dfe2a
4
+ data.tar.gz: 4e0a78c92215cd5ba1519afdbd717b4ad4ae05ea
5
5
  SHA512:
6
- metadata.gz: da48c552e451f18503883e748d5a91fe4b2da94ac5ecf9b32144981c6e6da87673d6da6ef63d568793d271e52e51229ac9723c39a7ed7d9fee09bea7f6063879
7
- data.tar.gz: a9155d595d4addd98d618e4ba14063817710f89676cdc25d6995ea3182f40c27582b87b71a8a529c1fe8284770079e1dee37d9c9993fa9b26522ff7f05dd3bd6
6
+ metadata.gz: 9eb90df0d27ac7759526c989fed3f4a84ff7e1f6d0ddd10a83dc3342c025b7f3657b08829a5b280ab95bd539cf09359343f518062158361a0cb387bd2175b51a
7
+ data.tar.gz: 35442c84f4a451546c8c3cfbad235f10713567965bd1a11a6553caee2f3b8c52c5a89e4e51614da9e996699762afa2671fcef06143fd50a185e491f5b29e697f
data/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  [![Build Status](https://secure.travis-ci.org/elia/opal-rails.png)](http://travis-ci.org/elia/opal-rails)
4
4
  [![Code Climate](https://codeclimate.com/github/elia/opal-rails.png)](https://codeclimate.com/github/elia/opal-rails)
5
5
  [![Gem Version](https://badge.fury.io/rb/opal-rails.png)](http://badge.fury.io/rb/opal-rails)
6
+ ![fun guaranteed](http://b.repl.ca/v1/fun-guaranteed-brightgreen.png)
6
7
 
7
8
  _Rails (3.2+, 4.0) bindings for [Opal Ruby](http://opalrb.org) engine. ([Changelog](https://github.com/opal/opal-rails/blob/master/CHANGELOG.md))_
8
9
 
@@ -42,7 +43,9 @@ end
42
43
 
43
44
  ### Gotchas
44
45
 
45
- After changing the version of the `opal` gem (e.g. via `bundle update opal`) or any configuration flag **you should trash the `#{Rails.root}/tmp/cache/assets` folder**, otherwise you could see a cached source compiled before the change.
46
+ <del>After changing the version of the `opal` gem (e.g. via `bundle update opal`) or any configuration flag **you should trash the `#{Rails.root}/tmp/cache/assets` folder**, otherwise you could see a cached source compiled before the change.</del>
47
+
48
+ Now ships with a patch to sprockets cache key to include processor version that is also in this [pull request](https://github.com/sstephenson/sprockets/pull/508).
46
49
 
47
50
 
48
51
 
data/lib/opal/rails.rb CHANGED
@@ -5,6 +5,7 @@ require 'opal-rspec'
5
5
 
6
6
  require 'opal/rails/engine'
7
7
  require 'opal/rails/template_handler'
8
+ require 'opal/rails/sprockets_cache_key_fix'
8
9
  require 'opal/rails/version'
9
10
 
10
11
  require 'jquery-rails'
@@ -34,7 +34,7 @@ module Opal
34
34
  end
35
35
 
36
36
  app.routes.prepend do
37
- if config.opal.source_map_enabled
37
+ if Opal::Processor.source_map_enabled
38
38
  maps_app = Opal::SourceMapServer.new(app.assets)
39
39
  mount maps_app => maps_app.prefix
40
40
  end
@@ -0,0 +1,19 @@
1
+ require 'sprockets/base'
2
+ require 'opal/version'
3
+ require 'opal/sprockets/processor'
4
+
5
+ def (Opal::Processor).version
6
+ Opal::VERSION
7
+ end unless Opal::Processor.respond_to? :version
8
+
9
+ class Sprockets::Base
10
+ def cache_key_for(path, options)
11
+ processors = attributes_for(path).processors
12
+ processors_key = processors.map do |p|
13
+ version = p.respond_to?(:version) ? p.version : '0'
14
+ "#{p.name}-#{version}"
15
+ end.join(':')
16
+
17
+ "#{path}:#{options[:bundle] ? '1' : '0'}:#{processors_key}"
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  module Rails
3
- VERSION = '0.6.1'
3
+ VERSION = '0.6.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elia Schito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-06 00:00:00.000000000 Z
11
+ date: 2013-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -207,6 +207,7 @@ files:
207
207
  - lib/opal/rails.rb
208
208
  - lib/opal/rails/engine.rb
209
209
  - lib/opal/rails/haml_filter.rb
210
+ - lib/opal/rails/sprockets_cache_key_fix.rb
210
211
  - lib/opal/rails/template_handler.rb
211
212
  - lib/opal/rails/version.rb
212
213
  - lib/tasks/opal-rails_tasks.rake
@@ -275,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
275
276
  version: '0'
276
277
  requirements: []
277
278
  rubyforge_project: opal-rails
278
- rubygems_version: 2.1.2
279
+ rubygems_version: 2.1.11
279
280
  signing_key:
280
281
  specification_version: 4
281
282
  summary: Rails bindings for opal JS engine