bones-rcov 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ == 1.0.0 / 2010-10-14
2
+
3
+ * 1 major enhancement
4
+ * Birthday!
data/README.txt ADDED
@@ -0,0 +1,37 @@
1
+ bones-rcov
2
+ by Tim Pease
3
+ http://rubygems.org/gems/bones-rcov
4
+
5
+ == DESCRIPTION:
6
+
7
+ The rcov package for Mr Bones provides tasks for running rcov over your unit
8
+ tests and source code.
9
+
10
+ == INSTALL:
11
+
12
+ gem install bones-rcov
13
+
14
+ == LICENSE:
15
+
16
+ (The MIT License)
17
+
18
+ Copyright (c) 2010
19
+
20
+ Permission is hereby granted, free of charge, to any person obtaining
21
+ a copy of this software and associated documentation files (the
22
+ 'Software'), to deal in the Software without restriction, including
23
+ without limitation the rights to use, copy, modify, merge, publish,
24
+ distribute, sublicense, and/or sell copies of the Software, and to
25
+ permit persons to whom the Software is furnished to do so, subject to
26
+ the following conditions:
27
+
28
+ The above copyright notice and this permission notice shall be
29
+ included in all copies or substantial portions of the Software.
30
+
31
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
32
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
35
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
37
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+
2
+ begin
3
+ require 'bones'
4
+ rescue LoadError
5
+ abort '### Please install the "bones" gem ###'
6
+ end
7
+
8
+ Bones {
9
+ name 'bones-rcov'
10
+ authors 'Tim Pease'
11
+ email 'tim.pease@gmail.com'
12
+ url 'http://github.com/TwP/bones-rcov'
13
+ ignore_file '.gitignore'
14
+
15
+ depend_on 'bones'
16
+
17
+ use_gmail
18
+ }
19
+
@@ -0,0 +1,78 @@
1
+
2
+ module Bones::Plugins::Rcov
3
+ include ::Bones::Helpers
4
+ extend self
5
+
6
+ def initialize_rcov
7
+ require 'rcov'
8
+ require 'rcov/rcovtask'
9
+ have?(:rcov) { true }
10
+
11
+ ::Bones.config {
12
+ desc 'Configuration settings for the Rcov code coverage tool.'
13
+ rcov {
14
+ path 'rcov', :desc => <<-__
15
+ Path to the rcov executable.
16
+ __
17
+
18
+ dir 'coverage', :desc => <<-__
19
+ Code coverage metrics will be written to this directory.
20
+ __
21
+
22
+ opts %w[--sort coverage -T], :desc => <<-__
23
+ An array of command line options that will be passed to the rcov
24
+ command when running your tests. See the Rcov help documentation
25
+ either online or from the command line by running 'rcov --help'.
26
+ __
27
+
28
+ threshold 90.0, :desc => <<-__
29
+ The threshold value (in percent) for coverage. If the actual
30
+ coverage is not greater than or equal to this value, the verify task
31
+ will raise an exception.
32
+ __
33
+
34
+ threshold_exact false, :desc => <<-__
35
+ Require the threshold to be met exactly. By default this option is
36
+ set to false.
37
+ __
38
+ }
39
+ }
40
+ rescue LoadError
41
+ have?(:rcov) { false }
42
+ end
43
+
44
+ def post_load
45
+ return unless have? :rcov
46
+ config = ::Bones.config
47
+ config.exclude << "^#{Regexp.escape(config.rcov.dir)}/"
48
+ end
49
+
50
+ def define_tasks
51
+ return unless have? :rcov
52
+ config = ::Bones.config
53
+
54
+ if have? :test
55
+ namespace :test do
56
+ desc 'Run rcov on the unit tests'
57
+ Rcov::RcovTask.new do |t|
58
+ t.output_dir = config.rcov.dir
59
+ t.rcov_opts = config.rcov.opts
60
+ t.ruby_opts = config.ruby_opts.dup.concat(config.test.opts)
61
+
62
+ t.test_files =
63
+ if test(?f, config.test.file) then [config.test.file]
64
+ else config.test.files.to_a end
65
+
66
+ t.libs = config.libs unless config.libs.empty?
67
+ end
68
+
69
+ task :clobber_rcov do
70
+ rm_r config.rcov.dir rescue nil
71
+ end
72
+ end
73
+ task :clobber => 'test:clobber_rcov'
74
+ end
75
+ end
76
+
77
+ end # module Bones::Plugins::Rcov
78
+
data/version.txt ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bones-rcov
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Tim Pease
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-14 00:00:00 -06:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: bones
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 19
30
+ segments:
31
+ - 3
32
+ - 5
33
+ - 0
34
+ version: 3.5.0
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: bones
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 19
46
+ segments:
47
+ - 3
48
+ - 5
49
+ - 0
50
+ version: 3.5.0
51
+ type: :development
52
+ version_requirements: *id002
53
+ description: |-
54
+ The rcov package for Mr Bones provides tasks for running rcov over your unit
55
+ tests and source code.
56
+ email: tim.pease@gmail.com
57
+ executables: []
58
+
59
+ extensions: []
60
+
61
+ extra_rdoc_files:
62
+ - History.txt
63
+ - README.txt
64
+ - version.txt
65
+ files:
66
+ - History.txt
67
+ - README.txt
68
+ - Rakefile
69
+ - lib/bones/plugins/rcov.rb
70
+ - version.txt
71
+ has_rdoc: true
72
+ homepage: http://github.com/TwP/bones-rcov
73
+ licenses: []
74
+
75
+ post_install_message:
76
+ rdoc_options:
77
+ - --main
78
+ - README.txt
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ hash: 3
87
+ segments:
88
+ - 0
89
+ version: "0"
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ hash: 3
96
+ segments:
97
+ - 0
98
+ version: "0"
99
+ requirements: []
100
+
101
+ rubyforge_project: bones-rcov
102
+ rubygems_version: 1.3.7
103
+ signing_key:
104
+ specification_version: 3
105
+ summary: The rcov package for Mr Bones provides tasks for running rcov over your unit tests and source code
106
+ test_files: []
107
+