redmine_stagecoach 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/stagecoach/config.rb +32 -0
- data/lib/stagecoach/git.rb +13 -2
- data/lib/stagecoach/redmine.rb +6 -1
- data/redmine_stagecoach.gemspec +1 -1
- metadata +18 -18
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
data/lib/stagecoach/config.rb
CHANGED
@@ -49,9 +49,41 @@ module Stagecoach
|
|
49
49
|
exit
|
50
50
|
end
|
51
51
|
|
52
|
+
# TODO Tell git to use a global config file if one is not used. Also if one
|
53
|
+
# is used and it is not .gitconfig, we need to save .stagecoach to that file somehow
|
54
|
+
unless Git.global_ignore_file
|
55
|
+
Git.global_ignore_file(".gitignore")
|
56
|
+
end
|
57
|
+
|
52
58
|
# Tell git to ignore the stagecoach config file
|
53
59
|
Git.global_ignore('.stagecoach')
|
54
60
|
|
61
|
+
# Set up global github username if it is not there
|
62
|
+
loop do
|
63
|
+
if Git.global_config(:github, :user) == ""
|
64
|
+
print "Please enter your github username: "
|
65
|
+
case STDIN.gets.chomp
|
66
|
+
when ""
|
67
|
+
print "Github user can't be blank, please try again:"
|
68
|
+
redo
|
69
|
+
else
|
70
|
+
Git.set_global_config(:github, :user, $_.chomp) # $_ means the last STDIN.
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
if Git.global_config(:github, :token) == ""
|
75
|
+
print "Please enter your Github api token (you can find this at http://github.com/account/admin): "
|
76
|
+
case STDIN.gets.chomp
|
77
|
+
when ""
|
78
|
+
print "Github API key can't be blank, please try again: "
|
79
|
+
redo
|
80
|
+
else
|
81
|
+
Git.set_global_config(:github, :token, $_.chomp)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
break
|
85
|
+
end
|
86
|
+
|
55
87
|
# Install the commit-msg githook if it is not already there:
|
56
88
|
source_dir = (File.dirname(__FILE__) + '/../githooks/')
|
57
89
|
install_dir = FileUtils.pwd + '/.git/hooks/'
|
data/lib/stagecoach/git.rb
CHANGED
@@ -5,14 +5,25 @@ module Stagecoach
|
|
5
5
|
`git branch`.split("\n")
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
9
|
-
|
8
|
+
def global_ignore_file(set = nil)
|
9
|
+
`git config --global core.excludesfile #{set}`
|
10
|
+
end
|
10
11
|
|
12
|
+
def global_ignore(filename)
|
11
13
|
# Check if filename is ignored already and ignores it if not
|
14
|
+
gitignore = Git.global_ignore_file.strip
|
12
15
|
unless File.read(gitignore) =~ /\.stagecoach/
|
13
16
|
gitignore.puts(filename)
|
14
17
|
end
|
15
18
|
end
|
19
|
+
|
20
|
+
def global_config(header, config)
|
21
|
+
`git config --global #{header}.#{config}`
|
22
|
+
end
|
23
|
+
|
24
|
+
def set_global_config(header, config, value)
|
25
|
+
`git config --global #{header}.#{config} #{value}`
|
26
|
+
end
|
16
27
|
|
17
28
|
def changes
|
18
29
|
`git diff-files --name-status -r --ignore-submodules`
|
data/lib/stagecoach/redmine.rb
CHANGED
@@ -13,7 +13,12 @@ module Stagecoach
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.issue_url(issue)
|
16
|
-
|
16
|
+
# originally this was:
|
17
|
+
#
|
18
|
+
# RedmineApi::Client.site + "/issues/" + issue.id
|
19
|
+
#
|
20
|
+
# but this caused URI merge errors on some setups.
|
21
|
+
"#{RedmineApi::Client.site}/issues/#{issue.id}"
|
17
22
|
end
|
18
23
|
|
19
24
|
# Open the issue in a browser.
|
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.5.
|
4
|
+
version: 0.5.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-26 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activeresource
|
16
|
-
requirement: &
|
16
|
+
requirement: &70101551536900 !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: *
|
24
|
+
version_requirements: *70101551536900
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: ghi
|
27
|
-
requirement: &
|
27
|
+
requirement: &70101551536420 !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: *
|
35
|
+
version_requirements: *70101551536420
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: trollop
|
38
|
-
requirement: &
|
38
|
+
requirement: &70101551535940 !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: *
|
46
|
+
version_requirements: *70101551535940
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: capistrano
|
49
|
-
requirement: &
|
49
|
+
requirement: &70101551535460 !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: *
|
57
|
+
version_requirements: *70101551535460
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: shoulda
|
60
|
-
requirement: &
|
60
|
+
requirement: &70101551534980 !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: *
|
68
|
+
version_requirements: *70101551534980
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
|
-
requirement: &
|
71
|
+
requirement: &70101551534500 !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: *
|
79
|
+
version_requirements: *70101551534500
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: jeweler
|
82
|
-
requirement: &
|
82
|
+
requirement: &70101551534020 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 1.6.4
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70101551534020
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rcov
|
93
|
-
requirement: &
|
93
|
+
requirement: &70101551533540 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70101551533540
|
102
102
|
description: Git/capistrano workflow automation script with Redmine & Github issue
|
103
103
|
integration
|
104
104
|
email: o.barnett@digitaleseiten.de
|
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
segments:
|
146
146
|
- 0
|
147
|
-
hash:
|
147
|
+
hash: 65861914571469357
|
148
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|