atlassian-stash 0.1.2 → 0.1.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.
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/stash +1 -1
- data/lib/atlassian/stash/pullrequest.rb +2 -2
- data/test/test_stash-create-pull-request.rb +16 -7
- metadata +53 -36
data/README.md
CHANGED
|
@@ -31,7 +31,7 @@ A: Do you have another command called `stash` or do you have an alias? Have a lo
|
|
|
31
31
|
Then check the value of your $PATH
|
|
32
32
|
|
|
33
33
|
## I want to contribute
|
|
34
|
-
Thanks! Please [fork this project](https://bitbucket.org/atlassian/
|
|
34
|
+
Thanks! Please [fork this project](https://bitbucket.org/atlassian/stash-command-line-tools/fork) and create a pull request to submit changes back to the original project.
|
|
35
35
|
|
|
36
36
|
### Build instructions
|
|
37
37
|
Building this gem is easy. To get started, run the following commands:
|
data/Rakefile
CHANGED
|
@@ -15,7 +15,7 @@ require 'jeweler'
|
|
|
15
15
|
Jeweler::Tasks.new do |gem|
|
|
16
16
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
|
17
17
|
gem.name = "atlassian-stash"
|
|
18
|
-
gem.homepage = "https://bitbucket.org/atlassian/
|
|
18
|
+
gem.homepage = "https://bitbucket.org/atlassian/stash-command-line-tools"
|
|
19
19
|
gem.license = "MIT"
|
|
20
20
|
gem.summary = "Command line tools for Atlassian Stash"
|
|
21
21
|
gem.description = "Provides convenient functions for interacting with Atlassian Stash through the command line"
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.3
|
data/bin/stash
CHANGED
|
@@ -87,7 +87,7 @@ end
|
|
|
87
87
|
default_command :help
|
|
88
88
|
program :help_formatter, :compact
|
|
89
89
|
program :help, 'Authors', 'Seb Ruiz <sruiz@atlassian.com> with others'
|
|
90
|
-
program :help, 'Website', 'https://bitbucket.org/atlassian/
|
|
90
|
+
program :help, 'Website', 'https://bitbucket.org/atlassian/stash-command-line-tools'
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
# vim set ft=ruby
|
|
@@ -48,8 +48,8 @@ module Atlassian
|
|
|
48
48
|
@config = config
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
def extract_repository_info
|
|
52
|
-
if m =
|
|
51
|
+
def extract_repository_info (url = get_remote_url)
|
|
52
|
+
if m = url.match(/\/([a-zA-Z][a-zA-Z0-9_]*)\/([[:alnum:]][\w\-\.]*).git$/)
|
|
53
53
|
return RepoInfo.new(m[1], m[2])
|
|
54
54
|
end
|
|
55
55
|
raise "Repository does not seem to be hosted in Stash"
|
|
@@ -6,16 +6,25 @@ include Atlassian::Stash::Git
|
|
|
6
6
|
class TestStashCreatePullRequest < Test::Unit::TestCase
|
|
7
7
|
|
|
8
8
|
should "extract project key and repo slug from Stash remote" do
|
|
9
|
-
|
|
9
|
+
remote = "https://sruiz@stash-dev.atlassian.com/scm/STASH/stash.git"
|
|
10
10
|
cpr = CreatePullRequest.new nil
|
|
11
|
-
ri = cpr.extract_repository_info
|
|
11
|
+
ri = cpr.extract_repository_info remote
|
|
12
12
|
assert_equal 'STASH', ri.projectKey
|
|
13
13
|
assert_equal 'stash', ri.slug
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
should "extracting project key and repo slug from non stash url raises exception" do
|
|
17
|
+
remote = "git@bitbucket.org:sebr/atlassian-stash-rubygem.git"
|
|
18
|
+
cpr = CreatePullRequest.new nil
|
|
19
|
+
assert_raise(RuntimeError) { cpr.extract_repository_info remote }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
should "repo with hyphes" do
|
|
24
|
+
remote = "https://sruiz@stash-dev.atlassian.com/scm/s745h/stash-repository.git"
|
|
25
|
+
cpr = CreatePullRequest.new nil
|
|
26
|
+
ri = cpr.extract_repository_info remote
|
|
27
|
+
assert_equal 's745h', ri.projectKey
|
|
28
|
+
assert_equal 'stash-repository', ri.slug
|
|
29
|
+
end
|
|
21
30
|
end
|
metadata
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: atlassian-stash
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
4
|
+
hash: 29
|
|
5
|
+
prerelease:
|
|
5
6
|
segments:
|
|
6
7
|
- 0
|
|
7
8
|
- 1
|
|
8
|
-
-
|
|
9
|
-
version: 0.1.
|
|
9
|
+
- 3
|
|
10
|
+
version: 0.1.3
|
|
10
11
|
platform: ruby
|
|
11
12
|
authors:
|
|
12
13
|
- Seb Ruiz
|
|
@@ -14,98 +15,111 @@ autorequire:
|
|
|
14
15
|
bindir: bin
|
|
15
16
|
cert_chain: []
|
|
16
17
|
|
|
17
|
-
date: 2012-10-
|
|
18
|
-
default_executable: stash
|
|
18
|
+
date: 2012-10-29 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
|
-
prerelease: false
|
|
22
21
|
type: :runtime
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
23
|
+
none: false
|
|
25
24
|
requirements:
|
|
26
25
|
- - ">="
|
|
27
26
|
- !ruby/object:Gem::Version
|
|
27
|
+
hash: 3
|
|
28
28
|
segments:
|
|
29
29
|
- 0
|
|
30
30
|
version: "0"
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
version_requirements: *id001
|
|
32
|
+
name: json
|
|
33
33
|
prerelease: false
|
|
34
|
+
- !ruby/object:Gem::Dependency
|
|
34
35
|
type: :runtime
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
37
|
+
none: false
|
|
37
38
|
requirements:
|
|
38
39
|
- - ">="
|
|
39
40
|
- !ruby/object:Gem::Version
|
|
41
|
+
hash: 3
|
|
40
42
|
segments:
|
|
41
43
|
- 0
|
|
42
44
|
version: "0"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
version_requirements: *id002
|
|
46
|
+
name: commander
|
|
45
47
|
prerelease: false
|
|
48
|
+
- !ruby/object:Gem::Dependency
|
|
46
49
|
type: :development
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
51
|
+
none: false
|
|
49
52
|
requirements:
|
|
50
53
|
- - ">="
|
|
51
54
|
- !ruby/object:Gem::Version
|
|
55
|
+
hash: 3
|
|
52
56
|
segments:
|
|
53
57
|
- 0
|
|
54
58
|
version: "0"
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
version_requirements: *id003
|
|
60
|
+
name: shoulda
|
|
57
61
|
prerelease: false
|
|
62
|
+
- !ruby/object:Gem::Dependency
|
|
58
63
|
type: :development
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
65
|
+
none: false
|
|
61
66
|
requirements:
|
|
62
67
|
- - ~>
|
|
63
68
|
- !ruby/object:Gem::Version
|
|
69
|
+
hash: 31
|
|
64
70
|
segments:
|
|
65
71
|
- 3
|
|
66
72
|
- 12
|
|
67
73
|
version: "3.12"
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
version_requirements: *id004
|
|
75
|
+
name: rdoc
|
|
70
76
|
prerelease: false
|
|
77
|
+
- !ruby/object:Gem::Dependency
|
|
71
78
|
type: :development
|
|
72
|
-
|
|
73
|
-
|
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
|
80
|
+
none: false
|
|
74
81
|
requirements:
|
|
75
82
|
- - ">="
|
|
76
83
|
- !ruby/object:Gem::Version
|
|
84
|
+
hash: 31
|
|
77
85
|
segments:
|
|
78
86
|
- 1
|
|
79
87
|
- 2
|
|
80
88
|
- 0
|
|
81
89
|
version: 1.2.0
|
|
82
|
-
|
|
83
|
-
|
|
90
|
+
version_requirements: *id005
|
|
91
|
+
name: bundler
|
|
84
92
|
prerelease: false
|
|
93
|
+
- !ruby/object:Gem::Dependency
|
|
85
94
|
type: :development
|
|
86
|
-
|
|
87
|
-
|
|
95
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
|
96
|
+
none: false
|
|
88
97
|
requirements:
|
|
89
98
|
- - ~>
|
|
90
99
|
- !ruby/object:Gem::Version
|
|
100
|
+
hash: 63
|
|
91
101
|
segments:
|
|
92
102
|
- 1
|
|
93
103
|
- 8
|
|
94
104
|
- 4
|
|
95
105
|
version: 1.8.4
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
version_requirements: *id006
|
|
107
|
+
name: jeweler
|
|
98
108
|
prerelease: false
|
|
109
|
+
- !ruby/object:Gem::Dependency
|
|
99
110
|
type: :development
|
|
100
|
-
|
|
101
|
-
|
|
111
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
|
112
|
+
none: false
|
|
102
113
|
requirements:
|
|
103
114
|
- - ">="
|
|
104
115
|
- !ruby/object:Gem::Version
|
|
116
|
+
hash: 3
|
|
105
117
|
segments:
|
|
106
118
|
- 0
|
|
107
119
|
version: "0"
|
|
108
|
-
|
|
120
|
+
version_requirements: *id007
|
|
121
|
+
name: rcov
|
|
122
|
+
prerelease: false
|
|
109
123
|
description: Provides convenient functions for interacting with Atlassian Stash through the command line
|
|
110
124
|
email: sruiz@atlassian.com
|
|
111
125
|
executables:
|
|
@@ -129,8 +143,7 @@ files:
|
|
|
129
143
|
- lib/stash_cli.rb
|
|
130
144
|
- test/helper.rb
|
|
131
145
|
- test/test_stash-create-pull-request.rb
|
|
132
|
-
|
|
133
|
-
homepage: https://bitbucket.org/atlassian/atlassian-stash-rubygem
|
|
146
|
+
homepage: https://bitbucket.org/atlassian/stash-command-line-tools
|
|
134
147
|
licenses:
|
|
135
148
|
- MIT
|
|
136
149
|
post_install_message:
|
|
@@ -139,23 +152,27 @@ rdoc_options: []
|
|
|
139
152
|
require_paths:
|
|
140
153
|
- lib
|
|
141
154
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
|
+
none: false
|
|
142
156
|
requirements:
|
|
143
157
|
- - ">="
|
|
144
158
|
- !ruby/object:Gem::Version
|
|
159
|
+
hash: 3
|
|
145
160
|
segments:
|
|
146
161
|
- 0
|
|
147
162
|
version: "0"
|
|
148
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
|
+
none: false
|
|
149
165
|
requirements:
|
|
150
166
|
- - ">="
|
|
151
167
|
- !ruby/object:Gem::Version
|
|
168
|
+
hash: 3
|
|
152
169
|
segments:
|
|
153
170
|
- 0
|
|
154
171
|
version: "0"
|
|
155
172
|
requirements: []
|
|
156
173
|
|
|
157
174
|
rubyforge_project:
|
|
158
|
-
rubygems_version: 1.
|
|
175
|
+
rubygems_version: 1.8.24
|
|
159
176
|
signing_key:
|
|
160
177
|
specification_version: 3
|
|
161
178
|
summary: Command line tools for Atlassian Stash
|