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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34fd5c7c444192f6ad38962cc264488bb75794c9
4
- data.tar.gz: d2cf50332549632d30e568e7b84f255aee706b22
3
+ metadata.gz: 74e88d1ceec15ae147dc103ce73fada9416df172
4
+ data.tar.gz: c81815b76116e5d9b52fa5760f4d12a5a4b64203
5
5
  SHA512:
6
- metadata.gz: 138a9a5f829f1a6665101328d839a7e0fa814488ab0c45a3d7ec013344d458eac0df39d28d6a786f6704f2b4956aae2ed48d69a6744a52a4db69d953ce78c02b
7
- data.tar.gz: 7f0ff0af444ed05b31e57dcafb892fa8b1ce7bd077a4e75146fe64a65c0f89a405d56926dedd24570912a74f7c20684cb7f3099a2cfdaf621d1d90700ec66829
6
+ metadata.gz: 296fc33e969364671f75a72da7522ead05a45979bf4d9da79e89cc85379adc26f8a4d023f2e3b7819fffc516b5b7c571c1b041f8d0dec0c81e262b289411f532
7
+ data.tar.gz: 4ae571ebc0c2be750cd5b115a2348dd554f116649cc2b8ef039fd55f17ba99634f14183d83ffe4ff7783ac3a855ee9c1323254e91bf165fe55125d600c1eed0d
@@ -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
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Global
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
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.0
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-06-25 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec