tracker_api 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +6 -0
- data/lib/tracker_api.rb +2 -0
- data/lib/tracker_api/endpoints/stories.rb +3 -1
- data/lib/tracker_api/endpoints/story_owners.rb +1 -1
- data/lib/tracker_api/endpoints/story_transitions.rb +20 -0
- data/lib/tracker_api/resources/comment.rb +1 -0
- data/lib/tracker_api/resources/story.rb +29 -1
- data/lib/tracker_api/resources/story_transition.rb +10 -0
- data/lib/tracker_api/version.rb +1 -1
- data/test/minitest_helper.rb +2 -2
- data/test/story_test.rb +79 -23
- data/test/vcr/cassettes/get_story_transitions.json +1 -0
- data/test/vcr/cassettes/save_story_with_one_owner.json +1 -0
- data/test/vcr/cassettes/save_story_with_two_owners.json +1 -0
- metadata +10 -6
- data/test/vcr/cassettes/save_story_with_owner_ids_cchanged.json +0 -1
- data/test/vcr/cassettes/save_story_with_owner_ids_changed.json +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1327b2ce56382d6c500c41a4a322f4942edccc9
|
4
|
+
data.tar.gz: 10a428b5e8ec43c8a6f9bc918b3a81d0f2668989
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 041259026948978b9c7a08618175c5f31c73e7d6920ef3c8cbb427889893c4254fe97b1fa77c7cbc7207f26e621eed41363da1826abf92c5078c512bdabcc5cb
|
7
|
+
data.tar.gz: e7e5b60e8674f2cf63ba31634b55eabad4b3f334f8d8a503048ec87def0f3a3beef6104363e8ab2fca935fa81fa432b8e2841d44b54849c5e80200735611d5c8
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -50,6 +50,7 @@ project.create_story(name: 'Destroy death star') # Crea
|
|
50
50
|
|
51
51
|
story = project.story(847762630) # Find a story with the given ID
|
52
52
|
story.activity # Get a list of all the activity performed on this story
|
53
|
+
story.transitions # Get a list of all the story transitions on this story
|
53
54
|
|
54
55
|
story.name = 'Save the Ewoks' # Update a single story attribute
|
55
56
|
story.attributes = { name: 'Save the Ewoks', description: '...' } # Update multiple story attributes
|
@@ -103,8 +104,13 @@ This will cause coercion and dirty tracking to be bypassed and the new label wil
|
|
103
104
|
story = project.story(847762630)
|
104
105
|
|
105
106
|
label = TrackerApi::Resources::Label.new(name: 'Special Snowflake')
|
107
|
+
# BAD
|
106
108
|
story.labels << label
|
107
109
|
story.save
|
110
|
+
|
111
|
+
# GOOD
|
112
|
+
story.labels = story.labels.dup.push(label)
|
113
|
+
story.save
|
108
114
|
```
|
109
115
|
|
110
116
|
## TODO
|
data/lib/tracker_api.rb
CHANGED
@@ -53,6 +53,7 @@ module TrackerApi
|
|
53
53
|
autoload :Comment, 'tracker_api/endpoints/comment'
|
54
54
|
autoload :Webhook, 'tracker_api/endpoints/webhook'
|
55
55
|
autoload :Webhooks, 'tracker_api/endpoints/webhooks'
|
56
|
+
autoload :StoryTransitions, 'tracker_api/endpoints/story_transitions'
|
56
57
|
end
|
57
58
|
|
58
59
|
module Resources
|
@@ -79,5 +80,6 @@ module TrackerApi
|
|
79
80
|
autoload :TimeZone, 'tracker_api/resources/time_zone'
|
80
81
|
autoload :Comment, 'tracker_api/resources/comment'
|
81
82
|
autoload :Webhook, 'tracker_api/resources/webhook'
|
83
|
+
autoload :StoryTransition, 'tracker_api/resources/story_transition'
|
82
84
|
end
|
83
85
|
end
|
@@ -8,7 +8,9 @@ module TrackerApi
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def get(project_id, params={})
|
11
|
-
|
11
|
+
url = params[:ids] ? "/projects/#{project_id}/stories/bulk" : "/projects/#{project_id}/stories"
|
12
|
+
data = client.paginate(url, params: params)
|
13
|
+
|
12
14
|
raise Errors::UnexpectedData, 'Array of stories expected' unless data.is_a? Array
|
13
15
|
|
14
16
|
data.map do |story|
|
@@ -9,7 +9,7 @@ module TrackerApi
|
|
9
9
|
|
10
10
|
def get(project_id, story_id, params={})
|
11
11
|
data = client.paginate("/projects/#{project_id}/stories/#{story_id}/owners", params: params)
|
12
|
-
raise Errors::UnexpectedData, 'Array of
|
12
|
+
raise Errors::UnexpectedData, 'Array of story owners expected' unless data.is_a? Array
|
13
13
|
|
14
14
|
data.map do |owner|
|
15
15
|
Resources::Person.new({ story_id: story_id }.merge(owner))
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module TrackerApi
|
2
|
+
module Endpoints
|
3
|
+
class StoryTransitions
|
4
|
+
attr_accessor :client
|
5
|
+
|
6
|
+
def initialize(client)
|
7
|
+
@client = client
|
8
|
+
end
|
9
|
+
|
10
|
+
def get(project_id, story_id, params={})
|
11
|
+
data = client.paginate("/projects/#{project_id}/stories/#{story_id}/transitions", params: params)
|
12
|
+
raise Errors::UnexpectedData, 'Array of story transitions expected' unless data.is_a? Array
|
13
|
+
|
14
|
+
data.map do |transition|
|
15
|
+
Resources::StoryTransition.new(transition)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -34,6 +34,7 @@ module TrackerApi
|
|
34
34
|
attribute :story_type, String # (feature, bug, chore, release)
|
35
35
|
attribute :task_ids, [Integer]
|
36
36
|
attribute :tasks, [Task]
|
37
|
+
attribute :transitions, [StoryTransition]
|
37
38
|
attribute :updated_at, DateTime
|
38
39
|
attribute :url, String
|
39
40
|
|
@@ -74,7 +75,22 @@ module TrackerApi
|
|
74
75
|
end
|
75
76
|
|
76
77
|
# Use attribute writer to get coercion and dirty tracking.
|
77
|
-
self.labels = (labels ? labels.dup : []).push(new_label)
|
78
|
+
self.labels = (labels ? labels.dup : []).push(new_label).uniq
|
79
|
+
end
|
80
|
+
|
81
|
+
# Adds a new owner to the story.
|
82
|
+
#
|
83
|
+
# @param [Person|Fixnum] owner
|
84
|
+
def add_owner(owner)
|
85
|
+
owner_id = if owner.kind_of?(Fixnum)
|
86
|
+
owner_id = owner
|
87
|
+
else
|
88
|
+
raise ArgumentError, 'Valid Person expected.' unless owner.instance_of?(Resources::Person)
|
89
|
+
owner_id = owner.id
|
90
|
+
end
|
91
|
+
|
92
|
+
# Use attribute writer to get coercion and dirty tracking.
|
93
|
+
self.owner_ids = (owner_ids ? owner_ids.dup : []).push(owner_id).uniq
|
78
94
|
end
|
79
95
|
|
80
96
|
# Provides a list of all the activity performed on the story.
|
@@ -121,6 +137,18 @@ module TrackerApi
|
|
121
137
|
end
|
122
138
|
end
|
123
139
|
|
140
|
+
# Provides a list of all the transitions of the story.
|
141
|
+
#
|
142
|
+
# @param [Hash] params
|
143
|
+
# @return [Array[StoryTransition]]
|
144
|
+
def transitions(params = {})
|
145
|
+
if params.blank? && @transitions.present?
|
146
|
+
@transitions
|
147
|
+
else
|
148
|
+
@transitions = Endpoints::StoryTransitions.new(client).get(project_id, id, params)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
124
152
|
# @param [Hash] params attributes to create the task with
|
125
153
|
# @return [Task] newly created Task
|
126
154
|
def create_task(params)
|
data/lib/tracker_api/version.rb
CHANGED
data/test/minitest_helper.rb
CHANGED
@@ -25,8 +25,8 @@ VCR.configure do |c|
|
|
25
25
|
end
|
26
26
|
|
27
27
|
# These API Tokens are for a user with just one Public Sample Project
|
28
|
-
PT_USER_1 = { username: 'trackerapi1', password: 'trackerapi1', token: 'd55c3bc1f74346b843ca84ba340b29bf', project_id: 1027488, workspace_id: 375106 }
|
29
|
-
PT_USER_2 = { username: 'trackerapi2', password: 'trackerapi2', token: 'ab4c5895f57995bb7547986eacf91160', project_ids: [1027488, 1027492], workspace_id: 581707 }
|
28
|
+
PT_USER_1 = { username: 'trackerapi1', password: 'trackerapi1', token: 'd55c3bc1f74346b843ca84ba340b29bf', project_id: 1027488, workspace_id: 375106, id: 1266314 }
|
29
|
+
PT_USER_2 = { username: 'trackerapi2', password: 'trackerapi2', token: 'ab4c5895f57995bb7547986eacf91160', project_ids: [1027488, 1027492], workspace_id: 581707, id: 1266316 }
|
30
30
|
PT_USER_3 = { username: 'trackerapi3', password: 'trackerapi3', token: '77f9b9a466c436e6456939208c84c973', project_id: 1027494 }
|
31
31
|
PT_USERS = [PT_USER_1, PT_USER_2, PT_USER_3]
|
32
32
|
|
data/test/story_test.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
require_relative 'minitest_helper'
|
2
2
|
|
3
3
|
describe TrackerApi::Resources::Story do
|
4
|
-
let(:
|
5
|
-
let(:
|
6
|
-
let(:
|
4
|
+
let(:pt_user_1) { PT_USER_1 }
|
5
|
+
let(:pt_user_1_id) { pt_user_1[:id] }
|
6
|
+
let(:pt_user_2) { PT_USER_2 }
|
7
|
+
let(:pt_user_2_id) { pt_user_2[:id] }
|
8
|
+
let(:client) { TrackerApi::Client.new token: pt_user_1[:token] }
|
9
|
+
let(:project_id) { pt_user_1[:project_id] }
|
7
10
|
let(:project) { VCR.use_cassette('get project') { client.project(project_id) } }
|
8
11
|
let(:story_id) { '66728004' }
|
9
12
|
let(:another_story_id) { '66728000' }
|
@@ -116,19 +119,70 @@ describe TrackerApi::Resources::Story do
|
|
116
119
|
end
|
117
120
|
end
|
118
121
|
|
119
|
-
describe
|
120
|
-
it do
|
121
|
-
|
122
|
+
describe '.owner_ids' do
|
123
|
+
it 'gets owner_ids for this story' do
|
124
|
+
VCR.use_cassette('get story', record: :new_episodes) do
|
125
|
+
story = project.story(story_id)
|
126
|
+
owner_ids = story.owner_ids
|
122
127
|
|
123
|
-
|
128
|
+
owner_ids.wont_be_empty
|
129
|
+
owner_ids.first.must_be_instance_of Fixnum
|
130
|
+
end
|
131
|
+
end
|
124
132
|
|
125
|
-
|
133
|
+
it 'update owners for a story' do
|
134
|
+
VCR.use_cassette('get story', record: :new_episodes) do
|
135
|
+
story = project.story(story_id)
|
126
136
|
|
127
|
-
|
128
|
-
|
137
|
+
# save with one owner
|
138
|
+
one_owner = [pt_user_1_id]
|
139
|
+
story.owner_ids = one_owner
|
140
|
+
VCR.use_cassette('save story with one owner') { story.save }
|
141
|
+
|
142
|
+
story.owner_ids.wont_be_empty
|
143
|
+
story.owner_ids.must_equal one_owner
|
144
|
+
|
145
|
+
# save with two owners
|
146
|
+
two_owners = [pt_user_1_id, pt_user_2_id]
|
147
|
+
story.owner_ids = two_owners
|
148
|
+
VCR.use_cassette('save story with two owners') { story.save }
|
149
|
+
|
150
|
+
story.owner_ids.wont_be_empty
|
151
|
+
story.owner_ids.must_equal two_owners
|
129
152
|
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
describe '.add_owner' do
|
157
|
+
it 'add owner to a story' do
|
158
|
+
VCR.use_cassette('get story', record: :new_episodes) do
|
159
|
+
story = project.story(story_id)
|
160
|
+
|
161
|
+
# clear current owners
|
162
|
+
story.owner_ids = []
|
163
|
+
|
164
|
+
story.add_owner(TrackerApi::Resources::Person.new(id: 123))
|
165
|
+
|
166
|
+
story.owner_ids.wont_be_empty
|
167
|
+
story.owner_ids.must_equal [123]
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
it 'add owners by id to a story' do
|
172
|
+
VCR.use_cassette('get story', record: :new_episodes) do
|
173
|
+
story = project.story(story_id)
|
174
|
+
|
175
|
+
# clear current owners
|
176
|
+
story.owner_ids = []
|
130
177
|
|
131
|
-
|
178
|
+
story.add_owner(123)
|
179
|
+
story.add_owner(456)
|
180
|
+
# test dups are not added
|
181
|
+
story.add_owner(123)
|
182
|
+
|
183
|
+
story.owner_ids.wont_be_empty
|
184
|
+
story.owner_ids.must_equal [123, 456]
|
185
|
+
end
|
132
186
|
end
|
133
187
|
end
|
134
188
|
|
@@ -200,18 +254,6 @@ describe TrackerApi::Resources::Story do
|
|
200
254
|
end
|
201
255
|
end
|
202
256
|
|
203
|
-
describe '.owners' do
|
204
|
-
it 'gets all owners of this story' do
|
205
|
-
VCR.use_cassette('get story owners', record: :new_episodes) do
|
206
|
-
owners = story.owners
|
207
|
-
|
208
|
-
owners.wont_be_empty
|
209
|
-
owner = owners.first
|
210
|
-
owner.must_be_instance_of TrackerApi::Resources::Person
|
211
|
-
end
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
257
|
describe '.comments' do
|
216
258
|
it 'gets all comments of story with just project_id and story_id' do
|
217
259
|
VCR.use_cassette('get story comments', record: :new_episodes) do
|
@@ -225,4 +267,18 @@ describe TrackerApi::Resources::Story do
|
|
225
267
|
end
|
226
268
|
end
|
227
269
|
end
|
270
|
+
|
271
|
+
describe '.transitions' do
|
272
|
+
it 'gets all story transitions with just project_id and story_id' do
|
273
|
+
VCR.use_cassette('get story transitions', record: :new_episodes) do
|
274
|
+
story = TrackerApi::Resources::Story.new( client: client,
|
275
|
+
project_id: project_id,
|
276
|
+
id: another_story_id)
|
277
|
+
|
278
|
+
transitions = story.transitions
|
279
|
+
transition = transitions.first
|
280
|
+
transition.must_be_instance_of TrackerApi::Resources::StoryTransition
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
228
284
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728000/transitions","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.5.0 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"response":{"status":{"code":200,"message":null},"headers":{"Access-Control-Allow-Credentials":["false"],"Access-Control-Allow-Headers":["X-TrackerToken,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Tracker-Warn-Unless-Project-Version-Is"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Allow-Origin":["*"],"Cache-Control":["max-age=0, private, must-revalidate"],"Content-Type":["application/json; charset=utf-8"],"Date":["Tue, 03 Jan 2017 23:50:01 GMT"],"Etag":["\"967a44e1aeaba9aa5d3432b3ac55f0f6\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Rack-Cache":["miss"],"X-Request-Id":["875c2082f7e398467f4ae81092835c33"],"X-Runtime":["0.034241"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Pagination-Limit":["100"],"X-Tracker-Pagination-Offset":["0"],"X-Tracker-Pagination-Returned":["2"],"X-Tracker-Pagination-Total":["2"],"X-Tracker-Project-Version":["158"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["18224844-f694-42c2-4596-825cb100f788"],"Content-Length":["347"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"kind\":\"story_transition\",\"state\":\"accepted\",\"story_id\":66728000,\"project_id\":1027488,\"project_version\":157,\"occurred_at\":\"2017-01-03T23:44:24Z\",\"performed_by_id\":1266314},{\"kind\":\"story_transition\",\"state\":\"rejected\",\"story_id\":66728000,\"project_id\":1027488,\"project_version\":158,\"occurred_at\":\"2017-01-03T23:49:51Z\",\"performed_by_id\":1266314}]"},"http_version":null},"recorded_at":"Tue, 03 Jan 2017 23:50:01 GMT"}],"recorded_with":"VCR 2.9.3"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","body":{"encoding":"UTF-8","string":"{\"owner_ids\":[1266314]}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.5.0 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Content-Type":["application/json"]}},"response":{"status":{"code":200,"message":null},"headers":{"Access-Control-Allow-Credentials":["false"],"Access-Control-Allow-Headers":["X-TrackerToken,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Tracker-Warn-Unless-Project-Version-Is"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Allow-Origin":["*"],"Cache-Control":["max-age=0, private, must-revalidate"],"Content-Type":["application/json; charset=utf-8"],"Date":["Thu, 05 Jan 2017 00:38:24 GMT"],"Etag":["\"5cd25879d7debd9d20fb03038596c268\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Rack-Cache":["invalidate, pass"],"X-Request-Id":["282573a485764039cd40cf2887216752"],"X-Runtime":["0.172276"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["160"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["3e5db7e3-0bc7-4a46-4da7-758e70c07e0f"],"Content-Length":["845"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728004,\"project_id\":1027488,\"name\":\"Some product photos not scaled properly when browsing products+++++++\",\"description\":\"++++++++\",\"story_type\":\"bug\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"owned_by_id\":1266314,\"owner_ids\":[1266314],\"labels\":[{\"kind\":\"label\",\"id\":11049868,\"project_id\":1027488,\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"kind\":\"label\",\"id\":11049870,\"project_id\":1027488,\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"kind\":\"label\",\"id\":14060665,\"project_id\":1027488,\"name\":\"super-special-label\",\"created_at\":\"2016-02-12T23:45:13Z\",\"updated_at\":\"2016-02-12T23:45:13Z\"}],\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-01-05T00:38:23Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728004\"}"},"http_version":null},"recorded_at":"Thu, 05 Jan 2017 00:38:24 GMT"}],"recorded_with":"VCR 2.9.3"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","body":{"encoding":"UTF-8","string":"{\"owner_ids\":[1266314,1266316]}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.5.0 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Content-Type":["application/json"]}},"response":{"status":{"code":200,"message":null},"headers":{"Access-Control-Allow-Credentials":["false"],"Access-Control-Allow-Headers":["X-TrackerToken,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Tracker-Warn-Unless-Project-Version-Is"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Allow-Origin":["*"],"Cache-Control":["max-age=0, private, must-revalidate"],"Content-Type":["application/json; charset=utf-8"],"Date":["Thu, 05 Jan 2017 00:40:49 GMT"],"Etag":["\"bffad4c85bc89fedfcbd56b6e5a4b70c\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Rack-Cache":["invalidate, pass"],"X-Request-Id":["4271c9b8ccb5d2cfaf0d86036cddd7ba"],"X-Runtime":["0.284607"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["162"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["80702f75-b222-471c-6e28-490a427614da"],"Content-Length":["853"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728004,\"project_id\":1027488,\"name\":\"Some product photos not scaled properly when browsing products+++++++\",\"description\":\"++++++++\",\"story_type\":\"bug\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"owned_by_id\":1266314,\"owner_ids\":[1266314,1266316],\"labels\":[{\"kind\":\"label\",\"id\":11049868,\"project_id\":1027488,\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"kind\":\"label\",\"id\":11049870,\"project_id\":1027488,\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"kind\":\"label\",\"id\":14060665,\"project_id\":1027488,\"name\":\"super-special-label\",\"created_at\":\"2016-02-12T23:45:13Z\",\"updated_at\":\"2016-02-12T23:45:13Z\"}],\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-01-05T00:40:49Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728004\"}"},"http_version":null},"recorded_at":"Thu, 05 Jan 2017 00:40:49 GMT"}],"recorded_with":"VCR 2.9.3"}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tracker_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Forest Carlisle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -238,6 +238,7 @@ files:
|
|
238
238
|
- lib/tracker_api/endpoints/stories.rb
|
239
239
|
- lib/tracker_api/endpoints/story.rb
|
240
240
|
- lib/tracker_api/endpoints/story_owners.rb
|
241
|
+
- lib/tracker_api/endpoints/story_transitions.rb
|
241
242
|
- lib/tracker_api/endpoints/task.rb
|
242
243
|
- lib/tracker_api/endpoints/tasks.rb
|
243
244
|
- lib/tracker_api/endpoints/webhook.rb
|
@@ -262,6 +263,7 @@ files:
|
|
262
263
|
- lib/tracker_api/resources/project_membership.rb
|
263
264
|
- lib/tracker_api/resources/shared/base.rb
|
264
265
|
- lib/tracker_api/resources/story.rb
|
266
|
+
- lib/tracker_api/resources/story_transition.rb
|
265
267
|
- lib/tracker_api/resources/task.rb
|
266
268
|
- lib/tracker_api/resources/time_zone.rb
|
267
269
|
- lib/tracker_api/resources/webhook.rb
|
@@ -307,6 +309,7 @@ files:
|
|
307
309
|
- test/vcr/cassettes/get_story_comments.json
|
308
310
|
- test/vcr/cassettes/get_story_no_existing_labels.json
|
309
311
|
- test/vcr/cassettes/get_story_owners.json
|
312
|
+
- test/vcr/cassettes/get_story_transitions.json
|
310
313
|
- test/vcr/cassettes/get_story_with_owners.json
|
311
314
|
- test/vcr/cassettes/get_story_with_tasks.json
|
312
315
|
- test/vcr/cassettes/get_tasks.json
|
@@ -321,8 +324,8 @@ files:
|
|
321
324
|
- test/vcr/cassettes/save_story.json
|
322
325
|
- test/vcr/cassettes/save_story_with_multiple_changes.json
|
323
326
|
- test/vcr/cassettes/save_story_with_new_label.json
|
324
|
-
- test/vcr/cassettes/
|
325
|
-
- test/vcr/cassettes/
|
327
|
+
- test/vcr/cassettes/save_story_with_one_owner.json
|
328
|
+
- test/vcr/cassettes/save_story_with_two_owners.json
|
326
329
|
- test/vcr/cassettes/save_task.json
|
327
330
|
- test/vcr/cassettes/update_story_to_create_activity.json
|
328
331
|
- test/workspace_test.rb
|
@@ -389,6 +392,7 @@ test_files:
|
|
389
392
|
- test/vcr/cassettes/get_story_comments.json
|
390
393
|
- test/vcr/cassettes/get_story_no_existing_labels.json
|
391
394
|
- test/vcr/cassettes/get_story_owners.json
|
395
|
+
- test/vcr/cassettes/get_story_transitions.json
|
392
396
|
- test/vcr/cassettes/get_story_with_owners.json
|
393
397
|
- test/vcr/cassettes/get_story_with_tasks.json
|
394
398
|
- test/vcr/cassettes/get_tasks.json
|
@@ -403,8 +407,8 @@ test_files:
|
|
403
407
|
- test/vcr/cassettes/save_story.json
|
404
408
|
- test/vcr/cassettes/save_story_with_multiple_changes.json
|
405
409
|
- test/vcr/cassettes/save_story_with_new_label.json
|
406
|
-
- test/vcr/cassettes/
|
407
|
-
- test/vcr/cassettes/
|
410
|
+
- test/vcr/cassettes/save_story_with_one_owner.json
|
411
|
+
- test/vcr/cassettes/save_story_with_two_owners.json
|
408
412
|
- test/vcr/cassettes/save_task.json
|
409
413
|
- test/vcr/cassettes/update_story_to_create_activity.json
|
410
414
|
- test/workspace_test.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","body":{"encoding":"UTF-8","string":"{\"owner_ids\":[1266314]}"},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin14; ruby) TrackerApi/1.2.1 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Content-Type":["application/json"]}},"response":{"status":{"code":200,"message":null},"headers":{"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"Cache-Control":["max-age=0, private, must-revalidate"],"Date":["Mon, 22 Aug 2016 19:28:22 GMT"],"X-Tracker-Project-Version":["152"],"X-Request-Id":["77303ab723a87b976a490f14fa0df75b"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"5f849ac18b519908e49abff0fed7de64\""],"X-Runtime":["0.180859"],"X-Rack-Cache":["invalidate, pass"],"X-Powered-By":["Phusion Passenger Enterprise"],"Server":["nginx + Phusion Passenger"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Credentials":["false"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Allow-Headers":["X-TrackerToken,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Tracker-Warn-Unless-Project-Version-Is"],"X-Tracker-Client-Pinger-Interval":["12"]},"body":{"encoding":"UTF-8","string":"{\"kind\":\"story\",\"id\":66728004,\"project_id\":1027488,\"name\":\"Some product photos not scaled properly when browsing products+++++++\",\"description\":\"++++++++\",\"story_type\":\"bug\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"owned_by_id\":1266314,\"owner_ids\":[1266314],\"labels\":[{\"kind\":\"label\",\"id\":11049868,\"project_id\":1027488,\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"kind\":\"label\",\"id\":11049870,\"project_id\":1027488,\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"kind\":\"label\",\"id\":14060665,\"project_id\":1027488,\"name\":\"super-special-label\",\"created_at\":\"2016-02-12T23:45:13Z\",\"updated_at\":\"2016-02-12T23:45:13Z\"}],\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2016-08-22T19:26:26Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728004\"}"},"http_version":null},"recorded_at":"Mon, 22 Aug 2016 19:28:22 GMT"}],"recorded_with":"VCR 3.0.3"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","body":{"encoding":"UTF-8","string":"{\"owner_ids\":[1266314]}"},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin14; ruby) TrackerApi/1.2.1 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Content-Type":["application/json"]}},"response":{"status":{"code":200,"message":null},"headers":{"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"Cache-Control":["max-age=0, private, must-revalidate"],"Date":["Mon, 22 Aug 2016 19:28:50 GMT"],"X-Tracker-Project-Version":["152"],"X-Request-Id":["d53a51da01146e594f7ffc392bca580b"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"5f849ac18b519908e49abff0fed7de64\""],"X-Runtime":["0.168668"],"X-Rack-Cache":["invalidate, pass"],"X-Powered-By":["Phusion Passenger Enterprise"],"Server":["nginx + Phusion Passenger"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Credentials":["false"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Allow-Headers":["X-TrackerToken,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Tracker-Warn-Unless-Project-Version-Is"],"X-Tracker-Client-Pinger-Interval":["12"]},"body":{"encoding":"UTF-8","string":"{\"kind\":\"story\",\"id\":66728004,\"project_id\":1027488,\"name\":\"Some product photos not scaled properly when browsing products+++++++\",\"description\":\"++++++++\",\"story_type\":\"bug\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"owned_by_id\":1266314,\"owner_ids\":[1266314],\"labels\":[{\"kind\":\"label\",\"id\":11049868,\"project_id\":1027488,\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"kind\":\"label\",\"id\":11049870,\"project_id\":1027488,\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"kind\":\"label\",\"id\":14060665,\"project_id\":1027488,\"name\":\"super-special-label\",\"created_at\":\"2016-02-12T23:45:13Z\",\"updated_at\":\"2016-02-12T23:45:13Z\"}],\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2016-08-22T19:26:26Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728004\"}"},"http_version":null},"recorded_at":"Mon, 22 Aug 2016 19:28:50 GMT"}],"recorded_with":"VCR 3.0.3"}
|