rubocop-git 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95a1517031e3e4f7a255e11f6b3aa60cf0173af9
4
- data.tar.gz: f50c1fd2638d7514a642888080d8c9fb49ff106f
3
+ metadata.gz: fea0fc048051dc4134a08fb53beffc0cd1d56102
4
+ data.tar.gz: 2bea213792be9f28bdfbdaf602fb6e53f2a79280
5
5
  SHA512:
6
- metadata.gz: 301ea08e20d5921bfc482af24f354aa5a62d24126a7fc4befcc59194b4f89c5e80ab27a7b4f99825570d0fc77a0cd603417eab614c762dbb45eddc73ed770d42
7
- data.tar.gz: f0afdf529d69b4f977bde6f85f36f1d7ec3e26838d028b5dbe892073cc30909d14b9e9c4adc59cca77f2d384e49832c343a32af32be0f7a8de3017f4b19d5ef0
6
+ metadata.gz: ca915131ae38037b4cb99f74d71e2984f7d1291816c5408328917fae916fe768c7f583df3e7fb96978d2f75088eba10a1d4c110a89f8dc73cdb381510d5b92d5
7
+ data.tar.gz: ffc46d4d0d07b21ff7899a77ab823a8dd687fa0f6cdc4602367b295d28cd7e1c1e3268b865a519d9d949886b62d9cfbbdcd19e315e9b35a8599dd1a387848732
@@ -60,11 +60,11 @@ module RuboCop
60
60
  end
61
61
 
62
62
  def commit_first
63
- @commits.length == 1 ? @commits.first + '^' : @commits.first
63
+ @commits.first
64
64
  end
65
65
 
66
66
  def commit_last
67
- @commits.last
67
+ @commits.length == 1 ? false : @commits.last
68
68
  end
69
69
 
70
70
  private
@@ -35,12 +35,9 @@ module RuboCop
35
35
  def git_diff(options)
36
36
  args = %w(diff --diff-filter=AMCR --find-renames --find-copies)
37
37
 
38
- if options.cached
39
- args << '--cached'
40
- elsif options.commit_last
41
- args << options.commit_first.shellescape
42
- args << options.commit_last.shellescape
43
- end
38
+ args << '--cached' if options.cached
39
+ args << options.commit_first.shellescape if options.commit_first
40
+ args << options.commit_last.shellescape if options.commit_last
44
41
 
45
42
  `git #{args.join(' ')}`
46
43
  end
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module Git
3
- VERSION = '0.0.6'
3
+ VERSION = '0.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-git
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaki Takeuchi