pivotal-tracker-api 1.0.2 → 1.0.3
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/README.md +2 -1
- data/Rakefile +5 -7
- data/VERSION +1 -1
- data/lib/pivotal-tracker-api/project.rb +5 -2
- data/lib/pivotal-tracker-api/service.rb +2 -1
- data/lib/pivotal-tracker-api/story.rb +4 -0
- data/pivotal-tracker-api.gemspec +3 -3
- data/test/test_service.rb +10 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01d475d2bb83763299e2fd81c24f41421c95ab82
|
4
|
+
data.tar.gz: 86ef726fcfb93e90b019ae0af06dc09d019d5d5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06da62205e127013961dbb9b2af6ebd326ed9695e0919f2f92fe2649827fd62df95922246135edcabad7acd12a86b2ce0360ad00390ebdbd427bc944ec6e3c03
|
7
|
+
data.tar.gz: 5ac7b749a84c800b56e8182fd838ba36d0843c11580d06d4bd6ccb21c5a8f3a880a65daf89806b4c49e90a3d6dfc07c2beb758f491499577b1005cc6e47fcb26
|
data/README.md
CHANGED
@@ -3,7 +3,8 @@ pivotal-tracker-api
|
|
3
3
|
|
4
4
|
A Pivotal Tracker API gem that can be used to interface with the Pivotal Tracker API v5.
|
5
5
|
|
6
|
-
[](
|
6
|
+
[](https://rubygems.org/gems/pivotal-tracker-api)
|
7
|
+
[](https://github.com/atljeremy/pivotal-tracker-api.git)
|
7
8
|
|
8
9
|
### Basic Example
|
9
10
|
|
data/Rakefile
CHANGED
@@ -32,13 +32,11 @@ Rake::TestTask.new(:test) do |test|
|
|
32
32
|
test.verbose = true
|
33
33
|
end
|
34
34
|
|
35
|
-
#require '
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
# test.rcov_opts << '--exclude "gems/*"'
|
41
|
-
#end
|
35
|
+
# require 'simplecov'
|
36
|
+
# SimpleCov.command_name 'Unit Tests'
|
37
|
+
# SimpleCov.start do
|
38
|
+
# add_filter "/test/"
|
39
|
+
# end
|
42
40
|
|
43
41
|
task :default => :test
|
44
42
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
@@ -44,12 +44,15 @@ module PivotalAPI
|
|
44
44
|
Service.activity(opts)
|
45
45
|
end
|
46
46
|
|
47
|
-
def story(opts={})
|
47
|
+
def story(story_id, opts={})
|
48
48
|
opts[:project_id] = id
|
49
|
+
opts[:story_id] = story_id
|
49
50
|
opts[:parameters] = {} unless opts[:parameters]
|
50
51
|
opts[:parameters][:fields] = Story.fields
|
51
52
|
|
52
|
-
Service.story(opts)
|
53
|
+
story = Service.story(opts)
|
54
|
+
story.project_id = id if story && story.project_id.nil?
|
55
|
+
story
|
53
56
|
end
|
54
57
|
|
55
58
|
def stories(opts={})
|
@@ -176,6 +176,7 @@ module PivotalAPI
|
|
176
176
|
raise ArgumentError.new("missing required key/value :story_id") unless opts[:story_id]
|
177
177
|
|
178
178
|
project_id = opts[:project_id]
|
179
|
+
story_id = opts[:story_id]
|
179
180
|
opts[:parameters] = {} unless opts[:parameters]
|
180
181
|
opts[:parameters][:fields] = opts[:fields] if opts[:fields] && opts[:parameters][:fields].nil?
|
181
182
|
|
@@ -193,7 +194,7 @@ module PivotalAPI
|
|
193
194
|
raise ArgumentError.new("missing required parameter project_id") unless project_id
|
194
195
|
raise ArgumentError.new("missing required parameter sotry_id") unless story_id
|
195
196
|
|
196
|
-
api_url = "/projects/#{
|
197
|
+
api_url = "/projects/#{project_id}/stories/#{story_id}"
|
197
198
|
PivotalAPI::Client.put(api_url, updates)
|
198
199
|
end
|
199
200
|
|
data/pivotal-tracker-api.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: pivotal-tracker-api 1.0.
|
5
|
+
# stub: pivotal-tracker-api 1.0.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "pivotal-tracker-api"
|
9
|
-
s.version = "1.0.
|
9
|
+
s.version = "1.0.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["jfox"]
|
14
|
-
s.date = "2016-
|
14
|
+
s.date = "2016-10-26"
|
15
15
|
s.description = "A ruby gem to communicate with the Picotal Tracker API v5"
|
16
16
|
s.email = "atljeremy@me.com"
|
17
17
|
s.extra_rdoc_files = [
|
data/test/test_service.rb
CHANGED
@@ -4,9 +4,9 @@ class TestService < Test::Unit::TestCase
|
|
4
4
|
|
5
5
|
context "PivotalAPI::Service" do
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
setup do
|
8
|
+
PivotalAPI::Service.set_token "5c17c42f0f4c30cbc0c53ddd8f832e7b"
|
9
|
+
end
|
10
10
|
|
11
11
|
# should "get user info" do
|
12
12
|
# me = PivotalAPI::Me.retrieve('USERNAME', 'PASSWORD')
|
@@ -64,6 +64,13 @@ class TestService < Test::Unit::TestCase
|
|
64
64
|
#
|
65
65
|
# assert_not_nil(activity)
|
66
66
|
# end
|
67
|
+
|
68
|
+
should "should get project activity" do
|
69
|
+
project = PivotalAPI::Project.retrieve(1158374)
|
70
|
+
story = project.story(128105441)
|
71
|
+
|
72
|
+
assert_not_nil(story)
|
73
|
+
end
|
67
74
|
|
68
75
|
end
|
69
76
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivotal-tracker-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jfox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|