redjs-sprockets 0.1.2 → 0.2.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: f8be159e593e45b4c159c44b8aed36accf07db62
4
- data.tar.gz: 0d62a1b717d11ff9f2dcd7685930eb87d728d04c
3
+ metadata.gz: f489bcea536400bb0fd1e76cbb954315e449c00e
4
+ data.tar.gz: e769556a216ea9d387a01dbe97c477b1a8bcac5c
5
5
  SHA512:
6
- metadata.gz: 23dad44cc9e48fd5bc010034aaee65e7c133438e572295f6bbf1eb679be02d3087e0b618688761cb4682a99b2d5dafb1a042d21d10a5aaf7e993bc6207b78b3f
7
- data.tar.gz: ed31f74f17e3302ce703ab4b5257b41d04f7e5052ef9d64d8a0f9780d3ad3a7ef727ac52fa7c25065730f98276ec110988f47a7bacf7eff07a33aecefec527a4
6
+ metadata.gz: 0eaa59fddff0a77472e7261e9bda96a50541af3eeed610a89a9fb40d8938195a6ff09652be2930cb005a2a8df533830e2b8c1d66d5ef969e247a55b31a4e9b8d
7
+ data.tar.gz: e781e45f5560613caf28b086442626ae7af82aa98e422cc116a460078b89fbfd7a152c4a2f7fe39dd5616961105cc35ebc1b11ff1e018729b560f4f5ba7d98b7
@@ -1,7 +1,7 @@
1
1
  ( function ( context ) {
2
2
 
3
3
  var reds = {};
4
-
4
+
5
5
  var $require = function ( key ) {
6
6
 
7
7
  if ( reds.hasOwnProperty( key ) ) return reds[ key ];
@@ -14,6 +14,8 @@ module Redjs
14
14
 
15
15
  super
16
16
 
17
+ Redjs::Sprockets.auto_usage_paths.merge options[ :auto_usage ]
18
+
17
19
  ::Tilt.register :red, Redjs::Sprockets
18
20
 
19
21
  app.after_configuration do
@@ -22,8 +24,6 @@ module Redjs
22
24
 
23
25
  end
24
26
 
25
- Redjs::Sprockets.auto_usage_paths.merge options[ :auto_usage ]
26
-
27
27
  end
28
28
 
29
29
  end
@@ -11,7 +11,7 @@ module Redjs
11
11
 
12
12
  result = Redjs::Processor.process context.logical_path, data
13
13
 
14
- result[ :required ].each{ | required_path | context.require_asset required_path }
14
+ result[ :required ].each { | required_path | context.require_asset required_path }
15
15
 
16
16
  result[ :data ]
17
17
 
@@ -27,13 +27,15 @@ module Redjs
27
27
 
28
28
  sprockets.append_path Redjs::JAVASCRIPTS_PATH
29
29
 
30
+ auto_usage_paths.each { | auto_usage | sprockets.prepend_path auto_usage }
31
+
30
32
  sprockets.register_engine :red, self
31
33
 
32
34
  sprockets.register_postprocessor default_mime_type, :red do | context, data |
33
35
 
34
36
  path = context.pathname.to_s
35
37
 
36
- if path !~ /\.red[^\/]*$/ && auto_usage_paths.any?{ | allowed | path.include?( allowed.to_s ) }
38
+ if path !~ /\.red[^\/]*$/ && auto_usage_paths.any? { | auto_usage | path.include?( auto_usage.to_s ) }
37
39
 
38
40
  @processor.call context, data
39
41
 
data/lib/redjs/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Redjs
2
2
 
3
- VERSION = '0.1.2'
3
+ VERSION = '0.2.2'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redjs-sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Maganov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-27 00:00:00.000000000 Z
11
+ date: 2015-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec