ice_nine 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +37 -0
- data/.pelusa.yml +9 -0
- data/.rvmrc +1 -0
- data/.travis.yml +17 -0
- data/.yardopts +1 -0
- data/Gemfile +32 -0
- data/LICENSE +20 -0
- data/README.md +54 -0
- data/Rakefile +9 -0
- data/TODO +3 -0
- data/config/flay.yml +3 -0
- data/config/flog.yml +2 -0
- data/config/roodi.yml +16 -0
- data/config/site.reek +91 -0
- data/config/yardstick.yml +2 -0
- data/ice_nine.gemspec +21 -0
- data/lib/ice_nine.rb +65 -0
- data/lib/ice_nine/freezer.rb +95 -0
- data/lib/ice_nine/freezer/array.rb +26 -0
- data/lib/ice_nine/freezer/hash.rb +30 -0
- data/lib/ice_nine/freezer/no_freeze.rb +48 -0
- data/lib/ice_nine/freezer/range.rb +29 -0
- data/lib/ice_nine/freezer/struct.rb +29 -0
- data/lib/ice_nine/version.rb +5 -0
- data/spec/rcov.opts +7 -0
- data/spec/spec.opts +3 -0
- data/spec/spec_helper.rb +23 -0
- data/spec/unit/ice_nine/class_methods/deep_freeze_spec.rb +193 -0
- data/spec/unit/ice_nine/freezer/array/class_methods/deep_freeze_spec.rb +27 -0
- data/spec/unit/ice_nine/freezer/class_methods/deep_freeze_spec.rb +30 -0
- data/spec/unit/ice_nine/freezer/class_methods/element_reference_spec.rb +85 -0
- data/spec/unit/ice_nine/freezer/false_class/class_methods/deep_freeze_spec.rb +22 -0
- data/spec/unit/ice_nine/freezer/hash/class_methods/deep_freeze_spec.rb +40 -0
- data/spec/unit/ice_nine/freezer/nil_class/class_methods/deep_freeze_spec.rb +22 -0
- data/spec/unit/ice_nine/freezer/no_freeze/class_methods/deep_freeze_spec.rb +19 -0
- data/spec/unit/ice_nine/freezer/numeric/class_methods/deep_freeze_spec.rb +24 -0
- data/spec/unit/ice_nine/freezer/range/class_methods/deep_freeze_spec.rb +30 -0
- data/spec/unit/ice_nine/freezer/struct/class_methods/deep_freeze_spec.rb +27 -0
- data/spec/unit/ice_nine/freezer/symbol/class_methods/deep_freeze_spec.rb +22 -0
- data/spec/unit/ice_nine/freezer/true_class/class_methods/deep_freeze_spec.rb +22 -0
- data/tasks/metrics/ci.rake +7 -0
- data/tasks/metrics/flay.rake +43 -0
- data/tasks/metrics/flog.rake +46 -0
- data/tasks/metrics/heckle.rake +210 -0
- data/tasks/metrics/metric_fu.rake +31 -0
- data/tasks/metrics/reek.rake +11 -0
- data/tasks/metrics/roodi.rake +17 -0
- data/tasks/metrics/yardstick.rake +25 -0
- data/tasks/spec.rake +46 -0
- data/tasks/yard.rake +11 -0
- metadata +150 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'metric_fu'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
# XXX: temporary hack until metric_fu is fixed
|
8
|
+
MetricFu::Saikuro.class_eval { include FileUtils }
|
9
|
+
|
10
|
+
MetricFu::Configuration.run do |config|
|
11
|
+
config.rcov = {
|
12
|
+
:environment => 'test',
|
13
|
+
:test_files => %w[ spec/**/*_spec.rb ],
|
14
|
+
:rcov_opts => %w[
|
15
|
+
--sort coverage
|
16
|
+
--no-html
|
17
|
+
--text-coverage
|
18
|
+
--no-color
|
19
|
+
--profile
|
20
|
+
--exclude spec/,^/
|
21
|
+
--include lib:spec
|
22
|
+
],
|
23
|
+
}
|
24
|
+
end
|
25
|
+
rescue LoadError
|
26
|
+
namespace :metrics do
|
27
|
+
task :all do
|
28
|
+
abort 'metric_fu is not available. In order to run metrics:all, you must: gem install metric_fu'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'roodi'
|
5
|
+
require 'rake/tasklib'
|
6
|
+
require 'roodi_task'
|
7
|
+
|
8
|
+
RoodiTask.new do |t|
|
9
|
+
t.verbose = false
|
10
|
+
t.config = File.expand_path('../../../config/roodi.yml', __FILE__)
|
11
|
+
t.patterns = %w[ lib/**/*.rb ]
|
12
|
+
end
|
13
|
+
rescue LoadError
|
14
|
+
task :roodi do
|
15
|
+
abort 'Roodi is not available. In order to run roodi, you must: gem install roodi'
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'pathname'
|
5
|
+
require 'yardstick'
|
6
|
+
require 'yardstick/rake/measurement'
|
7
|
+
require 'yardstick/rake/verify'
|
8
|
+
require 'yaml'
|
9
|
+
|
10
|
+
config = YAML.load_file(File.expand_path('../../../config/yardstick.yml', __FILE__))
|
11
|
+
|
12
|
+
# yardstick_measure task
|
13
|
+
Yardstick::Rake::Measurement.new
|
14
|
+
|
15
|
+
# verify_measurements task
|
16
|
+
Yardstick::Rake::Verify.new do |verify|
|
17
|
+
verify.threshold = config.fetch('threshold')
|
18
|
+
end
|
19
|
+
rescue LoadError
|
20
|
+
%w[ yardstick_measure verify_measurements ].each do |name|
|
21
|
+
task name.to_s do
|
22
|
+
abort "Yardstick is not available. In order to run #{name}, you must: gem install yardstick"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/tasks/spec.rake
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
begin
|
4
|
+
begin
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
rescue LoadError
|
7
|
+
require 'spec/rake/spectask'
|
8
|
+
|
9
|
+
module RSpec
|
10
|
+
module Core
|
11
|
+
RakeTask = Spec::Rake::SpecTask
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Run all specs'
|
17
|
+
task :spec => %w[ spec:unit spec:integration ]
|
18
|
+
|
19
|
+
namespace :spec do
|
20
|
+
RSpec::Core::RakeTask.new(:integration) do |t|
|
21
|
+
t.pattern = 'spec/integration/**/*_spec.rb'
|
22
|
+
end
|
23
|
+
|
24
|
+
RSpec::Core::RakeTask.new(:unit) do |t|
|
25
|
+
t.pattern = 'spec/unit/**/*_spec.rb'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
rescue LoadError
|
29
|
+
task :spec do
|
30
|
+
abort 'rspec is not available. In order to run spec, you must: gem install rspec'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
begin
|
35
|
+
desc 'Generate code coverage'
|
36
|
+
RSpec::Core::RakeTask.new(:rcov) do |t|
|
37
|
+
t.rcov = true
|
38
|
+
t.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
|
39
|
+
end
|
40
|
+
rescue LoadError
|
41
|
+
task :rcov do
|
42
|
+
abort 'rcov is not available. In order to run rcov, you must: gem install rcov'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
task :test => 'spec'
|
data/tasks/yard.rake
ADDED
metadata
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ice_nine
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 0
|
10
|
+
version: 0.1.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Dan Kubb
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-03-23 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rake
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 11
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 9
|
32
|
+
- 2
|
33
|
+
- 2
|
34
|
+
version: 0.9.2.2
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rspec
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 31
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 3
|
49
|
+
- 2
|
50
|
+
version: 1.3.2
|
51
|
+
type: :development
|
52
|
+
version_requirements: *id002
|
53
|
+
description: Deep Freeze Ruby Objects
|
54
|
+
email:
|
55
|
+
- dan.kubb@gmail.com
|
56
|
+
executables: []
|
57
|
+
|
58
|
+
extensions: []
|
59
|
+
|
60
|
+
extra_rdoc_files:
|
61
|
+
- LICENSE
|
62
|
+
- README.md
|
63
|
+
- TODO
|
64
|
+
files:
|
65
|
+
- .gitignore
|
66
|
+
- .pelusa.yml
|
67
|
+
- .rvmrc
|
68
|
+
- .travis.yml
|
69
|
+
- .yardopts
|
70
|
+
- Gemfile
|
71
|
+
- LICENSE
|
72
|
+
- README.md
|
73
|
+
- Rakefile
|
74
|
+
- TODO
|
75
|
+
- config/flay.yml
|
76
|
+
- config/flog.yml
|
77
|
+
- config/roodi.yml
|
78
|
+
- config/site.reek
|
79
|
+
- config/yardstick.yml
|
80
|
+
- ice_nine.gemspec
|
81
|
+
- lib/ice_nine.rb
|
82
|
+
- lib/ice_nine/freezer.rb
|
83
|
+
- lib/ice_nine/freezer/array.rb
|
84
|
+
- lib/ice_nine/freezer/hash.rb
|
85
|
+
- lib/ice_nine/freezer/no_freeze.rb
|
86
|
+
- lib/ice_nine/freezer/range.rb
|
87
|
+
- lib/ice_nine/freezer/struct.rb
|
88
|
+
- lib/ice_nine/version.rb
|
89
|
+
- spec/rcov.opts
|
90
|
+
- spec/spec.opts
|
91
|
+
- spec/spec_helper.rb
|
92
|
+
- spec/unit/ice_nine/class_methods/deep_freeze_spec.rb
|
93
|
+
- spec/unit/ice_nine/freezer/array/class_methods/deep_freeze_spec.rb
|
94
|
+
- spec/unit/ice_nine/freezer/class_methods/deep_freeze_spec.rb
|
95
|
+
- spec/unit/ice_nine/freezer/class_methods/element_reference_spec.rb
|
96
|
+
- spec/unit/ice_nine/freezer/false_class/class_methods/deep_freeze_spec.rb
|
97
|
+
- spec/unit/ice_nine/freezer/hash/class_methods/deep_freeze_spec.rb
|
98
|
+
- spec/unit/ice_nine/freezer/nil_class/class_methods/deep_freeze_spec.rb
|
99
|
+
- spec/unit/ice_nine/freezer/no_freeze/class_methods/deep_freeze_spec.rb
|
100
|
+
- spec/unit/ice_nine/freezer/numeric/class_methods/deep_freeze_spec.rb
|
101
|
+
- spec/unit/ice_nine/freezer/range/class_methods/deep_freeze_spec.rb
|
102
|
+
- spec/unit/ice_nine/freezer/struct/class_methods/deep_freeze_spec.rb
|
103
|
+
- spec/unit/ice_nine/freezer/symbol/class_methods/deep_freeze_spec.rb
|
104
|
+
- spec/unit/ice_nine/freezer/true_class/class_methods/deep_freeze_spec.rb
|
105
|
+
- tasks/metrics/ci.rake
|
106
|
+
- tasks/metrics/flay.rake
|
107
|
+
- tasks/metrics/flog.rake
|
108
|
+
- tasks/metrics/heckle.rake
|
109
|
+
- tasks/metrics/metric_fu.rake
|
110
|
+
- tasks/metrics/reek.rake
|
111
|
+
- tasks/metrics/roodi.rake
|
112
|
+
- tasks/metrics/yardstick.rake
|
113
|
+
- tasks/spec.rake
|
114
|
+
- tasks/yard.rake
|
115
|
+
homepage: https://github.com/dkubb/ice_nine
|
116
|
+
licenses: []
|
117
|
+
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options: []
|
120
|
+
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
hash: 3
|
129
|
+
segments:
|
130
|
+
- 0
|
131
|
+
version: "0"
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
none: false
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
hash: 3
|
138
|
+
segments:
|
139
|
+
- 0
|
140
|
+
version: "0"
|
141
|
+
requirements: []
|
142
|
+
|
143
|
+
rubyforge_project:
|
144
|
+
rubygems_version: 1.8.21
|
145
|
+
signing_key:
|
146
|
+
specification_version: 3
|
147
|
+
summary: Deep Freeze Ruby Objects
|
148
|
+
test_files: []
|
149
|
+
|
150
|
+
has_rdoc:
|