yardstick 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -0
- data/.travis.yml +75 -0
- data/Gemfile +27 -16
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/lib/yardstick.rb +1 -1
- data/lib/yardstick/cli.rb +1 -1
- data/lib/yardstick/rake/measurement.rb +0 -3
- data/lib/yardstick/rake/verify.rb +0 -12
- data/spec/public/yardstick/rake/measurement_spec.rb +3 -3
- data/spec/public/yardstick/rake/verify_spec.rb +2 -2
- data/yardstick.gemspec +22 -20
- metadata +35 -33
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use @$(basename `pwd`) --create
|
data/.travis.yml
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
language: ruby
|
2
|
+
bundler_args: --without guard metrics
|
3
|
+
script: "bundle exec rake spec"
|
4
|
+
rvm:
|
5
|
+
- ree
|
6
|
+
- 1.8.7
|
7
|
+
- 1.9.2
|
8
|
+
- 1.9.3
|
9
|
+
- ruby-head
|
10
|
+
- rbx-18mode
|
11
|
+
- rbx-19mode
|
12
|
+
- jruby-18mode
|
13
|
+
- jruby-19mode
|
14
|
+
- jruby-head
|
15
|
+
jdk:
|
16
|
+
-
|
17
|
+
- openjdk6
|
18
|
+
- openjdk7
|
19
|
+
- oraclejdk7
|
20
|
+
matrix:
|
21
|
+
exclude:
|
22
|
+
# remove non-jruby rubies from jdk matrix
|
23
|
+
- rvm: 1.8.7
|
24
|
+
jdk: openjdk6
|
25
|
+
- rvm: 1.8.7
|
26
|
+
jdk: openjdk7
|
27
|
+
- rvm: 1.8.7
|
28
|
+
jdk: oraclejdk7
|
29
|
+
- rvm: 1.9.2
|
30
|
+
jdk: openjdk6
|
31
|
+
- rvm: 1.9.2
|
32
|
+
jdk: openjdk7
|
33
|
+
- rvm: 1.9.2
|
34
|
+
jdk: oraclejdk7
|
35
|
+
- rvm: 1.9.3
|
36
|
+
jdk: openjdk6
|
37
|
+
- rvm: 1.9.3
|
38
|
+
jdk: openjdk7
|
39
|
+
- rvm: 1.9.3
|
40
|
+
jdk: oraclejdk7
|
41
|
+
- rvm: rbx-18mode
|
42
|
+
jdk: openjdk6
|
43
|
+
- rvm: rbx-18mode
|
44
|
+
jdk: openjdk7
|
45
|
+
- rvm: rbx-18mode
|
46
|
+
jdk: oraclejdk7
|
47
|
+
- rvm: rbx-19mode
|
48
|
+
jdk: openjdk6
|
49
|
+
- rvm: rbx-19mode
|
50
|
+
jdk: openjdk7
|
51
|
+
- rvm: rbx-19mode
|
52
|
+
jdk: oraclejdk7
|
53
|
+
- rvm: ree
|
54
|
+
jdk: openjdk6
|
55
|
+
- rvm: ree
|
56
|
+
jdk: openjdk7
|
57
|
+
- rvm: ree
|
58
|
+
jdk: oraclejdk7
|
59
|
+
- rvm: ruby-head
|
60
|
+
jdk: openjdk6
|
61
|
+
- rvm: ruby-head
|
62
|
+
jdk: openjdk7
|
63
|
+
- rvm: ruby-head
|
64
|
+
jdk: oraclejdk7
|
65
|
+
|
66
|
+
# remove jruby rubies from non-jdk matrix
|
67
|
+
- rvm: jruby-18mode
|
68
|
+
jdk:
|
69
|
+
- rvm: jruby-19mode
|
70
|
+
jdk:
|
71
|
+
- rvm: jruby-head
|
72
|
+
jdk:
|
73
|
+
notifications:
|
74
|
+
email:
|
75
|
+
- dan.kubb@gmail.com
|
data/Gemfile
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
# encoding: utf-8
|
2
2
|
|
3
|
-
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gem 'yard', '~> 0.8.1'
|
4
6
|
|
5
7
|
group :development do
|
6
|
-
gem 'jeweler', '~> 1.
|
7
|
-
gem 'rake', '~> 0.
|
8
|
+
gem 'jeweler', '~> 1.8.3'
|
9
|
+
gem 'rake', '~> 0.9.2'
|
8
10
|
gem 'rspec', '~> 1.3.2'
|
9
11
|
end
|
10
12
|
|
@@ -14,17 +16,26 @@ group :jruby do
|
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
gem '
|
26
|
-
gem '
|
27
|
-
gem '
|
28
|
-
gem '
|
19
|
+
group :metrics do
|
20
|
+
gem 'flay', '~> 1.4.2'
|
21
|
+
gem 'flog', '~> 2.5.1'
|
22
|
+
gem 'reek', '~> 1.2.8', :github => 'dkubb/reek'
|
23
|
+
gem 'roodi', '~> 2.1.0'
|
24
|
+
gem 'yard-spellcheck', '~> 0.1.5'
|
25
|
+
|
26
|
+
platforms :mri_18 do
|
27
|
+
gem 'arrayfields', '~> 4.7.4' # for metric_fu
|
28
|
+
gem 'fattr', '~> 2.2.0' # for metric_fu
|
29
|
+
gem 'heckle', '~> 1.4.3'
|
30
|
+
gem 'json', '~> 1.7.3' # for metric_fu rake task
|
31
|
+
gem 'map', '~> 6.0.1' # for metric_fu
|
32
|
+
gem 'metric_fu', '~> 2.1.1'
|
33
|
+
gem 'mspec', '~> 1.5.17'
|
34
|
+
gem 'rcov', '~> 1.0.0'
|
35
|
+
gem 'ruby2ruby', '= 1.2.2'
|
36
|
+
end
|
37
|
+
|
38
|
+
platforms :rbx do
|
39
|
+
gem 'pelusa', '~> 0.2.1'
|
29
40
|
end
|
30
41
|
end
|
data/Rakefile
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'rake'
|
2
2
|
|
3
3
|
begin
|
4
|
-
gem('jeweler', '~> 1.6.0') if respond_to?(:gem, true)
|
5
4
|
require 'jeweler'
|
6
5
|
|
7
6
|
Jeweler::Tasks.new do |gem|
|
@@ -17,5 +16,5 @@ begin
|
|
17
16
|
|
18
17
|
FileList['tasks/**/*.rake'].each { |task| import task }
|
19
18
|
rescue LoadError
|
20
|
-
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler
|
19
|
+
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
|
21
20
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/lib/yardstick.rb
CHANGED
data/lib/yardstick/cli.rb
CHANGED
@@ -7,9 +7,6 @@ module Yardstick
|
|
7
7
|
|
8
8
|
# Set the threshold
|
9
9
|
#
|
10
|
-
# @param [Number] threshold
|
11
|
-
# the threshold to set
|
12
|
-
#
|
13
10
|
# @return [undefined]
|
14
11
|
#
|
15
12
|
# @api public
|
@@ -17,9 +14,6 @@ module Yardstick
|
|
17
14
|
|
18
15
|
# Specify if the threshold should match the coverage
|
19
16
|
#
|
20
|
-
# @param [Boolean] require_exact_threshold
|
21
|
-
# true if the threshold should match the coverage, false if not
|
22
|
-
#
|
23
17
|
# @return [undefined]
|
24
18
|
#
|
25
19
|
# @api public
|
@@ -27,9 +21,6 @@ module Yardstick
|
|
27
21
|
|
28
22
|
# List of paths to measure
|
29
23
|
#
|
30
|
-
# @param [Array<#to_s>, #to_s] path
|
31
|
-
# optional list of paths to measure
|
32
|
-
#
|
33
24
|
# @return [undefined]
|
34
25
|
#
|
35
26
|
# @api public
|
@@ -37,9 +28,6 @@ module Yardstick
|
|
37
28
|
|
38
29
|
# Specify if the coverage summary should be displayed
|
39
30
|
#
|
40
|
-
# @param [Boolean] verbose
|
41
|
-
# true if the coverage summary should be displayed, false if not
|
42
|
-
#
|
43
31
|
# @return [undefined]
|
44
32
|
#
|
45
33
|
# @api public
|
@@ -53,7 +53,7 @@ describe Yardstick::Rake::Measurement do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
it 'should include the path in the task name' do
|
56
|
-
Rake
|
56
|
+
Rake.application.last_description.should == 'Measure docs in lib/**/*.rb with yardstick'
|
57
57
|
end
|
58
58
|
|
59
59
|
def execute_action
|
@@ -84,7 +84,7 @@ describe Yardstick::Rake::Measurement do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
it 'should include the path in the task name' do
|
87
|
-
Rake
|
87
|
+
Rake.application.last_description.should == 'Measure docs in lib/**/*.rb with yardstick'
|
88
88
|
end
|
89
89
|
|
90
90
|
def execute_action
|
@@ -119,7 +119,7 @@ describe Yardstick::Rake::Measurement do
|
|
119
119
|
end
|
120
120
|
|
121
121
|
it 'should include the path in the task name' do
|
122
|
-
Rake
|
122
|
+
Rake.application.last_description.should == 'Measure docs in lib/**/*.rb with yardstick'
|
123
123
|
end
|
124
124
|
|
125
125
|
def execute_action
|
@@ -49,7 +49,7 @@ describe Yardstick::Rake::Verify do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
it 'should include the threshold in the task name' do
|
52
|
-
Rake
|
52
|
+
Rake.application.last_description.should == 'Verify that yardstick coverage is at least 100%'
|
53
53
|
end
|
54
54
|
|
55
55
|
it 'should display coverage summary when executed' do
|
@@ -85,7 +85,7 @@ describe Yardstick::Rake::Verify do
|
|
85
85
|
end
|
86
86
|
|
87
87
|
it 'should include the threshold in the task name' do
|
88
|
-
Rake
|
88
|
+
Rake.application.last_description.should == 'Verify that yardstick coverage is at least 100%'
|
89
89
|
end
|
90
90
|
|
91
91
|
it 'should display coverage summary when executed' do
|
data/yardstick.gemspec
CHANGED
@@ -4,21 +4,23 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.
|
7
|
+
s.name = "yardstick"
|
8
|
+
s.version = "0.5.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
15
|
-
s.executables = [
|
11
|
+
s.authors = ["Dan Kubb"]
|
12
|
+
s.date = "2012-06-04"
|
13
|
+
s.description = "Measure YARD documentation coverage"
|
14
|
+
s.email = "dan.kubb@gmail.com"
|
15
|
+
s.executables = ["yardstick"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE",
|
18
18
|
"README.rdoc"
|
19
19
|
]
|
20
20
|
s.files = [
|
21
21
|
".document",
|
22
|
+
".rvmrc",
|
23
|
+
".travis.yml",
|
22
24
|
"Gemfile",
|
23
25
|
"LICENSE",
|
24
26
|
"README.rdoc",
|
@@ -59,29 +61,29 @@ Gem::Specification.new do |s|
|
|
59
61
|
"tasks/yardstick.rake",
|
60
62
|
"yardstick.gemspec"
|
61
63
|
]
|
62
|
-
s.homepage =
|
63
|
-
s.require_paths = [
|
64
|
-
s.rubygems_version =
|
65
|
-
s.summary =
|
64
|
+
s.homepage = "http://github.com/dkubb/yardstick"
|
65
|
+
s.require_paths = ["lib"]
|
66
|
+
s.rubygems_version = "1.8.24"
|
67
|
+
s.summary = "A tool for verifying YARD documentation coverage"
|
66
68
|
|
67
69
|
if s.respond_to? :specification_version then
|
68
70
|
s.specification_version = 3
|
69
71
|
|
70
72
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
71
|
-
s.add_runtime_dependency(%q<yard>, ["~> 0.
|
72
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.
|
73
|
-
s.add_development_dependency(%q<rake>, ["~> 0.
|
73
|
+
s.add_runtime_dependency(%q<yard>, ["~> 0.8.1"])
|
74
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
75
|
+
s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
|
74
76
|
s.add_development_dependency(%q<rspec>, ["~> 1.3.2"])
|
75
77
|
else
|
76
|
-
s.add_dependency(%q<yard>, ["~> 0.
|
77
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
78
|
-
s.add_dependency(%q<rake>, ["~> 0.
|
78
|
+
s.add_dependency(%q<yard>, ["~> 0.8.1"])
|
79
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
80
|
+
s.add_dependency(%q<rake>, ["~> 0.9.2"])
|
79
81
|
s.add_dependency(%q<rspec>, ["~> 1.3.2"])
|
80
82
|
end
|
81
83
|
else
|
82
|
-
s.add_dependency(%q<yard>, ["~> 0.
|
83
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
84
|
-
s.add_dependency(%q<rake>, ["~> 0.
|
84
|
+
s.add_dependency(%q<yard>, ["~> 0.8.1"])
|
85
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
86
|
+
s.add_dependency(%q<rake>, ["~> 0.9.2"])
|
85
87
|
s.add_dependency(%q<rspec>, ["~> 1.3.2"])
|
86
88
|
end
|
87
89
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yardstick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 5
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dan Kubb
|
@@ -15,59 +15,59 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-06-04 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
22
|
-
|
21
|
+
name: yard
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
23
|
none: false
|
24
24
|
requirements:
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
hash:
|
27
|
+
hash: 61
|
28
28
|
segments:
|
29
29
|
- 0
|
30
|
-
-
|
31
|
-
-
|
32
|
-
version: 0.
|
33
|
-
version_requirements: *id001
|
34
|
-
name: yard
|
30
|
+
- 8
|
31
|
+
- 1
|
32
|
+
version: 0.8.1
|
35
33
|
prerelease: false
|
34
|
+
type: :runtime
|
35
|
+
requirement: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
|
38
|
-
|
37
|
+
name: jeweler
|
38
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
43
|
+
hash: 49
|
44
44
|
segments:
|
45
45
|
- 1
|
46
|
-
-
|
47
|
-
-
|
48
|
-
version: 1.
|
49
|
-
version_requirements: *id002
|
50
|
-
name: jeweler
|
46
|
+
- 8
|
47
|
+
- 3
|
48
|
+
version: 1.8.3
|
51
49
|
prerelease: false
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
50
|
type: :development
|
54
|
-
requirement:
|
51
|
+
requirement: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: rake
|
54
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
55
|
none: false
|
56
56
|
requirements:
|
57
57
|
- - ~>
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
hash:
|
59
|
+
hash: 63
|
60
60
|
segments:
|
61
61
|
- 0
|
62
|
-
-
|
63
|
-
-
|
64
|
-
version: 0.
|
65
|
-
version_requirements: *id003
|
66
|
-
name: rake
|
62
|
+
- 9
|
63
|
+
- 2
|
64
|
+
version: 0.9.2
|
67
65
|
prerelease: false
|
68
|
-
- !ruby/object:Gem::Dependency
|
69
66
|
type: :development
|
70
|
-
requirement:
|
67
|
+
requirement: *id003
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rspec
|
70
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
71
71
|
none: false
|
72
72
|
requirements:
|
73
73
|
- - ~>
|
@@ -78,9 +78,9 @@ dependencies:
|
|
78
78
|
- 3
|
79
79
|
- 2
|
80
80
|
version: 1.3.2
|
81
|
-
version_requirements: *id004
|
82
|
-
name: rspec
|
83
81
|
prerelease: false
|
82
|
+
type: :development
|
83
|
+
requirement: *id004
|
84
84
|
description: Measure YARD documentation coverage
|
85
85
|
email: dan.kubb@gmail.com
|
86
86
|
executables:
|
@@ -92,6 +92,8 @@ extra_rdoc_files:
|
|
92
92
|
- README.rdoc
|
93
93
|
files:
|
94
94
|
- .document
|
95
|
+
- .rvmrc
|
96
|
+
- .travis.yml
|
95
97
|
- Gemfile
|
96
98
|
- LICENSE
|
97
99
|
- README.rdoc
|
@@ -160,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
162
|
requirements: []
|
161
163
|
|
162
164
|
rubyforge_project:
|
163
|
-
rubygems_version: 1.8.
|
165
|
+
rubygems_version: 1.8.24
|
164
166
|
signing_key:
|
165
167
|
specification_version: 3
|
166
168
|
summary: A tool for verifying YARD documentation coverage
|