security_blanket 0.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +7 -2
- data/Gemfile.lock +34 -0
- data/LICENSE.txt +23 -17
- data/README.rdoc +7 -2
- data/Rakefile +17 -4
- data/VERSION +1 -1
- data/lib/tasks/security_blanket.rake +53 -0
- data/test/helper.rb +1 -2
- data/test/test_security_blanket.rb +1 -1
- metadata +68 -18
data/Gemfile
CHANGED
@@ -5,9 +5,14 @@ source "http://rubygems.org"
|
|
5
5
|
|
6
6
|
# Add dependencies to develop your gem here.
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
|
9
|
+
gem "rcov"
|
10
|
+
gem "redgreen", "~> 1.2.2"
|
11
|
+
|
8
12
|
group :development do
|
9
|
-
gem "shoulda", ">= 0"
|
10
13
|
gem "bundler", "~> 1.0.0"
|
11
|
-
gem "jeweler", "~> 1.6.
|
14
|
+
gem "jeweler", "~> 1.6.2"
|
12
15
|
gem "rcov", ">= 0"
|
16
|
+
gem "reek", "~> 1.2.8"
|
17
|
+
gem "roodi", "~> 2.1.0"
|
13
18
|
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
git (1.2.5)
|
5
|
+
jeweler (1.6.3)
|
6
|
+
bundler (~> 1.0)
|
7
|
+
git (>= 1.2.5)
|
8
|
+
rake
|
9
|
+
rake (0.9.2)
|
10
|
+
rcov (0.9.9)
|
11
|
+
redgreen (1.2.2)
|
12
|
+
reek (1.2.8)
|
13
|
+
ruby2ruby (~> 1.2)
|
14
|
+
ruby_parser (~> 2.0)
|
15
|
+
sexp_processor (~> 3.0)
|
16
|
+
roodi (2.1.0)
|
17
|
+
ruby_parser
|
18
|
+
ruby2ruby (1.2.5)
|
19
|
+
ruby_parser (~> 2.0)
|
20
|
+
sexp_processor (~> 3.0)
|
21
|
+
ruby_parser (2.0.6)
|
22
|
+
sexp_processor (~> 3.0)
|
23
|
+
sexp_processor (3.0.5)
|
24
|
+
|
25
|
+
PLATFORMS
|
26
|
+
ruby
|
27
|
+
|
28
|
+
DEPENDENCIES
|
29
|
+
bundler (~> 1.0.0)
|
30
|
+
jeweler (~> 1.6.2)
|
31
|
+
rcov
|
32
|
+
redgreen (~> 1.2.2)
|
33
|
+
reek (~> 1.2.8)
|
34
|
+
roodi (~> 2.1.0)
|
data/LICENSE.txt
CHANGED
@@ -1,20 +1,26 @@
|
|
1
|
-
Copyright (c) 2011 Kristofer M White
|
1
|
+
Copyright (c) 2011, Kristofer M White
|
2
|
+
All rights reserved.
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
10
6
|
|
11
|
-
|
12
|
-
|
7
|
+
* Redistributions of source code must retain the above copyright notice, this
|
8
|
+
list of conditions and the following disclaimer.
|
9
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
11
|
+
and/or other materials provided with the distribution.
|
12
|
+
* Neither the name of the software nor the names of its contributors may be
|
13
|
+
used to endorse or promote products derived from this software without
|
14
|
+
specific prior written permission.
|
13
15
|
|
14
|
-
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
16
|
-
MERCHANTABILITY
|
17
|
-
|
18
|
-
LIABLE FOR ANY
|
19
|
-
|
20
|
-
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
17
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
18
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
19
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
20
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
21
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
22
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
23
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
24
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
25
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
26
|
+
POSSIBILITY OF SUCH DAMAGE.
|
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= security_blanket
|
2
2
|
|
3
|
-
|
3
|
+
SecurityBlanket is a gem to help in expediting getting test coverage information.
|
4
4
|
|
5
5
|
== Contributing to security_blanket
|
6
6
|
|
@@ -12,8 +12,13 @@ Description goes here.
|
|
12
12
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
13
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
14
|
|
15
|
+
== Credit
|
16
|
+
|
17
|
+
Credit belongs to iambetaful on twitter for the initial rake tasks. The post can be seen at:
|
18
|
+
http://www.betaful.com/2010/11/rails-3-rcov-test-coverage/
|
19
|
+
|
15
20
|
== Copyright
|
16
21
|
|
17
|
-
Copyright (c) 2011
|
22
|
+
Copyright (c) 2011 Krisotfer M White. See LICENSE.txt for
|
18
23
|
further details.
|
19
24
|
|
data/Rakefile
CHANGED
@@ -16,11 +16,11 @@ Jeweler::Tasks.new do |gem|
|
|
16
16
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
17
|
gem.name = "security_blanket"
|
18
18
|
gem.homepage = "http://github.com/kmwhite/security_blanket"
|
19
|
-
gem.license = "
|
20
|
-
gem.summary =
|
21
|
-
gem.description =
|
19
|
+
gem.license = "BSD"
|
20
|
+
gem.summary = %Q{Easy coverage reports for rails apps}
|
21
|
+
gem.description = %Q{Easy coverage reports for rails apps}
|
22
22
|
gem.email = "me@kmwhite.net"
|
23
|
-
gem.authors = ["
|
23
|
+
gem.authors = ["Krisotfer M White"]
|
24
24
|
# dependencies defined in Gemfile
|
25
25
|
end
|
26
26
|
Jeweler::RubygemsDotOrgTasks.new
|
@@ -40,6 +40,19 @@ Rcov::RcovTask.new do |test|
|
|
40
40
|
test.rcov_opts << '--exclude "gems/*"'
|
41
41
|
end
|
42
42
|
|
43
|
+
require 'reek/rake/task'
|
44
|
+
Reek::Rake::Task.new do |t|
|
45
|
+
t.fail_on_error = true
|
46
|
+
t.verbose = false
|
47
|
+
t.source_files = 'lib/**/*.rb'
|
48
|
+
end
|
49
|
+
|
50
|
+
require 'roodi'
|
51
|
+
require 'roodi_task'
|
52
|
+
RoodiTask.new do |t|
|
53
|
+
t.verbose = false
|
54
|
+
end
|
55
|
+
|
43
56
|
task :default => :test
|
44
57
|
|
45
58
|
require 'rake/rdoctask'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1.0.1
|
@@ -0,0 +1,53 @@
|
|
1
|
+
namespace :coverage do
|
2
|
+
|
3
|
+
task :clean do
|
4
|
+
rm_f "coverage"
|
5
|
+
rm_f "coverage.data"
|
6
|
+
Rcov = "cd test && rcov --rails --aggregate coverage.data -Ilib:. \
|
7
|
+
--text-summary -x 'bundler/*,gems/*'"
|
8
|
+
end
|
9
|
+
|
10
|
+
def display_coverage
|
11
|
+
if RUBY_PLATFORM =~ /darwin/ then
|
12
|
+
open_cmd = 'open'
|
13
|
+
else
|
14
|
+
open_cmd = 'sensible-browser'
|
15
|
+
end
|
16
|
+
system("#{open_cmd} test/coverage/index.html &")
|
17
|
+
end
|
18
|
+
|
19
|
+
desc 'Measures unit test coverage'
|
20
|
+
task :units => :clean do
|
21
|
+
system("#{Rcov} --html unit/*_test.rb")
|
22
|
+
display_coverage
|
23
|
+
end
|
24
|
+
|
25
|
+
desc 'Measures functional test coverage'
|
26
|
+
task :functionals => :clean do
|
27
|
+
system("#{Rcov} --html functional/*_test.rb")
|
28
|
+
display_coverage
|
29
|
+
end
|
30
|
+
|
31
|
+
desc 'Measures integration test coverage'
|
32
|
+
task :integration => :clean do
|
33
|
+
system("#{Rcov} --html integration/*_test.rb")
|
34
|
+
display_coverage
|
35
|
+
end
|
36
|
+
|
37
|
+
desc 'Measures perfomance test coverage'
|
38
|
+
task :perfomance => :clean do
|
39
|
+
system("#{Rcov} --html perfomance/*_test.rb")
|
40
|
+
display_coverage
|
41
|
+
end
|
42
|
+
|
43
|
+
desc 'All unit test coverage'
|
44
|
+
task :all => :clean do
|
45
|
+
system("#{Rcov} --html */*_test.rb")
|
46
|
+
display_coverage
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
task :coverage do
|
52
|
+
Rake::Task["coverage:all"].invoke
|
53
|
+
end
|
data/test/helper.rb
CHANGED
@@ -8,10 +8,9 @@ rescue Bundler::BundlerError => e
|
|
8
8
|
exit e.status_code
|
9
9
|
end
|
10
10
|
require 'test/unit'
|
11
|
-
require 'shoulda'
|
12
11
|
|
13
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
12
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
15
14
|
require 'security_blanket'
|
16
15
|
|
17
16
|
class Test::Unit::TestCase
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: security_blanket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 0.0.0
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
-
|
13
|
+
- Krisotfer M White
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
@@ -27,12 +27,28 @@ dependencies:
|
|
27
27
|
segments:
|
28
28
|
- 0
|
29
29
|
version: "0"
|
30
|
-
type: :
|
30
|
+
type: :runtime
|
31
31
|
requirement: *id001
|
32
32
|
prerelease: false
|
33
|
-
name:
|
33
|
+
name: rcov
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
hash: 27
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 2
|
44
|
+
- 2
|
45
|
+
version: 1.2.2
|
46
|
+
type: :runtime
|
47
|
+
requirement: *id002
|
48
|
+
prerelease: false
|
49
|
+
name: redgreen
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
36
52
|
none: false
|
37
53
|
requirements:
|
38
54
|
- - ~>
|
@@ -44,27 +60,27 @@ dependencies:
|
|
44
60
|
- 0
|
45
61
|
version: 1.0.0
|
46
62
|
type: :development
|
47
|
-
requirement: *
|
63
|
+
requirement: *id003
|
48
64
|
prerelease: false
|
49
65
|
name: bundler
|
50
66
|
- !ruby/object:Gem::Dependency
|
51
|
-
version_requirements: &
|
67
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
52
68
|
none: false
|
53
69
|
requirements:
|
54
70
|
- - ~>
|
55
71
|
- !ruby/object:Gem::Version
|
56
|
-
hash:
|
72
|
+
hash: 11
|
57
73
|
segments:
|
58
74
|
- 1
|
59
75
|
- 6
|
60
|
-
-
|
61
|
-
version: 1.6.
|
76
|
+
- 2
|
77
|
+
version: 1.6.2
|
62
78
|
type: :development
|
63
|
-
requirement: *
|
79
|
+
requirement: *id004
|
64
80
|
prerelease: false
|
65
81
|
name: jeweler
|
66
82
|
- !ruby/object:Gem::Dependency
|
67
|
-
version_requirements: &
|
83
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
68
84
|
none: false
|
69
85
|
requirements:
|
70
86
|
- - ">="
|
@@ -74,10 +90,42 @@ dependencies:
|
|
74
90
|
- 0
|
75
91
|
version: "0"
|
76
92
|
type: :development
|
77
|
-
requirement: *
|
93
|
+
requirement: *id005
|
78
94
|
prerelease: false
|
79
95
|
name: rcov
|
80
|
-
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ~>
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
hash: 15
|
103
|
+
segments:
|
104
|
+
- 1
|
105
|
+
- 2
|
106
|
+
- 8
|
107
|
+
version: 1.2.8
|
108
|
+
type: :development
|
109
|
+
requirement: *id006
|
110
|
+
prerelease: false
|
111
|
+
name: reek
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
116
|
+
- - ~>
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
hash: 11
|
119
|
+
segments:
|
120
|
+
- 2
|
121
|
+
- 1
|
122
|
+
- 0
|
123
|
+
version: 2.1.0
|
124
|
+
type: :development
|
125
|
+
requirement: *id007
|
126
|
+
prerelease: false
|
127
|
+
name: roodi
|
128
|
+
description: Easy coverage reports for rails apps
|
81
129
|
email: me@kmwhite.net
|
82
130
|
executables: []
|
83
131
|
|
@@ -89,16 +137,18 @@ extra_rdoc_files:
|
|
89
137
|
files:
|
90
138
|
- .document
|
91
139
|
- Gemfile
|
140
|
+
- Gemfile.lock
|
92
141
|
- LICENSE.txt
|
93
142
|
- README.rdoc
|
94
143
|
- Rakefile
|
95
144
|
- VERSION
|
96
145
|
- lib/security_blanket.rb
|
146
|
+
- lib/tasks/security_blanket.rake
|
97
147
|
- test/helper.rb
|
98
148
|
- test/test_security_blanket.rb
|
99
149
|
homepage: http://github.com/kmwhite/security_blanket
|
100
150
|
licenses:
|
101
|
-
-
|
151
|
+
- BSD
|
102
152
|
post_install_message:
|
103
153
|
rdoc_options: []
|
104
154
|
|
@@ -128,6 +178,6 @@ rubyforge_project:
|
|
128
178
|
rubygems_version: 1.8.5
|
129
179
|
signing_key:
|
130
180
|
specification_version: 3
|
131
|
-
summary:
|
181
|
+
summary: Easy coverage reports for rails apps
|
132
182
|
test_files: []
|
133
183
|
|