yardstick 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,64 +12,6 @@ rvm:
12
12
  - jruby-18mode
13
13
  - jruby-19mode
14
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
15
  notifications:
74
16
  email:
75
17
  - dan.kubb@gmail.com
data/Gemfile CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'yard', '~> 0.8.1'
5
+ gem 'backports', '~> 2.6.4'
6
+ gem 'yard', '~> 0.8.3'
6
7
 
7
8
  group :development do
8
9
  gem 'jeweler', '~> 1.8.3'
data/Rakefile CHANGED
@@ -1,20 +1,7 @@
1
1
  require 'rake'
2
2
 
3
- begin
4
- require 'jeweler'
3
+ require File.expand_path('../lib/yardstick/version', __FILE__)
5
4
 
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = 'yardstick'
8
- gem.summary = 'A tool for verifying YARD documentation coverage'
9
- gem.description = 'Measure YARD documentation coverage'
10
- gem.email = 'dan.kubb@gmail.com'
11
- gem.homepage = 'http://github.com/dkubb/yardstick'
12
- gem.authors = [ 'Dan Kubb' ]
13
- end
5
+ FileList['tasks/**/*.rake'].each { |task| import task }
14
6
 
15
- Jeweler::GemcutterTasks.new
16
-
17
- FileList['tasks/**/*.rake'].each { |task| import task }
18
- rescue LoadError
19
- puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
20
- end
7
+ task :default => :spec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.7.0
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby -KU
2
2
 
3
- require 'rubygems'
4
- require 'pathname'
5
- require File.expand_path('../../lib/yardstick', __FILE__)
3
+ $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
4
+
5
+ require 'yardstick'
6
+ require 'yardstick/cli'
6
7
 
7
8
  Yardstick::CLI.run(*ARGV)
@@ -1,8 +1,26 @@
1
1
  require 'pathname'
2
+ require 'rational'
3
+
4
+ require 'backports'
5
+ require 'yard'
6
+
7
+ require 'yardstick/yard_ext'
8
+
9
+ require 'yardstick/ordered_set'
10
+ require 'yardstick/rule_set'
11
+ require 'yardstick/measurement'
12
+
13
+ require 'yardstick/measurement_set'
14
+ require 'yardstick/processor'
15
+ require 'yardstick/rule'
16
+
17
+ require 'yardstick/measurable'
18
+ require 'yardstick/method'
19
+
20
+ require 'yardstick/version'
2
21
 
3
22
  module Yardstick
4
- VERSION = '0.6.0'.freeze
5
- ROOT = Pathname(__FILE__).dirname.parent.expand_path.freeze
23
+ ROOT = Pathname(__FILE__).dirname.parent.expand_path.freeze
6
24
 
7
25
  # Measure a list of files
8
26
  #
@@ -43,9 +61,3 @@ module Yardstick
43
61
  end
44
62
 
45
63
  end # module Yardstick
46
-
47
- $LOAD_PATH.unshift((Yardstick::ROOT + 'lib').to_s)
48
-
49
- require 'yardstick/core_ext/object'
50
- require 'yardstick/yard_ext'
51
- require 'yardstick/autoload'
@@ -55,7 +55,7 @@ module Yardstick
55
55
  #
56
56
  # @api private
57
57
  def extended(docstring)
58
- included(docstring.meta_class)
58
+ included(docstring.singleton_class)
59
59
  end
60
60
 
61
61
  end # module ClassMethods
@@ -72,7 +72,7 @@ module Yardstick
72
72
  #
73
73
  # @api public
74
74
  def measure
75
- meta_class.rules.measure(self)
75
+ singleton_class.rules.measure(self)
76
76
  end
77
77
 
78
78
  end # module Measurable
@@ -1,5 +1,3 @@
1
- require 'rational'
2
-
3
1
  module Yardstick
4
2
  class MeasurementSet < OrderedSet
5
3
 
@@ -1,5 +1,3 @@
1
- require 'yard'
2
-
3
1
  module Yardstick
4
2
  class Processor
5
3
 
@@ -1,6 +1,8 @@
1
1
  require 'rake'
2
2
  require 'rake/tasklib'
3
3
 
4
+ require 'yardstick'
5
+
4
6
  module Yardstick
5
7
  module Rake
6
8
  class Verify < ::Rake::TaskLib
@@ -0,0 +1,3 @@
1
+ module Yardstick
2
+ VERSION = '0.7.0'
3
+ end # module Yardstick
@@ -1,4 +1,5 @@
1
1
  require 'spec_helper'
2
+ require 'yardstick/cli'
2
3
 
3
4
  shared_examples_for 'displays help' do
4
5
  it 'should display the help message' do
@@ -1,4 +1,5 @@
1
1
  require 'spec_helper'
2
+ require 'yardstick/rake/measurement'
2
3
 
