ramen-rails 0.3.1 → 0.4.0

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: 7d4ff91504514b98ad64594de30163106aa9052d
4
- data.tar.gz: 2aa51d9f036d8c9f402df8021dcb661a2f399149
3
+ metadata.gz: e2fd11f0f2fdbc4b14251faddb4ec35e2f89902e
4
+ data.tar.gz: 6f6110a19e75baa8d0fb3143975bc253a9744bde
5
5
  SHA512:
6
- metadata.gz: c494ce67f39c93be6aaa02dffb5c97a057c87450cdc4b5c86beb51d1d347d6883ea1fdbb852a29815e09c7f7c72be7e1f83c64a95da9c2a03aa6f2ff00bc8004
7
- data.tar.gz: 24b3b2f5789501b01fe4d66e35374ccb87e86ee49964b68b4714ca4e92d2431f618830099a7d8eeea89f89391645e4d3277c189618188c87ed6d790455995a43
6
+ metadata.gz: a3b9575bbbf23fa8b13f90b1624c9b342e0c194f5b5d1486f90bed683935fddf3732f51824906047ff558dd76bfa9aa1733cbfff7ca23b0db38bc5f38f824cef
7
+ data.tar.gz: f6f8dba80bfa1cd796b55e871e55b9a35f37d67ca8d7985fa648de5515ba937bdb183fcaefe08055c221217320b89398e265ba3f236777cb03bf0fd7e3c5e7cf
data/CHANGELOG CHANGED
@@ -8,3 +8,8 @@ Add RamenRails::Import for importing customers directly into Ramen from command
8
8
 
9
9
  Version 0.3.1
10
10
  Print out time for each import
11
+
12
+ Version 0.4.0
13
+ Add support for window.ramenSettings.onload and window.ramenOnload. Change the way
14
+ ramenSettings is set so that it can be merged with other options previously defined
15
+ in <script> tags.
@@ -32,7 +32,15 @@ module RamenRails
32
32
 
33
33
  ramen_script = <<-RAMEN_SCRIPT
34
34
  <script id="RamenSettingsScriptTag">
35
- window.ramenSettings = #{ActiveSupport::JSON.encode(ramen_settings)};
35
+ (function() {
36
+ var opts = #{ActiveSupport::JSON.encode(ramen_settings)};
37
+ window.ramenSettings = window.ramenSettings || {};
38
+ for (var property in opts) {
39
+ if (opts.hasOwnProperty(property)) {
40
+ window.ramenSettings[property] = opts[property];
41
+ }
42
+ }
43
+ })()
36
44
  </script>
37
45
  <script src="#{ramen_js_asset_uri}" async></script>
38
46
  RAMEN_SCRIPT
@@ -1,3 +1,3 @@
1
1
  module RamenRails
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ramen-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Angilly