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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ec82f2efc923d30e422f2d07c0257ccce1b3634
4
- data.tar.gz: 2719c074d62e1e4dda1eaf6f00c761197ffb6ec0
3
+ metadata.gz: d803893053af72a3692f28ce2eabebbc91b96f29
4
+ data.tar.gz: 21afd988adf1d4b7bf2b484104c6a3c8bbaac21e
5
5
  SHA512:
6
- metadata.gz: cbeea4d13ec7b4c156a16dedb2a57dae566dc513e906cf7e5b273d17dd0609b9700eacdfdacfb93e2a1b086fbbfa1c9432741704fd52db3a7b9817a17922ff1a
7
- data.tar.gz: 6ddaaef39ebe79754031ef9f26770fb0f228319a0cf096c985e561d429c3077de40431f78ef3dbb8e432bf00958e0f70f28dd2a864e67009e690af4264dfa773
6
+ metadata.gz: d95f737032733f0f1d7d4a3262050f882e1ac831d740117e1f867f4ee252f2970c32623e4cb7b86cb886e78a5e6a1ea041fa58ae881a918f5a4231af5ebb60c6
7
+ data.tar.gz: 0646d78846d451737466632714e552990b2784039b0b91803d53367313f1501457ec36765e42bb96864a598f1bc4831233d6e1394c46137b704410d225671e4e
@@ -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: 'master', options: options.deep_clone).run
15
- pr_missing = DeadCodes.new(branch: 'refactoring', options: options.deep_clone).run
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 = { base_branch: 'master' }
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 branch_name', 'Specify base branch name. Default is "master"') do |base_branch|
35
- options[:base_branch] = base_branch
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 branch_name', 'Specify compare branch name.') do |compare_branch|
38
- options[:compare_branch] = compare_branch
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 FILE1,FILE2,ETC', Array, 'Exclude files or directories in comma-separated list.') do |list|
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!
@@ -1,3 +1,3 @@
1
1
  module Deathnote
2
- VERSION = "0.1.0"
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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-30 00:00:00.000000000 Z
11
+ date: 2018-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler