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 +4 -4
- data/README.md +4 -1
- data/lib/opal/rails.rb +1 -0
- data/lib/opal/rails/engine.rb +1 -1
- data/lib/opal/rails/sprockets_cache_key_fix.rb +19 -0
- data/lib/opal/rails/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fed15fdb17a5c9efd8ebd4797a10db2da7dfe2a
|
4
|
+
data.tar.gz: 4e0a78c92215cd5ba1519afdbd717b4ad4ae05ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/opal/rails/engine.rb
CHANGED
@@ -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
|
data/lib/opal/rails/version.rb
CHANGED
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.
|
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
|
+
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.
|
279
|
+
rubygems_version: 2.1.11
|
279
280
|
signing_key:
|
280
281
|
specification_version: 4
|
281
282
|
summary: Rails bindings for opal JS engine
|