yardstick 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
+ before_install: gem install bundler
2
3
  bundler_args: --without yard guard benchmarks
3
4
  script: "bundle exec rake ci"
4
5
  rvm:
@@ -8,18 +9,23 @@ rvm:
8
9
  - 1.9.3
9
10
  - 2.0.0
10
11
  - ruby-head
11
- - jruby-18mode
12
- - jruby-19mode
13
- - jruby-head
14
12
  - rbx-18mode
15
13
  - rbx-19mode
14
+ - jruby-18mode
15
+ notifications:
16
+ irc:
17
+ channels:
18
+ - irc.freenode.org#datamapper
19
+ on_success: never
20
+ on_failure: change
21
+ email:
22
+ recipients:
23
+ - dan.kubb@gmail.com
24
+ on_success: never
25
+ on_failure: change
16
26
  matrix:
17
- allow_failures:
18
- - rvm: ree
19
- - rvm: 1.8.7
27
+ include:
20
28
  - rvm: jruby-19mode
29
+ env: JRUBY_OPTS="$JRUBY_OPTS --debug"
21
30
  - rvm: jruby-head
22
- notifications:
23
- irc: "irc.freenode.org#datamapper"
24
- email:
25
- - dan.kubb@gmail.com
31
+ env: JRUBY_OPTS="$JRUBY_OPTS --debug"
data/Gemfile CHANGED
@@ -5,20 +5,21 @@ source 'https://rubygems.org'
5
5
  gemspec
6
6
 
7
7
  group :development do
8
- gem 'rake', '~> 10.0.3'
8
+ gem 'rake', '~> 10.0.4'
9
9
  gem 'rspec', '~> 1.3.2'
10
10
  end
11
11
 
12
- group :benchmarks do
13
- gem 'rbench', '~> 0.2.3'
12
+ group :yard do
13
+ gem 'kramdown', '~> 1.0.1'
14
14
  end
15
15
 
16
16
  group :guard do
17
- gem 'guard', '~> 1.6.2'
17
+ gem 'guard', '~> 1.7.0'
18
18
  gem 'guard-bundler', '~> 1.0.0'
19
19
  gem 'guard-rspec', '~> 1.2.1'
20
20
 
21
21
  # file system change event handling
22
+ gem 'listen', '~> 0.7.3'
22
23
  gem 'rb-fchange', '~> 0.0.6', :require => false
23
24
  gem 'rb-fsevent', '~> 0.9.3', :require => false
24
25
  gem 'rb-inotify', '~> 0.9.0', :require => false
@@ -29,21 +30,13 @@ group :guard do
29
30
  gem 'terminal-notifier-guard', '~> 1.5.3', :require => false
30
31
  end
31
32
 
32
- platform :jruby do
33
- group :jruby do
34
- gem 'jruby-openssl', '~> 0.8.2'
35
- end
36
- end
37
-
38
33
  group :metrics do
39
- gem 'flay', '~> 1.4.3'
40
- gem 'flog', '~> 2.5.3'
41
- gem 'roodi', '~> 2.2.0'
42
-
43
- platforms :ruby_18, :ruby_19 do
44
- # this indirectly depends on ffi which does not build on ruby-head
45
- gem 'yard-spellcheck', '~> 0.1.5'
46
- end
34
+ gem 'coveralls', '~> 0.6.5'
35
+ gem 'flay', '~> 1.4.3'
36
+ gem 'flog', '~> 2.5.3'
37
+ gem 'roodi', '~> 2.2.0'
38
+ gem 'simplecov', '~> 0.7.1'
39
+ gem 'yard-spellcheck', '~> 0.1.5'
47
40
 
48
41
  platforms :mri_18 do
49
42
  gem 'arrayfields', '~> 4.7.4' # for metric_fu
@@ -63,11 +56,12 @@ group :metrics do
63
56
  end
64
57
  end
65
58
 
66
- group :test do
67
- gem 'coveralls', '~> 0.5.6'
68
- gem 'simplecov', '~> 0.7.1'
59
+ group :benchmarks do
60
+ gem 'rbench', '~> 0.2.3'
69
61
  end
70
62
 
71
- group :yard do
72
- gem 'kramdown', '~> 0.14.2'
63
+ platform :jruby do
64
+ group :jruby do
65
+ gem 'jruby-openssl', '~> 0.8.5'
66
+ end
73
67
  end
data/README.md CHANGED
@@ -1,9 +1,17 @@
1
1
  # Yardstick
2
2
  ===========
3
3
 
4
- [![Build Status](https://secure.travis-ci.org/dkubb/yardstick.png?branch=master)](http://travis-ci.org/dkubb/yardstick)
5
- [![Dependency Status](https://gemnasium.com/dkubb/yardstick.png)](https://gemnasium.com/dkubb/yardstick)
6
- [![Code Climate](https://codeclimate.com/github/dkubb/yardstick.png)](https://codeclimate.com/github/dkubb/yardstick)
4
+ [![Gem Version](https://badge.fury.io/rb/yardstick.png)][gem]
5
+ [![Build Status](https://secure.travis-ci.org/dkubb/yardstick.png?branch=master)][travis]
6
+ [![Dependency Status](https://gemnasium.com/dkubb/yardstick.png)][gemnasium]
7
+ [![Code Climate](https://codeclimate.com/github/dkubb/yardstick.png)][codeclimate]
8
+ [![Coverage Status](https://coveralls.io/repos/dkubb/yardstick/badge.png?branch=master)][coveralls]
9
+
10
+ [gem]: https://rubygems.org/gems/yardstick
11
+ [travis]: https://travis-ci.org/dkubb/yardstick
12
+ [gemnasium]: https://gemnasium.com/dkubb/yardstick
13
+ [codeclimate]: https://codeclimate.com/github/dkubb/yardstick
14
+ [coveralls]: https://coveralls.io/r/dkubb/yardstick
7
15
 
8
16
  Yardstick is a tool that verifies documentation coverage of Ruby code. It will measure the source and provide feedback on what is missing from the documentation and what can be improved.
9
17
 
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  threshold: 16
3
- total_score: 253
3
+ total_score: 257
@@ -1,91 +1,105 @@
1
1
  ---
2
- UncommunicativeParameterName:
3
- accept: []
4
- exclude: []
2
+ Attribute:
5
3
  enabled: true
6
- reject:
7
- - !ruby/regexp /^.$/
8
- - !ruby/regexp /[0-9]$/
9
- - !ruby/regexp /[A-Z]/
10
- LargeClass:
11
- max_methods: 0
12
- exclude: []
4
+ exclude:
5
+ - Yardstick::Rake::Verify
6
+ - Yardstick::Rake::Measurement
7
+ - Yardstick::Measurement
8
+ BooleanParameter:
13
9
  enabled: true
14
- max_instance_variables: 0
15
- UncommunicativeMethodName:
16
- accept: []
17
10
  exclude: []
11
+ ClassVariable:
18
12
  enabled: true
19
- reject:
20
- - !ruby/regexp /^[a-z]$/
21
- - !ruby/regexp /[0-9]$/
22
- - !ruby/regexp /[A-Z]/
23
- LongParameterList:
24
- max_params: 0
25
13
  exclude: []
14
+ ControlCouple:
26
15
  enabled: true
27
- overrides: {}
28
- FeatureEnvy:
29
16
  exclude: []
17
+ DataClump:
30
18
  enabled: true
31
- ClassVariable:
32
19
  exclude: []
20
+ max_copies: 2
21
+ min_clump_size: 2
22
+ Duplication:
33
23
  enabled: true
34
- BooleanParameter:
35
24
  exclude: []
25
+ max_calls: 1
26
+ allow_calls: []
27
+ FeatureEnvy:
36
28
  enabled: true
37
- IrresponsibleModule:
38
- exclude: []
39
- enabled: false
40
- UncommunicativeModuleName:
41
- accept: []
42
29
  exclude: []
30
+ IrresponsibleModule:
43
31
  enabled: true
44
- reject:
45
- - !ruby/regexp /^.$/
46
- - !ruby/regexp /[0-9]$/
47
- NestedIterators:
48
- ignore_iterators: []
49
- exclude: []
32
+ exclude:
33
+ - YARD::Docstring
34
+ LargeClass:
50
35
  enabled: true
51
- max_allowed_nesting: 0
36
+ exclude:
37
+ - Yardstick::Measurement
38
+ - Yardstick::Rake::Verify
39
+ max_instance_variables: 3
40
+ max_methods: 10
52
41
  LongMethod:
53
- max_statements: 1
54
- exclude: []
55
42
  enabled: true
56
- Duplication:
57
- allow_calls: []
43
+ exclude:
44
+ - Yardstick::CLI#self.option_parser
45
+ - Yardstick::CLI#self.parse_options
46
+ - Yardstick::CLI#self.run
47
+ - Yardstick::OrderedSet#<<
48
+ - Yardstick::Processor#self.measurements
49
+ - Yardstick::Rake::Verify#verify_measurements
50
+ max_statements: 2
51
+ LongParameterList:
52
+ enabled: true
58
53
  exclude: []
54
+ max_params: 2
55
+ overrides:
56
+ initialize:
57
+ max_params: 3
58
+ LongYieldList:
59
59
  enabled: true
60
- max_calls: 1
61
- UtilityFunction:
62
- max_helper_calls: 1
63
60
  exclude: []
61
+ max_params: 2
62
+ NestedIterators:
64
63
  enabled: true
65
- Attribute:
66
64
  exclude: []
67
- enabled: false
68
- UncommunicativeVariableName:
69
- accept: []
65
+ max_allowed_nesting: 1
66
+ ignore_iterators: []
67
+ SimulatedPolymorphism:
68
+ enabled: true
70
69
  exclude: []
70
+ max_ifs: 1
71
+ UncommunicativeMethodName:
71
72
  enabled: true
73
+ exclude: []
72
74
  reject:
73
- - !ruby/regexp /^.$/
75
+ - !ruby/regexp /^[a-z]$/
74
76
  - !ruby/regexp /[0-9]$/
75
77
  - !ruby/regexp /[A-Z]/
76
- SimulatedPolymorphism:
77
- exclude: []
78
+ accept: []
79
+ UncommunicativeModuleName:
78
80
  enabled: true
79
- max_ifs: 1
80
- DataClump:
81
81
  exclude: []
82
+ reject:
83
+ - !ruby/regexp /^.$/
84
+ - !ruby/regexp /[0-9]$/
85
+ accept: []
86
+ UncommunicativeParameterName:
82
87
  enabled: true
83
- max_copies: 1
84
- min_clump_size: 1
85
- ControlCouple:
86
88
  exclude: []
89
+ reject:
90
+ - !ruby/regexp /^.$/
91
+ - !ruby/regexp /[0-9]$/
92
+ - !ruby/regexp /[A-Z]/
93
+ accept: []
94
+ UncommunicativeVariableName:
87
95
  enabled: true
88
- LongYieldList:
89
- max_params: 1
90
96
  exclude: []
97
+ reject:
98
+ - !ruby/regexp /^.$/
99
+ - !ruby/regexp /[0-9]$/
100
+ - !ruby/regexp /[A-Z]/
101
+ accept: []
102
+ UtilityFunction:
91
103
  enabled: true
104
+ exclude: []
105
+ max_helper_calls: 0
@@ -1,5 +1,8 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Yardstick
4
- VERSION = '0.9.5'
4
+
5
+ # Gem version
6
+ VERSION = '0.9.6'.freeze
7
+
5
8
  end # module Yardstick
@@ -2,6 +2,13 @@
2
2
 
3
3
  module YARD #:nodoc: all
4
4
 
5
+ # Test if JRuby head is being used
6
+ JRUBY_19MODE = RUBY_VERSION >= '1.9' && RUBY_ENGINE == 'jruby'
7
+ JRUBY_HEAD = JRUBY_19MODE && JRUBY_VERSION >= '1.7.4.dev'
8
+
9
+ # Fix jruby-head to use the ruby 1.8 parser until their ripper port is working
10
+ Parser::SourceParser.parser_type = :ruby18 if JRUBY_HEAD
11
+
5
12
  # Extend docstring with yardstick methods
6
13
  class Docstring
7
14
  include Yardstick::Method
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.description = 'Measure YARD documentation coverage'
14
14
  gem.summary = 'A tool for verifying YARD documentation coverage'
15
15
  gem.homepage = 'https://github.com/dkubb/yardstick'
16
- gem.licenses = ['MIT']
16
+ gem.licenses = %w[MIT]
17
17
 
18
18
  gem.require_paths = %w[lib]
19
19
  gem.files = `git ls-files`.split($/)
@@ -21,8 +21,8 @@ Gem::Specification.new do |gem|
21
21
  gem.extra_rdoc_files = %w[LICENSE README.md]
22
22
  gem.executables = %w[yardstick]
23
23
 
24
- gem.add_dependency 'backports', ['~> 3.0', '>= 3.0.3']
25
- gem.add_dependency 'yard', '~> 0.8.5'
24
+ gem.add_runtime_dependency('backports', '~> 3.3', '>= 3.3.0')
25
+ gem.add_runtime_dependency('yard', '~> 0.8', '>= 0.8.6')
26
26
 
27
- gem.add_development_dependency 'bundler', '~> 1.0'
27
+ gem.add_development_dependency('bundler', '~> 1.3', '>= 1.3.5')
28
28
  end
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.9.5
4
+ version: 0.9.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-19 00:00:00.000000000 Z
12
+ date: 2013-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: backports
@@ -18,10 +18,10 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '3.0'
21
+ version: '3.3'
22
22
  - - ! '>='
23
23
  - !ruby/object:Gem::Version
24
- version: 3.0.3
24
+ version: 3.3.0
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,10 +29,10 @@ dependencies:
29
29
  requirements:
30
30
  - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: '3.0'
32
+ version: '3.3'
33
33
  - - ! '>='
34
34
  - !ruby/object:Gem::Version
35
- version: 3.0.3
35
+ version: 3.3.0
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: yard
38
38
  requirement: !ruby/object:Gem::Requirement
@@ -40,7 +40,10 @@ dependencies:
40
40
  requirements:
41
41
  - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: 0.8.5
43
+ version: '0.8'
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: 0.8.6
44
47
  type: :runtime
45
48
  prerelease: false
46
49
  version_requirements: !ruby/object:Gem::Requirement
@@ -48,7 +51,10 @@ dependencies:
48
51
  requirements:
49
52
  - - ~>
50
53
  - !ruby/object:Gem::Version
51
- version: 0.8.5
54
+ version: '0.8'
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: 0.8.6
52
58
  - !ruby/object:Gem::Dependency
53
59
  name: bundler
54
60
  requirement: !ruby/object:Gem::Requirement
@@ -56,7 +62,10 @@ dependencies:
56
62
  requirements:
57
63
  - - ~>
58
64
  - !ruby/object:Gem::Version
59
- version: '1.0'
65
+ version: '1.3'
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 1.3.5
60
69
  type: :development
61
70
  prerelease: false
62
71
  version_requirements: !ruby/object:Gem::Requirement
@@ -64,7 +73,10 @@ dependencies:
64
73
  requirements:
65
74
  - - ~>
66
75
  - !ruby/object:Gem::Version
67
- version: '1.0'
76
+ version: '1.3'
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: 1.3.5
68
80
  description: Measure YARD documentation coverage
69
81
  email:
70
82
  - dan.kubb@gmail.com
@@ -147,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
159
  version: '0'
148
160
  requirements: []
149
161
  rubyforge_project:
150
- rubygems_version: 1.8.23
162
+ rubygems_version: 1.8.25
151
163
  signing_key:
152
164
  specification_version: 3
153
165
  summary: A tool for verifying YARD documentation coverage