modis 1.4.0 → 1.4.1
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 +4 -4
- data/.travis.yml +1 -1
- data/Gemfile.lock +1 -1
- data/lib/modis/attribute.rb +2 -2
- data/lib/modis/version.rb +1 -1
- data/spec/finder_spec.rb +1 -1
- data/spec/persistence_spec.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: a53daa02a9a6c4cc8463b7d7bd340a0581fe4748
|
|
4
|
+
data.tar.gz: fa9efc54e2ff9d4e7947e1deee4313ed59a6f345
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 129daf466455122c27dddd64bd4c3196de3b7cb227753e12c62a9cdda1e91410239823464c14ff8c94b1754af4b186588ed9deae38d5f479a8a53318ca0d71fb
|
|
7
|
+
data.tar.gz: 5055dd9c6e2bdc13c49d59423385009d8d528ec06358b7a9f06ee2632ac870bc421e678093f376e9d71b2a23b32fdea73c68c70af7caf1f7beba710c383055c9
|
data/.travis.yml
CHANGED
|
@@ -7,7 +7,7 @@ rvm:
|
|
|
7
7
|
- 2.1.5
|
|
8
8
|
- 2.2.0
|
|
9
9
|
- jruby-1.7.18
|
|
10
|
-
- rbx-2.
|
|
10
|
+
- rbx-2.5.0
|
|
11
11
|
env:
|
|
12
12
|
global:
|
|
13
13
|
secure: LrTz0Pq2ibNZuKDhdzcrvEUSNxUpPopEq9aJeCxy3UpV0v4vpHBtWV0S6zofvf98g/RkZ6cGI1u+0H578dHgE6pWTo+iR8LAwqPKofrFIWRkeo+M77Vs5swahb3mQyPOcig1hfVWDm25MsojePYm70eBIcBU55NWImtdePXfiU0=
|
data/Gemfile.lock
CHANGED
data/lib/modis/attribute.rb
CHANGED
|
@@ -39,7 +39,7 @@ module Modis
|
|
|
39
39
|
end.flatten
|
|
40
40
|
|
|
41
41
|
attributes[name] = options.update(type: type)
|
|
42
|
-
attributes_with_defaults[name] = options[:default]
|
|
42
|
+
attributes_with_defaults[name] = options[:default]
|
|
43
43
|
define_attribute_methods([name])
|
|
44
44
|
|
|
45
45
|
value_coercion = type == :timestamp ? 'value = Time.new(*value) if value && value.is_a?(Array) && value.count == 7' : nil
|
|
@@ -73,7 +73,7 @@ module Modis
|
|
|
73
73
|
def assign_attributes(hash)
|
|
74
74
|
hash.each do |k, v|
|
|
75
75
|
setter = "#{k}="
|
|
76
|
-
send(setter, v) if
|
|
76
|
+
send(setter, v) if respond_to?(setter)
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
|
data/lib/modis/version.rb
CHANGED
data/spec/finder_spec.rb
CHANGED
|
@@ -97,7 +97,7 @@ describe Modis::Finder do
|
|
|
97
97
|
|
|
98
98
|
it 'inherits attributes from the parent' do
|
|
99
99
|
consumer = FindersSpec::Consumer.create!(name: 'Kyle', consumed: true)
|
|
100
|
-
expect(consumer.attributes.keys.sort).to eq(%w(consumed id name parent_default type))
|
|
100
|
+
expect(consumer.attributes.keys.sort).to eq(%w(age consumed id name parent_default type))
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
it 'inherits default attribute values from the parent' do
|
data/spec/persistence_spec.rb
CHANGED
|
@@ -94,7 +94,7 @@ describe Modis::Persistence do
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
it 'does not identify an attribute as changed if the value is the default' do
|
|
97
|
-
expect(model.class.attributes_with_defaults).to eq('
|
|
97
|
+
expect(model.class.attributes_with_defaults['name']).to eq('Ian')
|
|
98
98
|
expect(model.name).to eq('Ian')
|
|
99
99
|
expect(model.name_changed?).to be false
|
|
100
100
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: modis
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ian Leitch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-01-
|
|
11
|
+
date: 2015-01-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|