pivo_flow 0.2.2 → 0.2.3
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 +4 -0
- data/lib/pivo_flow/base.rb +2 -2
- data/lib/pivo_flow/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -39,6 +39,10 @@ Clear current story without notifying Pivotal
|
|
39
39
|
|
40
40
|
pf clear
|
41
41
|
|
42
|
+
## Git-hooks
|
43
|
+
|
44
|
+
This gem installs a `pepare-commit-msg` hook by adding a reference to `pf-prepare-commit-msg` file. In short: you shouldn't be worried about your own `prepare-commit-msg` hook, the one added by `pivo_flow` will be added in the last line of original hook file.
|
45
|
+
|
42
46
|
## Contributing
|
43
47
|
|
44
48
|
1. Fork it
|
data/lib/pivo_flow/base.rb
CHANGED
@@ -21,7 +21,7 @@ module PivoFlow
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def git_hook_needed?
|
24
|
-
!File.executable?(@git_hook_path) || !File.read(@git_hook_path).match(
|
24
|
+
!File.executable?(@git_hook_path) || !File.read(@git_hook_path).match(/#{@pf_git_hook_name} \$1/)
|
25
25
|
end
|
26
26
|
|
27
27
|
def install_git_hook
|
@@ -30,7 +30,7 @@ module PivoFlow
|
|
30
30
|
FileUtils.cp(hook_path, @pf_git_hook_path, preserve: true)
|
31
31
|
puts "File copied..."
|
32
32
|
unless File.exists?(@git_hook_path) && File.read(@git_hook_path).match(/#{@pf_git_hook_name} \$1/)
|
33
|
-
File.open(@git_hook_path, "a") { |f| f.puts("
|
33
|
+
File.open(@git_hook_path, "a") { |f| f.puts("#{@pf_git_hook_path} $1") }
|
34
34
|
puts "Reference to pf-prepare-commit-msg added to prepare-commit-msg..."
|
35
35
|
end
|
36
36
|
unless File.executable?(@git_hook_path)
|
data/lib/pivo_flow/version.rb
CHANGED