rubocopter 0.0.8 → 0.0.10

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: 524740ea880bd1e4127e273f2b0fc322b961b04f
4
- data.tar.gz: a371767e8bd3c0e31d8f36a8bb646ebb086f5839
3
+ metadata.gz: d389ad55ac88f097d06e82294ec6e668d05bd20d
4
+ data.tar.gz: a3a157cc49c7edcadcd86abc4fcf9c1a041cabc3
5
5
  SHA512:
6
- metadata.gz: b60bd8f40a7afd81f206954d41fb40473136c6cd67eb2c5594f231f43a886fa4f88072bc1216a8e89ce0bccfd653f1fe80953f246ceca6e23a2aeee432c093c1
7
- data.tar.gz: 83bbfe51c05ea1ce5af4b7248bef312d3ad54a3c18cdc471259d348b272280e1137cfdd1c07588007c459e2ed506ed96882cae8a2327564d5806466667c024b9
6
+ metadata.gz: e9dd5171972debabbf28376ac45e7603fa2f643219d71d7108f3813899fdb965c9e7907f5aeb8797beed8ed1fe50cab2e90171e24b406aacc8f487dfc008de79
7
+ data.tar.gz: eb58d30c831d4c9fcd138bf2f5f40845d82be3f2ce85d0a42cba42091cfa7e323c99cce70a78d163e9144cdddc1f0a52875141540a3f22f03b21ce0bc0a20263
@@ -2,6 +2,7 @@ require 'optparse'
2
2
  require 'shellwords'
3
3
  require 'rubocop'
4
4
  require 'pathname'
5
+ require_relative 'version'
5
6
 
6
7
  RuboCopter::Options = Struct.new(:hash, :debug)
7
8
 
@@ -84,7 +85,7 @@ class RuboCopter::CLI
84
85
  @options = RuboCopter::Options.new('master', false)
85
86
 
86
87
  opt_parser = OptionParser.new do |opts|
87
- opts.banner = "Usage: rubocopter [options]"
88
+ opts.banner = "Rubocopter v:#{RuboCopter::VERSION}\nUsage: rubocopter [options]"
88
89
 
89
90
  opts.on('-c HASH', '--commit HASH', 'git hash to compare against') do |hash|
90
91
  @options.hash = hash
@@ -112,15 +113,15 @@ class RuboCopter::CLI
112
113
  end
113
114
 
114
115
  def install_git_hooks(hook)
115
- working_dir_git_hooks = Pathname.new(Dir.pwd).join('.git', 'hooks')
116
+ working_dir_git_hooks = Pathname.new(Dir.pwd).join('.git', 'hooks').to_s
116
117
  current_path = Pathname.new(File.dirname(__FILE__))
117
118
  if hook == 'commit'
118
- system(Shellwords.join(['cp', current_path.join('../../git_hooks', 'pre-commit'), working_dir_git_hooks]))
119
+ system(Shellwords.join(['cp', current_path.join('../../git_hooks', 'pre-commit').to_s, working_dir_git_hooks]))
119
120
  elsif hook == 'push'
120
- system(Shellwords.join(['cp', current_path.join('../../git_hooks', 'pre-push'), working_dir_git_hooks]))
121
+ system(Shellwords.join(['cp', current_path.join('../../git_hooks', 'pre-push').to_s, working_dir_git_hooks]))
121
122
  elsif hook == 'all'
122
- system(Shellwords.join(['cp', current_path.join('../../git_hooks', 'pre-commit'), working_dir_git_hooks]))
123
- system(Shellwords.join(['cp', current_path.join('../../git_hooks', 'pre-push'), working_dir_git_hooks]))
123
+ system(Shellwords.join(['cp', current_path.join('../../git_hooks', 'pre-commit').to_s, working_dir_git_hooks]))
124
+ system(Shellwords.join(['cp', current_path.join('../../git_hooks', 'pre-push').to_s, working_dir_git_hooks]))
124
125
  end
125
126
  exit(0)
126
127
  end
@@ -128,12 +129,12 @@ class RuboCopter::CLI
128
129
  def remove_git_hooks(hook)
129
130
  working_dir_git_hooks = Pathname.new(Dir.pwd).join('.git', 'hooks')
130
131
  if hook == 'commit'
131
- system(Shellwords.join(['rm', working_dir_git_hooks.join('pre-commit')]))
132
+ system(Shellwords.join(['rm', working_dir_git_hooks.join('pre-commit').to_s]))
132
133
  elsif hook == 'push'
133
- system(Shellwords.join(['rm', working_dir_git_hooks.join('pre-push')]))
134
+ system(Shellwords.join(['rm', working_dir_git_hooks.join('pre-push').to_s]))
134
135
  elsif hook == 'all'
135
- system(Shellwords.join(['rm', working_dir_git_hooks.join('pre-commit')]))
136
- system(Shellwords.join(['rm', working_dir_git_hooks.join('pre-push')]))
136
+ system(Shellwords.join(['rm', working_dir_git_hooks.join('pre-commit').to_s]))
137
+ system(Shellwords.join(['rm', working_dir_git_hooks.join('pre-push').to_s]))
137
138
  end
138
139
  exit(0)
139
140
  end
@@ -1,3 +1,3 @@
1
1
  module RuboCopter
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocopter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Basset