global 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/global/engine.rb +11 -0
- data/lib/global/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74e88d1ceec15ae147dc103ce73fada9416df172
|
4
|
+
data.tar.gz: c81815b76116e5d9b52fa5760f4d12a5a4b64203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 296fc33e969364671f75a72da7522ead05a45979bf4d9da79e89cc85379adc26f8a4d023f2e3b7819fffc516b5b7c571c1b041f8d0dec0c81e262b289411f532
|
7
|
+
data.tar.gz: 4ae571ebc0c2be750cd5b115a2348dd554f116649cc2b8ef039fd55f17ba99634f14183d83ffe4ff7783ac3a855ee9c1323254e91bf165fe55125d600c1eed0d
|
data/lib/global/engine.rb
CHANGED
@@ -2,5 +2,16 @@
|
|
2
2
|
|
3
3
|
module Global
|
4
4
|
class Engine < ::Rails::Engine
|
5
|
+
GLOBAL_JS_ASSET = 'global-js'
|
6
|
+
|
7
|
+
initializer 'global-js.dependent_on_configs', after: "sprockets.environment" do
|
8
|
+
if Rails.application.assets.respond_to?(:register_preprocessor)
|
9
|
+
configs = Dir.glob("#{Global.config_directory}#{File::SEPARATOR}*.yml")
|
10
|
+
Rails.application.assets.register_preprocessor 'application/javascript', :'global-js_dependent_on_configs' do |ctx, data|
|
11
|
+
configs.map{ |config| ctx.depend_on(config) } if ctx.logical_path == GLOBAL_JS_ASSET
|
12
|
+
data
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
5
16
|
end
|
6
17
|
end
|
data/lib/global/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: global
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Railsware LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|