ndhash 0.2.0 → 0.3.0

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: bc2ee27b7f3e0b5b95b6480e808fa7da9e4d8bf2
4
- data.tar.gz: f768a8c9fa20916a086b35f11c82f3a3f1142cd8
3
+ metadata.gz: bb40091368272586b4500b9bce5db4295f6c49a2
4
+ data.tar.gz: 63e5507d14f03f7dbc90124af87714a5a54348bb
5
5
  SHA512:
6
- metadata.gz: 2b9d9463d14ce761977bb76dfd28b5020d7f6c359762edf4ec7a41b3cce63bc0eb2480e46d501b7f1d2e8697e34585c9173119f3cb76e1bef7d73f184c644364
7
- data.tar.gz: eda72f3618defa9d9d6b704a9a5e50c295f9f0260172a4d5cbaa14a8869a7c45091d308df8af3d2aa5ab1cd42a046f2c4431c03437a494292495e943f4b2ac34
6
+ metadata.gz: 348767268b8a4ce11cb411e3054c92a33a910b54f555beaec2afb25cd99742789dee4c2ae99b6a911d33a959ceea809d492d1a9ad72fb2ae3b648159e07c9855
7
+ data.tar.gz: 659d8fb732ff5d0dd559f0d85e43585616bde4619a1e39ef221334e1910fd21f4192257d5ed62fa78f753224d8937e213935860e574a12ddf5b046e4ee9f9e77
data/.gitignore CHANGED
@@ -7,4 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- .idea/*
10
+ .idea/*
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ndhash
2
2
 
3
- N-dimension hash creation and utilities. Good for testing multi-level hash and JSON processing.
3
+ N-dimension hash creation and utilities. Useful for testing multi-level hash and JSON processing.
4
4
 
5
5
  ## Installation
6
6
 
@@ -25,10 +25,33 @@ require 'ndhash'
25
25
 
26
26
  # Generate hash with custom number of levels, number of key-value pairs and hashes per level
27
27
  NDHash.generate(levels:2, values_per_level:2, hashes_per_level:2)
28
- # =>
29
28
  ```
29
+
30
30
  ```json
31
- {"level_1_key_1":"level_1_value_1","level_1_key_2":"level_1_value_2","level_1_pointer_1":{"level_2_key_1":"level_2_value_1","level_2_key_2":"level_2_value_2"},"level_1_pointer_2":{"level_2_key_1":"level_2_value_1","level_2_key_2":"level_2_value_2"}}
31
+ {
32
+ "level_1_key_1": "level_1_value_1",
33
+ "level_1_key_2": "level_1_value_2",
34
+ "level_1_pointer_1": {
35
+ "level_2_key_1": "level_2_value_1",
36
+ "level_2_key_2": "level_2_value_2"
37
+ },
38
+ "level_1_pointer_2": {
39
+ "level_2_key_1": "level_2_value_1",
40
+ "level_2_key_2": "level_2_value_2"
41
+ }
42
+ }
43
+ ```
44
+
45
+ ```ruby
46
+ NDHash.generate(levels:2, values_per_level:0, hashes_per_level:2)
47
+ ```
48
+
49
+ ```json
50
+ {
51
+ "level_1_pointer_1": {},
52
+ "level_1_pointer_2": {}
53
+ }
54
+ ```
32
55
 
33
56
  ```ruby
34
57
  # Count number of nested levels per hash
@@ -36,6 +59,8 @@ NDHash.count_levels({key:{}}})
36
59
  # => 2
37
60
  ```
38
61
 
62
+ Check the unit tests for more examples.
63
+
39
64
  ## Development
40
65
 
41
66
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -44,7 +69,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
44
69
 
45
70
  ## Contributing
46
71
 
47
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ndhash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
72
+ Bug reports and pull requests are welcome on GitHub at https://github.com/csapagyi/ndhash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
48
73
 
49
74
 
50
75
  ## License
@@ -1,3 +1,3 @@
1
1
  module NDHash
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
data/ndhash.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Csaba Apagyi"]
10
10
  spec.email = ["csapagyi@users.noreply.github.com"]
11
11
 
12
- spec.summary = %q{N-dimension hash creation and utilities. Good for testing multi-level hash and JSON processing.}
12
+ spec.summary = %q{N-dimension hash creation and utilities. Useful for testing multi-level hash and JSON processing.}
13
13
  spec.homepage = "https://github.com/csapagyi/ndhash"
14
14
  spec.license = "MIT"
15
15
 
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.12.a"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "rspec"
23
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ndhash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Csaba Apagyi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-10 00:00:00.000000000 Z
11
+ date: 2016-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description:
42
56
  email:
43
57
  - csapagyi@users.noreply.github.com
@@ -80,6 +94,6 @@ rubyforge_project:
80
94
  rubygems_version: 2.5.1
81
95
  signing_key:
82
96
  specification_version: 4
83
- summary: N-dimension hash creation and utilities. Good for testing multi-level hash
97
+ summary: N-dimension hash creation and utilities. Useful for testing multi-level hash
84
98
  and JSON processing.
85
99
  test_files: []