jira-ruby 0.0.2

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.
@@ -0,0 +1,5 @@
1
+ {
2
+ "id": "10005",
3
+ "key": "SAMPLEPROJECT-4",
4
+ "self": "http://localhost:2990/jira/rest/api/2/issue/10005"
5
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "expand": "renderedFields,names,schema,transitions,editmeta,changelog",
3
+ "id": "10002",
4
+ "self": "http://localhost:2990/jira/rest/api/2/issue/10002",
5
+ "key": "SAMPLEPROJECT-1",
6
+ "fields": {
7
+ "summary": "Sample Issue",
8
+ "progress": {
9
+ "progress": 0,
10
+ "total": 0
11
+ },
12
+ "timetracking": {},
13
+ "issuetype": {
14
+ "self": "http://localhost:2990/jira/rest/api/2/issuetype/3",
15
+ "id": "3",
16
+ "description": "A task that needs to be done.",
17
+ "iconUrl": "http://localhost:2990/jira/images/icons/task.gif",
18
+ "name": "Task",
19
+ "subtask": false
20
+ },
21
+ "votes": {
22
+ "self": "http://localhost:2990/jira/rest/api/2/issue/SAMPLEPROJECT-1/votes",
23
+ "votes": 0,
24
+ "hasVoted": false
25
+ },
26
+ "resolution": null,
27
+ "fixVersions": [],
28
+ "resolutiondate": null,
29
+ "timespent": null,
30
+ "reporter": {
31
+ "self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
32
+ "name": "admin",
33
+ "emailAddress": "admin@example.com",
34
+ "avatarUrls": {
35
+ "16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
36
+ "48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
37
+ },
38
+ "displayName": "admin",
39
+ "active": true
40
+ },
41
+ "aggregatetimeoriginalestimate": null,
42
+ "updated": "2011-12-14T10:26:06.030+1300",
43
+ "created": "2011-12-14T10:26:06.030+1300",
44
+ "description": null,
45
+ "priority": {
46
+ "self": "http://localhost:2990/jira/rest/api/2/priority/3",
47
+ "iconUrl": "http://localhost:2990/jira/images/icons/priority_major.gif",
48
+ "name": "Major",
49
+ "id": "3"
50
+ },
51
+ "duedate": "2011-12-14",
52
+ "issuelinks": [],
53
+ "watches": {
54
+ "self": "http://localhost:2990/jira/rest/api/2/issue/SAMPLEPROJECT-1/watchers",
55
+ "watchCount": 0,
56
+ "isWatching": false
57
+ },
58
+ "worklog": {
59
+ "startAt": 0,
60
+ "maxResults": 0,
61
+ "total": 0,
62
+ "worklogs": []
63
+ },
64
+ "subtasks": [],
65
+ "status": {
66
+ "self": "http://localhost:2990/jira/rest/api/2/status/1",
67
+ "description": "The issue is open and ready for the assignee to start work on it.",
68
+ "iconUrl": "http://localhost:2990/jira/images/icons/status_open.gif",
69
+ "name": "Open",
70
+ "id": "1"
71
+ },
72
+ "labels": [],
73
+ "workratio": -1,
74
+ "assignee": {
75
+ "self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
76
+ "name": "admin",
77
+ "emailAddress": "admin@example.com",
78
+ "avatarUrls": {
79
+ "16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
80
+ "48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
81
+ },
82
+ "displayName": "admin",
83
+ "active": true
84
+ },
85
+ "attachment": [],
86
+ "aggregatetimeestimate": null,
87
+ "project": {
88
+ "self": "http://localhost:2990/jira/rest/api/2/project/SAMPLEPROJECT",
89
+ "id": "10001",
90
+ "key": "SAMPLEPROJECT",
91
+ "name": "Sample Project for Developing RoR RESTful API",
92
+ "avatarUrls": {
93
+ "16x16": "http://localhost:2990/jira/secure/projectavatar?size=small&pid=10001&avatarId=10011",
94
+ "48x48": "http://localhost:2990/jira/secure/projectavatar?pid=10001&avatarId=10011"
95
+ }
96
+ },
97
+ "versions": [],
98
+ "environment": null,
99
+ "timeestimate": null,
100
+ "aggregateprogress": {
101
+ "progress": 0,
102
+ "total": 0
103
+ },
104
+ "components": [],
105
+ "comment": {
106
+ "startAt": 0,
107
+ "maxResults": 0,
108
+ "total": 0,
109
+ "comments": []
110
+ },
111
+ "timeoriginalestimate": null,
112
+ "aggregatetimespent": null
113
+ }
114
+ }
@@ -0,0 +1,12 @@
1
+ [
2
+ {
3
+ "self": "http://localhost:2990/jira/rest/api/2/project/SAMPLEPROJECT",
4
+ "id": "10001",
5
+ "key": "SAMPLEPROJECT",
6
+ "name": "Sample Project for Developing RoR RESTful API",
7
+ "avatarUrls": {
8
+ "16x16": "http://localhost:2990/jira/secure/projectavatar?size=small&pid=10001&avatarId=10011",
9
+ "48x48": "http://localhost:2990/jira/secure/projectavatar?pid=10001&avatarId=10011"
10
+ }
11
+ }
12
+ ]
@@ -0,0 +1,70 @@
1
+ {
2
+ "self": "http://localhost:2990/jira/rest/api/2/project/SAMPLEPROJECT",
3
+ "id": "10001",
4
+ "key": "SAMPLEPROJECT",
5
+ "lead": {
6
+ "self": "http://localhost:2990/jira/rest/api/2/user?username=admin",
7
+ "name": "admin",
8
+ "avatarUrls": {
9
+ "16x16": "http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122",
10
+ "48x48": "http://localhost:2990/jira/secure/useravatar?avatarId=10122"
11
+ },
12
+ "displayName": "admin",
13
+ "active": true
14
+ },
15
+ "components": [],
16
+ "issueTypes": [
17
+ {
18
+ "self": "http://localhost:2990/jira/rest/api/2/issuetype/1",
19
+ "id": "1",
20
+ "description": "A problem which impairs or prevents the functions of the product.",
21
+ "iconUrl": "http://localhost:2990/jira/images/icons/bug.gif",
22
+ "name": "Bug",
23
+ "subtask": false
24
+ },
25
+ {
26
+ "self": "http://localhost:2990/jira/rest/api/2/issuetype/2",
27
+ "id": "2",
28
+ "description": "A new feature of the product, which has yet to be developed.",
29
+ "iconUrl": "http://localhost:2990/jira/images/icons/newfeature.gif",
30
+ "name": "New Feature",
31
+ "subtask": false
32
+ },
33
+ {
34
+ "self": "http://localhost:2990/jira/rest/api/2/issuetype/3",
35
+ "id": "3",
36
+ "description": "A task that needs to be done.",
37
+ "iconUrl": "http://localhost:2990/jira/images/icons/task.gif",
38
+ "name": "Task",
39
+ "subtask": false
40
+ },
41
+ {
42
+ "self": "http://localhost:2990/jira/rest/api/2/issuetype/4",
43
+ "id": "4",
44
+ "description": "An improvement or enhancement to an existing feature or task.",
45
+ "iconUrl": "http://localhost:2990/jira/images/icons/improvement.gif",
46
+ "name": "Improvement",
47
+ "subtask": false
48
+ },
49
+ {
50
+ "self": "http://localhost:2990/jira/rest/api/2/issuetype/5",
51
+ "id": "5",
52
+ "description": "The sub-task of the issue",
53
+ "iconUrl": "http://localhost:2990/jira/images/icons/issue_subtask.gif",
54
+ "name": "Sub-task",
55
+ "subtask": true
56
+ }
57
+ ],
58
+ "assigneeType": "PROJECT_LEAD",
59
+ "versions": [],
60
+ "name": "Sample Project for Developing RoR RESTful API",
61
+ "roles": {
62
+ "Users": "http://localhost:2990/jira/rest/api/2/project/SAMPLEPROJECT/role/10000",
63
+ "Administrators": "http://localhost:2990/jira/rest/api/2/project/SAMPLEPROJECT/role/10002",
64
+ "Developers": "http://localhost:2990/jira/rest/api/2/project/SAMPLEPROJECT/role/10001"
65
+ },
66
+ "avatarUrls": {
67
+ "16x16": "http://localhost:2990/jira/secure/projectavatar?size=small&pid=10001&avatarId=10011",
68
+ "48x48": "http://localhost:2990/jira/secure/projectavatar?pid=10001&avatarId=10011"
69
+ }
70
+ }
@@ -0,0 +1,26 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'rubygems'
3
+ require 'bundler/setup'
4
+ require 'webmock/rspec'
5
+
6
+ require 'jira'
7
+
8
+ RSpec.configure do |config|
9
+
10
+ end
11
+
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
+
19
+ failure_message_for_should do |actual|
20
+ "expected #{actual.attrs} to match #{expected}"
21
+ end
22
+ end
23
+
24
+ def get_mock_response(file)
25
+ File.read(File.join(File.dirname(__FILE__), 'mock_responses/', file))
26
+ end
metadata ADDED
@@ -0,0 +1,148 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jira-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Trineo Ltd
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-12-15 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: oauth
16
+ requirement: &70116927294340 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70116927294340
25
+ - !ruby/object:Gem::Dependency
26
+ name: oauth
27
+ requirement: &70116927293920 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *70116927293920
36
+ - !ruby/object:Gem::Dependency
37
+ name: railties
38
+ requirement: &70116927293500 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70116927293500
47
+ - !ruby/object:Gem::Dependency
48
+ name: railties
49
+ requirement: &70116927321980 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70116927321980
58
+ - !ruby/object:Gem::Dependency
59
+ name: webmock
60
+ requirement: &70116927321560 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70116927321560
69
+ description: API for Jira 5
70
+ email:
71
+ executables: []
72
+ extensions: []
73
+ extra_rdoc_files: []
74
+ files:
75
+ - .gitignore
76
+ - Gemfile
77
+ - README.markdown
78
+ - Rakefile
79
+ - example.rb
80
+ - jira-ruby.gemspec
81
+ - lib/jira.rb
82
+ - lib/jira/client.rb
83
+ - lib/jira/resource/base.rb
84
+ - lib/jira/resource/base_factory.rb
85
+ - lib/jira/resource/component.rb
86
+ - lib/jira/resource/http_error.rb
87
+ - lib/jira/resource/issue.rb
88
+ - lib/jira/resource/project.rb
89
+ - lib/jira/tasks.rb
90
+ - lib/jira/version.rb
91
+ - lib/tasks/generate.rake
92
+ - spec/integration/component_spec.rb
93
+ - spec/integration/issue_spec.rb
94
+ - spec/integration/project_spec.rb
95
+ - spec/jira/client_spec.rb
96
+ - spec/jira/resource/base_factory_spec.rb
97
+ - spec/jira/resource/base_spec.rb
98
+ - spec/jira/resource/http_error_spec.rb
99
+ - spec/jira/resource/project_factory_spec.rb
100
+ - spec/mock_responses/component.post.json
101
+ - spec/mock_responses/component/10000.json
102
+ - spec/mock_responses/component/10000.put.json
103
+ - spec/mock_responses/issue.post.json
104
+ - spec/mock_responses/issue/10002.json
105
+ - spec/mock_responses/project.json
106
+ - spec/mock_responses/project/SAMPLEPROJECT.json
107
+ - spec/spec_helper.rb
108
+ homepage: http://trineo.co.nz
109
+ licenses: []
110
+ post_install_message:
111
+ rdoc_options: []
112
+ require_paths:
113
+ - lib
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ requirements: []
127
+ rubyforge_project: jira-ruby
128
+ rubygems_version: 1.8.6
129
+ signing_key:
130
+ specification_version: 3
131
+ summary: Ruby Gem for use with the Atlassian Jira 5 REST API
132
+ test_files:
133
+ - spec/integration/component_spec.rb
134
+ - spec/integration/issue_spec.rb
135
+ - spec/integration/project_spec.rb
136
+ - spec/jira/client_spec.rb
137
+ - spec/jira/resource/base_factory_spec.rb
138
+ - spec/jira/resource/base_spec.rb
139
+ - spec/jira/resource/http_error_spec.rb
140
+ - spec/jira/resource/project_factory_spec.rb
141
+ - spec/mock_responses/component.post.json
142
+ - spec/mock_responses/component/10000.json
143
+ - spec/mock_responses/component/10000.put.json
144
+ - spec/mock_responses/issue.post.json
145
+ - spec/mock_responses/issue/10002.json
146
+ - spec/mock_responses/project.json
147
+ - spec/mock_responses/project/SAMPLEPROJECT.json
148
+ - spec/spec_helper.rb