virtus 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +10 -2
- data/Guardfile +9 -0
- data/README.md +12 -8
- data/TODO +0 -35
- data/config/flay.yml +1 -1
- data/config/site.reek +3 -1
- data/lib/virtus.rb +1 -0
- data/lib/virtus/attribute.rb +1 -1
- data/lib/virtus/attribute/collection.rb +2 -2
- data/lib/virtus/attribute/default_value/from_symbol.rb +2 -2
- data/lib/virtus/attribute_set.rb +4 -17
- data/lib/virtus/attributes_accessor.rb +22 -20
- data/lib/virtus/class_methods.rb +1 -1
- data/lib/virtus/coercion/hash.rb +1 -1
- data/lib/virtus/coercion/object.rb +1 -1
- data/lib/virtus/coercion/string.rb +20 -7
- data/lib/virtus/coercion/time_coercions.rb +5 -1
- data/lib/virtus/instance_methods.rb +8 -8
- data/lib/virtus/support/type_lookup.rb +24 -8
- data/lib/virtus/value_object/equalizer.rb +3 -2
- data/lib/virtus/version.rb +1 -1
- data/spec/shared/options_class_method.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/virtus/attribute/class_methods/determine_type_spec.rb +1 -7
- data/spec/unit/virtus/attribute/coerce_spec.rb +2 -2
- data/spec/unit/virtus/attribute/collection/coerce_and_append_member_spec.rb +16 -0
- data/spec/unit/virtus/attribute/collection/coerce_spec.rb +20 -7
- data/spec/unit/virtus/attribute/collection/member_coercion/coerce_and_append_member_spec.rb +18 -0
- data/spec/unit/virtus/attribute/collection/member_type_spec.rb +17 -0
- data/spec/unit/virtus/attribute/collection/new_collection_spec.rb +9 -0
- data/spec/unit/virtus/attribute/default_value/class_methods/build_spec.rb +25 -0
- data/spec/unit/virtus/attribute/default_value/evaluate_spec.rb +0 -43
- data/spec/unit/virtus/attribute/default_value/from_callable/class_methods/handle_spec.rb +20 -0
- data/spec/unit/virtus/attribute/default_value/from_callable/evaluate_spec.rb +21 -0
- data/spec/unit/virtus/attribute/default_value/from_clonable/class_methods/handle_spec.rb +20 -0
- data/spec/unit/virtus/attribute/default_value/from_clonable/evaluate_spec.rb +22 -0
- data/spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb +20 -0
- data/spec/unit/virtus/attribute/default_value/from_symbol/evaluate_spec.rb +18 -0
- data/spec/unit/virtus/attribute_set/element_set_spec.rb +5 -4
- data/spec/unit/virtus/attributes_accessor/define_reader_method_spec.rb +36 -0
- data/spec/unit/virtus/attributes_accessor/define_writer_method_spec.rb +36 -0
- data/spec/unit/virtus/coercion/array/{to_set_spec.rb → class_methods/to_set_spec.rb} +0 -0
- data/spec/unit/virtus/coercion/{class_name_reference_spec.rb → class_methods/element_reference_spec.rb} +0 -0
- data/spec/unit/virtus/coercion/class_methods/primitive_spec.rb +13 -0
- data/spec/unit/virtus/coercion/decimal/class_methods/to_decimal_spec.rb +10 -0
- data/spec/unit/virtus/coercion/float/class_methods/to_float_spec.rb +10 -0
- data/spec/unit/virtus/coercion/integer/class_methods/to_integer_spec.rb +10 -0
- data/spec/unit/virtus/coercion/numeric/class_methods/to_decimal_spec.rb +0 -0
- data/spec/unit/virtus/coercion/numeric/class_methods/to_float_spec.rb +0 -0
- data/spec/unit/virtus/coercion/numeric/class_methods/to_integer_spec.rb +0 -0
- data/spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb +0 -0
- data/spec/unit/virtus/coercion/object/class_methods/to_string_spec.rb +1 -1
- data/spec/unit/virtus/coercion/string/class_methods/to_symbol_spec.rb +10 -0
- data/spec/unit/virtus/coercion/time/class_methods/to_integer_spec.rb +11 -0
- data/spec/unit/virtus/instance_methods/attributes_spec.rb +25 -0
- data/spec/unit/virtus/instance_methods/initialize_spec.rb +42 -0
- data/spec/unit/virtus/type_lookup/class_methods/extended_spec.rb +10 -0
- data/spec/unit/virtus/value_object/class_methods/attribute_spec.rb +16 -0
- data/spec/unit/virtus/value_object/equalizer/append_spec.rb +61 -0
- data/virtus.gemspec +4 -3
- metadata +80 -75
- data/spec/unit/virtus/attribute_set/parent_spec.rb +0 -11
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Virtus::AttributesAccessor, '#define_writer_method' do
|
4
|
+
subject { described_class.new('Test') }
|
5
|
+
|
6
|
+
let(:attribute) { mock('attribute') }
|
7
|
+
|
8
|
+
if RUBY_VERSION < '1.9'
|
9
|
+
let(:method_name) { 'foo_bar=' }
|
10
|
+
else
|
11
|
+
let(:method_name) { :foo_bar= }
|
12
|
+
end
|
13
|
+
|
14
|
+
before do
|
15
|
+
subject.define_reader_method(attribute, method_name, visibility)
|
16
|
+
end
|
17
|
+
|
18
|
+
context "with public visibility" do
|
19
|
+
let(:visibility) { :public }
|
20
|
+
|
21
|
+
its(:public_instance_methods) { should include(method_name) }
|
22
|
+
end
|
23
|
+
|
24
|
+
context "with private visibility" do
|
25
|
+
let(:visibility) { :private }
|
26
|
+
|
27
|
+
its(:private_instance_methods) { should include(method_name) }
|
28
|
+
end
|
29
|
+
|
30
|
+
context "with protected visibility" do
|
31
|
+
let(:visibility) { :protected }
|
32
|
+
|
33
|
+
its(:protected_instance_methods) { should include(method_name) }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Virtus::Coercion, '.primitive' do
|
4
|
+
Virtus::Coercion.descendants.each do |descendant|
|
5
|
+
subject { descendant.primitive }
|
6
|
+
|
7
|
+
let(:primitive) { Object.const_get(descendant.name.split('::').last.to_sym) }
|
8
|
+
|
9
|
+
describe "#{descendant}.primitive" do
|
10
|
+
it { should be(primitive) }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -4,7 +4,7 @@ describe Virtus::Coercion::Object, '.to_string' do
|
|
4
4
|
subject { object.to_string(value) }
|
5
5
|
|
6
6
|
let(:object) { described_class }
|
7
|
-
let(:value) {
|
7
|
+
let(:value) { Object.new }
|
8
8
|
|
9
9
|
context 'when the value responds to #to_str' do
|
10
10
|
let(:coerced) { stub('coerced') }
|
@@ -21,6 +21,14 @@ describe Virtus::InstanceMethods do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
let(:hash_object) do
|
25
|
+
Class.new do
|
26
|
+
def to_hash
|
27
|
+
{:age => 5}
|
28
|
+
end
|
29
|
+
end.new
|
30
|
+
end
|
31
|
+
|
24
32
|
let(:attributes) { { :name => 'john', :age => 28 } }
|
25
33
|
|
26
34
|
describe '#attributes' do
|
@@ -109,5 +117,22 @@ describe Virtus::InstanceMethods do
|
|
109
117
|
expect { subject }.to_not raise_exception
|
110
118
|
end
|
111
119
|
end
|
120
|
+
|
121
|
+
context "when given values respond_to?(:to_hash)" do
|
122
|
+
let(:attribute_values) { hash_object }
|
123
|
+
|
124
|
+
it 'sets attributes' do
|
125
|
+
subject
|
126
|
+
object.age.should == 5
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
context "when given values does not respond_to?(:to_hash)" do
|
131
|
+
let(:attribute_values) { '' }
|
132
|
+
|
133
|
+
it 'raises an exception' do
|
134
|
+
expect { subject }.to raise_error(NoMethodError)
|
135
|
+
end
|
136
|
+
end
|
112
137
|
end
|
113
138
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Virtus::InstanceMethods, '#initialize' do
|
4
|
+
let(:described_class) do
|
5
|
+
Class.new do
|
6
|
+
include Virtus
|
7
|
+
attribute :name, String
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'with no arguments' do
|
12
|
+
subject { described_class.new }
|
13
|
+
|
14
|
+
it 'does not set attributes' do
|
15
|
+
subject.name.should be_nil
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'with nil' do
|
20
|
+
subject { described_class.new(nil) }
|
21
|
+
|
22
|
+
it 'does not set attributes' do
|
23
|
+
subject.name.should be_nil
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'with an argument that responds to #to_hash' do
|
28
|
+
subject { described_class.new(:name => name) }
|
29
|
+
|
30
|
+
let(:name) { stub('name') }
|
31
|
+
|
32
|
+
it 'sets attributes' do
|
33
|
+
subject.name.should be(name)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context' with an argument that does not respond to #to_hash' do
|
38
|
+
subject { described_class.new(Object.new) }
|
39
|
+
|
40
|
+
specify { expect { subject }.to raise_error(NoMethodError) }
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Virtus::ValueObject, '.attribute' do
|
4
|
+
subject { model.attributes[name] }
|
5
|
+
|
6
|
+
let(:model) { Class.new { include Virtus::ValueObject } }
|
7
|
+
let(:name) { :lat }
|
8
|
+
let(:type) { Float }
|
9
|
+
|
10
|
+
before { model.attribute(name, type) }
|
11
|
+
|
12
|
+
it { should be_instance_of(Virtus::Attribute::Float) }
|
13
|
+
|
14
|
+
specify { subject.options[:writer].should be(:private) }
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Virtus::ValueObject::Equalizer, '#<<' do
|
4
|
+
let(:equalizer) { described_class.new(:user, [ :first_name ]) }
|
5
|
+
|
6
|
+
let(:klass) do
|
7
|
+
klass = Class.new { attr_accessor :first_name, :last_name }
|
8
|
+
klass.send(:include, equalizer)
|
9
|
+
end
|
10
|
+
|
11
|
+
let(:user_one) { klass.new }
|
12
|
+
let(:user_two) { klass.new }
|
13
|
+
|
14
|
+
let(:first_name) { 'john' }
|
15
|
+
let(:last_name) { 'doe' }
|
16
|
+
|
17
|
+
before do
|
18
|
+
equalizer << :last_name
|
19
|
+
|
20
|
+
user_one.first_name = first_name
|
21
|
+
user_one.last_name = last_name
|
22
|
+
|
23
|
+
user_two.first_name = first_name
|
24
|
+
user_two.last_name = last_name
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "#eql?" do
|
28
|
+
subject { user_one.eql?(user_two) }
|
29
|
+
|
30
|
+
context 'when key values match' do
|
31
|
+
it { should be(true) }
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'when key values match' do
|
35
|
+
before { user_two.last_name = 'other' }
|
36
|
+
|
37
|
+
it { should be(false) }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "#==?" do
|
42
|
+
subject { user_one == user_two }
|
43
|
+
|
44
|
+
context 'when key values match' do
|
45
|
+
it { should be(true) }
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'when key values match' do
|
49
|
+
before { user_two.last_name = 'other' }
|
50
|
+
|
51
|
+
it { should be(false) }
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "#hash" do
|
56
|
+
subject { user_one.hash }
|
57
|
+
|
58
|
+
it { should eql(klass.hash ^ first_name.hash ^ last_name.hash) }
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
data/virtus.gemspec
CHANGED
@@ -16,7 +16,8 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.test_files = `git ls-files -- {spec}/*`.split("\n")
|
17
17
|
gem.extra_rdoc_files = %w[LICENSE README.md TODO]
|
18
18
|
|
19
|
-
gem.add_development_dependency('rake',
|
20
|
-
gem.add_development_dependency('backports',
|
21
|
-
gem.add_development_dependency('rspec',
|
19
|
+
gem.add_development_dependency('rake', '~> 0.9.2')
|
20
|
+
gem.add_development_dependency('backports', '~> 2.3.0')
|
21
|
+
gem.add_development_dependency('rspec', '~> 1.3.2')
|
22
|
+
gem.add_development_dependency('guard-rspec', '~> 0.6.0')
|
22
23
|
end
|
metadata
CHANGED
@@ -1,82 +1,70 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: virtus
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
- 0
|
10
|
-
version: 0.3.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Piotr Solnica
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-03-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: rake
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70209603947640 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
18
|
+
requirements:
|
26
19
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 63
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
- 9
|
32
|
-
- 2
|
20
|
+
- !ruby/object:Gem::Version
|
33
21
|
version: 0.9.2
|
34
22
|
type: :development
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: backports
|
38
23
|
prerelease: false
|
39
|
-
|
24
|
+
version_requirements: *70209603947640
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: backports
|
27
|
+
requirement: &70209603947040 !ruby/object:Gem::Requirement
|
40
28
|
none: false
|
41
|
-
requirements:
|
29
|
+
requirements:
|
42
30
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
hash: 3
|
45
|
-
segments:
|
46
|
-
- 2
|
47
|
-
- 3
|
48
|
-
- 0
|
31
|
+
- !ruby/object:Gem::Version
|
49
32
|
version: 2.3.0
|
50
33
|
type: :development
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: rspec
|
54
34
|
prerelease: false
|
55
|
-
|
35
|
+
version_requirements: *70209603947040
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &70209603934620 !ruby/object:Gem::Requirement
|
56
39
|
none: false
|
57
|
-
requirements:
|
40
|
+
requirements:
|
58
41
|
- - ~>
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
hash: 31
|
61
|
-
segments:
|
62
|
-
- 1
|
63
|
-
- 3
|
64
|
-
- 2
|
42
|
+
- !ruby/object:Gem::Version
|
65
43
|
version: 1.3.2
|
66
44
|
type: :development
|
67
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70209603934620
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: guard-rspec
|
49
|
+
requirement: &70209603933940 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.6.0
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70209603933940
|
68
58
|
description: Attributes on Steroids for Plain Old Ruby Objects
|
69
|
-
email:
|
59
|
+
email:
|
70
60
|
- piotr.solnica@gmail.com
|
71
61
|
executables: []
|
72
|
-
|
73
62
|
extensions: []
|
74
|
-
|
75
|
-
extra_rdoc_files:
|
63
|
+
extra_rdoc_files:
|
76
64
|
- LICENSE
|
77
65
|
- README.md
|
78
66
|
- TODO
|
79
|
-
files:
|
67
|
+
files:
|
80
68
|
- .gitignore
|
81
69
|
- .pelusa.yml
|
82
70
|
- .rvmrc
|
@@ -84,6 +72,7 @@ files:
|
|
84
72
|
- .yardopts
|
85
73
|
- Changelog.md
|
86
74
|
- Gemfile
|
75
|
+
- Guardfile
|
87
76
|
- LICENSE
|
88
77
|
- README.md
|
89
78
|
- Rakefile
|
@@ -174,15 +163,26 @@ files:
|
|
174
163
|
- spec/unit/virtus/attribute/coerce_spec.rb
|
175
164
|
- spec/unit/virtus/attribute/coercion_method_spec.rb
|
176
165
|
- spec/unit/virtus/attribute/collection/class_methods/merge_options_spec.rb
|
166
|
+
- spec/unit/virtus/attribute/collection/coerce_and_append_member_spec.rb
|
177
167
|
- spec/unit/virtus/attribute/collection/coerce_spec.rb
|
168
|
+
- spec/unit/virtus/attribute/collection/member_coercion/coerce_and_append_member_spec.rb
|
169
|
+
- spec/unit/virtus/attribute/collection/member_type_spec.rb
|
170
|
+
- spec/unit/virtus/attribute/collection/new_collection_spec.rb
|
178
171
|
- spec/unit/virtus/attribute/date/coerce_spec.rb
|
179
172
|
- spec/unit/virtus/attribute/date/value_coerced_spec.rb
|
180
173
|
- spec/unit/virtus/attribute/date_time/coerce_spec.rb
|
181
174
|
- spec/unit/virtus/attribute/decimal/coerce_spec.rb
|
182
175
|
- spec/unit/virtus/attribute/default_spec.rb
|
183
176
|
- spec/unit/virtus/attribute/default_value/attribute_spec.rb
|
177
|
+
- spec/unit/virtus/attribute/default_value/class_methods/build_spec.rb
|
184
178
|
- spec/unit/virtus/attribute/default_value/class_methods/new_spec.rb
|
185
179
|
- spec/unit/virtus/attribute/default_value/evaluate_spec.rb
|
180
|
+
- spec/unit/virtus/attribute/default_value/from_callable/class_methods/handle_spec.rb
|
181
|
+
- spec/unit/virtus/attribute/default_value/from_callable/evaluate_spec.rb
|
182
|
+
- spec/unit/virtus/attribute/default_value/from_clonable/class_methods/handle_spec.rb
|
183
|
+
- spec/unit/virtus/attribute/default_value/from_clonable/evaluate_spec.rb
|
184
|
+
- spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb
|
185
|
+
- spec/unit/virtus/attribute/default_value/from_symbol/evaluate_spec.rb
|
186
186
|
- spec/unit/virtus/attribute/default_value/value_spec.rb
|
187
187
|
- spec/unit/virtus/attribute/define_accessor_methods_spec.rb
|
188
188
|
- spec/unit/virtus/attribute/define_reader_method_spec.rb
|
@@ -212,16 +212,18 @@ files:
|
|
212
212
|
- spec/unit/virtus/attribute_set/element_reference_spec.rb
|
213
213
|
- spec/unit/virtus/attribute_set/element_set_spec.rb
|
214
214
|
- spec/unit/virtus/attribute_set/merge_spec.rb
|
215
|
-
- spec/unit/virtus/attribute_set/parent_spec.rb
|
216
215
|
- spec/unit/virtus/attribute_set/reset_spec.rb
|
216
|
+
- spec/unit/virtus/attributes_accessor/define_reader_method_spec.rb
|
217
|
+
- spec/unit/virtus/attributes_accessor/define_writer_method_spec.rb
|
217
218
|
- spec/unit/virtus/attributes_accessor/inspect_spec.rb
|
218
219
|
- spec/unit/virtus/class_methods/allowed_writer_methods_spec.rb
|
219
220
|
- spec/unit/virtus/class_methods/attribute_spec.rb
|
220
221
|
- spec/unit/virtus/class_methods/attributes_spec.rb
|
221
222
|
- spec/unit/virtus/class_methods/const_missing_spec.rb
|
222
223
|
- spec/unit/virtus/class_methods/inherited_spec.rb
|
223
|
-
- spec/unit/virtus/coercion/array/to_set_spec.rb
|
224
|
-
- spec/unit/virtus/coercion/
|
224
|
+
- spec/unit/virtus/coercion/array/class_methods/to_set_spec.rb
|
225
|
+
- spec/unit/virtus/coercion/class_methods/element_reference_spec.rb
|
226
|
+
- spec/unit/virtus/coercion/class_methods/primitive_spec.rb
|
225
227
|
- spec/unit/virtus/coercion/date/class_methods/to_date_spec.rb
|
226
228
|
- spec/unit/virtus/coercion/date/class_methods/to_datetime_spec.rb
|
227
229
|
- spec/unit/virtus/coercion/date/class_methods/to_string_spec.rb
|
@@ -230,11 +232,13 @@ files:
|
|
230
232
|
- spec/unit/virtus/coercion/date_time/class_methods/to_datetime_spec.rb
|
231
233
|
- spec/unit/virtus/coercion/date_time/class_methods/to_string_spec.rb
|
232
234
|
- spec/unit/virtus/coercion/date_time/class_methods/to_time_spec.rb
|
235
|
+
- spec/unit/virtus/coercion/decimal/class_methods/to_decimal_spec.rb
|
233
236
|
- spec/unit/virtus/coercion/decimal/class_methods/to_float_spec.rb
|
234
237
|
- spec/unit/virtus/coercion/decimal/class_methods/to_integer_spec.rb
|
235
238
|
- spec/unit/virtus/coercion/decimal/class_methods/to_string_spec.rb
|
236
239
|
- spec/unit/virtus/coercion/false_class/class_methods/to_string_spec.rb
|
237
240
|
- spec/unit/virtus/coercion/float/class_methods/to_decimal_spec.rb
|
241
|
+
- spec/unit/virtus/coercion/float/class_methods/to_float_spec.rb
|
238
242
|
- spec/unit/virtus/coercion/float/class_methods/to_integer_spec.rb
|
239
243
|
- spec/unit/virtus/coercion/float/class_methods/to_string_spec.rb
|
240
244
|
- spec/unit/virtus/coercion/hash/class_methods/to_date_spec.rb
|
@@ -243,7 +247,12 @@ files:
|
|
243
247
|
- spec/unit/virtus/coercion/integer/class_methods/to_boolean_spec.rb
|
244
248
|
- spec/unit/virtus/coercion/integer/class_methods/to_decimal_spec.rb
|
245
249
|
- spec/unit/virtus/coercion/integer/class_methods/to_float_spec.rb
|
250
|
+
- spec/unit/virtus/coercion/integer/class_methods/to_integer_spec.rb
|
246
251
|
- spec/unit/virtus/coercion/integer/class_methods/to_string_spec.rb
|
252
|
+
- spec/unit/virtus/coercion/numeric/class_methods/to_decimal_spec.rb
|
253
|
+
- spec/unit/virtus/coercion/numeric/class_methods/to_float_spec.rb
|
254
|
+
- spec/unit/virtus/coercion/numeric/class_methods/to_integer_spec.rb
|
255
|
+
- spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb
|
247
256
|
- spec/unit/virtus/coercion/object/class_methods/method_missing_spec.rb
|
248
257
|
- spec/unit/virtus/coercion/object/class_methods/to_array_spec.rb
|
249
258
|
- spec/unit/virtus/coercion/object/class_methods/to_hash_spec.rb
|
@@ -256,8 +265,10 @@ files:
|
|
256
265
|
- spec/unit/virtus/coercion/string/class_methods/to_decimal_spec.rb
|
257
266
|
- spec/unit/virtus/coercion/string/class_methods/to_float_spec.rb
|
258
267
|
- spec/unit/virtus/coercion/string/class_methods/to_integer_spec.rb
|
268
|
+
- spec/unit/virtus/coercion/string/class_methods/to_symbol_spec.rb
|
259
269
|
- spec/unit/virtus/coercion/string/class_methods/to_time_spec.rb
|
260
270
|
- spec/unit/virtus/coercion/symbol/class_methods/to_string_spec.rb
|
271
|
+
- spec/unit/virtus/coercion/time/class_methods/to_integer_spec.rb
|
261
272
|
- spec/unit/virtus/coercion/time/class_methods/to_time_spec.rb
|
262
273
|
- spec/unit/virtus/coercion/true_class/class_methods/to_string_spec.rb
|
263
274
|
- spec/unit/virtus/descendants_tracker/add_descendant_spec.rb
|
@@ -265,14 +276,18 @@ files:
|
|
265
276
|
- spec/unit/virtus/instance_methods/attributes_spec.rb
|
266
277
|
- spec/unit/virtus/instance_methods/element_reference_spec.rb
|
267
278
|
- spec/unit/virtus/instance_methods/element_set_spec.rb
|
279
|
+
- spec/unit/virtus/instance_methods/initialize_spec.rb
|
268
280
|
- spec/unit/virtus/instance_methods/to_hash_spec.rb
|
269
281
|
- spec/unit/virtus/options/accept_options_spec.rb
|
270
282
|
- spec/unit/virtus/options/accepted_options_spec.rb
|
271
283
|
- spec/unit/virtus/options/options_spec.rb
|
284
|
+
- spec/unit/virtus/type_lookup/class_methods/extended_spec.rb
|
272
285
|
- spec/unit/virtus/type_lookup/determine_type_spec.rb
|
273
286
|
- spec/unit/virtus/type_lookup/primitive_spec.rb
|
274
287
|
- spec/unit/virtus/value_object/class_methods/allowed_writer_methods_spec.rb
|
288
|
+
- spec/unit/virtus/value_object/class_methods/attribute_spec.rb
|
275
289
|
- spec/unit/virtus/value_object/class_methods/equalizer_spec.rb
|
290
|
+
- spec/unit/virtus/value_object/equalizer/append_spec.rb
|
276
291
|
- spec/unit/virtus/value_object/initialize_spec.rb
|
277
292
|
- spec/unit/virtus/value_object/with_spec.rb
|
278
293
|
- tasks/metrics/ci.rake
|
@@ -288,37 +303,27 @@ files:
|
|
288
303
|
- virtus.gemspec
|
289
304
|
homepage: https://github.com/solnic/virtus
|
290
305
|
licenses: []
|
291
|
-
|
292
306
|
post_install_message:
|
293
307
|
rdoc_options: []
|
294
|
-
|
295
|
-
require_paths:
|
308
|
+
require_paths:
|
296
309
|
- lib
|
297
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
310
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
298
311
|
none: false
|
299
|
-
requirements:
|
300
|
-
- -
|
301
|
-
- !ruby/object:Gem::Version
|
302
|
-
|
303
|
-
|
304
|
-
- 0
|
305
|
-
version: "0"
|
306
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
312
|
+
requirements:
|
313
|
+
- - ! '>='
|
314
|
+
- !ruby/object:Gem::Version
|
315
|
+
version: '0'
|
316
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
307
317
|
none: false
|
308
|
-
requirements:
|
309
|
-
- -
|
310
|
-
- !ruby/object:Gem::Version
|
311
|
-
|
312
|
-
segments:
|
313
|
-
- 0
|
314
|
-
version: "0"
|
318
|
+
requirements:
|
319
|
+
- - ! '>='
|
320
|
+
- !ruby/object:Gem::Version
|
321
|
+
version: '0'
|
315
322
|
requirements: []
|
316
|
-
|
317
323
|
rubyforge_project:
|
318
|
-
rubygems_version: 1.8.
|
324
|
+
rubygems_version: 1.8.15
|
319
325
|
signing_key:
|
320
326
|
specification_version: 3
|
321
327
|
summary: Attributes on Steroids for Plain Old Ruby Objects
|
322
328
|
test_files: []
|
323
|
-
|
324
329
|
has_rdoc:
|