serial_translator 2.0.0 → 2.0.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: 62f5df8cb8d27b7661c49e1b23e15b2b87c6d66d
4
- data.tar.gz: f5d879126f11013dba1f1a2832116a2a593d913e
3
+ metadata.gz: 783b148b631058301494001a7418bfc09f809d2e
4
+ data.tar.gz: 0a56fcaa10a203518feda80b0a3e5fa6bbf522b1
5
5
  SHA512:
6
- metadata.gz: a6d142dde2b763be22b547c5eb765dc7f5214a977a9416940516763d955c45aa7abf6a834b8781fbe941bb71391522b622ba6bd47398edf7eaf11bc4549ec5ca
7
- data.tar.gz: 6c0c04b1764fcfa8b9f5161169001429ad877310741abf40c057a42e8eb975961eca9026131ca202cf8a8b57d85f60f473e200b13bfaae879180e62fabf21c78
6
+ metadata.gz: 5fcedb9a2e4d9be52977279c9eeb77faca7338dfad61b59b90ed197c067d354c8dbd6dc78434d50a5d838c296d4588b49f5807dba9f6fc85817a7557fb4e1280
7
+ data.tar.gz: bb7e2fa8d707ff170eb96c0081f0fae5145f18e3c2b77ec29fc1e593a56427b2b877c337ddb48edde97133a5f67b604739dc8762684f62cc49193087ad788a9d
@@ -8,7 +8,7 @@ class SerialTranslator::TranslationType < ActiveRecord::Type::String
8
8
  when /\A---/
9
9
  YAML.load(value)
10
10
  else
11
- JSON.parse(value)
11
+ JSON.parse(value).symbolize_keys
12
12
  end
13
13
  end
14
14
 
@@ -1,3 +1,3 @@
1
1
  module SerialTranslator
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -5,7 +5,7 @@ describe SerialTranslator::TranslationType do
5
5
 
6
6
  describe '#cast' do
7
7
  it 'works for JSON' do
8
- expect(type.cast('{"foo":"bar"}')).to eq('foo' => 'bar')
8
+ expect(type.cast('{"foo":"bar"}')).to eq(foo: 'bar')
9
9
  end
10
10
 
11
11
  it 'works for YAML' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serial_translator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - betterplace development team