guard-yardstick 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 70281bd8873f56a754d7b1676d0e10b4b6ac57d5
4
+ data.tar.gz: 98a6e991a4391e003ce0eb11975e33301841b1c8
5
+ SHA512:
6
+ metadata.gz: 66ff4161396f810a48d794758c848ce15be8b65f3f53378478d35ec4eb0078965d98abcaff75898e39744964c2357fa3566c5d44b19485556a9b396e5012ae49
7
+ data.tar.gz: 00e4bd3594619dae551aa8b20a6f084fc0bb1821130f66124f0d4d2eb509c37dc1bec88acb963119d26ac02cf9818f234fe8bb1bfa083a0b272aa0870a027af5
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in guard-yardstick.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem 'guard'
8
+ end
data/Guardfile ADDED
@@ -0,0 +1,6 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard :yardstick do
5
+ watch(%r{.+\.rb$})
6
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Nathan Lee
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # guard-yardstick
2
+
3
+ guard-yardstick will automatically check your code for missing yardocs
4
+
5
+ ## Installation
6
+
7
+ Please make sure to have [Guard](https://github.com/guard/guard) installed before continue.
8
+
9
+ Add `guard-yardstick` to your `Gemfile`:
10
+
11
+ ```ruby
12
+ group :development do
13
+ gem 'guard-yardstick'
14
+ end
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ ```sh
20
+ $ bundle
21
+ ```
22
+
23
+ Or install it yourself as:
24
+
25
+ ```sh
26
+ $ gem install guard-yardstick
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ Please read the [Guard usage documentation](https://github.com/guard/guard#readme).
32
+
33
+ ## Options
34
+
35
+ You can pass some options in `Guardfile` like the following example:
36
+
37
+ ```ruby
38
+ guard :yardstick, all_on_start: false, cli: ['app/**/*.rb', 'lib/**/*.rb'] do
39
+ # ...
40
+ end
41
+ ```
42
+
43
+ ## Contributing
44
+
45
+ 1. Fork it
46
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
47
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
48
+ 4. Push to the branch (`git push origin my-new-feature`)
49
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'guard/yardstick/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "guard-yardstick"
8
+ spec.version = Guard::YardstickVersion
9
+ spec.authors = ["Nathan Lee"]
10
+ spec.email = ["nathan@globalphobia.com"]
11
+ spec.description = 'Guard::Yardstick automatically checks your code for missing yardocs ' \
12
+ 'when files are modified.'
13
+ spec.summary = %q{Guard plugin for Yardstick}
14
+ spec.homepage = ""
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files`.split($/)
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_runtime_dependency 'guard', '>= 2.0'
23
+ spec.add_runtime_dependency 'yardstick', '>= 0.9'
24
+
25
+ # spec.add_development_dependency 'bundler', '~> 1.3'
26
+ spec.add_development_dependency 'rake'
27
+ end
@@ -0,0 +1,14 @@
1
+ module Guard
2
+ # A workaround for declaring `class Yardstick`
3
+ # before `class Yardstick < Guard` in yardstick.rb
4
+ module YardstickVersion
5
+ # http://semver.org/
6
+ MAJOR = 0
7
+ MINOR = 0
8
+ PATCH = 1
9
+
10
+ def self.to_s
11
+ [MAJOR, MINOR, PATCH].join('.')
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,35 @@
1
+ require 'guard'
2
+ require 'guard/plugin'
3
+
4
+ module Guard
5
+ class Yardstick < Plugin
6
+
7
+ def initialize(options = {})
8
+ super
9
+
10
+ @options = {
11
+ all_on_start: true,
12
+ cli: ['./**/*.rb']
13
+ }.merge(options)
14
+ end
15
+
16
+ def start
17
+ run_all if @options[:all_on_start]
18
+ end
19
+
20
+ def run_all
21
+ UI.info 'Inspecting Yarddoc in all files'
22
+ system(build_command)
23
+ end
24
+
25
+ private
26
+
27
+ def build_command
28
+ cli = options[:cli].join(' ')
29
+
30
+ "bundle exec yardstick #{cli}"
31
+ end
32
+
33
+ end
34
+
35
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-yardstick
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nathan Lee
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: guard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: yardstick
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0.9'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0.9'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Guard::Yardstick automatically checks your code for missing yardocs when
56
+ files are modified.
57
+ email:
58
+ - nathan@globalphobia.com
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".gitignore"
64
+ - Gemfile
65
+ - Guardfile
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - guard-yardstick.gemspec
70
+ - lib/guard/yardstick.rb
71
+ - lib/guard/yardstick/version.rb
72
+ homepage: ''
73
+ licenses:
74
+ - MIT
75
+ metadata: {}
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubyforge_project:
92
+ rubygems_version: 2.2.2
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: Guard plugin for Yardstick
96
+ test_files: []
97
+ has_rdoc: