guard-rubocop 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/guard-rubocop.gemspec +17 -18
- data/lib/guard/rubocop/runner.rb +1 -3
- data/lib/guard/rubocop/version.rb +1 -1
- data/spec/guard/rubocop/runner_spec.rb +2 -3
- metadata +12 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bc5fa655511eae8b694c297d101d6ad09d266db
|
4
|
+
data.tar.gz: 0d464ef835877c3fcc291ceabc67e7ac2e2f8195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1a50603256283df2cc4c27f6b7014557258dbf9d8773f95e30b21bcb4d54de3dd6b8bab072c592fbaa9089b0a93a50f0f2a0c6fbf1d34c41dd1d6125f7e9fe7
|
7
|
+
data.tar.gz: edff6f80a97feb8ecc18f0aeb20708a2eec01777fcfc8829e63e995e68e2cd5dfed882fabad98d59ea4a0aaf28a624a02ebdf5d4cfddf7e24cd861f94c990a16
|
data/guard-rubocop.gemspec
CHANGED
@@ -6,29 +6,28 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
6
6
|
require 'guard/rubocop/version'
|
7
7
|
|
8
8
|
Gem::Specification.new do |spec|
|
9
|
-
spec.name =
|
9
|
+
spec.name = 'guard-rubocop'
|
10
10
|
spec.version = Guard::RubocopVersion::VERSION
|
11
|
-
spec.authors = [
|
12
|
-
spec.email = [
|
13
|
-
spec.summary =
|
14
|
-
spec.description =
|
15
|
-
spec.homepage =
|
16
|
-
spec.license =
|
11
|
+
spec.authors = ['Yuji Nakayama']
|
12
|
+
spec.email = ['nkymyj@gmail.com']
|
13
|
+
spec.summary = 'Guard plugin for RuboCop'
|
14
|
+
spec.description = 'Guard::Rubocop allows you to automatically check Ruby code style with RuboCop when files are modified.'
|
15
|
+
spec.homepage = 'https://github.com/yujinakayama/guard-rubocop'
|
16
|
+
spec.license = 'MIT'
|
17
17
|
|
18
18
|
spec.files = `git ls-files`.split($/)
|
19
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
-
spec.require_paths = [
|
21
|
+
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.add_runtime_dependency
|
24
|
-
spec.add_runtime_dependency
|
25
|
-
spec.add_runtime_dependency
|
26
|
-
spec.add_runtime_dependency "term-ansicolor", "~> 1.1"
|
23
|
+
spec.add_runtime_dependency 'guard', '~> 1.8'
|
24
|
+
spec.add_runtime_dependency 'rubocop', ['>= 0.6.1', '< 1.0.0']
|
25
|
+
spec.add_runtime_dependency 'childprocess', '~> 0.3'
|
27
26
|
|
28
|
-
spec.add_development_dependency
|
29
|
-
spec.add_development_dependency
|
30
|
-
spec.add_development_dependency
|
31
|
-
spec.add_development_dependency
|
32
|
-
spec.add_development_dependency
|
33
|
-
spec.add_development_dependency
|
27
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
28
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
29
|
+
spec.add_development_dependency 'rspec', '~> 2.13'
|
30
|
+
spec.add_development_dependency 'simplecov', '~> 0.7'
|
31
|
+
spec.add_development_dependency 'guard-rspec', '>= 2.5.4'
|
32
|
+
spec.add_development_dependency 'ruby_gntp', '>= 0.3'
|
34
33
|
end
|
data/lib/guard/rubocop/runner.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
require 'childprocess'
|
4
|
-
require 'term/ansicolor'
|
5
4
|
|
6
5
|
module Guard
|
7
6
|
class Rubocop
|
@@ -18,9 +17,8 @@ module Guard
|
|
18
17
|
end
|
19
18
|
|
20
19
|
def run(paths = [])
|
21
|
-
exit_code, output = rubocop(paths)
|
20
|
+
exit_code, @output = rubocop(['--no-color'].concat(paths))
|
22
21
|
@passed = (exit_code == PASSED_EXIT_CODE)
|
23
|
-
@output = Term::ANSIColor.uncolor(output)
|
24
22
|
|
25
23
|
case @options[:notification]
|
26
24
|
when :failed
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
require 'spec_helper.rb'
|
4
|
-
require 'term/ansicolor'
|
5
4
|
|
6
5
|
describe Guard::Rubocop::Runner, :silence_output do
|
7
6
|
include CaptureHelper
|
@@ -121,9 +120,9 @@ describe Guard::Rubocop::Runner, :silence_output do
|
|
121
120
|
runner.stub(:notify)
|
122
121
|
end
|
123
122
|
|
124
|
-
it 'returns
|
123
|
+
it 'returns output of rubocop command' do
|
125
124
|
captured_output = capture(:stdout) { runner.run(paths) }
|
126
|
-
runner.output.should ==
|
125
|
+
runner.output.should == captured_output
|
127
126
|
end
|
128
127
|
end
|
129
128
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Nakayama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: rubocop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.6.1
|
34
|
+
- - <
|
32
35
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
36
|
+
version: 1.0.0
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- -
|
41
|
+
- - '>='
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
43
|
+
version: 0.6.1
|
44
|
+
- - <
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.0.0
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: childprocess
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,20 +58,6 @@ dependencies:
|
|
52
58
|
- - ~>
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '0.3'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: term-ansicolor
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.1'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ~>
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '1.1'
|
69
61
|
- !ruby/object:Gem::Dependency
|
70
62
|
name: bundler
|
71
63
|
requirement: !ruby/object:Gem::Requirement
|