3
4
  shared_examples_for 'set default name for measurement task' do
4
5
  it 'should set name to :yardstick_measure' do
@@ -1,4 +1,5 @@
1
1
  require 'spec_helper'
2
+ require 'yardstick/rake/verify'
2
3
 
3
4
  shared_examples_for 'set default name for verify task' do
4
5
  it 'should set name to :verify_measurements' do
@@ -1,13 +1,6 @@
1
- require 'pathname'
2
- require 'rubygems'
3
- require 'spec/autorun'
4
-
5
- require 'yard'
6
1
  require 'yardstick'
7
-
8
- Pathname.glob(Yardstick::ROOT.join('lib', '**', '*.rb').to_s).sort.each do |file|
9
- require file.to_s.chomp('.rb')
10
- end
2
+ require 'spec'
3
+ require 'spec/autorun'
11
4
 
12
5
  Spec::Runner.configure do |config|
13
6
  clear_tasks = proc { Rake::Task.clear }
@@ -0,0 +1,3 @@
1
+ require 'rbconfig'
2
+
3
+ ::Config = RbConfig unless defined?(::Config)
@@ -0,0 +1,18 @@
1
+ begin
2
+ require 'jeweler'
3
+
4
+ Jeweler::Tasks.new do |gem|
5
+ gem.name = 'yardstick'
6
+ gem.summary = 'A tool for verifying YARD documentation coverage'
7
+ gem.description = 'Measure YARD documentation coverage'
8
+ gem.email = 'dan.kubb@gmail.com'
9
+ gem.homepage = 'http://github.com/dkubb/yardstick'
10
+ gem.authors = [ 'Dan Kubb' ]
11
+
12
+ gem.version = Yardstick::VERSION
13
+ end
14
+
15
+ Jeweler::GemcutterTasks.new
16
+ rescue LoadError
17
+ puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
18
+ end
@@ -3,7 +3,7 @@ require 'spec/rake/verify_rcov'
3
3
 
4
4
  spec_defaults = lambda do |spec|
5
5
  spec.pattern = 'spec/**/*_spec.rb'
6
- spec.libs << 'lib' << 'spec'
6
+ spec.ruby_opts = %w[ -r./spec/support/config_alias ]
7
7
  spec.spec_opts << '--options' << 'spec/spec.opts'
8
8
  end
9
9
 
@@ -1,4 +1,7 @@
1
- require File.expand_path('../../lib/yardstick', __FILE__)
1
+ $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
2
+
3
+ require 'yardstick/rake/measurement'
4
+ require 'yardstick/rake/verify'
2
5
 
3
6
  # yardstick_measure task
4
7
  Yardstick::Rake::Measurement.new
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "yardstick"
8
- s.version = "0.6.0"
8
+ s.version = "0.7.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Kubb"]
12
- s.date = "2012-07-05"
12
+ s.date = "2012-10-26"
13
13
  s.description = "Measure YARD documentation coverage"
14
14
  s.email = "dan.kubb@gmail.com"
15
15
  s.executables = ["yardstick"]
@@ -28,9 +28,7 @@ Gem::Specification.new do |s|
28
28
  "VERSION",
29
29
  "bin/yardstick",
30
30
  "lib/yardstick.rb",
31
- "lib/yardstick/autoload.rb",
32
31
  "lib/yardstick/cli.rb",
33
- "lib/yardstick/core_ext/object.rb",
34
32
  "lib/yardstick/measurable.rb",
35
33
  "lib/yardstick/measurement.rb",
36
34
  "lib/yardstick/measurement_set.rb",
@@ -41,6 +39,7 @@ Gem::Specification.new do |s|
41
39
  "lib/yardstick/rake/verify.rb",
42
40
  "lib/yardstick/rule.rb",
43
41
  "lib/yardstick/rule_set.rb",
42
+ "lib/yardstick/version.rb",
44
43
  "lib/yardstick/yard_ext.rb",
45
44
  "spec/public/yardstick/cli_spec.rb",
46
45
  "spec/public/yardstick/measurement_set_spec.rb",
@@ -53,8 +52,10 @@ Gem::Specification.new do |s|
53
52
  "spec/semipublic/yardstick/rule_spec.rb",
54
53
  "spec/spec.opts",
55
54
  "spec/spec_helper.rb",
55
+ "spec/support/config_alias.rb",
56
56
  "tasks/ci.rake",
57
57
  "tasks/heckle.rake",
58
+ "tasks/jeweler.rake",
58
59
  "tasks/metrics.rake",
59
60
  "tasks/spec.rake",
60
61
  "tasks/yard.rake",
@@ -70,18 +71,21 @@ Gem::Specification.new do |s|
70
71
  s.specification_version = 3
71
72
 
