differential 1.0.3 → 1.0.4

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: bda5fdf9228dd29ab49df6ed4af24492f3f56ee7
4
- data.tar.gz: 3c17dd8906111c400f111264d93483a5fa43c6df
3
+ metadata.gz: 34db9a9aa5d5c4a0662d7ca92ad84787ca400da4
4
+ data.tar.gz: 3d18436809dec81d69a9a48b2bbc944520ac546b
5
5
  SHA512:
6
- metadata.gz: b1aaa8b0917eb018a6d1cc0506a66af739432c108241f91b1486b8181a55617a7ab736119e5c486652569b96f9effd27f4120be792c32ff9bb407edf7a571f89
7
- data.tar.gz: 6b1abb55a1383f7d43ebb5cd15bd582ce2def298fa84e3a45134f72ed7a27a5ec1ac70b22fd6b9b796cdc0149a727e9b2c3719e2e0e7d1b3670052652139c266
6
+ metadata.gz: 9f761ad7abf2776aa1fe8221617cc6d6418b12a01356f4ce14fd302d249b7d1583f2a09e15cb6df5fafbd8f055584c46766f3ca07efb86d5c13ffa13ce65e1da
7
+ data.tar.gz: a7a0c48e0fd32f14c2ce63e303fa61315f6e853ea2e675e66f2eb653f5d49dc1a5c8ff8dd83025a34d01807669c02593b9a77effe8383bb1f74c867e22c17e8c
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- ## 1.0.3 (December 19, 2018)
1
+ ## 1.0.4 (December 21, 2018)
2
+
3
+ - Adjusted reader so it stores multipart ID's properly in the ID's data field.
4
+
5
+ ## 1.0.3 (December 21, 2018)
2
6
 
3
7
  - Added a_size and b_size for totals. This allows you to see how many items contributed to a calculation.
4
- - Changed ID to be a first-class object instead of a string. Now groups and items can have their respective ID parts consumed using: ```id.data```. The string representation is still accessible via ```id.value```.
8
+ - Changed ID to be a first-class object instead of a string. Now groups and items can have their respective ID parts consumed using: `id.data`. The string representation is still accessible via `id.value`.
9
+ - Ignore null hashes when reading input.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- differential (1.0.3)
4
+ differential (1.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -56,11 +56,11 @@ module Differential
56
56
  end
57
57
 
58
58
  def make_record_id(hash)
59
- record_id_key_array.map { |k| hash[k] }.join(':')
59
+ record_id_key_array.map { |k| hash[k] }
60
60
  end
61
61
 
62
62
  def make_group_id(hash)
63
- group_id_key_array.map { |k| hash[k] }.join(':')
63
+ group_id_key_array.map { |k| hash[k] }
64
64
  end
65
65
 
66
66
  def record_id_key_array
@@ -8,5 +8,5 @@
8
8
  #
9
9
 
10
10
  module Differential
11
- VERSION = '1.0.3'
11
+ VERSION = '1.0.4'
12
12
  end
@@ -150,6 +150,7 @@ describe ::Differential::Parser::Reader do
150
150
  hash = hashes.first
151
151
 
152
152
  expect(record.id).to eq("#{hash[:first]}:#{hash[:last]}")
153
+ expect(record.id.data).to eq([hash[:first], hash[:last]])
153
154
  expect(record.group_id).to eq("#{hash[:transport]}:#{hash[:direction]}")
154
155
  expect(record.value).to eq(hash[:minutes])
155
156
  expect(record.data).to eq(hash)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: differential
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ruggio