modis 1.4.0 → 1.4.1

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: d6f800df4e32942fff0bab6bcc91be7c5703ad85
4
- data.tar.gz: 44fb61a6e24d183599bc9b55372f327140696b30
3
+ metadata.gz: a53daa02a9a6c4cc8463b7d7bd340a0581fe4748
4
+ data.tar.gz: fa9efc54e2ff9d4e7947e1deee4313ed59a6f345
5
5
  SHA512:
6
- metadata.gz: fb1be4a74d4b4b7c0ea6686b6fcba3acf1013b601ca580e993aeef84532e364e167e13e08475a6b820818f8f05cdada5eacd2f10ffb6af517920c57c731bd3f8
7
- data.tar.gz: 6122913d3e5c734f0f7aa8cd1d2a52a1bdb5fbedcdcbd89c3ce7f3f74d35a255f20cf090512732dcc73c70c6f2116bfdfbed8964e8d6966f012f02411dba4923
6
+ metadata.gz: 129daf466455122c27dddd64bd4c3196de3b7cb227753e12c62a9cdda1e91410239823464c14ff8c94b1754af4b186588ed9deae38d5f479a8a53318ca0d71fb
7
+ data.tar.gz: 5055dd9c6e2bdc13c49d59423385009d8d528ec06358b7a9f06ee2632ac870bc421e678093f376e9d71b2a23b32fdea73c68c70af7caf1f7beba710c383055c9
@@ -7,7 +7,7 @@ rvm:
7
7
  - 2.1.5
8
8
  - 2.2.0
9
9
  - jruby-1.7.18
10
- - rbx-2.4.1
10
+ - rbx-2.5.0
11
11
  env:
12
12
  global:
13
13
  secure: LrTz0Pq2ibNZuKDhdzcrvEUSNxUpPopEq9aJeCxy3UpV0v4vpHBtWV0S6zofvf98g/RkZ6cGI1u+0H578dHgE6pWTo+iR8LAwqPKofrFIWRkeo+M77Vs5swahb3mQyPOcig1hfVWDm25MsojePYm70eBIcBU55NWImtdePXfiU0=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- modis (1.4.0)
4
+ modis (1.4.1)
5
5
  activemodel (>= 3.0)
6
6
  activesupport (>= 3.0)
7
7
  connection_pool (>= 2)
@@ -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] if 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 self.class.attributes.key?(k.to_s)
76
+ send(setter, v) if respond_to?(setter)
77
77
  end
78
78
  end
79
79
 
@@ -1,3 +1,3 @@
1
1
  module Modis
2
- VERSION = '1.4.0'
2
+ VERSION = '1.4.1'
3
3
  end
@@ -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
@@ -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('name' => 'Ian')
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.0
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-13 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel