sprockets-coffee-react 3.4.0 → 3.4.1

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: d8bd8ba953b5e675a55b0b47d3f4ea1d881ad783
4
- data.tar.gz: 05ff3369f64f40eac02a8c1bff011f8e2ac7675b
3
+ metadata.gz: 0391e9e5bfb326698e0e8bf7b5655642255dbad0
4
+ data.tar.gz: eb6cb417dc005933e6f0b38dfa040ecb1377a44e
5
5
  SHA512:
6
- metadata.gz: be0a274c95ce44e0d271cf2ab7f41d1410ffb0929c086708d8a05f8e7e301014570da3149f21472795abd124d90d8df47e542c37249cb29be145e153db830da3
7
- data.tar.gz: fce2b52be9640a2944f2380028bf2ae4ae5e4776081c3e0d66d328b872daf0f080d6048ba617f8c17aa898c98c24786b6e7542ac2dc1329ae3664c0e88d3756b
6
+ metadata.gz: 73a7752fd67bb9d918dc9315d4e145e608611701c697a63529258122c34f7454ea677a9088dd5061c95f07480c440f8151863e7690e7ee14bd22b028fd4ee1d6
7
+ data.tar.gz: d057b1bbba38b286b483d50d865bbf67de6b3abce1b4661d1b1ab0be3437d56a1fade793845a223ad2d2665b9f7880bc061225920092adf82b6905afe030571b
@@ -7,22 +7,18 @@ if defined?(Rails)
7
7
  class CoffeeReact
8
8
  class Engine < ::Rails::Engine
9
9
  initializer :setup_coffee_react, :after => "sprockets.environment", :group => :all do |app|
10
+ if app.assets
11
+ configure_env app.assets
12
+ else
13
+ app.config.assets.configure { |env| configure_env env }
14
+ end
15
+ end
10
16
 
11
- # ::Sprockets::CoffeeReact.install(app.assets)
12
-
13
- # unless app.assets.engines['.coffee']
14
- # if defined?(Sprockets::CoffeeScriptTemplate)
15
- # app.assets.register_engine '.coffee', Sprockets::CoffeeScriptTemplate
16
- # else
17
- # app.assets.register_engine '.coffee', Tilt::CoffeeScriptTemplate
18
- # end
19
- # end
20
-
21
- # app.assets.register_preprocessor '.coffee', Sprockets::CoffeeReact
22
- app.assets.register_preprocessor 'application/javascript', Sprockets::CoffeeReact
23
- app.assets.register_postprocessor 'application/javascript', Sprockets::CoffeeReactPostprocessor
24
- app.assets.register_engine '.cjsx', Sprockets::CoffeeReactScript
25
- app.assets.register_engine '.js.cjsx', Sprockets::CoffeeReactScript
17
+ def configure_env(env)
18
+ env.register_preprocessor 'application/javascript', Sprockets::CoffeeReact
19
+ env.register_postprocessor 'application/javascript', Sprockets::CoffeeReactPostprocessor
20
+ env.register_engine '.cjsx', Sprockets::CoffeeReactScript
21
+ env.register_engine '.js.cjsx', Sprockets::CoffeeReactScript
26
22
  end
27
23
  end
28
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-coffee-react
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Friend
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-17 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coffee-react