modis 0.0.1 → 1.0.0

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: dcfeb39afdb8de9cd3ffe9ec674b286eb70d06de
4
- data.tar.gz: d7249376be524136201103ab7e9e3252311691e1
3
+ metadata.gz: 636b12c6a5c346586ec5fed639ea9c7de44e18f8
4
+ data.tar.gz: d8bb31a3245b62c556a8bcee449a3555cf8c2bb6
5
5
  SHA512:
6
- metadata.gz: ca3a68ca27c5b974b150683440d1d5112ab1c78ea171219c05667c434015fbc9cd27e8e30f3d32fbd6eeb04626fff6d156196e037df1da343c232207c640cc79
7
- data.tar.gz: f268573540e3e4c02cfe12c91fdf824a7c6550efd8092fc0ea5345c3bf9c63bfd2f3d0a61fafed693019bbad04f60c641f8a4313bf91f5f21219fca1eda05c7a
6
+ metadata.gz: c379ef03514854bf7221a57c387635fa080c2cd97a9c75ed0620da4ee3166a4cd4ac32d66280f4e1e428679507d74fde8a2faaf2250be0eeb3c41728fe68ebfc
7
+ data.tar.gz: 677634bb19c26bfa9bd9f6836629466b45c00f4b39112d06cb82b817707cbfedc41a7d2b875154b743090b8e6478222b5e82d3d8fbe37da49c40620101e7be54
@@ -125,6 +125,8 @@ module Modis
125
125
  value = MultiJson.decode(value) if value.kind_of?(String)
126
126
  rescue MultiJson::ParseError
127
127
  raise if strict
128
+ else
129
+ value = value.to_s unless strict
128
130
  end
129
131
  if strict
130
132
  return value if value.kind_of?(type)
data/lib/modis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Modis
2
- VERSION = "0.0.1"
2
+ VERSION = '1.0.0'
3
3
  end
File without changes
@@ -171,8 +171,11 @@ describe Modis::Attributes do
171
171
  found.hash_not_strict.should eq "test"
172
172
  end
173
173
 
174
- it 'does not raise an error when assigned another type' do
175
- expect { model.hash_not_strict = "test" }.to_not raise_error
174
+ it 'returns an integer as a string' do
175
+ model.hash_not_strict = 1
176
+ model.save!
177
+ found = AttributesSpec::MockModel.find(model.id)
178
+ found.hash_not_strict.should eq "1"
176
179
  end
177
180
  end
178
181
  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: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Leitch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-15 00:00:00.000000000 Z
11
+ date: 2014-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -78,7 +78,7 @@ files:
78
78
  - lib/modis/transaction.rb
79
79
  - lib/modis/version.rb
80
80
  - lib/tasks/spec.rake
81
- - redis_model.gemspec
81
+ - modis.gemspec
82
82
  - spec/attributes_spec.rb
83
83
  - spec/errors_spec.rb
84
84
  - spec/finders_spec.rb