riveter 0.8.2 → 0.8.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: 4d6e22e7ef8c21ec6f308b9c255a1d8afe1b27806c99b7a80a89a941da7e1bc5
4
- data.tar.gz: 8265f2ea310547dd69cc3fed955ece95404227dcd9f63eb79c55138913f04619
3
+ metadata.gz: e42d665fc17ac27cb6d8577a74537233a0175500af57a371c7f457093465c96e
4
+ data.tar.gz: 65944a322f2c186365d0765c6f7a4dbc97206726603a0b0182f65a44a7aaafad
5
5
  SHA512:
6
- metadata.gz: 8d2504ef2ec31fc0d2fc30da0808c9016707025b0ec3e574564c0ce1b97f204ce8793c38336a71ec30c6ece9f4137aa57fa4f47a33046ea3444c4198439ec577
7
- data.tar.gz: a5916646a15f3274d19b90ca13bdaff2baf54373f571810ab3ae2948b0c658f95833c89b49812d78042024c9865faa624ddf77029570f98b8e065290ad5ecabb
6
+ metadata.gz: 4d25d91b57c555a75d3d2dcc3e2add7ae448a1238461ddd4db9c4badd3b346d76685496806329804ec6c0064960cde324c689dbc55bc2630e7b8d95cb2834f9d
7
+ data.tar.gz: 37cee8302923c8478ff5c02f434c48136ac69ee426c1ad054d9fb3256d8ee87d04947b103f2cb36ac6c988c5ba9f98ae7beb1bc60a9316fa4f52a5a0ed78aadc
@@ -1 +1 @@
1
- ruby-2.5.1
1
+ ruby-2.5.5
@@ -2,11 +2,9 @@ language: ruby
2
2
  cache: bundler
3
3
 
4
4
  rvm:
5
- - 2.1.10
6
- - 2.2.10
7
5
  - 2.3.7
8
6
  - 2.4.4
9
- - 2.5.1
7
+ - 2.5.5
10
8
 
11
9
  script: 'bundle exec rake spec'
12
10
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- riveter (0.8.2)
4
+ riveter (0.8.3)
5
5
  activemodel (>= 4.0.0)
6
6
  railties (>= 4.0.0)
7
7
  validates_timeliness (>= 3.0.0)
@@ -9,36 +9,36 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionmailer (4.2.10)
13
- actionpack (= 4.2.10)
14
- actionview (= 4.2.10)
15
- activejob (= 4.2.10)
12
+ actionmailer (4.2.11.1)
13
+ actionpack (= 4.2.11.1)
14
+ actionview (= 4.2.11.1)
15
+ activejob (= 4.2.11.1)
16
16
  mail (~> 2.5, >= 2.5.4)
17
17
  rails-dom-testing (~> 1.0, >= 1.0.5)
18
- actionpack (4.2.10)
19
- actionview (= 4.2.10)
20
- activesupport (= 4.2.10)
18
+ actionpack (4.2.11.1)
19
+ actionview (= 4.2.11.1)
20
+ activesupport (= 4.2.11.1)
21
21
  rack (~> 1.6)
22
22
  rack-test (~> 0.6.2)
23
23
  rails-dom-testing (~> 1.0, >= 1.0.5)
24
24
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
25
- actionview (4.2.10)
26
- activesupport (= 4.2.10)
25
+ actionview (4.2.11.1)
26
+ activesupport (= 4.2.11.1)
27
27
  builder (~> 3.1)
28
28
  erubis (~> 2.7.0)
29
29
  rails-dom-testing (~> 1.0, >= 1.0.5)
30
30
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
31
- activejob (4.2.10)
32
- activesupport (= 4.2.10)
31
+ activejob (4.2.11.1)
32
+ activesupport (= 4.2.11.1)
33
33
  globalid (>= 0.3.0)
34
- activemodel (4.2.10)
35
- activesupport (= 4.2.10)
34
+ activemodel (4.2.11.1)
35
+ activesupport (= 4.2.11.1)
36
36
  builder (~> 3.1)
37
- activerecord (4.2.10)
38
- activemodel (= 4.2.10)
39
- activesupport (= 4.2.10)
37
+ activerecord (4.2.11.1)
38
+ activemodel (= 4.2.11.1)
39
+ activesupport (= 4.2.11.1)
40
40
  arel (~> 6.0)
41
- activesupport (4.2.10)
41
+ activesupport (4.2.11.1)
42
42
  i18n (~> 0.7)
43
43
  minitest (~> 5.1)
44
44
  thread_safe (~> 0.3, >= 0.3.4)
@@ -53,20 +53,20 @@ GEM
53
53
  columnize (= 0.9.0)
54
54
  coderay (1.1.2)
55
55
  columnize (0.9.0)
56
- concurrent-ruby (1.1.3)
57
- coveralls (0.8.22)
56
+ concurrent-ruby (1.1.5)
57
+ coveralls (0.8.23)
58
58
  json (>= 1.8, < 3)
59
59
  simplecov (~> 0.16.1)
60
60
  term-ansicolor (~> 1.3)
61
- thor (~> 0.19.4)
61
+ thor (>= 0.19.4, < 2.0)
62
62
  tins (~> 1.6)
63
63
  crass (1.0.4)
64
64
  diff-lcs (1.3)
65
- docile (1.3.1)
65
+ docile (1.3.2)
66
66
  erubis (2.7.0)
67
- globalid (0.4.1)
67
+ globalid (0.4.2)
68
68
  activesupport (>= 4.2.0)
69
- haml (5.0.4)
69
+ haml (5.1.2)
70
70
  temple (>= 0.8.0)
71
71
  tilt
72
72
  haml-rails (1.0.0)
@@ -82,18 +82,18 @@ GEM
82
82
  ruby_parser (~> 3.5)
83
83
  i18n (0.9.5)
84
84
  concurrent-ruby (~> 1.0)
85
- json (2.1.0)
85
+ json (2.2.0)
86
86
  loofah (2.2.3)
87
87
  crass (~> 1.0.2)
88
88
  nokogiri (>= 1.5.9)
89
89
  mail (2.7.1)
90
90
  mini_mime (>= 0.1.1)
91
91
  method_source (0.8.2)
92
- mini_mime (1.0.1)
93
- mini_portile2 (2.3.0)
92
+ mini_mime (1.0.2)
93
+ mini_portile2 (2.4.0)
94
94
  minitest (5.11.3)
95
- nokogiri (1.8.5)
96
- mini_portile2 (~> 2.3.0)
95
+ nokogiri (1.10.4)
96
+ mini_portile2 (~> 2.4.0)
97
97
  pry (0.10.4)
98
98
  coderay (~> 1.1.0)
99
99
  method_source (~> 0.8.1)
@@ -104,16 +104,16 @@ GEM
104
104
  rack (1.6.11)
105
105
  rack-test (0.6.3)
106
106
  rack (>= 1.0)
107
- rails (4.2.10)
108
- actionmailer (= 4.2.10)
109
- actionpack (= 4.2.10)
110
- actionview (= 4.2.10)
111
- activejob (= 4.2.10)
112
- activemodel (= 4.2.10)
113
- activerecord (= 4.2.10)
114
- activesupport (= 4.2.10)
107
+ rails (4.2.11.1)
108
+ actionmailer (= 4.2.11.1)
109
+ actionpack (= 4.2.11.1)
110
+ actionview (= 4.2.11.1)
111
+ activejob (= 4.2.11.1)
112
+ activemodel (= 4.2.11.1)
113
+ activerecord (= 4.2.11.1)
114
+ activesupport (= 4.2.11.1)
115
115
  bundler (>= 1.3.0, < 2.0)
116
- railties (= 4.2.10)
116
+ railties (= 4.2.11.1)
117
117
  sprockets-rails
118
118
  rails-deprecated_sanitizer (1.0.3)
119
119
  activesupport (>= 4.2.0.alpha)
@@ -121,11 +121,11 @@ GEM
121
121
  activesupport (>= 4.2.0, < 5.0)
122
122
  nokogiri (~> 1.6)
123
123
  rails-deprecated_sanitizer (>= 1.0.1)
124
- rails-html-sanitizer (1.0.4)
124
+ rails-html-sanitizer (1.2.0)
125
125
  loofah (~> 2.2, >= 2.2.2)
126
- railties (4.2.10)
127
- actionpack (= 4.2.10)
128
- activesupport (= 4.2.10)
126
+ railties (4.2.11.1)
127
+ actionpack (= 4.2.11.1)
128
+ activesupport (= 4.2.11.1)
129
129
  rake (>= 0.8.7)
130
130
  thor (>= 0.18.1, < 2.0)
131
131
  rake (10.4.2)
@@ -146,9 +146,9 @@ GEM
146
146
  rspec-mocks (~> 3.2.0)
147
147
  rspec-support (~> 3.2.0)
148
148
  rspec-support (3.2.2)
149
- ruby_parser (3.11.0)
149
+ ruby_parser (3.13.1)
150
150
  sexp_processor (~> 4.9)
151
- sexp_processor (4.11.0)
151
+ sexp_processor (4.12.1)
152
152
  shoulda-matchers (2.8.0)
153
153
  activesupport (>= 3.0.0)
154
154
  simplecov (0.16.1)
@@ -164,18 +164,18 @@ GEM
164
164
  actionpack (>= 4.0)
165
165
  activesupport (>= 4.0)
166
166
  sprockets (>= 3.0.0)
167
- temple (0.8.0)
168
- term-ansicolor (1.7.0)
167
+ temple (0.8.1)
168
+ term-ansicolor (1.7.1)
169
169
  tins (~> 1.0)
170
- thor (0.19.4)
170
+ thor (0.20.3)
171
171
  thread_safe (0.3.6)
172
- tilt (2.0.8)
173
- timeliness (0.3.8)
174
- tins (1.20.2)
172
+ tilt (2.0.9)
173
+ timeliness (0.4.3)
174
+ tins (1.21.1)
175
175
  tzinfo (1.2.5)
176
176
  thread_safe (~> 0.1)
