redgit 0.0.2 → 0.0.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.
- checksums.yaml +4 -4
- data/bin/redgit +13 -10
- data/lib/redgit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3fac1729113ce6667eeb7cf381e004ad3c5f721d
|
|
4
|
+
data.tar.gz: 465e211e5284614b6d51a9f5ed52111d19882b39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e8c954229b51d43672042083b98c9e54cb8bebce59fce6ea4551ca2d7ecfb2bc5c86977144fa345036227e026aaee9c7a046b7e234c313b87ff2beb945bd83e
|
|
7
|
+
data.tar.gz: da5f359fa4c41e7e3be124e835b1a08b0bf7d28cfdbded1c7a1ed0bafa70e8e254e733cd2386365b48459c2b47f71f6d3c07a8b51dfadd47accb64f202ec71c7
|
data/bin/redgit
CHANGED
|
@@ -17,7 +17,6 @@ def die text
|
|
|
17
17
|
exit 1
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
|
|
21
20
|
class IssueManager
|
|
22
21
|
|
|
23
22
|
INPROGRESS=[1, 2, 3]
|
|
@@ -26,13 +25,11 @@ class IssueManager
|
|
|
26
25
|
|
|
27
26
|
def initialize
|
|
28
27
|
@host=`git config redmine.host`.strip
|
|
29
|
-
@host=(@host.empty?) ? 'http://redmine.pro' : @host
|
|
30
|
-
|
|
31
28
|
@project=`git config redmine.project`.strip
|
|
32
29
|
@apikey=`git config redmine.key`.strip
|
|
33
30
|
|
|
34
|
-
if @project.empty? or @apikey.empty?
|
|
35
|
-
puts "Используйте: #{$0} setup <project> <api-key>
|
|
31
|
+
if @project.empty? or @apikey.empty? or @host.empty?
|
|
32
|
+
puts "Используйте: #{$0} setup <project> <api-key> <host>"
|
|
36
33
|
die "Не задан проект или API-ключ."
|
|
37
34
|
end
|
|
38
35
|
|
|
@@ -154,7 +151,7 @@ def commit_msg
|
|
|
154
151
|
|
|
155
152
|
puts red("В сообщении не указан номер задачи в виде refs #XXX или fixes #XXX")
|
|
156
153
|
|
|
157
|
-
STDIN.reopen('/dev/tty')
|
|
154
|
+
#STDIN.reopen('/dev/tty')
|
|
158
155
|
|
|
159
156
|
im = IssueManager.new
|
|
160
157
|
|
|
@@ -167,7 +164,7 @@ def commit_msg
|
|
|
167
164
|
|
|
168
165
|
File.write(message_file, message)
|
|
169
166
|
|
|
170
|
-
STDIN.close
|
|
167
|
+
#STDIN.close
|
|
171
168
|
|
|
172
169
|
exit 0
|
|
173
170
|
else
|
|
@@ -188,19 +185,25 @@ if ARGV[0] == "setup"
|
|
|
188
185
|
root = git_root
|
|
189
186
|
|
|
190
187
|
if ARGV[1].to_s.empty? or ARGV[2].to_s.empty?
|
|
191
|
-
puts "Используйте: #{$0} setup <project> <api-key>
|
|
188
|
+
puts "Используйте: #{$0} setup <project> <api-key> <host>"
|
|
192
189
|
die "Не задан проект или API-ключ."
|
|
193
190
|
end
|
|
194
191
|
|
|
195
192
|
`mkdir #{root}/.git/hooks &> /dev/null`
|
|
196
|
-
|
|
197
|
-
|
|
193
|
+
|
|
194
|
+
File.open("#{root}/.git/hooks/commit-msg", "w+") do |f|
|
|
195
|
+
f.puts "#!/bin/bash"
|
|
196
|
+
f.puts "exec redgit $@ < /dev/tty"
|
|
197
|
+
end
|
|
198
|
+
|
|
198
199
|
`chmod 777 #{root}/.git/hooks/commit-msg`
|
|
199
200
|
die '' if $? != 0
|
|
200
201
|
|
|
201
202
|
`git config redmine.project #{ARGV[1]}`
|
|
202
203
|
`git config redmine.key #{ARGV[2]}`
|
|
203
204
|
`git config redmine.host #{ARGV[3]}` if !ARGV[3].to_s.empty?
|
|
205
|
+
|
|
206
|
+
puts "Setup completed successfuly"
|
|
204
207
|
exit 1
|
|
205
208
|
elsif ARGV[0] == "issues"
|
|
206
209
|
root = git_root
|
data/lib/redgit/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: redgit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samoilenko Yuri
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-08-
|
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|