inspector_hashes 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +20 -2
- data/inspector_hashes.gemspec +2 -0
- data/lib/inspector_hashes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2bf628ab10cd243a1c8dcb123ce78f1e0e0558b
|
4
|
+
data.tar.gz: aa814cf3ef28d01137582779b3a131b0a7b15a79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 424a516c4a7c239f48eddd54ca358d53967e49fcfc2978cb78b1cdf3e1ef5e7a9e62bd036f04ac49b3f0a5f08ed6fe07d54f2b50e9e0cd8e1c8af66bb8422c78
|
7
|
+
data.tar.gz: 3ab79a47696dd24ff1c430ca5bbce71408d7cde678f2b713ec46124bd141007925a747868d4b42f940704d4ba0b98a4cf06873bfc4d5d82cce16989fedeb823d
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# InspectorHashes
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/inspector_hashes.svg)](https://badge.fury.io/rb/inspector_hashes)
|
3
3
|
|
4
|
+
[![Build Status](https://travis-ci.org/eturino/inspector_hashes.svg?branch=master)](https://travis-ci.org/eturino/inspector_hashes)
|
5
|
+
|
4
6
|
[![Code Climate](https://codeclimate.com/github/eturino/inspector_hashes/badges/gpa.svg)](https://codeclimate.com/github/eturino/inspector_hashes)
|
5
7
|
|
6
8
|
[![Issue Count](https://codeclimate.com/github/eturino/inspector_hashes/badges/issue_count.svg)](https://codeclimate.com/github/eturino/inspector_hashes)
|
@@ -9,6 +11,18 @@
|
|
9
11
|
|
10
12
|
[![Coverage Status](https://coveralls.io/repos/github/eturino/inspector_hashes/badge.svg?branch=master)](https://coveralls.io/github/eturino/inspector_hashes?branch=master)
|
11
13
|
|
14
|
+
## Requirements
|
15
|
+
|
16
|
+
requires ruby >= 2.1
|
17
|
+
|
18
|
+
Tested with:
|
19
|
+
- 2.4.1
|
20
|
+
- 2.3.3
|
21
|
+
- 2.2.6
|
22
|
+
- 2.1.10
|
23
|
+
|
24
|
+
## Description
|
25
|
+
|
12
26
|
Tests failing with huge responses that look basically the same? Don't really know where the issue is? If you try to use any string diff you can't see anything because all the errors are about key ordering in the hashes?
|
13
27
|
|
14
28
|
|
@@ -21,7 +35,7 @@ expected_data == response_data #=> false
|
|
21
35
|
|
22
36
|
```
|
23
37
|
|
24
|
-
|
38
|
+
But where?
|
25
39
|
|
26
40
|
A string diff is going to spot a lot of false positives just because the order of the keys in your expected data is not the same as the order of the keys in your response data. That's not really helpful. And Rspec will show something like
|
27
41
|
|
@@ -31,7 +45,7 @@ A string diff is going to spot a lot of false positives just because the order o
|
|
31
45
|
"meta" => {"total"=>2, "size"=>100, "page"=>1, "offset"=>0, "ids"=>[1, 2], "facets"=>{"team-names"=>[{"value"=>"Tatooine", "count"=>1}], "names"=>[{"value"=>"Rolando Huel", "count"=>1}, {"value"=>"Ewell Ledner", "count"=>1}], "role-names"=>[{"value"=>"Director", "count"=>1}, {"value"=>"Junior Developer", "count"=>1}], "main-roles"=>[{"value"=>"Director", "count"=>1}, {"value"=>"Junior Developer", "count"=>1}], "project-keys"=>[{"value"=>"mt", "count"=>1}, {"value"=>"rm", "count"=>1}], "employment-types"=>[{"value"=>"contractor", "count"=>1}, {"value"=>"employee", "count"=>1}]}},
|
32
46
|
```
|
33
47
|
|
34
|
-
|
48
|
+
Which tells you that while `meta` is the same in both, `data` is different.
|
35
49
|
|
36
50
|
What you want is to spot that your expected data has a typo, and you expect `ed-date` instead of `end-date` in one of the objects.
|
37
51
|
|
@@ -156,6 +170,10 @@ The gem is available as open source under the terms of the [MIT License](http://
|
|
156
170
|
|
157
171
|
## Changelog
|
158
172
|
|
173
|
+
### v1.0.2
|
174
|
+
|
175
|
+
- specify min ruby version (2.1)
|
176
|
+
|
159
177
|
### v1.0.1
|
160
178
|
|
161
179
|
- minor changes in gemspec
|
data/inspector_hashes.gemspec
CHANGED
@@ -10,6 +10,8 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.authors = ['Eduardo Turiño']
|
11
11
|
spec.email = ['eturino@eturino.com']
|
12
12
|
|
13
|
+
spec.required_ruby_version = '>= 2.1'
|
14
|
+
|
13
15
|
spec.summary = <<-TXT
|
14
16
|
InspectorHashes helps finding hidden differences in hashes and arrays, included nested, also spotting missing keys or indices
|
15
17
|
TXT
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspector_hashes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Turiño
|
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
108
|
requirements:
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
111
|
+
version: '2.1'
|
112
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - ">="
|