props_template 0.22.1 → 0.22.2

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
  SHA256:
3
- metadata.gz: 18da6492527680c8726d4b774e411bda247f6e49d2a992c2d9b9fa1bd9555633
4
- data.tar.gz: 391d5b171c9816593f74a681c581075cd426a8eb29827a6a522dc21908e82875
3
+ metadata.gz: 34091400c3d4780e7af54a7f5c413384fc50628fe401ed3922cfd14e8d11c5d6
4
+ data.tar.gz: 0ca3c6fb38f9d9c7b4d149e0c68bad8366de9cc0407d0d3a0492d335cad4566b
5
5
  SHA512:
6
- metadata.gz: 8f3d71ec0398e27c05ca134e5dedb0fb96d6c6d5e725b271863bacf9fc907bca4a5b723416305c3051a38d1ec6ee692a9896d1698cf8278191b9804d4e8918c9
7
- data.tar.gz: f691118fb075e94b68462652d296ac0e7b2d294a44fe5abc088b3bdac8ef0aa9c4233a84e57a22c5274e10b3ef7f5e8b98d850db4d7cf4054580a96d152bb0a8
6
+ metadata.gz: 86d5f12f9319172b0880c202063eeae1a3a8ad963a52430ca7f0c06e77000ab296e82832a432823e46c2fe87116ca47a3a0a314c4367422110f6da0761ad6b9b
7
+ data.tar.gz: 721aa65b13b218be19bdfe1a10c032f52929b4c61228c7947ae49d92a9d08aca2022ec2043f1a691d4b127bb63426e5ca25920af453a35ec4da49464fd64809b
@@ -114,6 +114,8 @@ module Props
114
114
  end
115
115
 
116
116
  json = @stream.raw_json
117
+ @stream.reset
118
+
117
119
  @scope = nil
118
120
  @key_cache = {}
119
121
  json
@@ -1,3 +1,3 @@
1
1
  module Props
2
- VERSION = "0.22.1".freeze
2
+ VERSION = "0.22.2".freeze
3
3
  end
@@ -12,6 +12,24 @@ RSpec.describe 'Props::Base' do
12
12
  json = Props::Base.new
13
13
  expect(json.result!.strip).to eql('{}')
14
14
  end
15
+
16
+ it 'resets OJ' do
17
+ json = Props::Base.new
18
+ json.set! :foo, 'bar'
19
+ attrs = json.result!.strip
20
+
21
+ expect(attrs).to eql_json({
22
+ foo: 'bar'
23
+ })
24
+
25
+ expect(json.result!.strip).to eql_json({})
26
+
27
+ json.set! :foo, 'bar'
28
+ attrs = json.result!.strip
29
+ expect(attrs).to eql_json({
30
+ foo: 'bar'
31
+ })
32
+ end
15
33
  end
16
34
 
17
35
  context 'set!' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: props_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.1
4
+ version: 0.22.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johny Ho
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-20 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubygems_version: 3.1.4
102
+ rubygems_version: 3.1.6
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: A fast JSON builder