atomic_json 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '06197535fdc39b97d63996f30915b34218992b6a'
4
- data.tar.gz: 6426ccf81026c5302c8bd4917cb57a500b21c6e9
3
+ metadata.gz: 178ef309fead5b2e1ba21d6f8d649c6b1ec10096
4
+ data.tar.gz: d6e8747ee1d775c2ccc908a5ffc05e9d052b5b32
5
5
  SHA512:
6
- metadata.gz: 5cb38457ce4b79e9b1ff23609ade02f3dc828f97d10798e2cc8cf9c7e2a52b57b92e4af31e4b0122df4b5332435c0977da90e0b4079c8902f65be5e1275ce0d5
7
- data.tar.gz: 8a84ae72374eef525299bcca15b7d8c0d2c1eabbf8916edcba984f94f21a748dd4374c6d8f52a6360376014ab394d1eec52d0dd9a0814f5cc8e277414c6b1d68
6
+ metadata.gz: 9709961df141f0826464a285cfe9f03bc6b2f9bc43bcfa33b79e864d63c152e04cec6aa2deb121faadca5c4eb21a61fdea7eacc825e797bad347822b932a25ef
7
+ data.tar.gz: cba7e1b95790fad2f92b7ee567fdb680294f9ff887c9d424ca02f3a8040de12935efcb8399c6746117818b90884ff6751c0f66084c3b7b7e25e5b7963f6321c4
data/README.md CHANGED
@@ -29,7 +29,7 @@ Only the fields you've specified will be updated
29
29
  order.data
30
30
  => { amount: 50.00, first_name: 'Milkpie', last_name: 'Starlord' }
31
31
 
32
- order.jsonb_update(data: { amount: 10.00 })
32
+ order.json_update(data: { amount: 10.00 })
33
33
 
34
34
  order.data
35
35
  => { amount: 10.00, first_name: 'Milkpie', last_name: 'Starlord' }
@@ -37,7 +37,7 @@ order.data
37
37
 
38
38
  For the sake of simplicity, AtomicJson mimic the behavior of standard ActiveRecord query methods to update database fields
39
39
 
40
- ### jsonb_update_columns
40
+ ### json_update_columns
41
41
 
42
42
  Same as ActiveRecord `update_columns`, this method will make a straight database update
43
43
  - Validations are skipped
@@ -45,11 +45,11 @@ Same as ActiveRecord `update_columns`, this method will make a straight database
45
45
  - `updated_at` is not updated
46
46
 
47
47
  ```
48
- order.jsonb_update_columns(data: { paid: false })
48
+ order.json_update_columns(data: { paid: false })
49
49
  => true
50
50
  ```
51
51
 
52
- ### jsonb_update
52
+ ### json_update
53
53
 
54
54
  Same as ActiveRecord `update`, this method will
55
55
  - Invoke validations
@@ -57,17 +57,17 @@ Same as ActiveRecord `update`, this method will
57
57
  - Touch record `updated_at`
58
58
 
59
59
  ```
60
- order.jsonb_update(data: { paid: false, product_id: 3772389212 })
60
+ order.json_update(data: { paid: false, product_id: 3772389212 })
61
61
  => false
62
62
  ```
63
63
 
64
- ### jsonb_update!
64
+ ### json_update!
65
65
 
66
66
  Same as the above `json_update!`, but will raise an `ActiveRecord::RecordInvalid` exception
67
67
  if a custom validation fails
68
68
 
69
69
  ```
70
- order.jsonb_update!(data: { paid: false, product_id: 3772389212 })
70
+ order.json_update!(data: { paid: false, product_id: 3772389212 })
71
71
  => ActiveRecord::RecordInvalid Exception: Validation failed: data product_id can't be changed
72
72
  ```
73
73
  ## Todo's
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
Binary file
@@ -1,5 +1,5 @@
1
1
  module AtomicJson
2
2
 
3
- VERSION = '0.1.0'.freeze
3
+ VERSION = '0.1.2'.freeze
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Macia
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-14 00:00:00.000000000 Z
11
+ date: 2018-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -184,6 +184,7 @@ files:
184
184
  - README.md
185
185
  - Rakefile
186
186
  - VERSION
187
+ - atomic_json-0.1.0.gem
187
188
  - atomic_json.gemspec
188
189
  - bin/console
189
190
  - bin/setup