redmine_stagecoach 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.2
1
+ 0.6.3
data/bin/stagecoach CHANGED
@@ -18,6 +18,7 @@ module Stagecoach
18
18
 
19
19
  # Initial setup without -s flag.
20
20
  unless File.exist?(CONFIG_FILE)
21
+ puts "No .stagecoach file present, running initial setup."
21
22
  Config.setup
22
23
  end
23
24
 
@@ -79,7 +80,14 @@ module Stagecoach
79
80
  # Check that the redmine issue is not already assigned.
80
81
  if opts[:redmine]
81
82
  redmine_issue_number = opts[:redmine]
82
- redmine_issue = Redmine.issue(redmine_issue_number)
83
+ begin
84
+ puts "Searching for issue number #{redmine_issue_number}..."
85
+ redmine_issue = Redmine.issue(redmine_issue_number)
86
+ rescue ActiveResource::ResourceNotFound => e
87
+ puts e.message
88
+ exit
89
+ end
90
+
83
91
  if redmine_issue.status.id != '1'
84
92
  puts "Warning!".red
85
93
  puts "This issue is in status '#{redmine_issue.status.name}'"
@@ -166,17 +174,8 @@ module Stagecoach
166
174
  config[Git.current_branch] = {:redmine_issue => redmine_issue_number}
167
175
  end
168
176
 
169
- issue = config[Git.current_branch]
170
-
171
177
  # Set up the related issue for this branch.
172
- if redmine_issue = issue[:redmine_issue]
173
- begin
174
- puts "Searching for issue number #{redmine_issue}..."
175
- redmine_issue = Redmine.issue(redmine_issue)
176
- rescue ActiveResource::ResourceNotFound => e
177
- puts e.message
178
- exit
179
- end
178
+ if defined?(redmine_issue)
180
179
  puts "Issue found: #{redmine_issue.subject}\n"
181
180
 
182
181
  # Create a Github issue referencing the redmine issue.
@@ -188,7 +187,8 @@ module Stagecoach
188
187
  github_issue_id = github_issue[/\d+/]
189
188
 
190
189
  # Save it so we can reference it in commits using the magic of git hooks!
191
- config[Git.current_branch] = {:github_issue => github_issue_id, :redmine_issue => redmine_issue}
190
+ config[Git.current_branch] = {:github_issue => github_issue_id, :redmine_issue => redmine_issue_number}
191
+
192
192
 
193
193
  print "Would you like to edit the issue on Github? [Y]es or anything else to continue: "
194
194
 
@@ -199,7 +199,7 @@ module Stagecoach
199
199
  end
200
200
 
201
201
  # Github issues are easier.
202
- if issue[:github]
202
+ if config[Git.current_branch][:github]
203
203
  #TODO what happens if no github issue is found?
204
204
  puts "Searching for github issue number #{issue[:number]}..."
205
205
  github_issue = Git.issue(issue[:number])
@@ -1,3 +1,4 @@
1
+ require 'psych'
1
2
  require 'yaml'
2
3
  require 'FileUtils'
3
4
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "redmine_stagecoach"
8
- s.version = "0.6.2"
8
+ s.version = "0.6.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Oli Barnett"]
12
- s.date = "2012-02-06"
12
+ s.date = "2012-02-08"
13
13
  s.description = "Git/capistrano workflow automation script with Redmine & Github issue integration"
14
14
  s.email = "o.barnett@digitaleseiten.de"
15
15
  s.executables = ["stagecoach"]
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.6.2
4
+ version: 0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-06 00:00:00.000000000Z
12
+ date: 2012-02-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activeresource
16
- requirement: &70329089329460 !ruby/object:Gem::Requirement
16
+ requirement: &70198195705980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70329089329460
24
+ version_requirements: *70198195705980
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: ghi
27
- requirement: &70329089328980 !ruby/object:Gem::Requirement
27
+ requirement: &70198195705500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70329089328980
35
+ version_requirements: *70198195705500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: trollop
38
- requirement: &70329089328500 !ruby/object:Gem::Requirement
38
+ requirement: &70198195705020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70329089328500
46
+ version_requirements: *70198195705020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: capistrano
49
- requirement: &70329089328020 !ruby/object:Gem::Requirement
49
+ requirement: &70198195704540 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70329089328020
57
+ version_requirements: *70198195704540
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: shoulda
60
- requirement: &70329089327540 !ruby/object:Gem::Requirement
60
+ requirement: &70198195704060 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70329089327540
68
+ version_requirements: *70198195704060
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
- requirement: &70329089327060 !ruby/object:Gem::Requirement
71
+ requirement: &70198195703580 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.0.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70329089327060
79
+ version_requirements: *70198195703580
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: jeweler
82
- requirement: &70329089326580 !ruby/object:Gem::Requirement
82
+ requirement: &70198195703100 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: 1.6.4
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70329089326580
90
+ version_requirements: *70198195703100
91
91
  description: Git/capistrano workflow automation script with Redmine & Github issue
92
92
  integration
93
93
  email: o.barnett@digitaleseiten.de
@@ -133,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  segments:
135
135
  - 0
136
- hash: 4546930486911805785
136
+ hash: 3790526583547487543
137
137
  required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements: