ice_nine 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -1
- data/Gemfile +32 -22
- data/Guardfile +23 -0
- data/README.md +17 -11
- data/config/roodi.yml +3 -3
- data/ice_nine.gemspec +1 -1
- data/lib/ice_nine/freezer/range.rb +1 -1
- data/lib/ice_nine/version.rb +1 -1
- data/spec/integration/ice_nine/class_methods/deep_freeze_spec.rb +14 -14
- data/spec/spec_helper.rb +11 -15
- data/spec/support/heckle.rb +6 -0
- data/spec/unit/ice_nine/class_methods/deep_freeze_spec.rb +2 -2
- data/spec/unit/ice_nine/freezer/array/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/false_class/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/hash/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/nil_class/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/no_freeze/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/numeric/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/object/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/range/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/struct/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/symbol/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/ice_nine/freezer/true_class/class_methods/deep_freeze_spec.rb +1 -1
- data/spec/unit/object/deep_freeze_spec.rb +1 -1
- data/tasks/metrics/ci.rake +1 -1
- metadata +11 -10
- data/config/site.reek +0 -91
- data/tasks/metrics/reek.rake +0 -21
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -9,27 +9,26 @@ group :yard do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
group :guard do
|
12
|
-
gem 'guard', '~> 1.
|
12
|
+
gem 'guard', '~> 1.6.2'
|
13
13
|
gem 'guard-bundler', '~> 1.0.0'
|
14
14
|
gem 'guard-rspec', '~> 1.2.1'
|
15
|
-
end
|
16
15
|
|
17
|
-
|
18
|
-
gem '
|
19
|
-
|
16
|
+
# file system change event handling
|
17
|
+
gem 'rb-fchange', '~> 0.0.6', :require => false
|
18
|
+
gem 'rb-fsevent', '~> 0.9.3', :require => false
|
19
|
+
gem 'rb-inotify', '~> 0.9.0', :require => false
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
# notification handling
|
22
|
+
gem 'libnotify', '~> 0.8.0', :require => false
|
23
|
+
gem 'rb-notifu', '~> 0.0.4', :require => false
|
24
|
+
gem 'terminal-notifier-guard', '~> 1.5.3', :require => false
|
25
25
|
end
|
26
26
|
|
27
27
|
group :metrics do
|
28
28
|
gem 'flay', '~> 1.4.3'
|
29
29
|
gem 'flog', '~> 2.5.3'
|
30
|
-
gem '
|
31
|
-
gem '
|
32
|
-
gem 'yardstick', '~> 0.8.0'
|
30
|
+
gem 'roodi', '~> 2.2.0'
|
31
|
+
gem 'yardstick', '~> 0.9.2'
|
33
32
|
|
34
33
|
platforms :ruby_18, :ruby_19 do
|
35
34
|
# this indirectly depends on ffi which does not build on ruby-head
|
@@ -37,18 +36,19 @@ group :metrics do
|
|
37
36
|
end
|
38
37
|
|
39
38
|
platforms :mri_18 do
|
40
|
-
gem 'arrayfields',
|
41
|
-
gem 'fattr',
|
42
|
-
gem 'heckle',
|
43
|
-
gem 'json',
|
44
|
-
gem 'map',
|
45
|
-
gem 'metric_fu',
|
46
|
-
gem 'mspec',
|
47
|
-
gem 'rcov',
|
48
|
-
gem 'ruby2ruby',
|
39
|
+
gem 'arrayfields', '~> 4.7.4' # for metric_fu
|
40
|
+
gem 'fattr', '~> 2.2.0' # for metric_fu
|
41
|
+
gem 'heckle', '~> 1.4.3'
|
42
|
+
gem 'json', '~> 1.7.7' # for metric_fu rake task
|
43
|
+
gem 'map', '~> 6.3.0' # for metric_fu
|
44
|
+
gem 'metric_fu', '~> 2.1.1'
|
45
|
+
gem 'mspec', '~> 1.5.17'
|
46
|
+
gem 'rcov', '~> 1.0.0'
|
47
|
+
gem 'ruby2ruby', '= 1.2.2' # for heckle
|
48
|
+
gem 'rails_best_practices', '= 1.13.3' # for metric_fu
|
49
49
|
end
|
50
50
|
|
51
|
-
platforms :
|
51
|
+
platforms :mri_19 do
|
52
52
|
gem 'simplecov', '~> 0.7.1'
|
53
53
|
end
|
54
54
|
|
@@ -56,3 +56,13 @@ group :metrics do
|
|
56
56
|
gem 'pelusa', '~> 0.2.2'
|
57
57
|
end
|
58
58
|
end
|
59
|
+
|
60
|
+
group :benchmarks do
|
61
|
+
gem 'rbench', '~> 0.2.3'
|
62
|
+
end
|
63
|
+
|
64
|
+
platform :jruby do
|
65
|
+
group :jruby do
|
66
|
+
gem 'jruby-openssl', '~> 0.8.2'
|
67
|
+
end
|
68
|
+
end
|
data/Guardfile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
guard :bundler do
|
4
|
+
watch('Gemfile')
|
5
|
+
end
|
6
|
+
|
7
|
+
guard :rspec, :cli => File.read('.rspec').split.join(' '), :keep_failed => false do
|
8
|
+
# run all specs if configuration is modified
|
9
|
+
watch('Guardfile') { 'spec' }
|
10
|
+
watch('Gemfile.lock') { 'spec' }
|
11
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
12
|
+
|
13
|
+
# run all specs if supporting files files are modified
|
14
|
+
watch(%r{\Aspec/(?:lib|support|shared)/.+\.rb\z}) { 'spec' }
|
15
|
+
|
16
|
+
# run unit specs if associated lib code is modified
|
17
|
+
watch(%r{\Alib/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}"] }
|
18
|
+
watch(%r{\Alib/(.+)/support/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}/#{m[2]}"] }
|
19
|
+
watch("lib/#{File.basename(File.expand_path('../', __FILE__))}.rb") { 'spec' }
|
20
|
+
|
21
|
+
# run a spec if it is modified
|
22
|
+
watch(%r{\Aspec/(?:unit|integration)/.+_spec\.rb\z})
|
23
|
+
end
|
data/README.md
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
-
|
1
|
+
ice_nine
|
2
|
+
========
|
2
3
|
|
3
|
-
Deep
|
4
|
+
Deep freeze ruby objects
|
4
5
|
|
5
|
-
[![Build Status](https://secure.travis-ci.org/dkubb/ice_nine.png)](
|
6
|
+
[![Build Status](https://secure.travis-ci.org/dkubb/ice_nine.png)](https://travis-ci.org/dkubb/ice_nine)
|
7
|
+
[![Dependency Status](https://gemnasium.com/dkubb/ice_nine.png)](https://gemnasium.com/dkubb/ice_nine)
|
8
|
+
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/dkubb/ice_nine)
|
6
9
|
|
7
|
-
|
10
|
+
Examples
|
11
|
+
--------
|
8
12
|
|
9
13
|
```ruby
|
10
14
|
# Freezes most objects
|
@@ -22,7 +26,8 @@ object = Object.new
|
|
22
26
|
object.deep_freeze
|
23
27
|
```
|
24
28
|
|
25
|
-
|
29
|
+
Installation
|
30
|
+
------------
|
26
31
|
|
27
32
|
With Rubygems:
|
28
33
|
|
@@ -44,18 +49,19 @@ $ irb -rubygems
|
|
44
49
|
=> true
|
45
50
|
```
|
46
51
|
|
47
|
-
|
52
|
+
Contributing
|
53
|
+
-------------
|
48
54
|
|
49
|
-
* If you want your code merged into the mainline, please discuss the proposed changes with me before doing any work on it. This library is still in early development, and it may not always be clear
|
55
|
+
* If you want your code merged into the mainline, please discuss the proposed changes with me before doing any work on it. This library is still in early development, and the direction it is going may not always be clear. Some features may not be appropriate yet, may need to be deferred until later when the foundation for them is laid, or may be more applicable in a plugin.
|
50
56
|
* Fork the project.
|
51
57
|
* Make your feature addition or bug fix.
|
52
58
|
* Follow this [style guide](https://github.com/dkubb/styleguide).
|
53
59
|
* Add specs for it. This is important so I don't break it in a future version unintentionally. Tests must cover all branches within the code, and code must be fully covered.
|
54
|
-
* Commit, do not mess with Rakefile, version, or history.
|
55
|
-
* Run "rake ci". This must pass and not show any regressions in the
|
56
|
-
metrics for the code to be merged.
|
60
|
+
* Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
61
|
+
* Run "rake ci". This must pass and not show any regressions in the metrics for the code to be merged.
|
57
62
|
* Send me a pull request. Bonus points for topic branches.
|
58
63
|
|
59
|
-
|
64
|
+
Copyright
|
65
|
+
---------
|
60
66
|
|
61
67
|
Copyright © 2012 Dan Kubb. See LICENSE for details.
|
data/config/roodi.yml
CHANGED
@@ -3,14 +3,14 @@ AbcMetricMethodCheck: { score: 1 }
|
|
3
3
|
AssignmentInConditionalCheck: { }
|
4
4
|
CaseMissingElseCheck: { }
|
5
5
|
ClassLineCountCheck: { line_count: 88 }
|
6
|
-
ClassNameCheck: { pattern: !ruby/regexp /\A(?:[A-Z]+|[A-Z][a-z](?:[A-Z]?[a-z])+)\z/ }
|
6
|
+
ClassNameCheck: { pattern: !ruby/regexp '/\A(?:[A-Z]+|[A-Z][a-z](?:[A-Z]?[a-z])+)\z/' }
|
7
7
|
ClassVariableCheck: { }
|
8
8
|
CyclomaticComplexityBlockCheck: { complexity: 3 }
|
9
9
|
CyclomaticComplexityMethodCheck: { complexity: 1 }
|
10
10
|
EmptyRescueBodyCheck: { }
|
11
11
|
ForLoopCheck: { }
|
12
12
|
MethodLineCountCheck: { line_count: 1 }
|
13
|
-
MethodNameCheck: { pattern: !ruby/regexp /\A(?:[a-z\d](?:_?[a-z\d])+[?!=]?|\[\]=?|==|<=>|<<|[+*&|-])\z/ }
|
13
|
+
MethodNameCheck: { pattern: !ruby/regexp '/\A(?:[a-z\d](?:_?[a-z\d])+[?!=]?|\[\]=?|==|<=>|<<|[+*&|-])\z/' }
|
14
14
|
ModuleLineCountCheck: { line_count: 92 }
|
15
|
-
ModuleNameCheck: { pattern: !ruby/regexp /\A(?:[A-Z]+|[A-Z][a-z](?:[A-Z]?[a-z])+)\z/ }
|
15
|
+
ModuleNameCheck: { pattern: !ruby/regexp '/\A(?:[A-Z]+|[A-Z][a-z](?:[A-Z]?[a-z])+)\z/' }
|
16
16
|
ParameterNumberCheck: { parameter_count: 0 }
|
data/ice_nine.gemspec
CHANGED
data/lib/ice_nine/version.rb
CHANGED
@@ -21,7 +21,7 @@ describe IceNine, '.deep_freeze' do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'freezes the object' do
|
24
|
-
expect { subject }.
|
24
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
25
25
|
end
|
26
26
|
|
27
27
|
it 'freezes the instance variables in the Object' do
|
@@ -38,7 +38,7 @@ describe IceNine, '.deep_freeze' do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
it 'freezes the object' do
|
41
|
-
expect { subject }.
|
41
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
42
42
|
end
|
43
43
|
|
44
44
|
it 'freezes the instance variables in the Object' do
|
@@ -55,7 +55,7 @@ describe IceNine, '.deep_freeze' do
|
|
55
55
|
end
|
56
56
|
|
57
57
|
it 'freezes the object' do
|
58
|
-
expect { subject }.
|
58
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
59
59
|
end
|
60
60
|
|
61
61
|
it 'freezes each element in the Array' do
|
@@ -72,7 +72,7 @@ describe IceNine, '.deep_freeze' do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
it 'freezes the object' do
|
75
|
-
expect { subject }.
|
75
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
76
76
|
end
|
77
77
|
|
78
78
|
it 'freezes each element in the Array' do
|
@@ -89,7 +89,7 @@ describe IceNine, '.deep_freeze' do
|
|
89
89
|
end
|
90
90
|
|
91
91
|
it 'freezes the object' do
|
92
|
-
expect { subject }.
|
92
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
93
93
|
end
|
94
94
|
|
95
95
|
it 'freezes each key in the Hash' do
|
@@ -110,7 +110,7 @@ describe IceNine, '.deep_freeze' do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
it 'freezes the object' do
|
113
|
-
expect { subject }.
|
113
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
114
114
|
end
|
115
115
|
|
116
116
|
it 'freezes each key in the Hash' do
|
@@ -131,7 +131,7 @@ describe IceNine, '.deep_freeze' do
|
|
131
131
|
end
|
132
132
|
|
133
133
|
it 'freezes the object' do
|
134
|
-
expect { subject }.
|
134
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
135
135
|
end
|
136
136
|
|
137
137
|
it 'freeze the first object in the Range' do
|
@@ -155,7 +155,7 @@ describe IceNine, '.deep_freeze' do
|
|
155
155
|
end
|
156
156
|
|
157
157
|
it 'freezes the object' do
|
158
|
-
expect { subject }.
|
158
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
159
159
|
end
|
160
160
|
|
161
161
|
it 'freezes the instance variables in the String' do
|
@@ -172,7 +172,7 @@ describe IceNine, '.deep_freeze' do
|
|
172
172
|
end
|
173
173
|
|
174
174
|
it 'freezes the object' do
|
175
|
-
expect { subject }.
|
175
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
176
176
|
end
|
177
177
|
|
178
178
|
it 'freezes the instance variables in the String' do
|
@@ -190,7 +190,7 @@ describe IceNine, '.deep_freeze' do
|
|
190
190
|
end
|
191
191
|
|
192
192
|
it 'freezes the object' do
|
193
|
-
expect { subject }.
|
193
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
194
194
|
end
|
195
195
|
|
196
196
|
it 'freezes each value in the Struct' do
|
@@ -207,7 +207,7 @@ describe IceNine, '.deep_freeze' do
|
|
207
207
|
end
|
208
208
|
|
209
209
|
it 'freezes the object' do
|
210
|
-
expect { subject }.
|
210
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
211
211
|
end
|
212
212
|
|
213
213
|
it 'freezes each value in the Struct' do
|
@@ -228,7 +228,7 @@ describe IceNine, '.deep_freeze' do
|
|
228
228
|
end
|
229
229
|
|
230
230
|
it 'freezes the object' do
|
231
|
-
expect { subject }.
|
231
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
232
232
|
end
|
233
233
|
|
234
234
|
it 'freezes the instance variables in the SimpleDelegator' do
|
@@ -245,7 +245,7 @@ describe IceNine, '.deep_freeze' do
|
|
245
245
|
end
|
246
246
|
|
247
247
|
it 'freezes the object' do
|
248
|
-
expect { subject }.
|
248
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
249
249
|
end
|
250
250
|
|
251
251
|
it 'freezes the instance variables in the SimpleDelegator' do
|
@@ -263,7 +263,7 @@ describe IceNine, '.deep_freeze' do
|
|
263
263
|
end
|
264
264
|
|
265
265
|
it 'does not freeze the object' do
|
266
|
-
expect { subject }.
|
266
|
+
expect { subject }.to_not change(value, :frozen?).from(false)
|
267
267
|
end
|
268
268
|
end
|
269
269
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
if ENV['COVERAGE'] == 'true'
|
4
|
+
require 'simplecov'
|
5
|
+
|
6
|
+
SimpleCov.start do
|
7
|
+
command_name 'spec:unit'
|
8
|
+
add_filter 'config'
|
9
|
+
add_filter 'spec'
|
10
|
+
minimum_coverage 100
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
3
14
|
require 'spec'
|
4
15
|
require 'spec/autorun'
|
5
16
|
|
@@ -10,18 +21,3 @@ end
|
|
10
21
|
|
11
22
|
Spec::Runner.configure do |config|
|
12
23
|
end
|
13
|
-
|
14
|
-
if RUBY_VERSION >= '1.9' and ENV['COVERAGE'] == 'true'
|
15
|
-
require 'simplecov'
|
16
|
-
SimpleCov.start do
|
17
|
-
command_name 'spec:unit'
|
18
|
-
add_filter 'spec'
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# change the heckle timeout to be 5 seconds
|
23
|
-
if defined?(::Heckle)
|
24
|
-
class ::Heckle
|
25
|
-
@@timeout = 5
|
26
|
-
end
|
27
|
-
end
|
@@ -19,7 +19,7 @@ describe IceNine, '.deep_freeze' do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'freezes the object' do
|
22
|
-
expect { subject }.
|
22
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'freezes the instance variables in the Object' do
|
@@ -37,7 +37,7 @@ describe IceNine, '.deep_freeze' do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'does not freeze the object' do
|
40
|
-
expect { subject }.
|
40
|
+
expect { subject }.to_not change(value, :frozen?).from(true)
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'does not freeze the instance variables in the Object' do
|
@@ -16,7 +16,7 @@ describe IceNine::Freezer::Array, '.deep_freeze' do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'freezes the object' do
|
19
|
-
expect { subject }.
|
19
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'freezes each entry in the Array' do
|
@@ -16,7 +16,7 @@ describe IceNine::Freezer::Hash, '.deep_freeze' do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'freezes the object' do
|
19
|
-
expect { subject }.
|
19
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'freezes each key in the Hash' do
|
@@ -20,7 +20,7 @@ describe IceNine::Freezer::Object, '.deep_freeze' do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'freezes the object' do
|
23
|
-
expect { subject }.
|
23
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'freezes the instance variables in the Object' do
|
@@ -16,7 +16,7 @@ describe IceNine::Freezer::Range, '.deep_freeze' do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'freezes the object' do
|
19
|
-
expect { subject }.
|
19
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'freeze the first object in the Range' do
|
@@ -17,7 +17,7 @@ describe IceNine::Freezer::Struct, '.deep_freeze' do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it 'freezes the object' do
|
20
|
-
expect { subject }.
|
20
|
+
expect { subject }.to change(value, :frozen?).from(false).to(true)
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'freezes each value in the Struct' do
|
data/tasks/metrics/ci.rake
CHANGED
@@ -5,5 +5,5 @@ task :ci => %w[ ci:metrics metrics:heckle ]
|
|
5
5
|
|
6
6
|
namespace :ci do
|
7
7
|
desc 'Run metrics (except heckle) and spec'
|
8
|
-
task :metrics => %w[ spec metrics:verify_measurements metrics:flog metrics:flay metrics:
|
8
|
+
task :metrics => %w[ spec metrics:verify_measurements metrics:flog metrics:flay metrics:roodi metrics:all ]
|
9
9
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ice_nine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 7
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.7.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dan Kubb
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2013-02-16 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|
@@ -57,12 +57,13 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - ~>
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
hash:
|
60
|
+
hash: 29
|
61
61
|
segments:
|
62
62
|
- 0
|
63
63
|
- 8
|
64
|
-
-
|
65
|
-
|
64
|
+
- 4
|
65
|
+
- 1
|
66
|
+
version: 0.8.4.1
|
66
67
|
type: :development
|
67
68
|
version_requirements: *id003
|
68
69
|
description: Deep Freeze Ruby Objects
|
@@ -83,6 +84,7 @@ files:
|
|
83
84
|
- .travis.yml
|
84
85
|
- .yardopts
|
85
86
|
- Gemfile
|
87
|
+
- Guardfile
|
86
88
|
- LICENSE
|
87
89
|
- README.md
|
88
90
|
- Rakefile
|
@@ -90,7 +92,6 @@ files:
|
|
90
92
|
- config/flay.yml
|
91
93
|
- config/flog.yml
|
92
94
|
- config/roodi.yml
|
93
|
-
- config/site.reek
|
94
95
|
- config/yardstick.yml
|
95
96
|
- ice_nine.gemspec
|
96
97
|
- lib/ice_nine.rb
|
@@ -116,6 +117,7 @@ files:
|
|
116
117
|
- spec/spec.opts
|
117
118
|
- spec/spec_helper.rb
|
118
119
|
- spec/support/config_alias.rb
|
120
|
+
- spec/support/heckle.rb
|
119
121
|
- spec/unit/ice_nine/class_methods/deep_freeze_spec.rb
|
120
122
|
- spec/unit/ice_nine/freezer/array/class_methods/deep_freeze_spec.rb
|
121
123
|
- spec/unit/ice_nine/freezer/class_methods/element_reference_spec.rb
|
@@ -136,7 +138,6 @@ files:
|
|
136
138
|
- tasks/metrics/flog.rake
|
137
139
|
- tasks/metrics/heckle.rake
|
138
140
|
- tasks/metrics/metric_fu.rake
|
139
|
-
- tasks/metrics/reek.rake
|
140
141
|
- tasks/metrics/roodi.rake
|
141
142
|
- tasks/metrics/yardstick.rake
|
142
143
|
- tasks/spec.rake
|
@@ -170,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
171
|
requirements: []
|
171
172
|
|
172
173
|
rubyforge_project:
|
173
|
-
rubygems_version: 1.8.
|
174
|
+
rubygems_version: 1.8.25
|
174
175
|
signing_key:
|
175
176
|
specification_version: 3
|
176
177
|
summary: Deep Freeze Ruby Objects
|
data/config/site.reek
DELETED
@@ -1,91 +0,0 @@
|
|
1
|
-
---
|
2
|
-
UncommunicativeParameterName:
|
3
|
-
accept: []
|
4
|
-
exclude: []
|
5
|
-
enabled: true
|
6
|
-
reject:
|
7
|
-
- !ruby/regexp /^.$/
|
8
|
-
- !ruby/regexp /[0-9]$/
|
9
|
-
- !ruby/regexp /[A-Z]/
|
10
|
-
LargeClass:
|
11
|
-
max_methods: 1
|
12
|
-
exclude: []
|
13
|
-
enabled: true
|
14
|
-
max_instance_variables: 1
|
15
|
-
UncommunicativeMethodName:
|
16
|
-
accept: []
|
17
|
-
exclude: []
|
18
|
-
enabled: true
|
19
|
-
reject:
|
20
|
-
- !ruby/regexp /^[a-z]$/
|
21
|
-
- !ruby/regexp /[0-9]$/
|
22
|
-
- !ruby/regexp /[A-Z]/
|
23
|
-
LongParameterList:
|
24
|
-
max_params: 1
|
25
|
-
exclude: []
|
26
|
-
enabled: true
|
27
|
-
overrides: {}
|
28
|
-
FeatureEnvy:
|
29
|
-
exclude: []
|
30
|
-
enabled: true
|
31
|
-
ClassVariable:
|
32
|
-
exclude: []
|
33
|
-
enabled: true
|
34
|
-
BooleanParameter:
|
35
|
-
exclude: []
|
36
|
-
enabled: true
|
37
|
-
IrresponsibleModule:
|
38
|
-
exclude: []
|
39
|
-
enabled: true
|
40
|
-
UncommunicativeModuleName:
|
41
|
-
accept: []
|
42
|
-
exclude: []
|
43
|
-
enabled: true
|
44
|
-
reject:
|
45
|
-
- !ruby/regexp /^.$/
|
46
|
-
- !ruby/regexp /[0-9]$/
|
47
|
-
NestedIterators:
|
48
|
-
ignore_iterators: []
|
49
|
-
exclude: []
|
50
|
-
enabled: true
|
51
|
-
max_allowed_nesting: 1
|
52
|
-
LongMethod:
|
53
|
-
max_statements: 5
|
54
|
-
exclude: []
|
55
|
-
enabled: true
|
56
|
-
Duplication:
|
57
|
-
allow_calls: []
|
58
|
-
exclude: []
|
59
|
-
enabled: true
|
60
|
-
max_calls: 1
|
61
|
-
UtilityFunction:
|
62
|
-
max_helper_calls: 0
|
63
|
-
exclude: []
|
64
|
-
enabled: true
|
65
|
-
Attribute:
|
66
|
-
exclude: []
|
67
|
-
enabled: false
|
68
|
-
UncommunicativeVariableName:
|
69
|
-
accept: []
|
70
|
-
exclude: []
|
71
|
-
enabled: true
|
72
|
-
reject:
|
73
|
-
- !ruby/regexp /^.$/
|
74
|
-
- !ruby/regexp /[0-9]$/
|
75
|
-
- !ruby/regexp /[A-Z]/
|
76
|
-
SimulatedPolymorphism:
|
77
|
-
exclude: []
|
78
|
-
enabled: true
|
79
|
-
max_ifs: 1
|
80
|
-
DataClump:
|
81
|
-
exclude: []
|
82
|
-
enabled: true
|
83
|
-
max_copies: 0
|
84
|
-
min_clump_size: 0
|
85
|
-
ControlCouple:
|
86
|
-
exclude: []
|
87
|
-
enabled: true
|
88
|
-
LongYieldList:
|
89
|
-
max_params: 0
|
90
|
-
exclude: []
|
91
|
-
enabled: true
|
data/tasks/metrics/reek.rake
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'reek/rake/task'
|
5
|
-
|
6
|
-
RBX_18_MODE = RUBY_VERSION < '1.9' && defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
|
7
|
-
|
8
|
-
namespace :metrics do
|
9
|
-
Reek::Rake::Task.new do |t|
|
10
|
-
# reek has some problems under rbx in 1.8 mode that cause the underlying
|
11
|
-
# script to raise an exception. Rather than halt the "rake ci" process due
|
12
|
-
# to one bug, we choose to ignore it in this specific case until reek can be
|
13
|
-
# fixed.
|
14
|
-
t.fail_on_error = ! RBX_18_MODE # always true, except under rbx 18 mode
|
15
|
-
end
|
16
|
-
end
|
17
|
-
rescue LoadError
|
18
|
-
task :reek do
|
19
|
-
$stderr.puts 'Reek is not available. In order to run reek, you must: gem install reek'
|
20
|
-
end
|
21
|
-
end
|