checkstyle_filter-git 1.0.3 → 1.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: 5c01a6da32889fc4d193c58af2ff76bd4ab770cb
4
- data.tar.gz: 9e7d07d91e0281d73aa329babd4c6d6cc81ff622
3
+ metadata.gz: 47a296926850b9ab6fccb473569523ac095cd862
4
+ data.tar.gz: 9a4d2c09245f56bd73f8eb1fdca2fbca3a25dbc3
5
5
  SHA512:
6
- metadata.gz: efe31396318abf60c891cb723f6bacb59ba59dc2961fff3cbad76aada96f8d8393eaf286b35792aab0ec8509ff70f0b4e4a924ca7cc7053441b4c9328a834f58
7
- data.tar.gz: e62e133cda90726648719c3699bb5de7a174608c5f03be5ae6bff5f850f49ad5574f56a2de2e1ca6443c61f4c369fbcdcb7ec74f0b4ec6f017fb419cbd93d2ca
6
+ metadata.gz: 4a66aaea4c486bd2fe63250444ec0b4b3f16b8eee8d0e080491728567267a08e678a163f897de8a6fd09f3dcb2329fc0ed60c00850526d9d1b9e751fa8febb16
7
+ data.tar.gz: da24a6694bebb5d28cefc96ac610bf6af22cfba3616a08b9fcb8b2a6d96813f81f5560ce4d8f81f2af5c98f14ad350ae5c99671b83f7490c5efd9ef8d48b7d6a
data/.gitignore CHANGED
File without changes
File without changes
File without changes
File without changes
data/Gemfile CHANGED
File without changes
File without changes
data/README.md CHANGED
@@ -20,7 +20,8 @@
20
20
  <file name='/Users/sane/work/ruby-study/checkstyle_filter-git/lib/checkstyle_filter/git/cli.rb'>
21
21
  <error line='14' column='6' severity='info' message='Assignment Branch Condition size for diff is too high. [54.73/15]' source='com.puppycrawl.tools.checkstyle.Metrics/AbcSize'/>
22
22
  </file>
23
- <checkstyle>
23
+ </checkstyle>
24
+
24
25
  ```
25
26
 
26
27
  2. git diff
@@ -125,6 +126,7 @@ Or install it yourself as:
125
126
  $ checkstyle_filter-git
126
127
  Commands:
127
128
  checkstyle_filter-git diff # Filter using `git diff`
129
+ checkstyle_filter-git exec # Exec command `"git diff --no-color origin/master | iconv -f EUCJP -t UTF8"`
128
130
  checkstyle_filter-git help [COMMAND] # Describe available commands or one specific command
129
131
  checkstyle_filter-git version # Show the CheckstyleFilter/Git version
130
132
 
@@ -137,6 +139,12 @@ Options:
137
139
  [--file=FILE]
138
140
 
139
141
  Filter using `git diff`
142
+
143
+ $ checkstyle_filter-git help exec
144
+ Usage:
145
+ checkstyle_filter-git exec
146
+
147
+ Exec command `"git diff --no-color origin/master | iconv -f EUCJP -t UTF8"`
140
148
  ```
141
149
 
142
150
  ## Development
data/Rakefile CHANGED
File without changes
@@ -1,5 +1,14 @@
1
1
  # ChangeLog
2
2
 
3
+ <a name="1.1.0"></a>
4
+ # [1.1.0](https://github.com/packsaddle/ruby-checkstyle_filter-git/compare/v1.0.3...v1.1.0) (2016-06-25)
5
+
6
+
7
+ ### Features
8
+
9
+ * **command:** inmpement exec command([a11c3c7](https://github.com/packsaddle/ruby-checkstyle_filter-git/commit/a11c3c7f4daf1ddf26c0ab4f4ae9d8b1b78bda4b)), closes [#11](https://github.com/packsaddle/ruby-checkstyle_filter-git/pull/11)
10
+
11
+
3
12
  ## 1.0.3
4
13
 
5
14
  * Relax dependencies
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -29,6 +29,19 @@ module CheckstyleFilter
29
29
  puts ::CheckstyleFilter::Git::Filter.filter(data, git_diff)
30
30
  end
31
31
 
32
+ desc 'exec', 'Exec command `"git diff --no-color origin/master | iconv -f EUCJP -t UTF8"`'
33
+ def exec(command)
34
+ data = if !$stdin.tty?
35
+ ARGV.clear
36
+ ARGF.read
37
+ end
38
+
39
+ abort if !data || data.empty?
40
+
41
+ git_diff, _, _ = Open3.capture3(command)
42
+ puts ::CheckstyleFilter::Git::Filter.filter(data, git_diff)
43
+ end
44
+
32
45
  desc 'version', 'Show the CheckstyleFilter/Git version'
33
46
  map %w(-v --version) => :version
34
47
 
File without changes
@@ -1,5 +1,5 @@
1
1
  module CheckstyleFilter
2
2
  module Git
3
- VERSION = '1.0.3'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkstyle_filter-git
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-11 00:00:00.000000000 Z
11
+ date: 2016-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor