virtus 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +19 -15
- data/Changelog.md +43 -2
- data/Gemfile +5 -5
- data/README.md +113 -78
- data/Rakefile +13 -3
- data/lib/virtus.rb +46 -6
- data/lib/virtus/attribute.rb +21 -3
- data/lib/virtus/attribute/accessor.rb +11 -0
- data/lib/virtus/attribute/builder.rb +8 -13
- data/lib/virtus/attribute/collection.rb +12 -3
- data/lib/virtus/attribute/default_value.rb +2 -0
- data/lib/virtus/attribute/hash.rb +3 -3
- data/lib/virtus/attribute/nullify_blank.rb +24 -0
- data/lib/virtus/attribute/strict.rb +1 -1
- data/lib/virtus/attribute_set.rb +2 -2
- data/lib/virtus/builder.rb +2 -6
- data/lib/virtus/class_inclusions.rb +0 -1
- data/lib/virtus/coercer.rb +1 -0
- data/lib/virtus/configuration.rb +17 -36
- data/lib/virtus/extensions.rb +13 -21
- data/lib/virtus/instance_methods.rb +3 -2
- data/lib/virtus/model.rb +1 -3
- data/lib/virtus/module_extensions.rb +8 -2
- data/lib/virtus/support/equalizer.rb +1 -1
- data/lib/virtus/support/options.rb +2 -1
- data/lib/virtus/support/type_lookup.rb +1 -1
- data/lib/virtus/version.rb +1 -1
- data/spec/integration/attributes_attribute_spec.rb +28 -0
- data/spec/integration/building_module_spec.rb +22 -0
- data/spec/integration/collection_member_coercion_spec.rb +34 -13
- data/spec/integration/custom_attributes_spec.rb +2 -2
- data/spec/integration/custom_collection_attributes_spec.rb +6 -6
- data/spec/integration/default_values_spec.rb +8 -8
- data/spec/integration/defining_attributes_spec.rb +25 -18
- data/spec/integration/embedded_value_spec.rb +5 -5
- data/spec/integration/extending_objects_spec.rb +5 -5
- data/spec/integration/hash_attributes_coercion_spec.rb +16 -12
- data/spec/integration/mass_assignment_with_accessors_spec.rb +5 -5
- data/spec/integration/overriding_virtus_spec.rb +4 -4
- data/spec/integration/required_attributes_spec.rb +1 -1
- data/spec/integration/struct_as_embedded_value_spec.rb +4 -4
- data/spec/integration/using_modules_spec.rb +8 -8
- data/spec/integration/value_object_with_custom_constructor_spec.rb +4 -4
- data/spec/integration/virtus/instance_level_attributes_spec.rb +1 -1
- data/spec/integration/virtus/value_object_spec.rb +14 -14
- data/spec/shared/freeze_method_behavior.rb +6 -3
- data/spec/shared/idempotent_method_behaviour.rb +1 -1
- data/spec/shared/options_class_method.rb +3 -3
- data/spec/spec_helper.rb +2 -18
- data/spec/unit/virtus/attribute/boolean/coerce_spec.rb +3 -3
- data/spec/unit/virtus/attribute/boolean/value_coerced_predicate_spec.rb +3 -3
- data/spec/unit/virtus/attribute/class_methods/build_spec.rb +64 -24
- data/spec/unit/virtus/attribute/class_methods/coerce_spec.rb +2 -2
- data/spec/unit/virtus/attribute/coerce_spec.rb +58 -10
- data/spec/unit/virtus/attribute/coercible_predicate_spec.rb +2 -2
- data/spec/unit/virtus/attribute/collection/class_methods/build_spec.rb +15 -4
- data/spec/unit/virtus/attribute/collection/coerce_spec.rb +25 -4
- data/spec/unit/virtus/attribute/collection/value_coerced_predicate_spec.rb +31 -0
- data/spec/unit/virtus/attribute/comparison_spec.rb +20 -0
- data/spec/unit/virtus/attribute/custom_collection_spec.rb +8 -2
- data/spec/unit/virtus/attribute/defined_spec.rb +20 -0
- data/spec/unit/virtus/attribute/embedded_value/class_methods/build_spec.rb +30 -15
- data/spec/unit/virtus/attribute/embedded_value/coerce_spec.rb +25 -11
- data/spec/unit/virtus/attribute/get_spec.rb +2 -2
- data/spec/unit/virtus/attribute/hash/class_methods/build_spec.rb +21 -9
- data/spec/unit/virtus/attribute/hash/coerce_spec.rb +9 -9
- data/spec/unit/virtus/attribute/lazy_predicate_spec.rb +2 -2
- data/spec/unit/virtus/attribute/rename_spec.rb +6 -3
- data/spec/unit/virtus/attribute/required_predicate_spec.rb +2 -2
- data/spec/unit/virtus/attribute/set_default_value_spec.rb +43 -10
- data/spec/unit/virtus/attribute/set_spec.rb +1 -1
- data/spec/unit/virtus/attribute/value_coerced_predicate_spec.rb +2 -2
- data/spec/unit/virtus/attribute_set/append_spec.rb +6 -6
- data/spec/unit/virtus/attribute_set/define_reader_method_spec.rb +12 -11
- data/spec/unit/virtus/attribute_set/define_writer_method_spec.rb +13 -12
- data/spec/unit/virtus/attribute_set/each_spec.rb +21 -16
- data/spec/unit/virtus/attribute_set/element_reference_spec.rb +2 -2
- data/spec/unit/virtus/attribute_set/element_set_spec.rb +17 -9
- data/spec/unit/virtus/attribute_set/merge_spec.rb +7 -5
- data/spec/unit/virtus/attribute_set/reset_spec.rb +22 -11
- data/spec/unit/virtus/attribute_spec.rb +8 -7
- data/spec/unit/virtus/attributes_reader_spec.rb +1 -1
- data/spec/unit/virtus/attributes_writer_spec.rb +1 -1
- data/spec/unit/virtus/element_reader_spec.rb +1 -1
- data/spec/unit/virtus/freeze_spec.rb +23 -3
- data/spec/unit/virtus/model_spec.rb +38 -7
- data/spec/unit/virtus/module_spec.rb +59 -2
- data/spec/unit/virtus/set_default_attributes_spec.rb +10 -3
- data/spec/unit/virtus/value_object_spec.rb +15 -5
- data/virtus.gemspec +7 -5
- metadata +46 -44
- data/.ruby-version +0 -1
- data/Gemfile.devtools +0 -54
- data/config/flay.yml +0 -3
- data/config/flog.yml +0 -2
- data/config/mutant.yml +0 -15
- data/config/reek.yml +0 -146
- data/config/yardstick.yml +0 -2
data/virtus.gemspec
CHANGED
@@ -4,7 +4,7 @@ require File.expand_path('../lib/virtus/version', __FILE__)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "virtus"
|
7
|
-
gem.version = Virtus::VERSION
|
7
|
+
gem.version = Virtus::VERSION.dup
|
8
8
|
gem.authors = [ "Piotr Solnica" ]
|
9
9
|
gem.email = [ "piotr.solnica@gmail.com" ]
|
10
10
|
gem.description = "Attributes on Steroids for Plain Old Ruby Objects"
|
@@ -17,8 +17,10 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = `git ls-files -- {spec}/*`.split("\n")
|
18
18
|
gem.extra_rdoc_files = %w[LICENSE README.md TODO.md]
|
19
19
|
|
20
|
-
gem.add_dependency('descendants_tracker', '~> 0.0.
|
21
|
-
gem.add_dependency('
|
22
|
-
gem.add_dependency('
|
23
|
-
|
20
|
+
gem.add_dependency('descendants_tracker', '~> 0.0', '>= 0.0.3')
|
21
|
+
gem.add_dependency('coercible', '~> 1.0')
|
22
|
+
gem.add_dependency('axiom-types', '~> 0.1')
|
23
|
+
|
24
|
+
gem.add_development_dependency 'rake'
|
25
|
+
gem.required_ruby_version = '>= 2.0'
|
24
26
|
end
|
metadata
CHANGED
@@ -1,71 +1,77 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: virtus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: descendants_tracker
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0
|
19
|
+
version: '0.0'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.0.3
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - ~>
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.0'
|
30
|
+
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.0.
|
32
|
+
version: 0.0.3
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
34
|
+
name: coercible
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - ~>
|
37
|
+
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
39
|
+
version: '1.0'
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
|
-
- - ~>
|
44
|
+
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
46
|
+
version: '1.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
48
|
+
name: axiom-types
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - ~>
|
51
|
+
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1
|
53
|
+
version: '0.1'
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
|
-
- - ~>
|
58
|
+
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1
|
60
|
+
version: '0.1'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: rake
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
|
-
- -
|
65
|
+
- - ">="
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0
|
62
|
-
type: :
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- -
|
72
|
+
- - ">="
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0
|
74
|
+
version: '0'
|
69
75
|
description: Attributes on Steroids for Plain Old Ruby Objects
|
70
76
|
email:
|
71
77
|
- piotr.solnica@gmail.com
|
@@ -76,27 +82,20 @@ extra_rdoc_files:
|
|
76
82
|
- README.md
|
77
83
|
- TODO.md
|
78
84
|
files:
|
79
|
-
- .gitignore
|
80
|
-
- .pelusa.yml
|
81
|
-
- .rspec
|
82
|
-
- .ruby-gemset
|
83
|
-
- .
|
84
|
-
- .
|
85
|
-
- .yardopts
|
85
|
+
- ".gitignore"
|
86
|
+
- ".pelusa.yml"
|
87
|
+
- ".rspec"
|
88
|
+
- ".ruby-gemset"
|
89
|
+
- ".travis.yml"
|
90
|
+
- ".yardopts"
|
86
91
|
- CONTRIBUTING.md
|
87
92
|
- Changelog.md
|
88
93
|
- Gemfile
|
89
|
-
- Gemfile.devtools
|
90
94
|
- Guardfile
|
91
95
|
- LICENSE
|
92
96
|
- README.md
|
93
97
|
- Rakefile
|
94
98
|
- TODO.md
|
95
|
-
- config/flay.yml
|
96
|
-
- config/flog.yml
|
97
|
-
- config/mutant.yml
|
98
|
-
- config/reek.yml
|
99
|
-
- config/yardstick.yml
|
100
99
|
- lib/virtus.rb
|
101
100
|
- lib/virtus/attribute.rb
|
102
101
|
- lib/virtus/attribute/accessor.rb
|
@@ -112,6 +111,7 @@ files:
|
|
112
111
|
- lib/virtus/attribute/embedded_value.rb
|
113
112
|
- lib/virtus/attribute/hash.rb
|
114
113
|
- lib/virtus/attribute/lazy_default.rb
|
114
|
+
- lib/virtus/attribute/nullify_blank.rb
|
115
115
|
- lib/virtus/attribute/strict.rb
|
116
116
|
- lib/virtus/attribute_set.rb
|
117
117
|
- lib/virtus/builder.rb
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- lib/virtus/support/type_lookup.rb
|
131
131
|
- lib/virtus/value_object.rb
|
132
132
|
- lib/virtus/version.rb
|
133
|
+
- spec/integration/attributes_attribute_spec.rb
|
133
134
|
- spec/integration/building_module_spec.rb
|
134
135
|
- spec/integration/collection_member_coercion_spec.rb
|
135
136
|
- spec/integration/custom_attributes_spec.rb
|
@@ -162,7 +163,10 @@ files:
|
|
162
163
|
- spec/unit/virtus/attribute/coercible_predicate_spec.rb
|
163
164
|
- spec/unit/virtus/attribute/collection/class_methods/build_spec.rb
|
164
165
|
- spec/unit/virtus/attribute/collection/coerce_spec.rb
|
166
|
+
- spec/unit/virtus/attribute/collection/value_coerced_predicate_spec.rb
|
167
|
+
- spec/unit/virtus/attribute/comparison_spec.rb
|
165
168
|
- spec/unit/virtus/attribute/custom_collection_spec.rb
|
169
|
+
- spec/unit/virtus/attribute/defined_spec.rb
|
166
170
|
- spec/unit/virtus/attribute/embedded_value/class_methods/build_spec.rb
|
167
171
|
- spec/unit/virtus/attribute/embedded_value/coerce_spec.rb
|
168
172
|
- spec/unit/virtus/attribute/get_spec.rb
|
@@ -200,25 +204,23 @@ homepage: https://github.com/solnic/virtus
|
|
200
204
|
licenses:
|
201
205
|
- MIT
|
202
206
|
metadata: {}
|
203
|
-
post_install_message:
|
207
|
+
post_install_message:
|
204
208
|
rdoc_options: []
|
205
209
|
require_paths:
|
206
210
|
- lib
|
207
211
|
required_ruby_version: !ruby/object:Gem::Requirement
|
208
212
|
requirements:
|
209
|
-
- -
|
213
|
+
- - ">="
|
210
214
|
- !ruby/object:Gem::Version
|
211
|
-
version: '0'
|
215
|
+
version: '2.0'
|
212
216
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
213
217
|
requirements:
|
214
|
-
- -
|
218
|
+
- - ">="
|
215
219
|
- !ruby/object:Gem::Version
|
216
220
|
version: '0'
|
217
221
|
requirements: []
|
218
|
-
|
219
|
-
|
220
|
-
signing_key:
|
222
|
+
rubygems_version: 3.2.15
|
223
|
+
signing_key:
|
221
224
|
specification_version: 4
|
222
225
|
summary: Attributes on Steroids for Plain Old Ruby Objects
|
223
226
|
test_files: []
|
224
|
-
has_rdoc:
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.9.3
|
data/Gemfile.devtools
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
group :development do
|
4
|
-
gem 'rake', '~> 10.1.0'
|
5
|
-
gem 'rspec', '~> 2.14.1'
|
6
|
-
gem 'yard', '~> 0.8.7'
|
7
|
-
end
|
8
|
-
|
9
|
-
group :yard do
|
10
|
-
gem 'kramdown', '~> 1.2.0'
|
11
|
-
end
|
12
|
-
|
13
|
-
group :guard do
|
14
|
-
gem 'guard', '~> 1.8.1'
|
15
|
-
gem 'guard-bundler', '~> 1.0.0'
|
16
|
-
gem 'guard-rspec', '~> 3.0.2'
|
17
|
-
gem 'guard-rubocop', '~> 0.2.0'
|
18
|
-
gem 'guard-mutant', '~> 0.0.1'
|
19
|
-
|
20
|
-
# file system change event handling
|
21
|
-
gem 'listen', '~> 1.3.0'
|
22
|
-
gem 'rb-fchange', '~> 0.0.6', require: false
|
23
|
-
gem 'rb-fsevent', '~> 0.9.3', require: false
|
24
|
-
gem 'rb-inotify', '~> 0.9.0', require: false
|
25
|
-
|
26
|
-
# notification handling
|
27
|
-
gem 'libnotify', '~> 0.8.0', require: false
|
28
|
-
gem 'rb-notifu', '~> 0.0.4', require: false
|
29
|
-
gem 'terminal-notifier-guard', '~> 1.5.3', require: false
|
30
|
-
end
|
31
|
-
|
32
|
-
group :metrics do
|
33
|
-
gem 'coveralls', '~> 0.6.7'
|
34
|
-
gem 'flay', '~> 2.4.0'
|
35
|
-
gem 'flog', '~> 4.1.1'
|
36
|
-
gem 'reek', '~> 1.3.2'
|
37
|
-
gem 'rubocop', '~> 0.13.0'
|
38
|
-
gem 'simplecov', '~> 0.7.1'
|
39
|
-
gem 'yardstick', '~> 0.9.7', git: 'https://github.com/dkubb/yardstick.git'
|
40
|
-
|
41
|
-
platforms :ruby_19, :ruby_20 do
|
42
|
-
gem 'yard-spellcheck', '~> 0.1.5'
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
group :benchmarks do
|
47
|
-
gem 'rbench', '~> 0.2.3'
|
48
|
-
end
|
49
|
-
|
50
|
-
platform :jruby do
|
51
|
-
group :jruby do
|
52
|
-
gem 'jruby-openssl', '~> 0.8.5'
|
53
|
-
end
|
54
|
-
end
|
data/config/flay.yml
DELETED
data/config/flog.yml
DELETED
data/config/mutant.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: virtus
|
3
|
-
namespace:
|
4
|
-
- 'Virtus::Attribute'
|
5
|
-
- 'Virtus::AttributeSet'
|
6
|
-
- 'Virtus::Builder'
|
7
|
-
- 'Virtus::ClassInclusions'
|
8
|
-
- 'Virtus::ClassMethods'
|
9
|
-
- 'Virtus::Configuration'
|
10
|
-
- 'Virtus::ConstMissingExtensions'
|
11
|
-
- 'Virtus::Extensions'
|
12
|
-
- 'Virtus::InstanceMethods'
|
13
|
-
- 'Virtus::Model'
|
14
|
-
- 'Virtus::ModuleExtensions'
|
15
|
-
- 'Virtus::ValueObject'
|
data/config/reek.yml
DELETED
@@ -1,146 +0,0 @@
|
|
1
|
-
---
|
2
|
-
Attribute:
|
3
|
-
enabled: false
|
4
|
-
BooleanParameter:
|
5
|
-
enabled: true
|
6
|
-
exclude: []
|
7
|
-
ClassVariable:
|
8
|
-
enabled: true
|
9
|
-
exclude: []
|
10
|
-
ControlParameter:
|
11
|
-
enabled: true
|
12
|
-
exclude:
|
13
|
-
- 'Virtus::InstanceMethods::Constructor#initialize'
|
14
|
-
DataClump:
|
15
|
-
enabled: true
|
16
|
-
max_copies: 2
|
17
|
-
min_clump_size: 2
|
18
|
-
exclude:
|
19
|
-
- 'Virtus::AttributeSet'
|
20
|
-
DuplicateMethodCall:
|
21
|
-
enabled: false
|
22
|
-
FeatureEnvy:
|
23
|
-
enabled: true
|
24
|
-
exclude:
|
25
|
-
- 'Virtus::Attribute::Boolean#value_coerced?'
|
26
|
-
- 'Virtus::AttributeSet#get'
|
27
|
-
- 'Virtus::AttributeSet#set'
|
28
|
-
- 'Virtus::AttributeSet#skip_default?'
|
29
|
-
- 'Virtus::Builder#add_extended_hook'
|
30
|
-
- 'Virtus::Builder#add_included_hook'
|
31
|
-
- 'Virtus::InstanceMethods#assert_valid_name'
|
32
|
-
- 'Virtus::TypeLookup#determine_type_from_primitive'
|
33
|
-
IrresponsibleModule:
|
34
|
-
enabled: true
|
35
|
-
exclude: []
|
36
|
-
LongParameterList:
|
37
|
-
enabled: true
|
38
|
-
exclude:
|
39
|
-
- 'Virtus::AttributeSet#define_reader_method'
|
40
|
-
- 'Virtus::AttributeSet#define_writer_method'
|
41
|
-
- 'Virtus::Extensions::Methods#attribute'
|
42
|
-
- 'Virtus::ModuleExtensions#attribute'
|
43
|
-
- 'Virtus::ModuleExtensions#self.setup'
|
44
|
-
- 'Virtus::ValueObject::ClassMethods#attribute'
|
45
|
-
max_params: 2
|
46
|
-
LongYieldList:
|
47
|
-
enabled: true
|
48
|
-
exclude: []
|
49
|
-
max_params: 2
|
50
|
-
NestedIterators:
|
51
|
-
enabled: true
|
52
|
-
max_allowed_nesting: 1
|
53
|
-
ignore_iterators: []
|
54
|
-
exclude:
|
55
|
-
- 'Virtus::Builder#add_extended_hook'
|
56
|
-
- 'Virtus::Builder#add_included_hook'
|
57
|
-
- 'Virtus::ModuleBuilder#add_included_hook'
|
58
|
-
- 'Virtus::Equalizer#define_cmp_method'
|
59
|
-
- 'Virtus::Equalizer#define_hash_method'
|
60
|
-
- 'Virtus::Equalizer#define_inspect_method'
|
61
|
-
NilCheck:
|
62
|
-
enabled: true
|
63
|
-
exclude:
|
64
|
-
- 'Virtus::Attribute::EmbeddedValue::FromOpenStruct#call'
|
65
|
-
- 'Virtus::Attribute::EmbeddedValue::FromStruct#call'
|
66
|
-
- 'Virtus::Attribute::Strict#coerce'
|
67
|
-
- 'Virtus::Options#options'
|
68
|
-
- 'Virtus::TypeLookup#determine_type_from_primitive'
|
69
|
-
RepeatedConditional:
|
70
|
-
enabled: true
|
71
|
-
max_ifs: 1
|
72
|
-
exclude:
|
73
|
-
- 'Virtus::AttributeSet'
|
74
|
-
- 'Virtus::Builder'
|
75
|
-
TooManyInstanceVariables:
|
76
|
-
enabled: true
|
77
|
-
max_instance_variables: 3
|
78
|
-
exclude:
|
79
|
-
- 'Virtus::Attribute'
|
80
|
-
- 'Virtus::Attribute::Builder'
|
81
|
-
- 'Virtus::Configuration'
|
82
|
-
TooManyMethods:
|
83
|
-
enabled: true
|
84
|
-
max_methods: 6
|
85
|
-
exclude:
|
86
|
-
- 'Virtus::Equalizer'
|
87
|
-
- 'Virtus::Builder'
|
88
|
-
- 'Virtus::Attribute'
|
89
|
-
- 'Virtus::AttributeSet'
|
90
|
-
TooManyStatements:
|
91
|
-
enabled: true
|
92
|
-
max_statements: 4
|
93
|
-
exclude:
|
94
|
-
- 'Virtus#self.included'
|
95
|
-
- 'Virtus::Attribute::Builder#self.determine_type'
|
96
|
-
- 'Virtus::Attribute::Collection#self.infer'
|
97
|
-
- 'Virtus::Attribute::Hash#self.infer'
|
98
|
-
- 'Virtus::Builder#add_extended_hook'
|
99
|
-
- 'Virtus::Builder#add_included_hook'
|
100
|
-
- 'Virtus::ModuleBuilder#add_included_hook'
|
101
|
-
- 'Virtus::ClassInclusions#self.included'
|
102
|
-
- 'Virtus::ClassMethods#self.extended'
|
103
|
-
- 'Virtus::Extensions#self.extended'
|
104
|
-
- 'Virtus::ModuleExtensions#included'
|
105
|
-
- 'Virtus::TypeLookup#determine_type_from_primitive'
|
106
|
-
- 'Virtus::ValueObject#self.included'
|
107
|
-
UncommunicativeMethodName:
|
108
|
-
enabled: true
|
109
|
-
reject:
|
110
|
-
- !ruby/regexp /^[a-z]$/
|
111
|
-
- !ruby/regexp /[0-9]$/
|
112
|
-
- !ruby/regexp /[A-Z]/
|
113
|
-
UncommunicativeModuleName:
|
114
|
-
enabled: true
|
115
|
-
exclude: []
|
116
|
-
reject:
|
117
|
-
- !ruby/regexp /^.$/
|
118
|
-
- !ruby/regexp /[0-9]$/
|
119
|
-
accept: []
|
120
|
-
UncommunicativeParameterName:
|
121
|
-
enabled: true
|
122
|
-
exclude: []
|
123
|
-
reject:
|
124
|
-
- !ruby/regexp /^.$/
|
125
|
-
- !ruby/regexp /[0-9]$/
|
126
|
-
- !ruby/regexp /[A-Z]/
|
127
|
-
accept: ['_']
|
128
|
-
UncommunicativeVariableName:
|
129
|
-
enabled: true
|
130
|
-
exclude: []
|
131
|
-
reject:
|
132
|
-
- !ruby/regexp /^.$/
|
133
|
-
- !ruby/regexp /[0-9]$/
|
134
|
-
- !ruby/regexp /[A-Z]/
|
135
|
-
accept: []
|
136
|
-
UnusedParameters:
|
137
|
-
enabled: true
|
138
|
-
exclude: []
|
139
|
-
UtilityFunction:
|
140
|
-
enabled: true
|
141
|
-
max_helper_calls: 0
|
142
|
-
exclude:
|
143
|
-
- 'Virtus::Attribute::Boolean#value_coerced?'
|
144
|
-
- 'Virtus::AttributeSet#set_default'
|
145
|
-
- 'Virtus::AttributeSet#skip_default?'
|
146
|
-
- 'Virtus::Extensions::Methods#merge_options'
|
data/config/yardstick.yml
DELETED