From 04c32a6979bf011d7a7912c45b2bd00ce0d4561f Mon Sep 17 00:00:00 2001 From: drselump14 Date: Sun, 1 Jan 2017 00:55:50 +0900 Subject: [PATCH 1/5] add story#add_owner method to add owner using owner's API --- lib/tracker_api/endpoints/story_owners.rb | 5 +++++ lib/tracker_api/resources/story.rb | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/lib/tracker_api/endpoints/story_owners.rb b/lib/tracker_api/endpoints/story_owners.rb index b0a7d85..77e7691 100644 --- a/lib/tracker_api/endpoints/story_owners.rb +++ b/lib/tracker_api/endpoints/story_owners.rb @@ -15,6 +15,11 @@ def get(project_id, story_id, params={}) Resources::Person.new({ story_id: story_id }.merge(owner)) end end + + def create(project_id, story_id, params={}) + data = client.post("/projects/#{project_id}/stories/#{story_id}/owners", params: params) + Resources::Person.new({ client: client }.merge(data)) + end end end end diff --git a/lib/tracker_api/resources/story.rb b/lib/tracker_api/resources/story.rb index 565aab6..c1bd8e0 100644 --- a/lib/tracker_api/resources/story.rb +++ b/lib/tracker_api/resources/story.rb @@ -78,6 +78,18 @@ def add_label(label) self.labels = (labels ? labels.dup : []).push(new_label) end + # Assigns owner of story + # @param [Person|Integer] owner + def add_owner(person) + person_id = if person.kind_of?(Person) + person.id + else + person + end + + Endpoints::StoryOwners.new(client).create(project_id, id, id: person_id) + end + # Provides a list of all the activity performed on the story. # # @param [Hash] params From 939569b1a11757e3fd58e9d8a791fb5abfff3927 Mon Sep 17 00:00:00 2001 From: drselump14 Date: Sun, 1 Jan 2017 00:39:29 +0900 Subject: [PATCH 2/5] add attribute person for comment --- lib/tracker_api/resources/comment.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tracker_api/resources/comment.rb b/lib/tracker_api/resources/comment.rb index 415c123..6ba3c18 100644 --- a/lib/tracker_api/resources/comment.rb +++ b/lib/tracker_api/resources/comment.rb @@ -10,6 +10,7 @@ class Comment attribute :epic_id, Integer attribute :text, String attribute :person_id, Integer + attribute :person, Person attribute :created_at, DateTime attribute :updated_at, DateTime attribute :file_attachment_ids, [Integer] From ba8d8a217b16e8ca497175f96770556c9ebab12d Mon Sep 17 00:00:00 2001 From: Forest Carlisle Date: Wed, 4 Jan 2017 16:46:27 -0800 Subject: [PATCH 3/5] Ignore vscode configs and binstubs --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 645669e..c352266 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ .config .yardoc .idea +.vscode +bin .DS_Store Gemfile.lock InstalledFiles From 93393dbe4095fa685dcc8fcdd0fb571f2357301d Mon Sep 17 00:00:00 2001 From: Forest Carlisle Date: Wed, 4 Jan 2017 16:48:27 -0800 Subject: [PATCH 4/5] Added test to verify updating story owners works --- lib/tracker_api/endpoints/story_owners.rb | 8 +-- lib/tracker_api/resources/story.rb | 22 +++---- test/minitest_helper.rb | 4 +- test/story_test.rb | 57 +++++++++++-------- .../cassettes/save_story_with_one_owner.json | 1 + .../save_story_with_owner_ids_cchanged.json | 1 - .../save_story_with_owner_ids_changed.json | 1 - .../cassettes/save_story_with_two_owners.json | 1 + 8 files changed, 52 insertions(+), 43 deletions(-) create mode 100644 test/vcr/cassettes/save_story_with_one_owner.json delete mode 100644 test/vcr/cassettes/save_story_with_owner_ids_cchanged.json delete mode 100644 test/vcr/cassettes/save_story_with_owner_ids_changed.json create mode 100644 test/vcr/cassettes/save_story_with_two_owners.json diff --git a/lib/tracker_api/endpoints/story_owners.rb b/lib/tracker_api/endpoints/story_owners.rb index 77e7691..5bb9a27 100644 --- a/lib/tracker_api/endpoints/story_owners.rb +++ b/lib/tracker_api/endpoints/story_owners.rb @@ -16,10 +16,10 @@ def get(project_id, story_id, params={}) end end - def create(project_id, story_id, params={}) - data = client.post("/projects/#{project_id}/stories/#{story_id}/owners", params: params) - Resources::Person.new({ client: client }.merge(data)) - end + # def create(project_id, story_id, params={}) + # data = client.post("/projects/#{project_id}/stories/#{story_id}/owners", params: params) + # Resources::Person.new({ client: client }.merge(data)) + # end end end end diff --git a/lib/tracker_api/resources/story.rb b/lib/tracker_api/resources/story.rb index c1bd8e0..c050dc4 100644 --- a/lib/tracker_api/resources/story.rb +++ b/lib/tracker_api/resources/story.rb @@ -78,17 +78,17 @@ def add_label(label) self.labels = (labels ? labels.dup : []).push(new_label) end - # Assigns owner of story - # @param [Person|Integer] owner - def add_owner(person) - person_id = if person.kind_of?(Person) - person.id - else - person - end - - Endpoints::StoryOwners.new(client).create(project_id, id, id: person_id) - end + # # Assigns owner of story + # # @param [Person|Integer] owner + # def add_owner(person) + # person_id = if person.kind_of?(Person) + # person.id + # else + # person + # end + + # Endpoints::StoryOwners.new(client).create(project_id, id, id: person_id) + # end # Provides a list of all the activity performed on the story. # diff --git a/test/minitest_helper.rb b/test/minitest_helper.rb index 20b39ce..860ee95 100644 --- a/test/minitest_helper.rb +++ b/test/minitest_helper.rb @@ -25,8 +25,8 @@ end # These API Tokens are for a user with just one Public Sample Project -PT_USER_1 = { username: 'trackerapi1', password: 'trackerapi1', token: 'd55c3bc1f74346b843ca84ba340b29bf', project_id: 1027488, workspace_id: 375106 } -PT_USER_2 = { username: 'trackerapi2', password: 'trackerapi2', token: 'ab4c5895f57995bb7547986eacf91160', project_ids: [1027488, 1027492], workspace_id: 581707 } +PT_USER_1 = { username: 'trackerapi1', password: 'trackerapi1', token: 'd55c3bc1f74346b843ca84ba340b29bf', project_id: 1027488, workspace_id: 375106, id: 1266314 } +PT_USER_2 = { username: 'trackerapi2', password: 'trackerapi2', token: 'ab4c5895f57995bb7547986eacf91160', project_ids: [1027488, 1027492], workspace_id: 581707, id: 1266316 } PT_USER_3 = { username: 'trackerapi3', password: 'trackerapi3', token: '77f9b9a466c436e6456939208c84c973', project_id: 1027494 } PT_USERS = [PT_USER_1, PT_USER_2, PT_USER_3] diff --git a/test/story_test.rb b/test/story_test.rb index 8a1f550..5f7f83e 100644 --- a/test/story_test.rb +++ b/test/story_test.rb @@ -1,9 +1,12 @@ require_relative 'minitest_helper' describe TrackerApi::Resources::Story do - let(:pt_user) { PT_USER_1 } - let(:client) { TrackerApi::Client.new token: pt_user[:token] } - let(:project_id) { pt_user[:project_id] } + let(:pt_user_1) { PT_USER_1 } + let(:pt_user_1_id) { pt_user_1[:id] } + let(:pt_user_2) { PT_USER_2 } + let(:pt_user_2_id) { pt_user_2[:id] } + let(:client) { TrackerApi::Client.new token: pt_user_1[:token] } + let(:project_id) { pt_user_1[:project_id] } let(:project) { VCR.use_cassette('get project') { client.project(project_id) } } let(:story_id) { '66728004' } let(:another_story_id) { '66728000' } @@ -116,19 +119,37 @@ end end - describe "updating owners" do - it do - owner_ids = [VCR.use_cassette("get me", record: :new_episodes) { client.me.id }] + describe '.owner_ids' do + it 'gets owner_ids for this story' do + VCR.use_cassette('get story', record: :new_episodes) do + story = project.story(story_id) + owner_ids = story.owner_ids + + owner_ids.wont_be_empty + owner_ids.first.must_be_instance_of Fixnum + end + end - refute_equal story.owner_ids, owner_ids + it 'update owners for a story' do + VCR.use_cassette('get story', record: :new_episodes) do + story = project.story(story_id) - story.owner_ids = owner_ids + # save with one owner + one_owner = [pt_user_1_id] + story.owner_ids = one_owner + VCR.use_cassette('save story with one owner') { story.save } - VCR.use_cassette("save story with owner_ids changed", record: :new_episodes) do - story.save - end + story.owner_ids.wont_be_empty + story.owner_ids.must_equal one_owner + + # save with two owners + two_owners = [pt_user_1_id, pt_user_2_id] + story.owner_ids = two_owners + VCR.use_cassette('save story with two owners') { story.save } - story.owner_ids.must_equal owner_ids + story.owner_ids.wont_be_empty + story.owner_ids.must_equal two_owners + end end end @@ -200,18 +221,6 @@ end end - describe '.owners' do - it 'gets all owners of this story' do - VCR.use_cassette('get story owners', record: :new_episodes) do - owners = story.owners - - owners.wont_be_empty - owner = owners.first - owner.must_be_instance_of TrackerApi::Resources::Person - end - end - end - describe '.comments' do it 'gets all comments of story with just project_id and story_id' do VCR.use_cassette('get story comments', record: :new_episodes) do diff --git a/test/vcr/cassettes/save_story_with_one_owner.json b/test/vcr/cassettes/save_story_with_one_owner.json new file mode 100644 index 0000000..421720a --- /dev/null +++ b/test/vcr/cassettes/save_story_with_one_owner.json @@ -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.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"} \ No newline at end of file diff --git a/test/vcr/cassettes/save_story_with_owner_ids_cchanged.json b/test/vcr/cassettes/save_story_with_owner_ids_cchanged.json deleted file mode 100644 index a984a2a..0000000 --- a/test/vcr/cassettes/save_story_with_owner_ids_cchanged.json +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/test/vcr/cassettes/save_story_with_owner_ids_changed.json b/test/vcr/cassettes/save_story_with_owner_ids_changed.json deleted file mode 100644 index 783ee72..0000000 --- a/test/vcr/cassettes/save_story_with_owner_ids_changed.json +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/test/vcr/cassettes/save_story_with_two_owners.json b/test/vcr/cassettes/save_story_with_two_owners.json new file mode 100644 index 0000000..69f94a5 --- /dev/null +++ b/test/vcr/cassettes/save_story_with_two_owners.json @@ -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,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"} \ No newline at end of file From d8100fb691de8e3303a239817389339894f93391 Mon Sep 17 00:00:00 2001 From: Forest Carlisle Date: Wed, 4 Jan 2017 16:59:34 -0800 Subject: [PATCH 5/5] Remove unnecessary add story owner code. --- lib/tracker_api/endpoints/story_owners.rb | 5 ----- lib/tracker_api/resources/story.rb | 12 ------------ 2 files changed, 17 deletions(-) diff --git a/lib/tracker_api/endpoints/story_owners.rb b/lib/tracker_api/endpoints/story_owners.rb index 5bb9a27..b0a7d85 100644 --- a/lib/tracker_api/endpoints/story_owners.rb +++ b/lib/tracker_api/endpoints/story_owners.rb @@ -15,11 +15,6 @@ def get(project_id, story_id, params={}) Resources::Person.new({ story_id: story_id }.merge(owner)) end end - - # def create(project_id, story_id, params={}) - # data = client.post("/projects/#{project_id}/stories/#{story_id}/owners", params: params) - # Resources::Person.new({ client: client }.merge(data)) - # end end end end diff --git a/lib/tracker_api/resources/story.rb b/lib/tracker_api/resources/story.rb index c050dc4..565aab6 100644 --- a/lib/tracker_api/resources/story.rb +++ b/lib/tracker_api/resources/story.rb @@ -78,18 +78,6 @@ def add_label(label) self.labels = (labels ? labels.dup : []).push(new_label) end - # # Assigns owner of story - # # @param [Person|Integer] owner - # def add_owner(person) - # person_id = if person.kind_of?(Person) - # person.id - # else - # person - # end - - # Endpoints::StoryOwners.new(client).create(project_id, id, id: person_id) - # end - # Provides a list of all the activity performed on the story. # # @param [Hash] params