whoopee-cushion 1.0.0 → 1.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: 511989dd2912ff76496a7633ed8b3879d25550f9
4
- data.tar.gz: 48e85a251bd17590807ec59f986da00507d70eef
3
+ metadata.gz: 0e0ad2fa7eab93bd1c26e8da9052519db870d3e4
4
+ data.tar.gz: 1f023f5709c3fb97dea08bbe5d2dfbc67200e91a
5
5
  SHA512:
6
- metadata.gz: 8b0501be20f64d23f1ad6e0e3580f8230f9ca4af9b33acfddbdf55f5e63ed341d1e0b1598b0d638e6c6933d07be46244ef80d20b13bd7009cb7e45b7872d910c
7
- data.tar.gz: 2f87403c437fc9d363b1a4bc7c3e4bc4505dadcf3e4f3195322f6a1f5eea20ea89336dd5321e984e70d71a256e79b4f4d75391f8d8c33cf61385fdfcffa789ff
6
+ metadata.gz: 5f42fccf1155a87cde3ce979dc8d32c9a731b874eb01b786cc0457efa4a20fb72a5b4789be48241c710d176eb75176d6962ab864089028380561aa38715d58c0
7
+ data.tar.gz: 4e57ca1ca97900f00879f7fb66c791dfd63e0be8030ba0bed1ceadfca58e5593cbc458454fd55af0077e124f9bf00b3a3ce9eb66832855419cefcc7ccbf2ce6f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- whoopee-cushion (1.0.0)
4
+ whoopee-cushion (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -18,57 +18,49 @@ because it uses Ruby's faster Struct objects under the hood.
18
18
  Setup
19
19
  =====
20
20
 
21
- `
22
- gem install whoopee-cushion
23
- `
21
+ `gem install whoopee-cushion`
24
22
 
25
23
  or
26
24
 
27
- `
28
- gem "whoopee-cushion"
29
- `
25
+ `gem "whoopee-cushion"`
30
26
 
31
27
  in your Gemfile.
32
28
 
33
29
  In your Ruby code:
34
30
 
35
- `
36
- require 'whoopee_cushion'
37
- `
31
+ `require 'whoopee_cushion'`
38
32
 
39
33
  then
40
34
 
41
- `
42
- hash = {:a => 1, :CamelCase => 2, :c => 3, :d => { :e => 4, :f => [1,2,3,4,5]}}
35
+ `hash = {:a => 1, :CamelCase => 2, :c => 3, :d => { :e => 4, :f => [1,2,3,4,5]}}`
43
36
 
44
- obj = WhoopeeCushion::Inflate.from_hash(hash)
37
+ `obj = WhoopeeCushion::Inflate.from_hash(hash)`
45
38
 
46
- puts obj.a
47
- puts obj.camel_case
48
- puts obj.d.f.first
49
- `
39
+ `puts obj.a`
40
+
41
+ `puts obj.camel_case`
42
+
43
+ `puts obj.d.f.first`
50
44
 
51
45
  You can also go straight from JSON, or turn off the automatic camel case conversion:
52
46
 
53
- `
54
- json = '{"CamelCase": "no", "json": "yes"}'
47
+ `json = '{"CamelCase": "no", "json": "yes"}'`
55
48
 
56
- obj = WhoopeeCushion::Inflate.from_json(json, :convert_keys => false)
49
+ `obj = WhoopeeCushion::Inflate.from_json(json, :convert_keys => false)`
57
50
 
58
- puts obj.CamelCase
59
- `
51
+ `puts obj.CamelCase`
60
52
 
61
53
  If you want to carry out your own string conversion, use a lambda:
62
54
 
63
- `
64
- hash = {:a => 1, :CamelCase => 2, :c => 3, :d => { :e => 4, :f => [1,2,3,4,5]}}
55
+ `hash = {:a => 1, :CamelCase => 2, :c => 3, :d => { :e => 4, :f => [1,2,3,4,5]}}`
56
+
57
+ `obj = WhoopeeCushion::Inflate.from_hash(hash, :convert_keys => lambda {|s| '#{s}_foo'})`
58
+
59
+ `puts obj.a_foo`
65
60
 
66
- obj = WhoopeeCushion::Inflate.from_hash(hash, :convert_keys => lambda {|s| '#{s}_foo'})
61
+ `puts obj.CamelCase_foo`
67
62
 
68
- puts obj.a_foo
69
- puts obj.CamelCase_foo
70
- puts obj.d_foo.f_foo.first
71
- `
63
+ `puts obj.d_foo.f_foo.first`
72
64
 
73
65
  Performance
74
66
  ===========
@@ -1,3 +1,3 @@
1
1
  module WhoopeeCushion
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whoopee-cushion
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Dunkley