nexocop 0.0.3 → 0.0.4

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
- SHA1:
3
- metadata.gz: 5685eb9737cf0311a1ea24d35f734b39dc52fb86
4
- data.tar.gz: 8beb4caf62947bc69b3b09c6003004f33c926001
2
+ SHA256:
3
+ metadata.gz: ac20ecaba05e8f7b2cf27ceee34298b5a2290e5ba69f157d51fcabe655893fd6
4
+ data.tar.gz: b745584f605b429373caeb19e273b2d629231d02399cb10c397d9299803761a0
5
5
  SHA512:
6
- metadata.gz: 573ddaa72b7e9c5f89059d8796557899053b4b9f638968a2fc81f7517445d94a5e53a04962968fb95019aae4f112b245d71a8d3fa4d5bc9aaa20f7da35a2c1b5
7
- data.tar.gz: ffae3165275d03faa284bb0d429e64c263dafdfef74e9a89f557219124e6c7b39b332bee130a7cc20bb5837dfa073f62744ef36f8aff437c7b2cc51935f98044
6
+ metadata.gz: 9f487669380f56168ceaf3b30938e291aec5244c7df0409f9d4191efbb58c84fc199f3dfaaf04b4d1f65e91323473c1d9ef412eb8fe2ed4db4b66859e77fb533
7
+ data.tar.gz: 5191e8d2bc569205df31511f56a60a5c69cc8f0b16e445e7078423d2ccf731f77b6c3f12d9b76fb478dd5da7c424559233f9e3e4c9cff0696dc1c2ae7af84a72
@@ -31,6 +31,15 @@ module Nexocop
31
31
  lines
32
32
  end
33
33
 
34
+ #
35
+ # Get an array of filenames that have changed. Path is relative to the git root
36
+ #
37
+ def self.changed_files
38
+ Sh.run_command('git diff --diff-filter=AM origin/master --name-only')
39
+ .stdout
40
+ .split("\n")
41
+ end
42
+
34
43
  def self.filename?(line)
35
44
  line.start_with?('+++ b/')
36
45
  end
@@ -26,6 +26,10 @@ module Nexocop
26
26
  rubocop_args.push(%w[--format json -o].push(default_json_file)).flatten!
27
27
  end
28
28
 
29
+ # Filter files that haven't changed at all so rubocop doesn't waste time
30
+ # checking them when we are going to throw them away anyway
31
+ rubocop_args.concat(Git::changed_files)
32
+
29
33
  OpenStruct.new(
30
34
  json_outfile: json_outfile,
31
35
  rubocop_args: rubocop_args
@@ -2,10 +2,10 @@
2
2
 
3
3
  module Nexocop
4
4
  def self.version
5
- '0.0.3'
5
+ '0.0.4'
6
6
  end
7
7
 
8
8
  def self.date
9
- '2018-10-29'
9
+ '2019-02-06'
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Porter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-29 00:00:00.000000000 Z
11
+ date: 2019-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.5.2.3
119
+ rubygems_version: 2.7.6
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Easy rubocop wrapping for git diffs