tracker_api 0.2.0 → 0.2.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 +4 -4
- data/CHANGELOG.md +2 -7
- data/README.md +19 -0
- data/lib/tracker_api/client.rb +1 -1
- data/lib/tracker_api/resources/project.rb +4 -4
- data/lib/tracker_api/version.rb +1 -1
- data/test/client_test.rb +3 -1
- data/test/minitest_helper.rb +2 -0
- data/tracker_api.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b897caea67a6740f4ec6c0a2fffceeb581248ca
|
4
|
+
data.tar.gz: 709d70b6f4cd722acf7c37e87dcdd1d0a81f3185
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0163e2073569220d272f6f23abca2bc2b07ed1688f0eb09131308f58a9b4307e23afce7d389377397d10d62f3d8385f781ee432dcd27331e5754682d0918b6b0
|
7
|
+
data.tar.gz: ac24c26685e42b4dd78af2a9a7d263ee84cacee8ebb6c0e3225e2fa7abed51bf557c737eaf1a93971f292c17370447112965ee37ea08a6769cb9b1b0ca7153f7
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,4 @@
|
|
1
|
-
|
1
|
+
Changelog has moved to Releases
|
2
2
|
---
|
3
|
-
- Initial release.
|
4
3
|
|
5
|
-
|
6
|
-
---
|
7
|
-
- Feature: Added auto pagination.
|
8
|
-
- Bug: Added `current_velocity` attribute to `Project`.
|
9
|
-
- Bug: Removed attributes from `Iteration` that don't exist.
|
4
|
+
Please see [Releases](https://github.com/dashofcode/tracker_api/releases) for changes.
|
data/README.md
CHANGED
@@ -10,6 +10,25 @@ This gem allows you to easily use the [Pivotal Tracker v5 API](https://www.pivot
|
|
10
10
|
|
11
11
|
It’s powered by [Faraday](https://github.com/lostisland/faraday) and [Virtus](https://github.com/solnic/virtus).
|
12
12
|
|
13
|
+
##Demonstration
|
14
|
+
[Dash of Agile](https://www.dashofagile.com) uses `tracker_api` to create agile dashboards from Pivotal Tracker projects.
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
Add this line to your application's Gemfile:
|
19
|
+
```ruby
|
20
|
+
gem 'tracker_api', '~> 0.2.0'
|
21
|
+
```
|
22
|
+
|
23
|
+
And then execute:
|
24
|
+
```bash
|
25
|
+
$ bundle install
|
26
|
+
```
|
27
|
+
|
28
|
+
Or install it yourself as:
|
29
|
+
```bash
|
30
|
+
$ gem install tracker_api
|
31
|
+
```
|
13
32
|
|
14
33
|
## Basic Usage
|
15
34
|
|
data/lib/tracker_api/client.rb
CHANGED
@@ -24,7 +24,7 @@ module TrackerApi
|
|
24
24
|
url = options.fetch(:url, 'https://www.pivotaltracker.com')
|
25
25
|
@url = Addressable::URI.parse(url).to_s
|
26
26
|
@api_version = options.fetch(:api_version, '/services/v5')
|
27
|
-
@logger = options.fetch(:logger, Logger.new(nil))
|
27
|
+
@logger = options.fetch(:logger, ::Logger.new(nil))
|
28
28
|
adapter = options.fetch(:adapter, :net_http)
|
29
29
|
connection_options = options.fetch(:connection_options, { ssl: { verify: true } })
|
30
30
|
@auto_paginate = options.fetch(:auto_paginate, true)
|
@@ -40,7 +40,7 @@ module TrackerApi
|
|
40
40
|
attribute :version, Integer
|
41
41
|
attribute :week_start_day, String
|
42
42
|
|
43
|
-
# @return [String]
|
43
|
+
# @return [String] comma separated list of labels
|
44
44
|
def label_list
|
45
45
|
@label_list ||= labels.collect(&:name).join(',')
|
46
46
|
end
|
@@ -76,13 +76,13 @@ module TrackerApi
|
|
76
76
|
# @option params [Integer] :offset With the first story in your priority list as 0,
|
77
77
|
# the index of the first story you want returned.
|
78
78
|
# @option params [Integer] :limit The number of stories you want returned.
|
79
|
-
# @return [Array[Story]]
|
79
|
+
# @return [Array[Story]] stories associated with this project
|
80
80
|
def stories(params = {})
|
81
81
|
Endpoints::Stories.new(client).get(id, params)
|
82
82
|
end
|
83
83
|
|
84
|
-
# @param [Fixnum] story_id id of story
|
85
|
-
# @return [Story]
|
84
|
+
# @param [Fixnum] story_id id of story to get
|
85
|
+
# @return [Story] Story with given id
|
86
86
|
def story(story_id)
|
87
87
|
Endpoints::Story.new(client).get(id, story_id)
|
88
88
|
end
|
data/lib/tracker_api/version.rb
CHANGED
data/test/client_test.rb
CHANGED
@@ -10,11 +10,13 @@ describe TrackerApi::Client do
|
|
10
10
|
it 'can be configured' do
|
11
11
|
client = TrackerApi::Client.new(url: 'http://test.com',
|
12
12
|
api_version: '/foo-bar/1',
|
13
|
-
token: '12345'
|
13
|
+
token: '12345',
|
14
|
+
logger: LOGGER)
|
14
15
|
|
15
16
|
client.url.must_equal 'http://test.com'
|
16
17
|
client.api_version.must_equal '/foo-bar/1'
|
17
18
|
client.token.must_equal '12345'
|
19
|
+
client.logger.must_equal LOGGER
|
18
20
|
end
|
19
21
|
|
20
22
|
describe '.projects' do
|
data/test/minitest_helper.rb
CHANGED
@@ -28,3 +28,5 @@ PT_USER_1 = { project_id: 1027488, token: '0de3ac29f13082f0c16ed76f3f3f6895' } #
|
|
28
28
|
PT_USER_2 = { project_id: 1027492, token: '90a51cef4e7c358b36b4e4cdf0f2dd2a' } # trackher2 user
|
29
29
|
PT_USER_3 = { project_id: 1027494, token: 'f8aad6b471d1b1eb303d368ef533f622' } # trackher3 user
|
30
30
|
PT_USERS = [PT_USER_1, PT_USER_2, PT_USER_3]
|
31
|
+
|
32
|
+
LOGGER = ::Logger.new(STDOUT)
|
data/tracker_api.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['forestcarlisle@gmail.com']
|
11
11
|
spec.summary = %q{API client for the Pivotal Tracker v5 API}
|
12
12
|
spec.description = %q{This gem allows you to easily use the Pivotal Tracker v5 API.}
|
13
|
-
spec.homepage = ''
|
13
|
+
spec.homepage = 'https://github.com/dashofcode/tracker_api'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
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: 0.2.
|
4
|
+
version: 0.2.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: 2014-
|
11
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -195,7 +195,7 @@ files:
|
|
195
195
|
- test/vcr/cassettes/get_project_with_epics.json
|
196
196
|
- test/vcr/cassettes/get_unscheduled_stories.json
|
197
197
|
- tracker_api.gemspec
|
198
|
-
homepage:
|
198
|
+
homepage: https://github.com/dashofcode/tracker_api
|
199
199
|
licenses:
|
200
200
|
- MIT
|
201
201
|
metadata: {}
|