kennel 1.32.0 → 1.33.0

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
  SHA256:
3
- metadata.gz: 1fb3be2e1395d9f41520f63d29df373ce631e4e4113b19194a8b2e1341e5908b
4
- data.tar.gz: 9f70d18d20d323428817e734431b4368c2ba1847ad09d80c4cb2ee5b5813002f
3
+ metadata.gz: 59fc72147f8fbc5e6814c42fb0eb98428de06c73ce61bfa6a5d5f51c34eb4125
4
+ data.tar.gz: a42cc6a71dd4c623ea15f33ae1a6c443943c2a4634d1f693406ad8eba1757ca8
5
5
  SHA512:
6
- metadata.gz: c9d781f6f85ece7438eb471df37a357153e1eecd48dd0cf2ed56abfc625abc2cfc6ec6577a2022c1452939311ad1b5218d9371c4cbc69e7fc09e0c00344161ca
7
- data.tar.gz: e910e6220b1d099d238d0551c7c19d847b65837a3675241dd4c7c50d16ff6c2c784dafc833919faf4e91e4ca60d624fa26c3fbe050b82274a3b67cd0918561b2
6
+ metadata.gz: f419ab0130605fee062d418722b53e2b65c90b192661f8922beb0f052ca356159e2a981e08c29e89f8eb579cbb5308a8e47f3214501a12d7109141762b3af6a9
7
+ data.tar.gz: 2a0ac369b1dfaee83f8accaacce2c9e5a74da8d401d088ddc80988859a8ea3314d0998ff51e447b22c037c17e56f7f1e3414213140c44546d19d5f89d513abc7
@@ -10,7 +10,6 @@ module Kennel
10
10
  end
11
11
 
12
12
  def import(resource, id)
13
- model = data = nil
14
13
  begin
15
14
  model =
16
15
  begin
@@ -68,7 +67,6 @@ module Kennel
68
67
  pretty = JSON.pretty_generate(v)
69
68
  .gsub(": null", ": nil")
70
69
  .gsub(/(^\s*)"([a-zA-Z][a-zA-Z\d_]*)":/, "\\1\\2:") # "foo": 1 -> foo: 1
71
- .gsub(/(^\s*)(".*?"):/, "\\1\\2 =>") # "123": 1 -> "123" => 1
72
70
  .gsub(/^/, " ") # indent
73
71
 
74
72
  "\n#{pretty}\n "
@@ -20,7 +20,11 @@ module Kennel
20
20
  def validate_json(data)
21
21
  bad = OptionalValidations.all_keys(data).grep_v(Symbol)
22
22
  return if bad.empty?
23
- invalid! "only use Symbols to avoid permanent diffs (#{bad.map(&:inspect).join(", ")})"
23
+ invalid!(
24
+ "Only use Symbols as hash keys to avoid permanent diffs when updating.\n" \
25
+ "Change these keys to be symbols (usually 'foo' => 1 --> 'foo': 1)\n" \
26
+ "#{bad.map(&:inspect).join("\n")}"
27
+ )
24
28
  end
25
29
  end
26
30
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.32.0"
3
+ VERSION = "1.33.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.32.0
4
+ version: 1.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-14 00:00:00.000000000 Z
11
+ date: 2019-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday