redmine_stagecoach 0.7.3 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/stagecoach +16 -14
- data/lib/stagecoach/capistrano.rb +2 -0
- data/lib/stagecoach/config.rb +6 -6
- data/lib/stagecoach/git.rb +6 -6
- data/redmine_stagecoach.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.5
|
data/bin/stagecoach
CHANGED
@@ -105,10 +105,10 @@ module Stagecoach
|
|
105
105
|
if opts[:github].nil? && opts[:redmine].nil?
|
106
106
|
print "Are you working on a [R]edmine or a [G]ithub issue: "
|
107
107
|
case STDIN.gets.chomp
|
108
|
-
when
|
108
|
+
when /r/i
|
109
109
|
print "Please enter your Redmine issue number: "
|
110
110
|
opts[:redmine] = gets.chomp
|
111
|
-
when
|
111
|
+
when /g/i
|
112
112
|
print "Please enter your Github issue number: "
|
113
113
|
opts[:github] = gets.chomp
|
114
114
|
end
|
@@ -126,7 +126,6 @@ module Stagecoach
|
|
126
126
|
end
|
127
127
|
|
128
128
|
if redmine_issue.status.id != 1
|
129
|
-
puts "Warning!".red
|
130
129
|
puts "This issue is in status '#{redmine_issue.status.name}'"
|
131
130
|
begin
|
132
131
|
puts "It is assigned to #{redmine_issue.assigned_to.name}"
|
@@ -135,8 +134,8 @@ module Stagecoach
|
|
135
134
|
end
|
136
135
|
print "Continue? [Y]es or [Q]uit: "
|
137
136
|
case STDIN.gets.chomp
|
138
|
-
when
|
139
|
-
when
|
137
|
+
when /Y/i
|
138
|
+
when /Q/i
|
140
139
|
exit
|
141
140
|
end
|
142
141
|
end
|
@@ -192,9 +191,9 @@ module Stagecoach
|
|
192
191
|
exit
|
193
192
|
end
|
194
193
|
case STDIN.gets.chomp
|
195
|
-
when
|
194
|
+
when /u/i
|
196
195
|
Git.change_to_branch(new_branch)
|
197
|
-
when
|
196
|
+
when /q/i
|
198
197
|
exit
|
199
198
|
end
|
200
199
|
else
|
@@ -272,9 +271,9 @@ module Stagecoach
|
|
272
271
|
print " or "
|
273
272
|
print "[anything else] to cancel: ".green
|
274
273
|
case STDIN.gets.chomp
|
275
|
-
when
|
274
|
+
when /p/i
|
276
275
|
CommandLine.line_break
|
277
|
-
puts "
|
276
|
+
puts "Pushing:"
|
278
277
|
CommandLine.line_break
|
279
278
|
else
|
280
279
|
puts "Exiting..."
|
@@ -283,8 +282,8 @@ module Stagecoach
|
|
283
282
|
end
|
284
283
|
|
285
284
|
case branch
|
286
|
-
when
|
287
|
-
puts "You can't use stagecoach to
|
285
|
+
when /master/i
|
286
|
+
puts "You can't use stagecoach to push your #{branch} branch.\nExiting..."
|
288
287
|
exit
|
289
288
|
end
|
290
289
|
|
@@ -309,8 +308,11 @@ module Stagecoach
|
|
309
308
|
from_branch = Git.current_branch
|
310
309
|
to_branch = opts[:deploy]
|
311
310
|
|
312
|
-
|
313
|
-
|
311
|
+
unless to_branch =~ /master/i
|
312
|
+
Git.merge(to_branch, from_branch)
|
313
|
+
Git.push(to_branch)
|
314
|
+
end
|
315
|
+
|
314
316
|
Capistrano.deploy(to_branch)
|
315
317
|
|
316
318
|
# Redmine issue to feedback status
|
@@ -318,7 +320,7 @@ module Stagecoach
|
|
318
320
|
CommandLine.line_break
|
319
321
|
puts "Would you like to change your Redmine ticket status to [F]eedback or [E]rledigt? Leave blank to do nothing: "
|
320
322
|
case STDIN.gets.chomp
|
321
|
-
when
|
323
|
+
when /f/i
|
322
324
|
puts "Attempting to change Redmine ticket status to 'Feedback' for you..."
|
323
325
|
issue = Redmine.issue(redmine_issue_number)
|
324
326
|
issue.status_id = 4
|
data/lib/stagecoach/config.rb
CHANGED
@@ -51,10 +51,10 @@ module Stagecoach
|
|
51
51
|
|
52
52
|
# Create a config file if necessary
|
53
53
|
case STDIN.gets.chomp
|
54
|
-
when
|
54
|
+
when /c/i
|
55
55
|
Config.check_if_outdated
|
56
56
|
Config.new unless File.exist?(CONFIG_FILE)
|
57
|
-
when
|
57
|
+
when /q/i
|
58
58
|
puts "Exiting..."
|
59
59
|
exit
|
60
60
|
end
|
@@ -98,7 +98,7 @@ module Stagecoach
|
|
98
98
|
print "[I]nstall or [S]kip this step: "
|
99
99
|
loop do
|
100
100
|
case STDIN.gets.chomp
|
101
|
-
when
|
101
|
+
when /i/i
|
102
102
|
if File.exist?(install_dir + git_hook)
|
103
103
|
case FileUtils.compare_file(source_dir + git_hook, install_dir + git_hook)
|
104
104
|
when true
|
@@ -106,9 +106,9 @@ module Stagecoach
|
|
106
106
|
break
|
107
107
|
when false
|
108
108
|
puts "You have a commit-msg githook already. Are you sure you want to install? This will #{'overwrite'.red} your current commit-msg githook."
|
109
|
-
print "
|
109
|
+
print "[O]K or anything else to skip installation: "
|
110
110
|
case STDIN.gets.chomp
|
111
|
-
when
|
111
|
+
when /o/i
|
112
112
|
Config.githook_install(source_dir, install_dir, git_hook)
|
113
113
|
break
|
114
114
|
else
|
@@ -120,7 +120,7 @@ module Stagecoach
|
|
120
120
|
Config.githook_install(source_dir, install_dir, git_hook)
|
121
121
|
break
|
122
122
|
end
|
123
|
-
when
|
123
|
+
when /s/i
|
124
124
|
puts 'Skipping Installation.'
|
125
125
|
break
|
126
126
|
end
|
data/lib/stagecoach/git.rb
CHANGED
@@ -19,7 +19,7 @@ module Stagecoach
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
CommandLine.line_break
|
22
|
-
puts "*".red + " = merged to master, can be deleted by stagecoach -t"
|
22
|
+
puts "*".red + " = merged to master, can be deleted by stagecoach -t" if deletable_branches.length > 0
|
23
23
|
CommandLine.line_break
|
24
24
|
deletable_branches
|
25
25
|
end
|
@@ -35,7 +35,7 @@ module Stagecoach
|
|
35
35
|
puts "All branches that have been merged into master will be deleted locally and remotely.".red
|
36
36
|
print "Continue? [Y]es or anything else to cancel: "
|
37
37
|
case STDIN.gets.chomp
|
38
|
-
when
|
38
|
+
when /y/i
|
39
39
|
erase(deletable_branches)
|
40
40
|
else
|
41
41
|
puts 'No branches deleted. Exiting...'
|
@@ -99,8 +99,8 @@ module Stagecoach
|
|
99
99
|
CommandLine.line_break
|
100
100
|
print "You are currently in local branch: #{Git.current_branch.red} \nAre these details correct? ([Y]es or [Q]uit): "
|
101
101
|
case STDIN.gets.chomp
|
102
|
-
when
|
103
|
-
when
|
102
|
+
when /y/i
|
103
|
+
when /q/i
|
104
104
|
exit
|
105
105
|
else
|
106
106
|
puts "Please enter Y to continue or Q to quit."
|
@@ -120,9 +120,9 @@ module Stagecoach
|
|
120
120
|
else
|
121
121
|
print "Branch '#{branch}' does not exist. [C]reate or [Q]uit: "
|
122
122
|
case STDIN.gets.chomp
|
123
|
-
when
|
123
|
+
when /c/i
|
124
124
|
new_branch(branch)
|
125
|
-
when
|
125
|
+
when /q/i
|
126
126
|
exit
|
127
127
|
end
|
128
128
|
end
|
data/redmine_stagecoach.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_stagecoach
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
segments:
|
170
170
|
- 0
|
171
|
-
hash: -
|
171
|
+
hash: -124324135115026598
|
172
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
173
|
none: false
|
174
174
|
requirements:
|