72
73
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
73
- s.add_runtime_dependency(%q<yard>, ["~> 0.8.1"])
74
+ s.add_runtime_dependency(%q<backports>, ["~> 2.6.4"])
75
+ s.add_runtime_dependency(%q<yard>, ["~> 0.8.3"])
74
76
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
75
77
  s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
76
78
  s.add_development_dependency(%q<rspec>, ["~> 1.3.2"])
77
79
  else
78
- s.add_dependency(%q<yard>, ["~> 0.8.1"])
80
+ s.add_dependency(%q<backports>, ["~> 2.6.4"])
81
+ s.add_dependency(%q<yard>, ["~> 0.8.3"])
79
82
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
80
83
  s.add_dependency(%q<rake>, ["~> 0.9.2"])
81
84
  s.add_dependency(%q<rspec>, ["~> 1.3.2"])
82
85
  end
83
86
  else
84
- s.add_dependency(%q<yard>, ["~> 0.8.1"])
87
+ s.add_dependency(%q<backports>, ["~> 2.6.4"])
88
+ s.add_dependency(%q<yard>, ["~> 0.8.3"])
85
89
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
86
90
  s.add_dependency(%q<rake>, ["~> 0.9.2"])
87
91
  s.add_dependency(%q<rspec>, ["~> 1.3.2"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yardstick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-05 00:00:00.000000000 Z
12
+ date: 2012-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: backports
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 2.6.4
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 2.6.4
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: yard
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -18,7 +34,7 @@ dependencies:
18
34
  requirements:
19
35
  - - ~>
20
36
  - !ruby/object:Gem::Version
21
- version: 0.8.1
37
+ version: 0.8.3
22
38
  type: :runtime
23
39
  prerelease: false
24
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +42,7 @@ dependencies:
26
42
  requirements:
27
43
  - - ~>
28
44
  - !ruby/object:Gem::Version
29
- version: 0.8.1
45
+ version: 0.8.3
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: jeweler
32
48
  requirement: !ruby/object:Gem::Requirement
@@ -94,9 +110,7 @@ files:
94
110
  - VERSION
95
111
  - bin/yardstick
96
112
  - lib/yardstick.rb
97
- - lib/yardstick/autoload.rb
98
113
  - lib/yardstick/cli.rb
99
- - lib/yardstick/core_ext/object.rb
100
114
  - lib/yardstick/measurable.rb
101
115
  - lib/yardstick/measurement.rb
102
116
  - lib/yardstick/measurement_set.rb
@@ -107,6 +121,7 @@ files:
107
121
  - lib/yardstick/rake/verify.rb
108
122
  - lib/yardstick/rule.rb
109
123
  - lib/yardstick/rule_set.rb
124
+ - lib/yardstick/version.rb
110
125
  - lib/yardstick/yard_ext.rb
111
126
  - spec/public/yardstick/cli_spec.rb
112
127
  - spec/public/yardstick/measurement_set_spec.rb
@@ -119,8 +134,10 @@ files:
119
134
  - spec/semipublic/yardstick/rule_spec.rb
120
135
  - spec/spec.opts
121
136
  - spec/spec_helper.rb
137
+ - spec/support/config_alias.rb
122
138
  - tasks/ci.rake
123
139
  - tasks/heckle.rake
140
+ - tasks/jeweler.rake
124
141
  - tasks/metrics.rake
125
142
  - tasks/spec.rake
126
143
  - tasks/yard.rake
@@ -138,9 +155,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
155
  - - ! '>='
139
156
  - !ruby/object:Gem::Version
140
157
  version: '0'
141
- segments:
142
- - 0
143
- hash: 4342461256610534409
144
158
  required_rubygems_version: !ruby/object:Gem::Requirement
145
159
  none: false
146
160
  requirements:
@@ -1,16 +0,0 @@
1
- module Yardstick
2
- autoload :CLI, 'yardstick/cli'
3
- autoload :Measurable, 'yardstick/measurable'
4
- autoload :Measurement, 'yardstick/measurement'
5
- autoload :MeasurementSet, 'yardstick/measurement_set'
6
- autoload :Method, 'yardstick/method'
7
- autoload :OrderedSet, 'yardstick/ordered_set'
8
- autoload :Processor, 'yardstick/processor'
9
- autoload :Rule, 'yardstick/rule'
10
- autoload :RuleSet, 'yardstick/rule_set'
11
-
12
- module Rake
13
- autoload :Measurement, 'yardstick/rake/measurement'
14
- autoload :Verify, 'yardstick/rake/verify'
15
- end # module Rake
16
- end # module Yardstick
@@ -1,13 +0,0 @@
1
- class Object #:nodoc:
2
-
3
- # Return the meta class for this instance
4
- #
5
- # @return [Class]
6
- # the meta class
7
- #
8
- # @api private
9
- def meta_class
10
- class << self; self end
11
- end
12
-
13
- end # class Object