cldr-plurals-runtime-js 1.0.0 → 1.1.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: ca051f23ae6f1bc2bfcf02127fea20ffea73ef84
4
- data.tar.gz: ab1c76440979b47534037e61e1cea2418af7bdad
3
+ metadata.gz: 4ee720eff1e806c029b71e4b85e9770f96d50fc5
4
+ data.tar.gz: 00a9416c3131447956be3a4bfdd846c256675bc0
5
5
  SHA512:
6
- metadata.gz: 1f1d20a5e984352849a3fff3788e70bc225df96caf31563cfb3bb365c36ad803e3024ca8bc75c496109239219fd8d5adc4414efc4a7036564903fd94a965e111
7
- data.tar.gz: 2bd8143495a80457757dc4a8e420d1bb9780e8aa02728cfe1519cd9b2a22fcc531e51872582378f35df2d6ac76af1cfa31fe50b32a055fcacfe7aac174cdb288
6
+ metadata.gz: d46ae85222450e5dacfea4ae3cb2b13556b4ecd7452d7e64dc39e593148851f37870014f7606588968c1b88ffcd20e0c50dfdbbfb2755ef0ef625360fe1b2704
7
+ data.tar.gz: f82aa671de184d78a212b3445596cfeef90851f2e9900de87dd3a3778c4bc0dbcc03493a9224487e443a548e84be8ec42954e80d196cae76201839b4041c4f95
@@ -1,3 +1,7 @@
1
+ == 1.1.0
2
+
3
+ * Prevent variables from leaking into outside scope.
4
+
1
5
  == 1.0.0
2
6
 
3
7
  * Birthday!
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module CldrPlurals
4
- JAVASCRIPT_RUNTIME_VERSION = '1.0.0'
4
+ JAVASCRIPT_RUNTIME_VERSION = '1.1.0'
5
5
  end
@@ -1,4 +1,4 @@
1
- (function() {
1
+ (function(context) {
2
2
  this.buildArgsFor = function(num_str) {
3
3
  return [
4
4
  this.n(num_str), this.i(num_str), this.f(num_str),
@@ -75,4 +75,4 @@
75
75
  }
76
76
 
77
77
  return this;
78
- })();
78
+ }).call({})
@@ -204,4 +204,14 @@ describe CldrPlurals::JavascriptRuntime do
204
204
  expect(rt.t(num)).to eq(23)
205
205
  end
206
206
  end
207
+
208
+ context 'with global variables already present' do
209
+ context = V8::Context.new
210
+ context.eval('v = 5')
211
+ context.eval(CldrPlurals::JavascriptRuntime.source)
212
+ it 'expects to not overwrite variables of the global scope' do
213
+ expect(context.eval('v')).to eq(5)
214
+ end
215
+ end
216
+
207
217
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cldr-plurals-runtime-js
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-30 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: therubyracer
@@ -65,3 +65,4 @@ signing_key:
65
65
  specification_version: 4
66
66
  summary: Javascript runtime methods for CLDR plural rules (see camertron/cldr-plurals).
67
67
  test_files: []
68
+ has_rdoc: true