tracker_api 1.9.0 → 1.9.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5c69ed80fbe1f4d8cb18311a4df2807c7131678c79a4f2c8a54f39fa766a180
4
- data.tar.gz: 9e69d8cfcfb3291ea39ed720685b761430aa12c83f8389ef100bde47f83ddb7b
3
+ metadata.gz: a65aa29413649912595c37c00d2e8ee08a0c86d0011799749d4d8bc5182a6900
4
+ data.tar.gz: b45f9f13846ec255a83d8423931da2909a494d5ac6e1a78d21c4a0a5eb84f968
5
5
  SHA512:
6
- metadata.gz: 385942ec74532ff4285005b5477c3e6070f4a5ecdbe51fb2cbd91b8897a518599c31f90e6b91fd8101cb61a494462b8e4563c7f2c9356f258282a4fcaaf4b7d8
7
- data.tar.gz: 92788d5cbc49ae6393fd1012f508c91ffe68e2ff29ee38821abc1dc83e928d5374ea6c78a257bcc3838152e797536f828a9fa7310f98946683c076631aa6c72c
6
+ metadata.gz: cdaac226ae1997ff05a7a300853c5a5d47d8251960999e2ef7204573567e79b9ae0d23cc2153ddfa1cd3dee2c23d3f04d0263ce9cc59cd0e3a1e538ee1826853
7
+ data.tar.gz: 922277c51eeac8e25016502fb8574167c01c86ca8bd9b51936aca2d3931c9a71ef6993adfa8597a4b15085c0c24635b30652d6a470e6f73efeb5d27d74bb7130
@@ -6,7 +6,7 @@ rvm:
6
6
  - 2.3
7
7
  - 2.4
8
8
  - 2.5
9
- # - "jruby"
9
+ - "jruby"
10
10
  # - rbx
11
11
  # - "1.8.7"
12
12
  # uncomment this line if your project needs to run something other than `rake`:
@@ -62,6 +62,8 @@ module TrackerApi
62
62
  autoload :StoryTransitions, 'tracker_api/endpoints/story_transitions'
63
63
  autoload :Attachment, 'tracker_api/endpoints/attachment'
64
64
  autoload :Attachments, 'tracker_api/endpoints/attachments'
65
+ autoload :Releases, 'tracker_api/endpoints/releases'
66
+ autoload :Release, 'tracker_api/endpoints/release'
65
67
  end
66
68
 
67
69
  module Resources
@@ -93,5 +95,6 @@ module TrackerApi
93
95
  autoload :Webhook, 'tracker_api/resources/webhook'
94
96
  autoload :StoryTransition, 'tracker_api/resources/story_transition'
95
97
  autoload :FileAttachment, 'tracker_api/resources/file_attachment'
98
+ autoload :Release, 'tracker_api/resources/release'
96
99
  end
97
100
  end
@@ -25,7 +25,7 @@ module TrackerApi
25
25
  @url = Addressable::URI.parse(url).to_s
26
26
  @api_version = options.fetch(:api_version, '/services/v5')
27
27
  @logger = options.fetch(:logger, ::Logger.new(nil))
28
- adapter = options.fetch(:adapter, :excon)
28
+ adapter = options.fetch(:adapter) { defined?(JRUBY_VERSION) ? :net_http : :excon }
29
29
  connection_options = options.fetch(:connection_options, { ssl: { verify: true } })
30
30
  @auto_paginate = options.fetch(:auto_paginate, true)
31
31
  @token = options[:token]
