jira-ruby 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +259 -0
- data/Rakefile +9 -0
- data/example.rb +47 -4
- data/jira-ruby.gemspec +5 -3
- data/lib/jira.rb +21 -7
- data/lib/jira/base.rb +466 -0
- data/lib/jira/base_factory.rb +49 -0
- data/lib/jira/client.rb +79 -8
- data/lib/jira/has_many_proxy.rb +43 -0
- data/lib/jira/http_error.rb +16 -0
- data/lib/jira/resource/attachment.rb +12 -0
- data/lib/jira/resource/comment.rb +14 -0
- data/lib/jira/resource/component.rb +4 -9
- data/lib/jira/resource/issue.rb +49 -5
- data/lib/jira/resource/issuetype.rb +10 -0
- data/lib/jira/resource/priority.rb +10 -0
- data/lib/jira/resource/project.rb +24 -3
- data/lib/jira/resource/status.rb +10 -0
- data/lib/jira/resource/user.rb +14 -0
- data/lib/jira/resource/version.rb +10 -0
- data/lib/jira/resource/worklog.rb +16 -0
- data/lib/jira/version.rb +2 -2
- data/spec/integration/attachment_spec.rb +26 -0
- data/spec/integration/comment_spec.rb +55 -0
- data/spec/integration/component_spec.rb +25 -52
- data/spec/integration/issue_spec.rb +50 -47
- data/spec/integration/issuetype_spec.rb +27 -0
- data/spec/integration/priority_spec.rb +27 -0
- data/spec/integration/project_spec.rb +32 -24
- data/spec/integration/status_spec.rb +27 -0
- data/spec/integration/user_spec.rb +25 -0
- data/spec/integration/version_spec.rb +43 -0
- data/spec/integration/worklog_spec.rb +55 -0
- data/spec/jira/base_factory_spec.rb +46 -0
- data/spec/jira/base_spec.rb +555 -0
- data/spec/jira/client_spec.rb +12 -12
- data/spec/jira/has_many_proxy_spec.rb +45 -0
- data/spec/jira/{resource/http_error_spec.rb → http_error_spec.rb} +1 -1
- data/spec/jira/resource/attachment_spec.rb +20 -0
- data/spec/jira/resource/issue_spec.rb +83 -0
- data/spec/jira/resource/project_factory_spec.rb +3 -3
- data/spec/jira/resource/project_spec.rb +28 -0
- data/spec/jira/resource/worklog_spec.rb +24 -0
- data/spec/mock_responses/attachment/10000.json +20 -0
- data/spec/mock_responses/component/10000.invalid.put.json +5 -0
- data/spec/mock_responses/issue.json +1108 -0
- data/spec/mock_responses/issue/10002.invalid.put.json +6 -0
- data/spec/mock_responses/issue/10002.json +13 -1
- data/spec/mock_responses/issue/10002.put.missing_field_update.json +6 -0
- data/spec/mock_responses/issue/10002/comment.json +65 -0
- data/spec/mock_responses/issue/10002/comment.post.json +29 -0
- data/spec/mock_responses/issue/10002/comment/10000.json +29 -0
- data/spec/mock_responses/issue/10002/comment/10000.put.json +29 -0
- data/spec/mock_responses/issue/10002/worklog.json +98 -0
- data/spec/mock_responses/issue/10002/worklog.post.json +30 -0
- data/spec/mock_responses/issue/10002/worklog/10000.json +31 -0
- data/spec/mock_responses/issue/10002/worklog/10000.put.json +30 -0
- data/spec/mock_responses/issuetype.json +42 -0
- data/spec/mock_responses/issuetype/5.json +8 -0
- data/spec/mock_responses/priority.json +42 -0
- data/spec/mock_responses/priority/1.json +8 -0
- data/spec/mock_responses/project/SAMPLEPROJECT.issues.json +1108 -0
- data/spec/mock_responses/project/SAMPLEPROJECT.json +15 -1
- data/spec/mock_responses/status.json +37 -0
- data/spec/mock_responses/status/1.json +7 -0
- data/spec/mock_responses/user?username=admin.json +17 -0
- data/spec/mock_responses/version.post.json +7 -0
- data/spec/mock_responses/version/10000.invalid.put.json +5 -0
- data/spec/mock_responses/version/10000.json +11 -0
- data/spec/mock_responses/version/10000.put.json +7 -0
- data/spec/spec_helper.rb +7 -12
- data/spec/support/matchers/have_attributes.rb +11 -0
- data/spec/support/matchers/have_many.rb +9 -0
- data/spec/support/matchers/have_one.rb +5 -0
- data/spec/support/shared_examples/integration.rb +174 -0
- metadata +139 -24
- data/README.markdown +0 -81
- data/lib/jira/resource/base.rb +0 -148
- data/lib/jira/resource/base_factory.rb +0 -44
- data/lib/jira/resource/http_error.rb +0 -17
- data/spec/jira/resource/base_factory_spec.rb +0 -36
- data/spec/jira/resource/base_spec.rb +0 -292
@@ -12,7 +12,21 @@
|
|
12
12
|
"displayName": "admin",
|
13
13
|
"active": true
|
14
14
|
},
|
15
|
-
"components": [
|
15
|
+
"components": [
|
16
|
+
{
|
17
|
+
"self": "http://localhost:2990/jira/rest/api/2/component/10001",
|
18
|
+
"id": "10001",
|
19
|
+
"name": "Jamflam",
|
20
|
+
"isAssigneeTypeValid": false
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"self": "http://localhost:2990/jira/rest/api/2/component/10000",
|
24
|
+
"id": "10000",
|
25
|
+
"name": "Jammy",
|
26
|
+
"description": "Description!",
|
27
|
+
"isAssigneeTypeValid": false
|
28
|
+
}
|
29
|
+
],
|
16
30
|
"issueTypes": [
|
17
31
|
{
|
18
32
|
"self": "http://localhost:2990/jira/rest/api/2/issuetype/1",
|
@@ -0,0 +1,37 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"self": "http://localhost:2990/jira/rest/api/2/status/1",
|
4
|
+
"description": "The issue is open and ready for the assignee to start work on it.",
|
5
|
+
"iconUrl": "http://localhost:2990/jira/images/icons/status_open.gif",
|
6
|
+
"name": "Open",
|
7
|
+
"id": "1"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"self": "http://localhost:2990/jira/rest/api/2/status/3",
|
11
|
+
"description": "This issue is being actively worked on at the moment by the assignee.",
|
12
|
+
"iconUrl": "http://localhost:2990/jira/images/icons/status_inprogress.gif",
|
13
|
+
"name": "In Progress",
|
14
|
+
"id": "3"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"self": "http://localhost:2990/jira/rest/api/2/status/4",
|
18
|
+
"description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.",
|
19
|
+
"iconUrl": "http://localhost:2990/jira/images/icons/status_reopened.gif",
|
20
|
+
"name": "Reopened",
|
21
|
+
"id": "4"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"self": "http://localhost:2990/jira/rest/api/2/status/5",
|
25
|
+
"description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.",
|
26
|
+
"iconUrl": "http://localhost:2990/jira/images/icons/status_resolved.gif",
|
27
|
+
"name": "Resolved",
|
28
|
+
"id": "5"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"self": "http://localhost:2990/jira/rest/api/2/status/6",
|
32
|
+
"description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.",
|
33
|
+
"iconUrl": "http://localhost:2990/jira/images/icons/status_closed.gif",
|
34
|
+
"name": "Closed",
|
35
|
+
"id": "6"
|
36
|
+
}
|
37
|
+
]
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
|
3
|
+
"name": "admin",
|
4
|
+
"emailAddress": "admin@example.com",
|
5
|
+
"avatarUrls": {
|
6
|
+
"16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
|
7
|
+
"48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
|
8
|
+
},
|
9
|
+
"displayName": "admin",
|
10
|
+
"active": true,
|
11
|
+
"timeZone": "Pacific/Auckland",
|
12
|
+
"groups": {
|
13
|
+
"size": 3,
|
14
|
+
"items": []
|
15
|
+
},
|
16
|
+
"expand": "groups"
|
17
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"self": "http://localhost:2990/jira/rest/api/2/version/10000",
|
3
|
+
"id": "10000",
|
4
|
+
"description": "Initial version",
|
5
|
+
"name": "1.0",
|
6
|
+
"overdue": false,
|
7
|
+
"userReleaseDate": "12/Jan/12",
|
8
|
+
"archived": false,
|
9
|
+
"releaseDate": "2012-01-12",
|
10
|
+
"released": false
|
11
|
+
}
|
data/spec/spec_helper.rb
CHANGED
@@ -2,6 +2,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
2
2
|
require 'rubygems'
|
3
3
|
require 'bundler/setup'
|
4
4
|
require 'webmock/rspec'
|
5
|
+
Dir["./spec/support/**/*.rb"].each {|f| require f}
|
5
6
|
|
6
7
|
require 'jira'
|
7
8
|
|
@@ -9,18 +10,12 @@ RSpec.configure do |config|
|
|
9
10
|
|
10
11
|
end
|
11
12
|
|
12
|
-
RSpec::Matchers.define :have_attributes do |expected|
|
13
|
-
match do |actual|
|
14
|
-
expected.each do |key, value|
|
15
|
-
actual.attrs[key].should == value
|
16
|
-
end
|
17
|
-
end
|
18
13
|
|
19
|
-
|
20
|
-
|
14
|
+
def get_mock_response(file, value_if_file_not_found = false)
|
15
|
+
begin
|
16
|
+
File.read(File.join(File.dirname(__FILE__), 'mock_responses/', file))
|
17
|
+
rescue Errno::ENOENT => e
|
18
|
+
raise e if value_if_file_not_found == false
|
19
|
+
value_if_file_not_found
|
21
20
|
end
|
22
21
|
end
|
23
|
-
|
24
|
-
def get_mock_response(file)
|
25
|
-
File.read(File.join(File.dirname(__FILE__), 'mock_responses/', file))
|
26
|
-
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
RSpec::Matchers.define :have_attributes do |expected|
|
2
|
+
match do |actual|
|
3
|
+
expected.each do |key, value|
|
4
|
+
actual.attrs[key].should == value
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
failure_message_for_should do |actual|
|
9
|
+
"expected #{actual.attrs} to match #{expected}"
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
RSpec::Matchers.define :have_many do |collection, klass|
|
2
|
+
match do |actual|
|
3
|
+
actual.send(collection).class.should == JIRA::HasManyProxy
|
4
|
+
actual.send(collection).length.should > 0
|
5
|
+
actual.send(collection).each do |member|
|
6
|
+
member.class.should == klass
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,174 @@
|
|
1
|
+
def get_mock_from_path(method, options = {})
|
2
|
+
if defined? belongs_to
|
3
|
+
prefix = belongs_to.path_component + '/'
|
4
|
+
else
|
5
|
+
prefix = ''
|
6
|
+
end
|
7
|
+
|
8
|
+
if options[:url]
|
9
|
+
url = options[:url]
|
10
|
+
elsif options[:key]
|
11
|
+
url = described_class.singular_path(client, options[:key], prefix)
|
12
|
+
else
|
13
|
+
url = described_class.collection_path(client, prefix)
|
14
|
+
end
|
15
|
+
file_path = url.sub(client.options[:rest_base_path], '')
|
16
|
+
file_path = file_path + '.' + options[:suffix] if options[:suffix]
|
17
|
+
file_path = file_path + '.' + method.to_s unless method == :get
|
18
|
+
value_if_not_found = options.keys.include?(:value_if_not_found) ? options[:value_if_not_found] : false
|
19
|
+
get_mock_response("#{file_path}.json", value_if_not_found)
|
20
|
+
end
|
21
|
+
|
22
|
+
def class_basename
|
23
|
+
described_class.name.split('::').last
|
24
|
+
end
|
25
|
+
|
26
|
+
def options
|
27
|
+
options = {}
|
28
|
+
if defined? belongs_to
|
29
|
+
options[belongs_to.to_sym] = belongs_to
|
30
|
+
end
|
31
|
+
options
|
32
|
+
end
|
33
|
+
|
34
|
+
def prefix
|
35
|
+
prefix = '/'
|
36
|
+
if defined? belongs_to
|
37
|
+
prefix = belongs_to.path_component + '/'
|
38
|
+
end
|
39
|
+
prefix
|
40
|
+
end
|
41
|
+
|
42
|
+
def build_receiver
|
43
|
+
if defined?(belongs_to)
|
44
|
+
belongs_to.send(described_class.endpoint_name.pluralize.to_sym)
|
45
|
+
else
|
46
|
+
client.send(class_basename)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
shared_examples "a resource" do
|
51
|
+
|
52
|
+
it "gracefully handles non-json responses" do
|
53
|
+
if defined? target
|
54
|
+
subject = target
|
55
|
+
else
|
56
|
+
subject = client.send(class_basename).build(described_class.key_attribute.to_s => '99999')
|
57
|
+
end
|
58
|
+
stub_request(:put, 'http://localhost:2990' + subject.url).
|
59
|
+
to_return(:status => 405, :body => "<html><body>Some HTML</body></html>")
|
60
|
+
subject.save('foo' => 'bar').should be_false
|
61
|
+
lambda do
|
62
|
+
subject.save!('foo' => 'bar').should be_false
|
63
|
+
end.should raise_error(JIRA::HTTPError)
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
shared_examples "a resource with a collection GET endpoint" do
|
69
|
+
|
70
|
+
it "should get the collection" do
|
71
|
+
stub_request(:get, "http://localhost:2990" + described_class.collection_path(client)).
|
72
|
+
to_return(:status => 200, :body => get_mock_from_path(:get))
|
73
|
+
collection = build_receiver.all
|
74
|
+
collection.length.should == expected_collection_length
|
75
|
+
|
76
|
+
first = collection.first
|
77
|
+
first.should have_attributes(expected_attributes)
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
81
|
+
|
82
|
+
shared_examples "a resource with a singular GET endpoint" do
|
83
|
+
|
84
|
+
it "GETs a single resource" do
|
85
|
+
# E.g., for JIRA::Resource::Project, we need to call
|
86
|
+
# client.Project.find()
|
87
|
+
stub_request(:get, "http://localhost:2990" + described_class.singular_path(client, key, prefix)).
|
88
|
+
to_return(:status => 200, :body => get_mock_from_path(:get, :key => key))
|
89
|
+
subject = client.send(class_basename).find(key, options)
|
90
|
+
|
91
|
+
subject.should have_attributes(expected_attributes)
|
92
|
+
end
|
93
|
+
|
94
|
+
it "builds and fetches a single resource" do
|
95
|
+
# E.g., for JIRA::Resource::Project, we need to call
|
96
|
+
# client.Project.build('key' => 'ABC123')
|
97
|
+
stub_request(:get, "http://localhost:2990" + described_class.singular_path(client, key, prefix)).
|
98
|
+
to_return(:status => 200, :body => get_mock_from_path(:get, :key => key))
|
99
|
+
|
100
|
+
subject = build_receiver.build(described_class.key_attribute.to_s => key)
|
101
|
+
subject.fetch
|
102
|
+
|
103
|
+
subject.should have_attributes(expected_attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
it "handles a 404" do
|
107
|
+
stub_request(:get, "http://localhost:2990" + described_class.singular_path(client, '99999', prefix)).
|
108
|
+
to_return(:status => 404, :body => '{"errorMessages":["'+class_basename+' Does Not Exist"],"errors": {}}')
|
109
|
+
lambda do
|
110
|
+
client.send(class_basename).find('99999', options)
|
111
|
+
end.should raise_exception(JIRA::HTTPError)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
shared_examples "a resource with a DELETE endpoint" do
|
116
|
+
it "deletes a resource" do
|
117
|
+
# E.g., for JIRA::Resource::Project, we need to call
|
118
|
+
# client.Project.delete()
|
119
|
+
stub_request(:delete, "http://localhost:2990" + described_class.singular_path(client, key, prefix)).
|
120
|
+
to_return(:status => 204, :body => nil)
|
121
|
+
|
122
|
+
subject = build_receiver.build(described_class.key_attribute.to_s => key)
|
123
|
+
subject.delete.should be_true
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
shared_examples "a resource with a POST endpoint" do
|
128
|
+
|
129
|
+
it "saves a new resource" do
|
130
|
+
stub_request(:post, "http://localhost:2990" + described_class.collection_path(client, prefix)).
|
131
|
+
to_return(:status => 201, :body => get_mock_from_path(:post))
|
132
|
+
subject = build_receiver.build
|
133
|
+
subject.save(attributes_for_post).should be_true
|
134
|
+
expected_attributes_from_post.each do |method_name, value|
|
135
|
+
subject.send(method_name).should == value
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
end
|
140
|
+
|
141
|
+
shared_examples "a resource with a PUT endpoint" do
|
142
|
+
|
143
|
+
it "saves an existing component" do
|
144
|
+
stub_request(:get, "http://localhost:2990" + described_class.singular_path(client, key, prefix)).
|
145
|
+
to_return(:status => 200, :body => get_mock_from_path(:get, :key =>key))
|
146
|
+
stub_request(:put, "http://localhost:2990" + described_class.singular_path(client, key, prefix)).
|
147
|
+
to_return(:status => 200, :body => get_mock_from_path(:put, :key => key, :value_if_not_found => nil))
|
148
|
+
subject = build_receiver.build(described_class.key_attribute.to_s => key)
|
149
|
+
subject.fetch
|
150
|
+
subject.save(attributes_for_put).should be_true
|
151
|
+
expected_attributes_from_put.each do |method_name, value|
|
152
|
+
subject.send(method_name).should == value
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
end
|
157
|
+
|
158
|
+
shared_examples 'a resource with a PUT endpoint that rejects invalid fields' do
|
159
|
+
|
160
|
+
it "fails to save with an invalid field" do
|
161
|
+
stub_request(:get, "http://localhost:2990" + described_class.singular_path(client, key)).
|
162
|
+
to_return(:status => 200, :body => get_mock_from_path(:get, :key => key))
|
163
|
+
stub_request(:put, "http://localhost:2990" + described_class.singular_path(client, key)).
|
164
|
+
to_return(:status => 400, :body => get_mock_from_path(:put, :key => key, :suffix => "invalid"))
|
165
|
+
subject = client.send(class_basename).build(described_class.key_attribute.to_s => key)
|
166
|
+
subject.fetch
|
167
|
+
|
168
|
+
subject.save('fields'=> {'invalid' => 'field'}).should be_false
|
169
|
+
lambda do
|
170
|
+
subject.save!('fields'=> {'invalid' => 'field'})
|
171
|
+
end.should raise_error(JIRA::HTTPError)
|
172
|
+
end
|
173
|
+
|
174
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jira-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.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:
|
12
|
+
date: 2012-01-30 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth
|
16
|
-
requirement: &
|
16
|
+
requirement: &70202332043180 !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: *70202332043180
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: oauth
|
27
|
-
requirement: &
|
27
|
+
requirement: &70202332042760 !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: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70202332042760
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: railties
|
38
|
-
requirement: &
|
38
|
+
requirement: &70202332042340 !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: *70202332042340
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: railties
|
49
|
-
requirement: &
|
49
|
+
requirement: &70202332041920 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,32 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70202332041920
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: activesupport
|
60
|
+
requirement: &70202332041500 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :runtime
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70202332041500
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: activesupport
|
71
|
+
requirement: &70202332041080 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70202332041080
|
58
80
|
- !ruby/object:Gem::Dependency
|
59
81
|
name: webmock
|
60
|
-
requirement: &
|
82
|
+
requirement: &70202332040660 !ruby/object:Gem::Requirement
|
61
83
|
none: false
|
62
84
|
requirements:
|
63
85
|
- - ! '>='
|
@@ -65,8 +87,8 @@ dependencies:
|
|
65
87
|
version: '0'
|
66
88
|
type: :development
|
67
89
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
-
description: API for
|
90
|
+
version_requirements: *70202332040660
|
91
|
+
description: API for JIRA 5
|
70
92
|
email:
|
71
93
|
executables: []
|
72
94
|
extensions: []
|
@@ -74,37 +96,88 @@ extra_rdoc_files: []
|
|
74
96
|
files:
|
75
97
|
- .gitignore
|
76
98
|
- Gemfile
|
77
|
-
- README.
|
99
|
+
- README.rdoc
|
78
100
|
- Rakefile
|
79
101
|
- example.rb
|
80
102
|
- jira-ruby.gemspec
|
81
103
|
- lib/jira.rb
|
104
|
+
- lib/jira/base.rb
|
105
|
+
- lib/jira/base_factory.rb
|
82
106
|
- lib/jira/client.rb
|
83
|
-
- lib/jira/
|
84
|
-
- lib/jira/
|
107
|
+
- lib/jira/has_many_proxy.rb
|
108
|
+
- lib/jira/http_error.rb
|
109
|
+
- lib/jira/resource/attachment.rb
|
110
|
+
- lib/jira/resource/comment.rb
|
85
111
|
- lib/jira/resource/component.rb
|
86
|
-
- lib/jira/resource/http_error.rb
|
87
112
|
- lib/jira/resource/issue.rb
|
113
|
+
- lib/jira/resource/issuetype.rb
|
114
|
+
- lib/jira/resource/priority.rb
|
88
115
|
- lib/jira/resource/project.rb
|
116
|
+
- lib/jira/resource/status.rb
|
117
|
+
- lib/jira/resource/user.rb
|
118
|
+
- lib/jira/resource/version.rb
|
119
|
+
- lib/jira/resource/worklog.rb
|
89
120
|
- lib/jira/tasks.rb
|
90
121
|
- lib/jira/version.rb
|
91
122
|
- lib/tasks/generate.rake
|
123
|
+
- spec/integration/attachment_spec.rb
|
124
|
+
- spec/integration/comment_spec.rb
|
92
125
|
- spec/integration/component_spec.rb
|
93
126
|
- spec/integration/issue_spec.rb
|
127
|
+
- spec/integration/issuetype_spec.rb
|
128
|
+
- spec/integration/priority_spec.rb
|
94
129
|
- spec/integration/project_spec.rb
|
130
|
+
- spec/integration/status_spec.rb
|
131
|
+
- spec/integration/user_spec.rb
|
132
|
+
- spec/integration/version_spec.rb
|
133
|
+
- spec/integration/worklog_spec.rb
|
134
|
+
- spec/jira/base_factory_spec.rb
|
135
|
+
- spec/jira/base_spec.rb
|
95
136
|
- spec/jira/client_spec.rb
|
96
|
-
- spec/jira/
|
97
|
-
- spec/jira/
|
98
|
-
- spec/jira/resource/
|
137
|
+
- spec/jira/has_many_proxy_spec.rb
|
138
|
+
- spec/jira/http_error_spec.rb
|
139
|
+
- spec/jira/resource/attachment_spec.rb
|
140
|
+
- spec/jira/resource/issue_spec.rb
|
99
141
|
- spec/jira/resource/project_factory_spec.rb
|
142
|
+
- spec/jira/resource/project_spec.rb
|
143
|
+
- spec/jira/resource/worklog_spec.rb
|
144
|
+
- spec/mock_responses/attachment/10000.json
|
100
145
|
- spec/mock_responses/component.post.json
|
146
|
+
- spec/mock_responses/component/10000.invalid.put.json
|
101
147
|
- spec/mock_responses/component/10000.json
|
102
148
|
- spec/mock_responses/component/10000.put.json
|
149
|
+
- spec/mock_responses/issue.json
|
103
150
|
- spec/mock_responses/issue.post.json
|
151
|
+
- spec/mock_responses/issue/10002.invalid.put.json
|
104
152
|
- spec/mock_responses/issue/10002.json
|
153
|
+
- spec/mock_responses/issue/10002.put.missing_field_update.json
|
154
|
+
- spec/mock_responses/issue/10002/comment.json
|
155
|
+
- spec/mock_responses/issue/10002/comment.post.json
|
156
|
+
- spec/mock_responses/issue/10002/comment/10000.json
|
157
|
+
- spec/mock_responses/issue/10002/comment/10000.put.json
|
158
|
+
- spec/mock_responses/issue/10002/worklog.json
|
159
|
+
- spec/mock_responses/issue/10002/worklog.post.json
|
160
|
+
- spec/mock_responses/issue/10002/worklog/10000.json
|
161
|
+
- spec/mock_responses/issue/10002/worklog/10000.put.json
|
162
|
+
- spec/mock_responses/issuetype.json
|
163
|
+
- spec/mock_responses/issuetype/5.json
|
164
|
+
- spec/mock_responses/priority.json
|
165
|
+
- spec/mock_responses/priority/1.json
|
105
166
|
- spec/mock_responses/project.json
|
167
|
+
- spec/mock_responses/project/SAMPLEPROJECT.issues.json
|
106
168
|
- spec/mock_responses/project/SAMPLEPROJECT.json
|
169
|
+
- spec/mock_responses/status.json
|
170
|
+
- spec/mock_responses/status/1.json
|
171
|
+
- spec/mock_responses/user?username=admin.json
|
172
|
+
- spec/mock_responses/version.post.json
|
173
|
+
- spec/mock_responses/version/10000.invalid.put.json
|
174
|
+
- spec/mock_responses/version/10000.json
|
175
|
+
- spec/mock_responses/version/10000.put.json
|
107
176
|
- spec/spec_helper.rb
|
177
|
+
- spec/support/matchers/have_attributes.rb
|
178
|
+
- spec/support/matchers/have_many.rb
|
179
|
+
- spec/support/matchers/have_one.rb
|
180
|
+
- spec/support/shared_examples/integration.rb
|
108
181
|
homepage: http://trineo.co.nz
|
109
182
|
licenses: []
|
110
183
|
post_install_message:
|
@@ -128,21 +201,63 @@ rubyforge_project: jira-ruby
|
|
128
201
|
rubygems_version: 1.8.6
|
129
202
|
signing_key:
|
130
203
|
specification_version: 3
|
131
|
-
summary: Ruby Gem for use with the Atlassian
|
204
|
+
summary: Ruby Gem for use with the Atlassian JIRA 5 REST API
|
132
205
|
test_files:
|
206
|
+
- spec/integration/attachment_spec.rb
|
207
|
+
- spec/integration/comment_spec.rb
|
133
208
|
- spec/integration/component_spec.rb
|
134
209
|
- spec/integration/issue_spec.rb
|
210
|
+
- spec/integration/issuetype_spec.rb
|
211
|
+
- spec/integration/priority_spec.rb
|
135
212
|
- spec/integration/project_spec.rb
|
213
|
+
- spec/integration/status_spec.rb
|
214
|
+
- spec/integration/user_spec.rb
|
215
|
+
- spec/integration/version_spec.rb
|
216
|
+
- spec/integration/worklog_spec.rb
|
217
|
+
- spec/jira/base_factory_spec.rb
|
218
|
+
- spec/jira/base_spec.rb
|
136
219
|
- spec/jira/client_spec.rb
|
137
|
-
- spec/jira/
|
138
|
-
- spec/jira/
|
139
|
-
- spec/jira/resource/
|
220
|
+
- spec/jira/has_many_proxy_spec.rb
|
221
|
+
- spec/jira/http_error_spec.rb
|
222
|
+
- spec/jira/resource/attachment_spec.rb
|
223
|
+
- spec/jira/resource/issue_spec.rb
|
140
224
|
- spec/jira/resource/project_factory_spec.rb
|
225
|
+
- spec/jira/resource/project_spec.rb
|
226
|
+
- spec/jira/resource/worklog_spec.rb
|
227
|
+
- spec/mock_responses/attachment/10000.json
|
141
228
|
- spec/mock_responses/component.post.json
|
229
|
+
- spec/mock_responses/component/10000.invalid.put.json
|
142
230
|
- spec/mock_responses/component/10000.json
|
143
231
|
- spec/mock_responses/component/10000.put.json
|
232
|
+
- spec/mock_responses/issue.json
|
144
233
|
- spec/mock_responses/issue.post.json
|
234
|
+
- spec/mock_responses/issue/10002.invalid.put.json
|
145
235
|
- spec/mock_responses/issue/10002.json
|
236
|
+
- spec/mock_responses/issue/10002.put.missing_field_update.json
|
237
|
+
- spec/mock_responses/issue/10002/comment.json
|
238
|
+
- spec/mock_responses/issue/10002/comment.post.json
|
239
|
+
- spec/mock_responses/issue/10002/comment/10000.json
|
240
|
+
- spec/mock_responses/issue/10002/comment/10000.put.json
|
241
|
+
- spec/mock_responses/issue/10002/worklog.json
|
242
|
+
- spec/mock_responses/issue/10002/worklog.post.json
|
243
|
+
- spec/mock_responses/issue/10002/worklog/10000.json
|
244
|
+
- spec/mock_responses/issue/10002/worklog/10000.put.json
|
245
|
+
- spec/mock_responses/issuetype.json
|
246
|
+
- spec/mock_responses/issuetype/5.json
|
247
|
+
- spec/mock_responses/priority.json
|
248
|
+
- spec/mock_responses/priority/1.json
|
146
249
|
- spec/mock_responses/project.json
|
250
|
+
- spec/mock_responses/project/SAMPLEPROJECT.issues.json
|
147
251
|
- spec/mock_responses/project/SAMPLEPROJECT.json
|
252
|
+
- spec/mock_responses/status.json
|
253
|
+
- spec/mock_responses/status/1.json
|
254
|
+
- spec/mock_responses/user?username=admin.json
|
255
|
+
- spec/mock_responses/version.post.json
|
256
|
+
- spec/mock_responses/version/10000.invalid.put.json
|
257
|
+
- spec/mock_responses/version/10000.json
|
258
|
+
- spec/mock_responses/version/10000.put.json
|
148
259
|
- spec/spec_helper.rb
|
260
|
+
- spec/support/matchers/have_attributes.rb
|
261
|
+
- spec/support/matchers/have_many.rb
|
262
|
+
- spec/support/matchers/have_one.rb
|
263
|
+
- spec/support/shared_examples/integration.rb
|