hashlation 0.1.0 → 0.1.3

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: 844322f953a82a82dba511528598cfd9f7cd16407a5ed8e3a5d8d38f0ece3a7b
4
- data.tar.gz: f7037b05c2682ac281a9597a95de8ca8fe3c9064e61151992a9ad511025f0c39
3
+ metadata.gz: 6f73fbcd96c1c7beeedd568b29102b4931a8d2425aaa9dada4fede99d1c0aa88
4
+ data.tar.gz: 8a7624e52ea1880b35e5df71d10d704fa8d25dd83205cac334faec748f4b4716
5
5
  SHA512:
6
- metadata.gz: 46501563a71f56b65567d4cc74e8c07a51428c080114bf6ed51d3a947110a024eca3995041056097a8b1d852418c0134dff5e56fb271478c81ca737e6d8c33ba
7
- data.tar.gz: e7069b715a4167e6ff4021e260b6324c6e4414c8483045bd8828d3409dee963dc38189bc3085703e980bfc86cedfa42ebb7684987ea09e6c8e00cb99882a3f36
6
+ metadata.gz: 467cbaa9f2c43460c61266487f8f3aece0ef1af931a01f2bfe279608cbef2c38e3f6dfeabebfb93c4c9602509727135457e4eacfd5c097c7804f667ddf9ede8c
7
+ data.tar.gz: f95861a090051ccf724bc7cc10f7b43b45a15427847a7070487723c5cdac453545a0e83ac6a21a77f2d86111f77220a908dd63961da75c29364a26f4f398d29f
data/.idea/.DS_Store CHANGED
Binary file
data/README.md CHANGED
@@ -16,17 +16,51 @@ Or install it yourself as:
16
16
 
17
17
  $ gem install hashlation
18
18
 
19
- ## Usage
20
19
 
21
- Hashlation::Simple -> Hashlation::Simple.new(hash)
22
20
 
23
- Handles simple string/symbol keys in conversion as well as singleton_methods. Much faster, but cannot hanlde edge cases in response.
24
-
25
- Hashlation::Complex -> Hashlation::Complex.new(hash)
26
-
27
- Handles MOST key types in conversion. If you know that your keys will contain leading Integer characters, or ':'.
28
21
 
29
- **If ::Complex fails due to inability to read key, please report an Issue.**
22
+ ## Methods
23
+
24
+ The returned `obj` includes the method `.keys` to list the keys on the object at every level.
25
+
26
+ ---
27
+
28
+ ### Simple
29
+
30
+ Handles simple string/symbol keys in conversion as well as singleton_methods. Very fast, but cannot handle edge cases in keys.
31
+
32
+ Usage:
33
+
34
+ `obj = Hashlation::Simple.new(hash)`
35
+
36
+
37
+ ---
38
+
39
+ ### Complex
40
+
41
+ Handles MOST key types in conversion. If you know that your keys will contain leading Integer characters, or ':' use this method.
42
+
43
+ Usage:
44
+
45
+ `obj = Hashlation::Complex.new(hash)`
46
+
47
+ ---
48
+
49
+ ** If `Complex` fails due to inability to read a key, please report in GitHub Issues. Thanks! **
50
+
51
+ ---
52
+
53
+ ## Translated Keys Format:
54
+
55
+ Keys that cannot be set as-is by attr_accessor will be transformed.
56
+
57
+ ### Simple:
58
+
59
+ - `'Test-Name' -> obj.test_name`
60
+
61
+ ### Complex:
62
+
63
+ - `'11123:12312' -> obj._11123_12312`
30
64
 
31
65
  ## Development
32
66
 
@@ -41,3 +75,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/rharri
41
75
  ## License
42
76
 
43
77
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
78
+
79
+ ---
80
+
81
+ *Naming credit belongs to my wife, who bales out my inability to name stuff..*
data/hashlation.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["rharris389"]
9
9
  spec.email = ["56176404+rharris389@users.noreply.github.com"]
10
10
 
11
- spec.summary = "Simple/Lightweight hash parsing gem. "
12
- spec.description = "View keys at every nesting level, "
11
+ spec.summary = "Lightweight response parsing"
12
+ spec.description = "Lightweight hash parser for cleaner navigation of large response objects."
13
13
  spec.homepage = "https://github.com/rharris389/hashlation"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hashlation
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashlation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - rharris389
@@ -10,7 +10,7 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: 'View keys at every nesting level, '
13
+ description: Lightweight hash parser for cleaner navigation of large response objects.
14
14
  email:
15
15
  - 56176404+rharris389@users.noreply.github.com
16
16
  executables: []
@@ -69,5 +69,5 @@ requirements: []
69
69
  rubygems_version: 3.1.2
70
70
  signing_key:
71
71
  specification_version: 4
72
- summary: Simple/Lightweight hash parsing gem.
72
+ summary: Lightweight response parsing
73
73
  test_files: []