gon 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gon might be problematic. Click here for more details.

data/README.md CHANGED
@@ -49,7 +49,7 @@ Or manually install gon gem: `$ gem install gon`
49
49
 
50
50
  * @gazay
51
51
 
52
- Special thanks to @brainopia and @kossnocorp.
52
+ Special thanks to @brainopia, @kossnocorp and @ai.
53
53
 
54
54
  ## License
55
55
 
data/lib/gon.rb CHANGED
@@ -13,6 +13,6 @@ module Gon
13
13
  new_data[name] = value if name && value
14
14
 
15
15
  Rails.cache.delete('gon_variables')
16
- Rails.cache.write('gon_variables', (new_data.merge data))
16
+ Rails.cache.write('gon_variables', (new_data.reverse_merge data))
17
17
  end
18
18
  end
@@ -10,8 +10,8 @@ module Gon
10
10
 
11
11
  script = "<script>function Gon(){"
12
12
  data.each do |key, val|
13
- script += "this." + key.to_s + "'" + val.to_s + "';"
14
- end
13
+ script += "this." + key.to_s + val.to_json + ";"
14
+ end
15
15
  script += "}; var Gon = new Gon()</script>"
16
16
  script.html_safe
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module Gon
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-05-09 00:00:00.000000000 +04:00
12
+ date: 2011-05-10 00:00:00.000000000 +04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: If you need to send some data to your js files and you don't want to