legit 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Build Status](https://travis-ci.org/dillonkearns/legit.png)](https://travis-ci.org/dillonkearns/legit)
4
4
  [![Gem Version](https://fury-badge.herokuapp.com/rb/legit.png)](http://badge.fury.io/rb/legit)
5
5
  [![Dependency Status](https://gemnasium.com/dillonkearns/legit.png)](https://gemnasium.com/dillonkearns/legit)
6
- [![Code Climate](https://codeclimate.com/github/dillonkearns/dotfile-linker.png)](https://codeclimate.com/github/dillonkearns/dotfile-linker)
6
+ [![Code Climate](https://codeclimate.com/github/dillonkearns/legit.png)](https://codeclimate.com/github/dillonkearns/legit)
7
7
 
8
8
  ## Installation
9
9
  ```bash
data/lib/legit/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Legit
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/lib/legit.rb CHANGED
@@ -54,7 +54,7 @@ module Legit
54
54
  def run_catch_todos(todo_format)
55
55
  if todos_staged?(todo_format)
56
56
  if options[:warn]
57
- exit 1 unless positive_response?("[pre-commit hook] Found staged `#{todo_format}`s. Do you still want to continue?", :warning)
57
+ exit 1 unless yes?("[pre-commit hook] Found staged `#{todo_format}`s. Do you still want to continue?", :yellow)
58
58
  else
59
59
  show("[pre-commit hook] Aborting commit... found staged `#{todo_format}`s.", :warning)
60
60
  exit 1
data/lib/legit_helper.rb CHANGED
@@ -57,15 +57,10 @@ def show(message, type = :success)
57
57
  raise 'Unknown prompt type'
58
58
  end
59
59
 
60
- show(message, color)
60
+ say(message, color)
61
61
  end
62
62
 
63
63
  def todos_staged?(todo_format)
64
64
  run_command("git diff --staged | grep '^+' | grep #{todo_format}")
65
65
  $?.success? # grep returns 0 if there is a match
66
66
  end
67
-
68
- def positive_response?(message, type = :normal)
69
- show("#{message} (y/n)", type)
70
- STDIN.gets.chomp =~ /y/
71
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  version: '0'
199
199
  segments:
200
200
  - 0
201
- hash: 1919928434083848105
201
+ hash: -1036208191887355172
202
202
  requirements: []
203
203
  rubyforge_project:
204
204
  rubygems_version: 1.8.23