177
- validates_timeliness (4.0.2)
178
- timeliness (~> 0.3.7)
177
+ validates_timeliness (4.1.1)
178
+ timeliness (>= 0.3.10, < 1)
179
179
 
180
180
  PLATFORMS
181
181
  ruby
@@ -194,4 +194,4 @@ DEPENDENCIES
194
194
  shoulda-matchers (~> 2.8.0)
195
195
 
196
196
  BUNDLED WITH
197
- 1.17.1
197
+ 1.17.3
@@ -119,9 +119,9 @@ module Riveter
119
119
  # When both +hsh+ and +other_hash+ contains an entry with the same key,
120
120
  # it merges and returns the values from both arrays.
121
121
  #
122
- # h1 = {"a" => 100, "b" => 200, "c" => {"c1" => 12, "c2" => 14}}
123
- # h2 = {"b" => 254, "c" => 300, "c" => {"c1" => 16, "c3" => 94}}
124
- # h1.rmerge!(h2) #=> {"a" => 100, "b" => 254, "c" => {"c1" => 16, "c2" => 14, "c3" => 94}}
122
+ # h1 = {"a" => 100, "b" => 200, "c" => {"c1" => 12, "c2" => 14}, "d" => {"d1" => 400}}
123
+ # h2 = {"b" => 254, "c" => 300, "c" => {"c1" => 16, "c3" => 94}, "d" => nil}
124
+ # h1.rmerge!(h2) #=> {"a" => 100, "b" => 254, "c" => {"c1" => 16, "c2" => 14, "c3" => 94}, "d" => nil}
125
125
  #
126
126
  # Simply using Hash#merge! would return
127
127
  #
@@ -146,15 +146,17 @@ module Riveter
146
146
  # includes the same key, the value is merged instead replaced with
147
147
  # +other_hash+ value.
148
148
  #
149
- # h1 = {"a" => 100, "b" => 200, "c" => {"c1" => 12, "c2" => 14}}
150
- # h2 = {"b" => 254, "c" => 300, "c" => {"c1" => 16, "c3" => 94}}
151
- # h1.rmerge(h2) #=> {"a" => 100, "b" => 254, "c" => {"c1" => 16, "c2" => 14, "c3" => 94}}
149
+ # h1 = {"a" => 100, "b" => 200, "c" => {"c1" => 12, "c2" => 14}, "d" => {"d1" => 400}}
150
+ # h2 = {"b" => 254, "c" => 300, "c" => {"c1" => 16, "c3" => 94}, "d" => nil}
151
+ # h1.rmerge(h2) #=> {"a" => 100, "b" => 254, "c" => {"c1" => 16, "c2" => 14, "c3" => 94}, "d" => nil}
152
152
  #
153
153
  # Simply using Hash#merge would return
154
154
  #
155
155
  # h1.merge(h2) #=> {"a" => 100, "b" = >254, "c" => {"c1" => 16, "c3" => 94}}
156
156
  #
157
157
  def rmerge(other_hash)
158
+ return nil if other_hash.nil?
159
+
158
160
  r = {}
159
161
  merge(other_hash) do |key, oldval, newval|
160
162
  r[key] = oldval.class == self.class ? oldval.rmerge(newval) : newval
@@ -4,7 +4,7 @@ module Riveter
4
4
 
5
5
  included do
6
6
 
7
- const_names = self.constants(false).freeze
7
+ const_names = self.constants(false).sort.freeze
8
8
  const_values = const_names.collect {|name| self.const_get(name) }.freeze
9
9
 
10
10
  # create hashes for decoding names and values
@@ -1,3 +1,3 @@
1
1
  module Riveter
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
@@ -108,9 +108,9 @@ describe Riveter::CoreExtensions do
108
108
  describe Riveter::CoreExtensions::HashExtensions do
109
109
  describe "#rmerge" do
110
110
  it {
111
- h1 = {"a" => 100, "b" => 200, "c" => {"c1" => 12, "c2" => 14}}
112
- h2 = {"b" => 254, "c" => 300, "c" => {"c1" => 16, "c3" => 94}}
113
- h1.rmerge(h2).should eq({"a" => 100, "b" => 254, "c" => {"c1" => 16, "c2" => 14, "c3" => 94}})
111
+ h1 = {"a" => 100, "b" => 200, "c" => {"c1" => 12, "c2" => 14}, "d" => {"d1" => 400}}
112
+ h2 = {"b" => 254, "c" => 300, "c" => {"c1" => 16, "c3" => 94}, "d" => nil}
113
+ h1.rmerge(h2).should eq({"a" => 100, "b" => 254, "c" => {"c1" => 16, "c2" => 14, "c3" => 94}, "d" => nil})
114
114
  }
115
115
  end
116
116
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riveter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Stefano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-22 00:00:00.000000000 Z
11
+ date: 2019-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -406,8 +406,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
406
406
  - !ruby/object:Gem::Version
407
407
  version: '0'
408
408
  requirements: []
409
- rubyforge_project:
410
- rubygems_version: 2.7.7
409
+ rubygems_version: 3.0.3
411
410
  signing_key:
412
411
  specification_version: 4
413
412
  summary: Provides several useful patterns, packaged in a gem, for use in Rails.