rubocop-git 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d36f12a8d0468f329ba0584e8949e751a516eaca
4
- data.tar.gz: 4eb070a9571b58d441ae12de21e8280d7f7fedda
3
+ metadata.gz: 479c6ef78fb6e1288498d2473e929433d265dd04
4
+ data.tar.gz: aadfa88a049cea5f27045e10ab80836aa4495672
5
5
  SHA512:
6
- metadata.gz: 68c48199df217edde2b30db32271dc74d562c8510447b342da1c7abd2dc652ef7b7bba962098c16f9f34d448d724b90cbc242aab388de9cb47b0982b89122d58
7
- data.tar.gz: 7c28d9a045527ad8fc3df5fd3ee10b03fa701e9c2a36cc11468dd95072680a654fd6f13d59631cae842a542cf655537879cad1c89afd5ee44ae7e7a425e0d921
6
+ metadata.gz: b8d5005cbaf72bdd986a52b390c08ce06859559df3ef4994d1904ced7e30083811e2b03f005c8cca40add0c037b0d53f8479463039a821fb9245da08f7548c9d
7
+ data.tar.gz: 53511c3b165a67c63631f7d76fb0d8a90eb6396293a8ae0183cd02ea401346c87a3bb4a3d605ce0163ec1eb6a9f35a8a2304448730bb99cb01c2ac092ed833e7
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.0
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
- before_install: gem install bundler -v 1.11.2
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
@@ -13,6 +13,16 @@
13
13
  0.35.1
14
14
  0.36.0
15
15
  0.37.2
16
+ 0.38.0
17
+ 0.39.0
18
+ 0.40.0
19
+ 0.41.2
20
+ 0.42.0
21
+ 0.43.0
22
+ 0.44.1
23
+ 0.45.0
24
+ 0.46.0
25
+ 0.47.1
16
26
  ).each do |version|
17
27
  appraise version[/\d+\.\d+/] do
18
28
  gem 'rubocop', version
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.38.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.39.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.40.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.41.2"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.42.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.43.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.44.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.45.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.46.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.47.1"
6
+
7
+ gemspec :path => "../"
@@ -12,14 +12,19 @@ class StyleGuide
12
12
  []
13
13
  else
14
14
  parsed_source = parse_source(file)
15
- cops = RuboCop::Cop::Cop.all
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
- if Gem::Version.new(RuboCop::Version::STRING) < Gem::Version.new('0.36.0')
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
- else
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']
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module Git
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
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.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: 2016-02-14 00:00:00.000000000 Z
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.5.1
164
+ rubygems_version: 2.6.8
155
165
  signing_key:
156
166
  specification_version: 4
157
167
  summary: RuboCop for git diff.