legit 0.0.8 → 0.0.9
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.
- data/README.md +1 -1
- data/lib/legit/version.rb +1 -1
- data/lib/legit.rb +1 -1
- data/lib/legit_helper.rb +1 -6
- metadata +2 -2
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[](https://travis-ci.org/dillonkearns/legit)
|
4
4
|
[](http://badge.fury.io/rb/legit)
|
5
5
|
[](https://gemnasium.com/dillonkearns/legit)
|
6
|
-
[](https://codeclimate.com/github/dillonkearns/legit)
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
```bash
|
data/lib/legit/version.rb
CHANGED
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
|
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
|
-
|
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.
|
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:
|
201
|
+
hash: -1036208191887355172
|
202
202
|
requirements: []
|
203
203
|
rubyforge_project:
|
204
204
|
rubygems_version: 1.8.23
|