@@ -0,0 +1,17 @@
1
+ module TrackerApi
2
+ module Endpoints
3
+ class Release
4
+ attr_accessor :client
5
+
6
+ def initialize(client)
7
+ @client = client
8
+ end
9
+
10
+ def get(project_id, id, params={})
11
+ data = client.get("/projects/#{project_id}/releases/#{id}", params: params).body
12
+
13
+ Resources::Release.new({ client: client }.merge(data))
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,20 @@
1
+ module TrackerApi
2
+ module Endpoints
3
+ class Releases
4
+ attr_accessor :client
5
+
6
+ def initialize(client)
7
+ @client = client
8
+ end
9
+
10
+ def get(project_id, params={})
11
+ data = client.paginate("/projects/#{project_id}/releases", params: params)
12
+ raise Errors::UnexpectedData, 'Array of releases expected' unless data.is_a? Array
13
+
14
+ data.map do |release|
15
+ Resources::Release.new({ client: client, project_id: project_id }.merge(release))
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -10,7 +10,7 @@ module TrackerApi
10
10
  def get(project_id, query, options={})
11
11
  raise ArgumentError, 'Valid query string required to search' unless query.is_a?(String)
12
12
 
13
- options.key?(:body) ? options[:body][:query] = query : options[:body] = { query: query }
13
+ options[:params] = { query: query }
14
14
  data = client.get("/projects/#{project_id}/search", options).body
15
15
 
16
16
  raise Errors::UnexpectedData, 'Hash of search results expect' unless data.is_a? Hash
@@ -17,6 +17,16 @@ module TrackerApi
17
17
  Resources::Story.new({ client: client, project_id: project_id }.merge(story))
18
18
  end
19
19
  end
20
+
21
+ def get_release(project_id, release_id, params={})
22
+ data = client.paginate("/projects/#{project_id}/releases/#{release_id}/stories", params: params)
23
+
24
+ raise Errors::UnexpectedData, 'Array of stories expected' unless data.is_a? Array
25
+
26
+ data.map do |story|
27
+ Resources::Story.new({ client: client, project_id: project_id }.merge(story))
28
+ end
29
+ end
20
30
  end
21
31
  end
22
32
  end
@@ -131,6 +131,19 @@ module TrackerApi
131
131
  Endpoints::Stories.new(client).get(id, params)
132
132
  end
133
133
 
134
+ # Provides a list of all the releases in the project.
135
+ #
136
+ # @param [Hash] params
137
+ # @option params [String] :with_state A release's current_state which all returned releases must match.
138
+ # Valid enumeration values: accepted, delivered, finished, started, rejected, unstarted, unscheduled
139
+ # @option params [Integer] :offset With the first release in your priority list as 0,
140
+ # the index of the first release you want returned.
141
+ # @option params [Integer] :limit The number of releases you want returned.
142
+ # @return [Array[Release]] releases associated with this project
143
+ def releases(params={})
144
+ Endpoints::Releases.new(client).get(id, params)
145
+ end
146
+
134
147
  # Provides a list of all the memberships in the project.
135
148
  #
136
149
  # @param [Hash] params
@@ -0,0 +1,29 @@
1
+ module TrackerApi
2
+ module Resources
3
+ class Release
4
+ include Shared::Base
5
+
6
+ attribute :client
7
+
8
+ attribute :project_id, Integer
9
+ attribute :name, String
10
+ attribute :description, String
11
+ attribute :current_state, String # (accepted, delivered, finished, started, rejected, planned, unstarted, unscheduled)
12
+ attribute :accepted_at, DateTime
13
+ attribute :deadline, DateTime
14
+ attribute :labels, [Label]
15
+ attribute :created_at, DateTime
16
+ attribute :updated_at, DateTime
17
+ attribute :url, String
18
+ attribute :kind, String
19
+
20
+ # Provides a list of all the stories in the release.
21
+ #
22
+ # @param [Hash] params
23
+ # @return [Array[Story]] stories of this release
24
+ def stories(params={})
25
+ Endpoints::Stories.new(client).get_release(project_id, id, params)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -1,3 +1,3 @@
1
1
  module TrackerApi
2
- VERSION = '1.9.0'
2
+ VERSION = '1.9.1'
3
3
  end
@@ -20,7 +20,7 @@ VCR.configure do |c|
20
20
  c.ignore_localhost = true
21
21
  c.cassette_library_dir = File.expand_path('../vcr/cassettes', __FILE__).to_s
22
22
  c.default_cassette_options = { serialize_with: :json }
23
- c.hook_into :excon
23
+ c.hook_into :faraday
24
24
  c.allow_http_connections_when_no_cassette = false
25
25
  end
26
26
 
@@ -209,4 +209,16 @@ describe TrackerApi::Resources::Project do
209
209
  end
210
210
  end
211
211
  end
212
+
213
+ describe '.releases' do
214
+ it 'gets all of the releases for the project' do
215
+ VCR.use_cassette('get releases', record: :new_episodes) do
216
+ releases = project.releases
217
+
218
+ releases.wont_be_empty
219
+ releases.size.must_equal 3
220
+ releases.first.must_be_instance_of TrackerApi::Resources::Release
221
+ end
222
+ end
223
+ end
212
224
  end
@@ -0,0 +1,22 @@
1
+ require_relative 'minitest_helper'
2
+
3
+ describe TrackerApi::Resources::Release do
4
+ let(:pt_user) { PT_USER_1 }
5
+ let(:client) { TrackerApi::Client.new token: pt_user[:token] }
6
+ let(:project_id) { pt_user[:project_id] }
7
+ let(:project) { VCR.use_cassette('get project') { client.project(project_id) } }
8
+
9
+ describe '.stories' do
10
+ it 'returns all the stories related to a release' do
11
+ releases = VCR.use_cassette('get releases') { project.releases }
12
+ release = releases.find { |release| release.name == 'Beta launch' }
13
+
14
+ VCR.use_cassette('release stories', record: :new_episodes) do
15
+ stories = release.stories
16
+
17
+ stories.size.must_equal 9
18
+ stories.first.must_be_instance_of TrackerApi::Resources::Story
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.4.1 (x86_64-darwin15; ruby) TrackerApi/1.9.0 Faraday/0.15.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Accept":["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":["Tue, 31 Jul 2018 17:55:31 GMT"],"Etag":["W/\"4e54e943972c892eae56a18d566f173e\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Content-Type-Options":["nosniff, nosniff"],"X-Frame-Options":["SAMEORIGIN"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Request-Id":["f89b2a3b-b4d8-432c-a0ed-016065dab143"],"X-Runtime":["0.044165"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["493"],"X-Vcap-Request-Id":["acf8b574-3947-48a5-66a4-3036e9a4e4ee"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["847"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"id\":1027488,\"kind\":\"project\",\"name\":\"My Sample Project\",\"version\":493,\"iteration_length\":1,\"week_start_day\":\"Monday\",\"point_scale\":\"0,1,2,3\",\"point_scale_is_custom\":false,\"bugs_and_chores_are_estimatable\":false,\"automatic_planning\":true,\"enable_tasks\":true,\"time_zone\":{\"kind\":\"time_zone\",\"olson_name\":\"America/Los_Angeles\",\"offset\":\"-07:00\"},\"velocity_averaged_over\":3,\"number_of_done_iterations_to_show\":12,\"has_google_domain\":false,\"profile_content\":\"This is a demo project, created by Tracker, with example stories for a simple shopping web site.\",\"enable_incoming_emails\":true,\"initial_velocity\":10,\"public\":false,\"atom_enabled\":false,\"project_type\":\"demo\",\"start_time\":\"2014-02-10T08:00:00Z\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\",\"account_id\":621384,\"current_iteration_number\":234,\"enable_following\":true}"},"http_version":null},"recorded_at":"Tue, 31 Jul 2018 17:55:31 GMT"},{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/releases","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.4.1 (x86_64-darwin15; ruby) TrackerApi/1.9.0 Faraday/0.15.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Accept":["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":["Tue, 31 Jul 2018 17:55:31 GMT"],"Etag":["W/\"0bfcc7249b18fb7b53a6b16bd0386774\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Content-Type-Options":["nosniff, nosniff"],"X-Frame-Options":["SAMEORIGIN"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Request-Id":["dfa70eae-1373-4717-927d-59493403fd39"],"X-Runtime":["0.049638"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Pagination-Limit":["100"],"X-Tracker-Pagination-Offset":["0"],"X-Tracker-Pagination-Returned":["3"],"X-Tracker-Pagination-Total":["3"],"X-Tracker-Project-Version":["493"],"X-Vcap-Request-Id":["41ba3959-d631-4ee3-595e-e643bb4b8a0f"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["798"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"kind\":\"release\",\"id\":66728012,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:05Z\",\"name\":\"Initial demo to investors\",\"current_state\":\"unstarted\",\"url\":\"https://www.pivotaltracker.com/story/show/66728012\",\"project_id\":1027488,\"labels\":[]},{\"kind\":\"release\",\"id\":66728034,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:06Z\",\"deadline\":\"2014-03-17T00:00:00Z\",\"name\":\"Beta launch\",\"current_state\":\"unstarted\",\"url\":\"https://www.pivotaltracker.com/story/show/66728034\",\"project_id\":1027488,\"labels\":[]},{\"kind\":\"release\",\"id\":66728082,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:07Z\",\"name\":\"Full production launch\",\"current_state\":\"unstarted\",\"url\":\"https://www.pivotaltracker.com/story/show/66728082\",\"project_id\":1027488,\"labels\":[]}]"},"http_version":null},"recorded_at":"Tue, 31 Jul 2018 17:55:31 GMT"}],"recorded_with":"VCR 4.0.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/releases/66728034/stories","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.4.1 (x86_64-darwin15; ruby) TrackerApi/1.9.0 Faraday/0.15.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Accept":["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":["Tue, 31 Jul 2018 18:08:51 GMT"],"Etag":["W/\"a760df243b5eeb972f6f861c6e86fcfd\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Content-Type-Options":["nosniff, nosniff"],"X-Frame-Options":["SAMEORIGIN"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Request-Id":["2465f4db-8382-4655-beba-92a7a1c9f9b3"],"X-Runtime":["0.050357"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["493"],"X-Vcap-Request-Id":["973dcd63-0081-447d-6557-720c240b7ab6"],"X-Xss-Protection":["1; mode=block"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"kind\":\"story\",\"id\":66728014,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-05-03T23:34:05Z\",\"estimate\":1,\"story_type\":\"feature\",\"name\":\"Shopper should be able to enter credit card information and shipping address\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728014\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849090,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"checkout\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"},{\"id\":7849082,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"shopping\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}]},{\"kind\":\"story\",\"id\":66728016,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:05Z\",\"story_type\":\"chore\",\"name\":\"Integrate with payment gateway\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728016\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849090,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"checkout\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"},{\"id\":7849082,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"shopping\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}]},{\"kind\":\"story\",\"id\":66728018,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:05Z\",\"estimate\":3,\"story_type\":\"feature\",\"name\":\"When shopper submits order, authorize total product amount from payment gateway\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728018\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849090,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"checkout\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"},{\"id\":7849092,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"needs discussion\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"},{\"id\":7849082,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"shopping\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}]},{\"kind\":\"story\",\"id\":66728020,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:05Z\",\"estimate\":1,\"story_type\":\"feature\",\"name\":\"If system fails to authorize payment amount, display error message to shopper\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728020\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849090,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"checkout\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"},{\"id\":7849082,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"shopping\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}]},{\"kind\":\"story\",\"id\":66728022,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:05Z\",\"estimate\":1,\"story_type\":\"feature\",\"name\":\"If authorization is successful, show order number and confirmation message to shopper\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728022\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849090,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"checkout\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"},{\"id\":7849082,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"shopping\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}]},{\"kind\":\"story\",\"id\":66728024,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-05-03T23:32:55Z\",\"estimate\":1,\"story_type\":\"feature\",\"name\":\"Send notification email of order placement to admin\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728024\",\"project_id\":1027488,\"owner_ids\":[1266314],\"labels\":[{\"id\":7849080,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"admin\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"},{\"id\":7849090,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"checkout\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"},{\"id\":7849082,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"shopping\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}],\"owned_by_id\":1266314},{\"kind\":\"story\",\"id\":66728026,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:05Z\",\"estimate\":2,\"story_type\":\"feature\",\"name\":\"Shopper should be able to check status of order by entering name and order number\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728026\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849094,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"orders\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"}]},{\"kind\":\"story\",\"id\":66728028,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:05Z\",\"estimate\":1,\"story_type\":\"feature\",\"name\":\"Shopper should be able to ask question about order\",\"description\":\"When checking status of order, shopper should have the option to ask a question. This should send email to admin.\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728028\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849094,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"orders\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"}]},{\"kind\":\"story\",\"id\":66728032,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2014-03-02T07:11:06Z\",\"story_type\":\"chore\",\"name\":\"Set up Engine Yard production environment\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728032\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849078,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"deployment\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}]}]"},"http_version":null},"recorded_at":"Tue, 31 Jul 2018 18:08:51 GMT"}],"recorded_with":"VCR 4.0.0"}
@@ -1 +1 @@
1
- {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027494","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.0 Faraday/0.9.2"],"X-TrackerToken":["77f9b9a466c436e6456939208c84c973"]}},"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":["Wed, 03 May 2017 23:29:43 GMT"],"Etag":["\"bee447d8953acab8e6f52d725b44b4d7\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Rack-Cache":["miss"],"X-Request-Id":["4ecb19a70299df501daba9a51dc89abd"],"X-Runtime":["0.060077"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["3"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["4e8c69bf-b14b-4d04-496e-f43a4ab4f31f"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["845"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"id\":1027494,\"kind\":\"project\",\"name\":\"My Sample Project\",\"version\":3,\"iteration_length\":1,\"week_start_day\":\"Monday\",\"point_scale\":\"0,1,2,3\",\"point_scale_is_custom\":false,\"bugs_and_chores_are_estimatable\":false,\"automatic_planning\":true,\"enable_tasks\":true,\"time_zone\":{\"kind\":\"time_zone\",\"olson_name\":\"America/Los_Angeles\",\"offset\":\"-07:00\"},\"velocity_averaged_over\":3,\"number_of_done_iterations_to_show\":12,\"has_google_domain\":false,\"profile_content\":\"This is a demo project, created by Tracker, with example stories for a simple shopping web site.\",\"enable_incoming_emails\":true,\"initial_velocity\":10,\"public\":false,\"atom_enabled\":false,\"project_type\":\"demo\",\"start_time\":\"2014-02-10T08:00:00Z\",\"created_at\":\"2014-03-02T07:18:28Z\",\"updated_at\":\"2014-03-02T07:18:28Z\",\"account_id\":621388,\"current_iteration_number\":169,\"enable_following\":true}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:43 GMT"},{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027494/search","body":{"encoding":"UTF-8","string":"{\"query\":\"name:\\\"story to test search\\\"\"}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.0 Faraday/0.9.2"],"X-TrackerToken":["77f9b9a466c436e6456939208c84c973"],"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":["Wed, 03 May 2017 23:29:44 GMT"],"Etag":["\"8a5f6bd57393dc3dcfc9ee0386be8575\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Rack-Cache":["miss"],"X-Request-Id":["f2e4dd411e1db55d620a1c12f978d082"],"X-Runtime":["0.499813"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["3"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["2884d725-4b08-4abf-54e7-d219a7a1ac34"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["506"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"stories\":{\"stories\":[{\"kind\":\"story\",\"id\":143444685,\"created_at\":\"2017-04-10T18:20:52Z\",\"updated_at\":\"2017-04-10T18:20:52Z\",\"story_type\":\"feature\",\"name\":\"story to test search\",\"current_state\":\"unscheduled\",\"requested_by_id\":1266318,\"url\":\"https://www.pivotaltracker.com/story/show/143444685\",\"project_id\":1027494,\"owner_ids\":[],\"labels\":[]}],\"total_points\":0,\"total_points_completed\":0,\"total_hits\":1,\"total_hits_with_done\":1},\"epics\":{\"epics\":[],\"total_hits\":0},\"query\":\"name:\\\"story to test search\\\"\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:44 GMT"}],"recorded_with":"VCR 2.9.3"}
1
+ {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027494","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.5.1 (x86_64-darwin17; ruby) TrackerApi/1.9.0 Faraday/0.15.3"],"X-TrackerToken":["77f9b9a466c436e6456939208c84c973"],"Accept":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"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":["Mon, 24 Sep 2018 23:26:16 GMT"],"Etag":["W/\"4ae072562994d5bd15e6a9074f6416ad\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Content-Type-Options":["nosniff, nosniff"],"X-Frame-Options":["SAMEORIGIN"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Request-Id":["c9eb89e5-2865-4b6e-a2bc-6bcda28863e5"],"X-Runtime":["0.050412"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["3"],"X-Vcap-Request-Id":["d57342dc-7ed3-4af7-48e9-4fd73f3f6329"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["845"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"id\":1027494,\"kind\":\"project\",\"name\":\"My Sample Project\",\"version\":3,\"iteration_length\":1,\"week_start_day\":\"Monday\",\"point_scale\":\"0,1,2,3\",\"point_scale_is_custom\":false,\"bugs_and_chores_are_estimatable\":false,\"automatic_planning\":true,\"enable_tasks\":true,\"time_zone\":{\"kind\":\"time_zone\",\"olson_name\":\"America/Los_Angeles\",\"offset\":\"-07:00\"},\"velocity_averaged_over\":3,\"number_of_done_iterations_to_show\":12,\"has_google_domain\":false,\"profile_content\":\"This is a demo project, created by Tracker, with example stories for a simple shopping web site.\",\"enable_incoming_emails\":true,\"initial_velocity\":10,\"public\":false,\"atom_enabled\":false,\"project_type\":\"demo\",\"start_time\":\"2014-02-10T08:00:00Z\",\"created_at\":\"2014-03-02T07:18:28Z\",\"updated_at\":\"2014-03-02T07:18:28Z\",\"account_id\":621388,\"current_iteration_number\":242,\"enable_following\":true}"},"http_version":null},"recorded_at":"Mon, 24 Sep 2018 23:26:16 GMT"},{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027494/search?query=name%3A%22story+to+test+search%22","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.5.1 (x86_64-darwin17; ruby) TrackerApi/1.9.0 Faraday/0.15.3"],"X-TrackerToken":["77f9b9a466c436e6456939208c84c973"],"Accept":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"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":["Mon, 24 Sep 2018 23:26:17 GMT"],"Etag":["W/\"8a5f6bd57393dc3dcfc9ee0386be8575\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-Content-Type-Options":["nosniff, nosniff"],"X-Frame-Options":["SAMEORIGIN"],"X-Powered-By":["Phusion Passenger Enterprise"],"X-Request-Id":["d4ba2d69-b3a4-40d9-83ae-103ed31d7604"],"X-Runtime":["0.281657"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["3"],"X-Vcap-Request-Id":["35b4554f-a348-4ec6-46ff-2a3bdd585b79"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["506"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"stories\":{\"stories\":[{\"kind\":\"story\",\"id\":143444685,\"created_at\":\"2017-04-10T18:20:52Z\",\"updated_at\":\"2017-04-10T18:20:52Z\",\"story_type\":\"feature\",\"name\":\"story to test search\",\"current_state\":\"unscheduled\",\"requested_by_id\":1266318,\"url\":\"https://www.pivotaltracker.com/story/show/143444685\",\"project_id\":1027494,\"owner_ids\":[],\"labels\":[]}],\"total_points\":0,\"total_points_completed\":0,\"total_hits\":1,\"total_hits_with_done\":1},\"epics\":{\"epics\":[],\"total_hits\":0},\"query\":\"name:\\\"story to test search\\\"\"}"},"http_version":null},"recorded_at":"Mon, 24 Sep 2018 23:26:17 GMT"}],"recorded_with":"VCR 4.0.0"}
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.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Forest Carlisle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-18 00:00:00.000000000 Z
11
+ date: 2018-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -251,6 +251,8 @@ files:
251
251
  - lib/tracker_api/endpoints/notifications.rb
252
252
  - lib/tracker_api/endpoints/project.rb
253
253
  - lib/tracker_api/endpoints/projects.rb
254
+ - lib/tracker_api/endpoints/release.rb
255
+ - lib/tracker_api/endpoints/releases.rb
254
256
  - lib/tracker_api/endpoints/search.rb
255
257
  - lib/tracker_api/endpoints/stories.rb
256
258
  - lib/tracker_api/endpoints/story.rb
@@ -281,6 +283,7 @@ files:
281
283
  - lib/tracker_api/resources/primary_resource.rb
282
284
  - lib/tracker_api/resources/project.rb
283
285
  - lib/tracker_api/resources/project_membership.rb
286
+ - lib/tracker_api/resources/release.rb
284
287
  - lib/tracker_api/resources/search_result_container.rb
285
288
  - lib/tracker_api/resources/shared/base.rb
286
289
  - lib/tracker_api/resources/stories_search_result.rb
@@ -300,6 +303,7 @@ files:
300
303
  - test/file_attachment_test.rb
301
304
  - test/minitest_helper.rb
302
305
  - test/project_test.rb
306
+ - test/release_test.rb
303
307
  - test/story_test.rb
304
308
  - test/task_test.rb
305
309
  - test/vcr/cassettes/client_done_iterations_with_pagination.json
@@ -335,6 +339,7 @@ files:
335
339
  - test/vcr/cassettes/get_project_activity.json
336
340
  - test/vcr/cassettes/get_project_with_epics.json
337
341
  - test/vcr/cassettes/get_project_with_labels.json
342
+ - test/vcr/cassettes/get_releases.json
338
343
  - test/vcr/cassettes/get_story.json
339
344
  - test/vcr/cassettes/get_story_activity.json
340
345
  - test/vcr/cassettes/get_story_comments.json
@@ -350,6 +355,7 @@ files:
350
355
  - test/vcr/cassettes/get_unscheduled_story.json
351
356
  - test/vcr/cassettes/get_workspace.json
352
357
  - test/vcr/cassettes/get_workspace_projects.json
358
+ - test/vcr/cassettes/release_stories.json
353
359
  - test/vcr/cassettes/save_comment.json
354
360
  - test/vcr/cassettes/save_previously_no_label_story_with_new_label.json
355
361
  - test/vcr/cassettes/save_story.json
@@ -448,6 +454,7 @@ test_files:
448
454
  - test/file_attachment_test.rb
449
455
  - test/minitest_helper.rb
450
456
  - test/project_test.rb
457
+ - test/release_test.rb
451
458
  - test/story_test.rb
452
459
  - test/task_test.rb
453
460
  - test/vcr/cassettes/client_done_iterations_with_pagination.json
@@ -483,6 +490,7 @@ test_files:
483
490
  - test/vcr/cassettes/get_project_activity.json
484
491
  - test/vcr/cassettes/get_project_with_epics.json
485
492
  - test/vcr/cassettes/get_project_with_labels.json
493
+ - test/vcr/cassettes/get_releases.json
486
494
  - test/vcr/cassettes/get_story.json
487
495
  - test/vcr/cassettes/get_story_activity.json
488
496
  - test/vcr/cassettes/get_story_comments.json
@@ -498,6 +506,7 @@ test_files:
498
506
  - test/vcr/cassettes/get_unscheduled_story.json
499
507
  - test/vcr/cassettes/get_workspace.json
500
508
  - test/vcr/cassettes/get_workspace_projects.json
509
+ - test/vcr/cassettes/release_stories.json
501
510
  - test/vcr/cassettes/save_comment.json
502
511
  - test/vcr/cassettes/save_previously_no_label_story_with_new_label.json
503
512
  - test/vcr/cassettes/save_story.json