guard-inch 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/guard-inch.gemspec +3 -3
- data/lib/guard/inch.rb +10 -1
- data/lib/guard/inch/version.rb +3 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c2280e2482faaf6bc7b00fe6712cdf3ad06e2b0
|
4
|
+
data.tar.gz: 1b872a9ac91d488ca9796c4685769a85a9ada1bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7f8dae49a8630d02bac221a89a5f675454a267429b29429bb4aff55e0c27bcaeab4cfc1a9fd2b24b2fbe72ba6e4511e760e302abd5e0f2a25a8406578c1f5d8
|
7
|
+
data.tar.gz: acd123ee4b94a4cc8dec6bb08bf4266de52fafc68bbd356679bd9b2190c2a2777aeccafc7edad7643a0503cbade818c1a13a6fd591f7cf636a047755092c245f
|
data/guard-inch.gemspec
CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.5"
|
22
|
-
spec.add_development_dependency "rake"
|
22
|
+
spec.add_development_dependency "rake", "~> 1"
|
23
23
|
|
24
|
-
spec.add_runtime_dependency "guard"
|
25
|
-
spec.add_runtime_dependency "inch"
|
24
|
+
spec.add_runtime_dependency "guard", "~> 0"
|
25
|
+
spec.add_runtime_dependency "inch", "~> 0"
|
26
26
|
end
|
data/lib/guard/inch.rb
CHANGED
@@ -2,8 +2,12 @@ require "guard/inch/version"
|
|
2
2
|
require 'guard'
|
3
3
|
require 'guard/plugin'
|
4
4
|
|
5
|
+
# The guard namespace
|
5
6
|
module Guard
|
7
|
+
# A guard plugin for the Inch documentation lint tool
|
6
8
|
class Inch < Plugin
|
9
|
+
# configure a new instance of the plugin
|
10
|
+
# @param [Hash] options the guard plugin options
|
7
11
|
def initialize(options = {})
|
8
12
|
super
|
9
13
|
@options = options
|
@@ -11,6 +15,7 @@ module Guard
|
|
11
15
|
@all_type = options[:all_type] || :none
|
12
16
|
end
|
13
17
|
|
18
|
+
# On start, display a message and optionally run the documentation lint
|
14
19
|
def start
|
15
20
|
message = 'Guard::Inch is running'
|
16
21
|
message << ' in pedantic mode' if options[:pedantic]
|
@@ -18,6 +23,7 @@ module Guard
|
|
18
23
|
run_all if options[:all_on_start]
|
19
24
|
end
|
20
25
|
|
26
|
+
# Run all of the documentation lints
|
21
27
|
def run_all
|
22
28
|
return unless options[:all_type]
|
23
29
|
args = case options[:all_type]
|
@@ -31,12 +37,15 @@ module Guard
|
|
31
37
|
args << ' .'
|
32
38
|
run_inch args
|
33
39
|
end
|
40
|
+
|
41
|
+
# Run the lints for changes files
|
42
|
+
# @param [Array<String>] paths the paths of changed files
|
34
43
|
def run_on_changes(paths)
|
35
44
|
flags = ''
|
36
45
|
flags << '--pedantic ' if options[:pedantic]
|
37
46
|
run_inch "#{flags} #{paths.join(' ')}"
|
38
47
|
end
|
39
|
-
|
48
|
+
|
40
49
|
private
|
41
50
|
|
42
51
|
# run the inch tool with the specified argument string
|
data/lib/guard/inch/version.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-inch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig Hills
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: guard
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: inch
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: This gem is a Guard plugin, which integrates the inch documentation measurement
|
@@ -74,7 +74,7 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .gitignore
|
77
|
+
- ".gitignore"
|
78
78
|
- Gemfile
|
79
79
|
- LICENSE.txt
|
80
80
|
- README.md
|
@@ -93,17 +93,17 @@ require_paths:
|
|
93
93
|
- lib
|
94
94
|
required_ruby_version: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
|
-
- -
|
96
|
+
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.
|
106
|
+
rubygems_version: 2.4.5
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: A guard plugin to run the inch documentation measurement tool.
|