jirarest2 0.0.12 → 0.0.13
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.tar.gz.sig +0 -0
- data/History.txt +18 -0
- data/Manifest.txt +6 -0
- data/bin/jira_create_issue +5 -5
- data/lib/jirarest2.rb +3 -1
- data/lib/jirarest2/connect.rb +12 -3
- data/lib/jirarest2/cookie_credentials.rb +4 -1
- data/lib/jirarest2/credentials.rb +4 -1
- data/lib/jirarest2/exceptions.rb +5 -0
- data/lib/jirarest2/field.rb +645 -0
- data/lib/jirarest2/issue.rb +7 -0
- data/lib/jirarest2/issuetype.rb +256 -0
- data/lib/jirarest2/madbitconfig.rb +3 -1
- data/lib/jirarest2/newissue.rb +30 -162
- data/lib/jirarest2/result.rb +1 -8
- data/lib/jirarest2/services.rb +1 -1
- data/lib/jirarest2/services/comment.rb +1 -0
- data/lib/jirarest2/services/issuelink.rb +1 -0
- data/lib/jirarest2bin.rb +2 -2
- data/test/data/createmeta +1 -0
- data/test/test_fieldcreatemeta.rb +820 -0
- data/test/test_fields.rb +395 -0
- data/test/test_issue.rb +4 -3
- data/test/test_issuetype.rb +74 -0
- data/test/test_newissue.rb +3 -4
- metadata +30 -46
- metadata.gz.sig +0 -0
data/test/test_newissue.rb
CHANGED
@@ -16,14 +16,14 @@ class TestNewIssue < MiniTest::Unit::TestCase
|
|
16
16
|
def testNonExistentProject
|
17
17
|
stub_request(:get, "http://test:1234@localhost:2990/jira/rest/api/2/issue/createmeta/?expand=projects.issuetypes.fields&issuetypeNames=fasel&projectKeys=blubber").with(:headers => {'Accept'=>'*/*', 'Content-Type'=>'application/json;charset=UTF-8', 'User-Agent'=>'Ruby'}).to_return(:status => 200, :body => '{"expand":"projects","projects":[]}', :headers => {})
|
18
18
|
assert_raises(Jirarest2::WrongProjectException) {
|
19
|
-
|
19
|
+
NewIssue.new("blubber","fasel",@connect)
|
20
20
|
}
|
21
21
|
end
|
22
22
|
|
23
23
|
def testNonExistentIssuetype
|
24
24
|
stub_request(:get, "http://test:1234@localhost:2990/jira/rest/api/2/issue/createmeta/?expand=projects.issuetypes.fields&issuetypeNames=fasel&projectKeys=MFTP").with(:headers => {'Accept'=>'*/*', 'Content-Type'=>'application/json;charset=UTF-8', 'User-Agent'=>'Ruby'}).to_return(:status => 200, :body => '{"expand":"projects","projects":[{"expand":"issuetypes","self":"http://localhost:2990/jira/rest/api/2/project/MFTP","id":"10000","key":"MFTP","name":"My first Test Project","avatarUrls":{"16x16":"http://localhost:2990/jira/secure/projectavatar?size=small&pid=10000&avatarId=10011","48x48":"http://localhost:2990/jira/secure/projectavatar?pid=10000&avatarId=10011"},"issuetypes":[]}]}', :headers => {})
|
25
25
|
assert_raises(Jirarest2::WrongIssuetypeException) {
|
26
|
-
|
26
|
+
NewIssue.new("MFTP","fasel",@connect)
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
@@ -50,7 +50,6 @@ class TestNewIssue < MiniTest::Unit::TestCase
|
|
50
50
|
issue.set_field("List select","Räuber")
|
51
51
|
issue.set_field("Multi Select",["Glocke","Kabale und Liebe"])
|
52
52
|
blankissue = issue.jirahash
|
53
|
-
assert blankissue
|
54
53
|
assert_equal "MFTP", blankissue["fields"]["project"]["key"]
|
55
54
|
assert_equal "Summary Text", issue.get_field("Summary")
|
56
55
|
end
|
@@ -60,7 +59,7 @@ class TestNewIssue < MiniTest::Unit::TestCase
|
|
60
59
|
issue = @existentIssue
|
61
60
|
issue.set_field("Summary","Summary Text")
|
62
61
|
issue.set_field("Priority","Trivial")
|
63
|
-
stub_request(:post, "http://test:1234@localhost:2990/jira/rest/api/2/issue/").with(:body => "{\"fields\":{\"
|
62
|
+
stub_request(:post, "http://test:1234@localhost:2990/jira/rest/api/2/issue/").with(:body => "{\"fields\":{\"summary\":\"Summary Text\",\"issuetype\":{\"name\":\"My issue type\"},\"project\":{\"key\":\"MFTP\"},\"priority\":{\"name\":\"Trivial\"}}}",:headers => {'Accept'=>'*/*', 'Content-Type'=>'application/json;charset=UTF-8', 'User-Agent'=>'Ruby'}).to_return(:status => 201, :body => '{"id":"10608","key":"MFTP-11","self":"http://localhost:2990/jira/rest/api/2/issue/10608"}', :headers => {})
|
64
63
|
|
65
64
|
issue.persist(@connect)
|
66
65
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jirarest2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -50,11 +50,11 @@ cert_chain:
|
|
50
50
|
-----END CERTIFICATE-----
|
51
51
|
|
52
52
|
'
|
53
|
-
date: 2012-
|
53
|
+
date: 2012-09-18 00:00:00.000000000 Z
|
54
54
|
dependencies:
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: json
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirement: &19241320 !ruby/object:Gem::Requirement
|
58
58
|
none: false
|
59
59
|
requirements:
|
60
60
|
- - ! '>='
|
@@ -62,15 +62,10 @@ dependencies:
|
|
62
62
|
version: 1.6.0
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
|
-
version_requirements:
|
66
|
-
none: false
|
67
|
-
requirements:
|
68
|
-
- - ! '>='
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: 1.6.0
|
65
|
+
version_requirements: *19241320
|
71
66
|
- !ruby/object:Gem::Dependency
|
72
67
|
name: highline
|
73
|
-
requirement: !ruby/object:Gem::Requirement
|
68
|
+
requirement: &19240760 !ruby/object:Gem::Requirement
|
74
69
|
none: false
|
75
70
|
requirements:
|
76
71
|
- - ! '>='
|
@@ -78,15 +73,10 @@ dependencies:
|
|
78
73
|
version: 1.1.0
|
79
74
|
type: :runtime
|
80
75
|
prerelease: false
|
81
|
-
version_requirements:
|
82
|
-
none: false
|
83
|
-
requirements:
|
84
|
-
- - ! '>='
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 1.1.0
|
76
|
+
version_requirements: *19240760
|
87
77
|
- !ruby/object:Gem::Dependency
|
88
78
|
name: hoe-yard
|
89
|
-
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirement: &19240140 !ruby/object:Gem::Requirement
|
90
80
|
none: false
|
91
81
|
requirements:
|
92
82
|
- - ! '>='
|
@@ -94,15 +84,10 @@ dependencies:
|
|
94
84
|
version: 0.1.2
|
95
85
|
type: :development
|
96
86
|
prerelease: false
|
97
|
-
version_requirements:
|
98
|
-
none: false
|
99
|
-
requirements:
|
100
|
-
- - ! '>='
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 0.1.2
|
87
|
+
version_requirements: *19240140
|
103
88
|
- !ruby/object:Gem::Dependency
|
104
89
|
name: webmock
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
90
|
+
requirement: &19239600 !ruby/object:Gem::Requirement
|
106
91
|
none: false
|
107
92
|
requirements:
|
108
93
|
- - ! '>='
|
@@ -110,15 +95,10 @@ dependencies:
|
|
110
95
|
version: 1.7.0
|
111
96
|
type: :development
|
112
97
|
prerelease: false
|
113
|
-
version_requirements:
|
114
|
-
none: false
|
115
|
-
requirements:
|
116
|
-
- - ! '>='
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: 1.7.0
|
98
|
+
version_requirements: *19239600
|
119
99
|
- !ruby/object:Gem::Dependency
|
120
100
|
name: hoe
|
121
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirement: &19239000 !ruby/object:Gem::Requirement
|
122
102
|
none: false
|
123
103
|
requirements:
|
124
104
|
- - ! '>='
|
@@ -126,12 +106,7 @@ dependencies:
|
|
126
106
|
version: 2.9.4
|
127
107
|
type: :development
|
128
108
|
prerelease: false
|
129
|
-
version_requirements:
|
130
|
-
none: false
|
131
|
-
requirements:
|
132
|
-
- - ! '>='
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: 2.9.4
|
109
|
+
version_requirements: *19239000
|
135
110
|
description: ! "jirarest2 is yet another implementation of the JIRA(tm) REST-API[https://developer.atlassian.com/display/JIRADEV/JIRA+Remote+API+Reference]
|
136
111
|
. This one for Ruby1.9.1\n\nIt is intended to be called within the shell to create
|
137
112
|
and verify JIRA(tm) issues fast without a browser. There was no particular need
|
@@ -169,7 +144,9 @@ files:
|
|
169
144
|
- lib/jirarest2/cookie_credentials.rb
|
170
145
|
- lib/jirarest2/credentials.rb
|
171
146
|
- lib/jirarest2/exceptions.rb
|
147
|
+
- lib/jirarest2/field.rb
|
172
148
|
- lib/jirarest2/issue.rb
|
149
|
+
- lib/jirarest2/issuetype.rb
|
173
150
|
- lib/jirarest2/madbitconfig.rb
|
174
151
|
- lib/jirarest2/newissue.rb
|
175
152
|
- lib/jirarest2/password_credentials.rb
|
@@ -181,6 +158,7 @@ files:
|
|
181
158
|
- lib/jirarest2/services/watcher.rb
|
182
159
|
- lib/jirarest2bin.rb
|
183
160
|
- test/data/cookiejar
|
161
|
+
- test/data/createmeta
|
184
162
|
- test/data/get-comments.txt
|
185
163
|
- test/data/issuespec.txt
|
186
164
|
- test/data/test.config.data
|
@@ -192,9 +170,12 @@ files:
|
|
192
170
|
- test/test_connect.rb
|
193
171
|
- test/test_cookie_credentials.rb
|
194
172
|
- test/test_credentials.rb
|
173
|
+
- test/test_fieldcreatemeta.rb
|
174
|
+
- test/test_fields.rb
|
195
175
|
- test/test_issue.rb
|
196
176
|
- test/test_issuelink.rb
|
197
177
|
- test/test_issuelinktype.rb
|
178
|
+
- test/test_issuetype.rb
|
198
179
|
- test/test_madbitconfig.rb
|
199
180
|
- test/test_newissue.rb
|
200
181
|
- test/test_password_credentials.rb
|
@@ -225,20 +206,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
206
|
version: '0'
|
226
207
|
requirements: []
|
227
208
|
rubyforge_project: jirarest2
|
228
|
-
rubygems_version: 1.8.
|
209
|
+
rubygems_version: 1.8.11
|
229
210
|
signing_key:
|
230
211
|
specification_version: 3
|
231
212
|
summary: jirarest2 is yet another implementation of the JIRA(tm) REST-API[https://developer.atlassian.com/display/JIRADEV/JIRA+Remote+API+Reference]
|
232
213
|
test_files:
|
214
|
+
- test/test_password_credentials.rb
|
233
215
|
- test/test_madbitconfig.rb
|
234
|
-
- test/
|
235
|
-
- test/test_cookie_credentials.rb
|
236
|
-
- test/test_issuelinktype.rb
|
216
|
+
- test/test_fieldcreatemeta.rb
|
237
217
|
- test/test_comment.rb
|
238
|
-
- test/
|
239
|
-
- test/
|
240
|
-
- test/test_password_credentials.rb
|
241
|
-
- test/test_newissue.rb
|
218
|
+
- test/test_watcher.rb
|
219
|
+
- test/test_issuelinktype.rb
|
242
220
|
- test/test_result.rb
|
221
|
+
- test/test_newissue.rb
|
222
|
+
- test/test_issuetype.rb
|
223
|
+
- test/test_credentials.rb
|
224
|
+
- test/test_connect.rb
|
243
225
|
- test/test_issuelink.rb
|
244
|
-
- test/
|
226
|
+
- test/test_fields.rb
|
227
|
+
- test/test_cookie_credentials.rb
|
228
|
+
- test/test_issue.rb
|
metadata.gz.sig
CHANGED
Binary file
|