rubocop-git 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +14 -2
- data/Appraisals +10 -0
- data/gemfiles/0.38.gemfile +7 -0
- data/gemfiles/0.39.gemfile +7 -0
- data/gemfiles/0.40.gemfile +7 -0
- data/gemfiles/0.41.gemfile +7 -0
- data/gemfiles/0.42.gemfile +7 -0
- data/gemfiles/0.43.gemfile +7 -0
- data/gemfiles/0.44.gemfile +7 -0
- data/gemfiles/0.45.gemfile +7 -0
- data/gemfiles/0.46.gemfile +7 -0
- data/gemfiles/0.47.gemfile +7 -0
- data/lib/rubocop/git/style_guide.rb +17 -4
- data/lib/rubocop/git/version.rb +1 -1
- metadata +13 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 479c6ef78fb6e1288498d2473e929433d265dd04
|
4
|
+
data.tar.gz: aadfa88a049cea5f27045e10ab80836aa4495672
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8d5005cbaf72bdd986a52b390c08ce06859559df3ef4994d1904ced7e30083811e2b03f005c8cca40add0c037b0d53f8479463039a821fb9245da08f7548c9d
|
7
|
+
data.tar.gz: 53511c3b165a67c63631f7d76fb0d8a90eb6396293a8ae0183cd02ea401346c87a3bb4a3d605ce0163ec1eb6a9f35a8a2304448730bb99cb01c2ac092ed833e7
|
data/.travis.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
3
|
+
- 2.1.10
|
4
|
+
- 2.4.0
|
4
5
|
gemfile:
|
5
6
|
- gemfiles/0.24.gemfile
|
6
7
|
- gemfiles/0.25.gemfile
|
@@ -16,4 +17,15 @@ gemfile:
|
|
16
17
|
- gemfiles/0.35.gemfile
|
17
18
|
- gemfiles/0.36.gemfile
|
18
19
|
- gemfiles/0.37.gemfile
|
19
|
-
|
20
|
+
- gemfiles/0.38.gemfile
|
21
|
+
- gemfiles/0.39.gemfile
|
22
|
+
- gemfiles/0.40.gemfile
|
23
|
+
- gemfiles/0.41.gemfile
|
24
|
+
- gemfiles/0.42.gemfile
|
25
|
+
- gemfiles/0.43.gemfile
|
26
|
+
- gemfiles/0.44.gemfile
|
27
|
+
- gemfiles/0.45.gemfile
|
28
|
+
- gemfiles/0.46.gemfile
|
29
|
+
- gemfiles/0.47.gemfile
|
30
|
+
before_install:
|
31
|
+
- gem update --system
|
data/Appraisals
CHANGED
@@ -12,14 +12,19 @@ class StyleGuide
|
|
12
12
|
[]
|
13
13
|
else
|
14
14
|
parsed_source = parse_source(file)
|
15
|
-
|
16
|
-
team = RuboCop::Cop::Team.new(cops, config, rubocop_options)
|
15
|
+
team = RuboCop::Cop::Team.new(all_cops, config, rubocop_options)
|
17
16
|
team.inspect_file(parsed_source)
|
18
17
|
end
|
19
18
|
end
|
20
19
|
|
21
20
|
private
|
22
21
|
|
22
|
+
if Gem::Version.new(RuboCop::Version::STRING) >= Gem::Version.new('0.47.0')
|
23
|
+
def all_cops; RuboCop::Cop::Registry.new RuboCop::Cop::Cop.all; end
|
24
|
+
else
|
25
|
+
def all_cops; RuboCop::Cop::Cop.all; end
|
26
|
+
end
|
27
|
+
|
23
28
|
def ignored_file?(file)
|
24
29
|
!file.ruby? || file.removed? || excluded_file?(file)
|
25
30
|
end
|
@@ -29,11 +34,15 @@ class StyleGuide
|
|
29
34
|
end
|
30
35
|
|
31
36
|
def parse_source(file)
|
32
|
-
|
37
|
+
rubocop_version = Gem::Version.new(RuboCop::Version::STRING)
|
38
|
+
if rubocop_version < Gem::Version.new('0.36.0')
|
33
39
|
RuboCop::ProcessedSource.new(file.content, file.filename)
|
34
|
-
|
40
|
+
elsif rubocop_version < Gem::Version.new('0.41.0')
|
35
41
|
RuboCop::ProcessedSource.new(file.content,
|
36
42
|
target_ruby_version, file.filename)
|
43
|
+
else
|
44
|
+
RuboCop::ProcessedSource.new(file.content,
|
45
|
+
config.target_ruby_version, file.filename)
|
37
46
|
end
|
38
47
|
end
|
39
48
|
|
@@ -67,6 +76,10 @@ class StyleGuide
|
|
67
76
|
end
|
68
77
|
end
|
69
78
|
|
79
|
+
# TODO: DELETE ME when we drop support for 0.x releases of rubocop
|
80
|
+
#
|
81
|
+
# This method exists in RuboCop::Config now (or config in this class) so we
|
82
|
+
# should make use of that.
|
70
83
|
def target_ruby_version
|
71
84
|
@target ||= begin
|
72
85
|
target = config['AllCops'] && config['AllCops']['TargetRubyVersion']
|
data/lib/rubocop/git/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaki Takeuchi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -110,6 +110,16 @@ files:
|
|
110
110
|
- gemfiles/0.35.gemfile
|
111
111
|
- gemfiles/0.36.gemfile
|
112
112
|
- gemfiles/0.37.gemfile
|
113
|
+
- gemfiles/0.38.gemfile
|
114
|
+
- gemfiles/0.39.gemfile
|
115
|
+
- gemfiles/0.40.gemfile
|
116
|
+
- gemfiles/0.41.gemfile
|
117
|
+
- gemfiles/0.42.gemfile
|
118
|
+
- gemfiles/0.43.gemfile
|
119
|
+
- gemfiles/0.44.gemfile
|
120
|
+
- gemfiles/0.45.gemfile
|
121
|
+
- gemfiles/0.46.gemfile
|
122
|
+
- gemfiles/0.47.gemfile
|
113
123
|
- hound.yml
|
114
124
|
- lib/rubocop/git.rb
|
115
125
|
- lib/rubocop/git/cli.rb
|
@@ -151,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
161
|
version: '0'
|
152
162
|
requirements: []
|
153
163
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.
|
164
|
+
rubygems_version: 2.6.8
|
155
165
|
signing_key:
|
156
166
|
specification_version: 4
|
157
167
|
summary: RuboCop for git diff.
|