socialcast-git-extensions 2.3.4 → 2.3.5
Sign up to get free protection for your applications and to get access to all the features.
data/bin/git-reviewrequest
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
# git reviewrequest
|
6
6
|
|
7
7
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extensions.rb')
|
8
|
+
require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extensions', 'string_ext.rb')
|
8
9
|
include Socialcast::Git
|
9
10
|
include Socialcast::Github
|
10
11
|
|
@@ -24,17 +25,30 @@ if index = (ARGV.index('-d') || ARGV.index('--description'))
|
|
24
25
|
else
|
25
26
|
require 'tempfile'
|
26
27
|
Tempfile.open('reviewrequest.md') do |f|
|
27
|
-
|
28
|
+
helper_tip = <<-EOS.dedent
|
29
|
+
# Describe your pull request
|
30
|
+
# Use GitHub flavored Markdown http://github.github.com/github-flavored-markdown/
|
31
|
+
# Why not include a screenshot? Format is ![title](url)
|
32
|
+
EOS
|
33
|
+
f << "\n\n#{helper_tip}"
|
28
34
|
f.flush
|
29
35
|
|
30
36
|
editor = ENV['EDITOR'] || 'vi'
|
31
|
-
|
32
|
-
|
37
|
+
flags = case editor
|
38
|
+
when 'mate', 'emacs'
|
39
|
+
'-w'
|
40
|
+
when 'mvim'
|
41
|
+
'-f'
|
42
|
+
else
|
43
|
+
''
|
44
|
+
end
|
45
|
+
pid = fork { exec "#{editor} #{flags} #{f.path}" }
|
33
46
|
Process.waitpid(pid)
|
34
47
|
description = File.read(f.path)
|
35
|
-
description.gsub
|
48
|
+
description = description.gsub(/^\#.*/, '').chomp.strip
|
36
49
|
end
|
37
50
|
end
|
51
|
+
|
38
52
|
short_description = description.split("\n").first(5).join("\n")
|
39
53
|
stats = `git diff --stat master...#{branch}`
|
40
54
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialcast-git-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 2.3.
|
9
|
+
- 5
|
10
|
+
version: 2.3.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- lib/socialcast-git-extensions.rb
|
182
182
|
- lib/socialcast-git-extensions/git.rb
|
183
183
|
- lib/socialcast-git-extensions/github.rb
|
184
|
+
- lib/socialcast-git-extensions/string_ext.rb
|
184
185
|
- lib/socialcast-git-extensions/version.rb
|
185
186
|
- socialcast-git-extensions.gemspec
|
186
187
|
- test/helper.rb
|