deathnote 0.1.0 → 0.1.1
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 +4 -4
- data/lib/deathnote.rb +8 -8
- data/lib/deathnote/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d803893053af72a3692f28ce2eabebbc91b96f29
|
|
4
|
+
data.tar.gz: 21afd988adf1d4b7bf2b484104c6a3c8bbaac21e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d95f737032733f0f1d7d4a3262050f882e1ac831d740117e1f867f4ee252f2970c32623e4cb7b86cb886e78a5e6a1ea041fa58ae881a918f5a4231af5ebb60c6
|
|
7
|
+
data.tar.gz: 0646d78846d451737466632714e552990b2784039b0b91803d53367313f1501457ec36765e42bb96864a598f1bc4831233d6e1394c46137b704410d225671e4e
|
data/lib/deathnote.rb
CHANGED
|
@@ -11,8 +11,8 @@ module Deathnote
|
|
|
11
11
|
options = parse_options(argv)
|
|
12
12
|
old_branch = Open3.popen3('git rev-parse --abbrev-ref HEAD') { |_i, o, _e, _t| o.read.chomp }
|
|
13
13
|
|
|
14
|
-
base_missing = DeadCodes.new(branch:
|
|
15
|
-
pr_missing = DeadCodes.new(branch:
|
|
14
|
+
base_missing = DeadCodes.new(branch: options[:base_commit], options: options.deep_clone).run
|
|
15
|
+
pr_missing = DeadCodes.new(branch: options[:compare_commit], options: options.deep_clone).run
|
|
16
16
|
Open3.popen3("git checkout #{old_branch}")
|
|
17
17
|
|
|
18
18
|
pr_missing.
|
|
@@ -23,7 +23,7 @@ module Deathnote
|
|
|
23
23
|
private
|
|
24
24
|
|
|
25
25
|
def parse_options(argv)
|
|
26
|
-
options = {
|
|
26
|
+
options = {}
|
|
27
27
|
OptionParser.new do |opts|
|
|
28
28
|
opts.banner = 'Usage: deathnote [options] files_or_dirs'
|
|
29
29
|
|
|
@@ -31,16 +31,16 @@ module Deathnote
|
|
|
31
31
|
puts opts
|
|
32
32
|
exit
|
|
33
33
|
end
|
|
34
|
-
opts.on('-b', '--base
|
|
35
|
-
options[:
|
|
34
|
+
opts.on('-b', '--base=[commit hash]', 'Specify base commit hash.') do |base_commit|
|
|
35
|
+
options[:base_commit] = base_commit
|
|
36
36
|
end
|
|
37
|
-
opts.on('-c', '--compare
|
|
38
|
-
options[:
|
|
37
|
+
opts.on('-c', '--compare[commit hash]', 'Specify compare commit hash.') do |compare_commit|
|
|
38
|
+
options[:compare_commit] = compare_commit
|
|
39
39
|
end
|
|
40
40
|
opts.on('-r', '--rails', 'Filter some rails call conversions.') do
|
|
41
41
|
options[:rails] = true
|
|
42
42
|
end
|
|
43
|
-
opts.on('-e', '--exclude
|
|
43
|
+
opts.on('-e', '--exclude=file1,file2,etc', Array, 'Exclude files or directories in comma-separated list.') do |list|
|
|
44
44
|
options[:exclude] = list
|
|
45
45
|
end
|
|
46
46
|
end.parse!
|
data/lib/deathnote/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deathnote
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shia
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-03
|
|
11
|
+
date: 2018-04-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|