├── .github └── workflows │ └── ruby-tests.yml ├── .gitignore ├── CHANGELOG.md ├── Gemfile ├── LICENSE.txt ├── README.md ├── Rakefile ├── gemfiles ├── faraday-1.gemfile └── faraday-2.gemfile ├── lib ├── core_ext │ └── object │ │ └── blank.rb ├── tracker_api.rb ├── tracker_api │ ├── client.rb │ ├── endpoints │ │ ├── activity.rb │ │ ├── attachment.rb │ │ ├── attachments.rb │ │ ├── blockers.rb │ │ ├── comment.rb │ │ ├── comments.rb │ │ ├── epic.rb │ │ ├── epics.rb │ │ ├── iteration.rb │ │ ├── iterations.rb │ │ ├── labels.rb │ │ ├── me.rb │ │ ├── memberships.rb │ │ ├── notifications.rb │ │ ├── project.rb │ │ ├── projects.rb │ │ ├── release.rb │ │ ├── releases.rb │ │ ├── review.rb │ │ ├── reviews.rb │ │ ├── search.rb │ │ ├── stories.rb │ │ ├── story.rb │ │ ├── story_owners.rb │ │ ├── story_transitions.rb │ │ ├── task.rb │ │ ├── tasks.rb │ │ ├── webhook.rb │ │ ├── webhooks.rb │ │ ├── workspace.rb │ │ └── workspaces.rb │ ├── error.rb │ ├── file_utility.rb │ ├── logger.rb │ ├── resources │ │ ├── account.rb │ │ ├── activity.rb │ │ ├── blocker.rb │ │ ├── change.rb │ │ ├── comment.rb │ │ ├── cycle_time_details.rb │ │ ├── daily_history_container.rb │ │ ├── epic.rb │ │ ├── epics_search_result.rb │ │ ├── file_attachment.rb │ │ ├── iteration.rb │ │ ├── label.rb │ │ ├── me.rb │ │ ├── membership_summary.rb │ │ ├── notification.rb │ │ ├── person.rb │ │ ├── primary_resource.rb │ │ ├── project.rb │ │ ├── project_membership.rb │ │ ├── pull_request.rb │ │ ├── release.rb │ │ ├── review.rb │ │ ├── review_type.rb │ │ ├── search_result_container.rb │ │ ├── shared │ │ │ └── base.rb │ │ ├── stories_search_result.rb │ │ ├── story.rb │ │ ├── story_transition.rb │ │ ├── task.rb │ │ ├── time_zone.rb │ │ ├── webhook.rb │ │ └── workspace.rb │ └── version.rb └── virtus │ ├── attribute │ └── nullify_blank.rb │ ├── dirty_attribute.rb │ └── dirty_attribute │ └── session.rb ├── test ├── client_test.rb ├── comment_test.rb ├── error_test.rb ├── file_attachment_test.rb ├── iteration_test.rb ├── minitest_helper.rb ├── project_test.rb ├── release_test.rb ├── review_test.rb ├── story_test.rb ├── task_test.rb ├── vcr │ ├── cassettes │ │ ├── client_done_iterations_with_pagination.json │ │ ├── client_get_all_stories_with_pagination.json │ │ ├── client_get_limited_stories_with_no_pagination.json │ │ ├── client_get_single_epic_by_epic_id.json │ │ ├── client_get_single_story_by_story_id.json │ │ ├── create_attachments.json │ │ ├── create_comment.json │ │ ├── create_comment_with_attachment.json │ │ ├── create_epic_attachments.json │ │ ├── create_epic_comment.json │ │ ├── create_epic_comment_with_attachment.json │ │ ├── create_story.json │ │ ├── create_story_attachments.json │ │ ├── create_story_comment.json │ │ ├── create_story_comment_with_attachment.json │ │ ├── create_story_with_lengthy_params.json │ │ ├── create_task.json │ │ ├── delete_an_attachment.json │ │ ├── delete_attachments.json │ │ ├── delete_comment.json │ │ ├── delete_comments.json │ │ ├── delete_epic_attachments.json │ │ ├── delete_epic_comment.json │ │ ├── delete_story_attachments.json │ │ ├── delete_story_comment.json │ │ ├── get_all_notifications.json │ │ ├── get_all_projects.json │ │ ├── get_all_workspaces.json │ │ ├── get_another_story.json │ │ ├── get_comments.json │ │ ├── get_current_iteration.json │ │ ├── get_cycle_time_details.json │ │ ├── get_daily_history_container.json │ │ ├── get_done_iterations.json │ │ ├── get_epic.json │ │ ├── get_epic_comments.json │ │ ├── get_epics.json │ │ ├── get_iteration_by_number.json │ │ ├── get_labels.json │ │ ├── get_me.json │ │ ├── get_my_activities.json │ │ ├── get_owners_for_story.json │ │ ├── get_project.json │ │ ├── get_project_activity.json │ │ ├── get_project_with_epics.json │ │ ├── get_project_with_labels.json │ │ ├── get_releases.json │ │ ├── get_story.json │ │ ├── get_story_activity.json │ │ ├── get_story_comments.json │ │ ├── get_story_in_epic.json │ │ ├── get_story_no_existing_labels.json │ │ ├── get_story_reviews.json │ │ ├── get_story_transitions.json │ │ ├── get_story_with_owners.json │ │ ├── get_story_with_pull_requests.json │ │ ├── get_story_with_tasks.json │ │ ├── get_tasks.json │ │ ├── get_tasks_for_story.json │ │ ├── get_tasks_when_stories_filtered.json │ │ ├── get_unscheduled_stories.json │ │ ├── get_unscheduled_story.json │ │ ├── get_workspace.json │ │ ├── get_workspace_projects.json │ │ ├── release_stories.json │ │ ├── save_comment.json │ │ ├── save_epic_comment.json │ │ ├── save_previously_no_label_story_with_new_label.json │ │ ├── save_review.json │ │ ├── save_story.json │ │ ├── save_story_comment.json │ │ ├── save_story_in_epic.json │ │ ├── save_story_with_multiple_changes.json │ │ ├── save_story_with_new_label.json │ │ ├── save_story_with_one_owner.json │ │ ├── save_story_with_two_owners.json │ │ ├── save_task.json │ │ ├── search_project.json │ │ └── update_story_to_create_activity.json │ └── x-cassettes │ │ ├── client_done_iterations_with_pagination.json │ │ ├── client_get_all_stories_with_pagination.json │ │ ├── client_get_limited_stories_with_no_pagination.json │ │ ├── client_get_single_epic_by_epic_id.json │ │ ├── client_get_single_story_by_story_id.json │ │ ├── create_comment.json │ │ ├── create_story.json │ │ ├── create_story_comment.json │ │ ├── create_story_with_lengthy_params.json │ │ ├── create_task.json │ │ ├── get_all_notifications.json │ │ ├── get_all_projects.json │ │ ├── get_all_workspaces.json │ │ ├── get_another_story.json │ │ ├── get_comments.json │ │ ├── get_current_iteration.json │ │ ├── get_done_iterations.json │ │ ├── get_epics.json │ │ ├── get_iteration_by_number.json │ │ ├── get_labels.json │ │ ├── get_me.json │ │ ├── get_my_activities.json │ │ ├── get_owners_for_story.json │ │ ├── get_project.json │ │ ├── get_project_activity.json │ │ ├── get_project_with_epics.json │ │ ├── get_project_with_labels.json │ │ ├── get_story.json │ │ ├── get_story_activity.json │ │ ├── get_story_comments.json │ │ ├── get_story_in_epic.json │ │ ├── get_story_no_existing_labels.json │ │ ├── get_story_owners.json │ │ ├── get_story_transitions.json │ │ ├── get_story_with_owners.json │ │ ├── get_story_with_tasks.json │ │ ├── get_tasks.json │ │ ├── get_tasks_for_story.json │ │ ├── get_tasks_when_stories_filtered.json │ │ ├── get_unscheduled_stories.json │ │ ├── get_unscheduled_story.json │ │ ├── get_workspace.json │ │ ├── get_workspace_projects.json │ │ ├── save_comment.json │ │ ├── save_previously_no_label_story_with_new_label.json │ │ ├── save_story.json │ │ ├── save_story_in_epic.json │ │ ├── save_story_with_multiple_changes.json │ │ ├── save_story_with_new_label.json │ │ ├── save_story_with_one_owner.json │ │ ├── save_story_with_two_owners.json │ │ ├── save_task.json │ │ ├── search_project.json │ │ └── update_story_to_create_activity.json └── workspace_test.rb └── tracker_api.gemspec /.github/workflows/ruby-tests.yml: -------------------------------------------------------------------------------- 1 | name: Ruby Tests 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | test: 11 | 12 | name: Specs - Ruby ${{ matrix.ruby-version }} ${{matrix.gemfile}} 13 | runs-on: ubuntu-latest 14 | env: 15 | CC_TEST_REPORTER_ID: 8d1cf5f9b65f4b22efbdbb85b82f31ecdf132ea9e7f6728cd288fb05e9fa549a 16 | BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile 17 | 18 | strategy: 19 | matrix: 20 | gemfile: 21 | - faraday-1 22 | - faraday-2 23 | ruby-version: 24 | - "3.3" 25 | - "3.2" 26 | - "3.1" 27 | - jruby 28 | - truffleruby 29 | 30 | steps: 31 | - uses: actions/checkout@v3 32 | - name: Set up Ruby ${{ matrix.ruby-version }} 33 | uses: ruby/setup-ruby@v1 34 | with: 35 | ruby-version: ${{ matrix.ruby-version }} 36 | - name: Set environment 37 | run: echo "COVERAGE=true" >> "$GITHUB_ENV" 38 | if: matrix.ruby-version == '3.3' && matrix.gemfile == 'faraday-2' 39 | - name: Install dependencies 40 | run: bundle install 41 | - name: Run tests 42 | run: bundle exec rake test 43 | - name: Upload Coverage 44 | uses: paambaati/codeclimate-action@v3.2.0 45 | if: matrix.ruby-version == '3.3' && matrix.gemfile == 'faraday-2' 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .bundle 4 | .config 5 | .yardoc 6 | .idea 7 | .vscode 8 | bin 9 | .DS_Store 10 | Gemfile.lock 11 | InstalledFiles 12 | _yardoc 13 | coverage 14 | doc/ 15 | lib/bundler/man 16 | pkg 17 | rdoc 18 | spec/reports 19 | test/tmp 20 | test/version_tmp 21 | tmp 22 | .byebug_history 23 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Changelog has moved to Releases 2 | --- 3 | 4 | Please see [Releases](https://github.com/dashofcode/tracker_api/releases) for changes. 5 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Specify your gem's dependencies in tracker_api.gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [2024] [Irving Phillips] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | begin 2 | require 'bundler/setup' 3 | rescue LoadError 4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks' 5 | end 6 | 7 | require 'bundler/gem_tasks' 8 | 9 | require 'rake/testtask' 10 | 11 | Rake::TestTask.new(:test) do |t| 12 | t.libs << 'lib' 13 | t.libs << 'test' 14 | t.test_files = FileList['test/**/*_test.rb'] 15 | t.verbose = false 16 | t.warning = false 17 | end 18 | 19 | task :default => :test 20 | -------------------------------------------------------------------------------- /gemfiles/faraday-1.gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'faraday', '~> 1.10' 4 | 5 | gemspec path: '../' 6 | -------------------------------------------------------------------------------- /gemfiles/faraday-2.gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'faraday', '~> 2.2' 4 | 5 | gemspec path: '../' 6 | -------------------------------------------------------------------------------- /lib/core_ext/object/blank.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | # Borrowed from: activesupport-4.2.2/lib/active_support/core_ext/object/blank.rb 4 | class Object 5 | # An object is blank if it's false, empty, or a whitespace string. 6 | # For example, '', ' ', +nil+, [], and {} are all blank. 7 | # 8 | # This simplifies 9 | # 10 | # address.nil? || address.empty? 11 | # 12 | # to 13 | # 14 | # address.blank? 15 | # 16 | # @return [true, false] 17 | def blank? 18 | respond_to?(:empty?) ? !!empty? : !self 19 | end 20 | 21 | # An object is present if it's not blank. 22 | # 23 | # @return [true, false] 24 | def present? 25 | !blank? 26 | end 27 | 28 | # Returns the receiver if it's present otherwise returns +nil+. 29 | # object.presence is equivalent to 30 | # 31 | # object.present? ? object : nil 32 | # 33 | # For example, something like 34 | # 35 | # state = params[:state] if params[:state].present? 36 | # country = params[:country] if params[:country].present? 37 | # region = state || country || 'US' 38 | # 39 | # becomes 40 | # 41 | # region = params[:state].presence || params[:country].presence || 'US' 42 | # 43 | # @return [Object] 44 | def presence 45 | self if present? 46 | end 47 | end 48 | 49 | class NilClass 50 | # +nil+ is blank: 51 | # 52 | # nil.blank? # => true 53 | # 54 | # @return [true] 55 | def blank? 56 | true 57 | end 58 | end 59 | 60 | class FalseClass 61 | # +false+ is blank: 62 | # 63 | # false.blank? # => true 64 | # 65 | # @return [true] 66 | def blank? 67 | true 68 | end 69 | end 70 | 71 | class TrueClass 72 | # +true+ is not blank: 73 | # 74 | # true.blank? # => false 75 | # 76 | # @return [false] 77 | def blank? 78 | false 79 | end 80 | end 81 | 82 | class Array 83 | # An array is blank if it's empty: 84 | # 85 | # [].blank? # => true 86 | # [1,2,3].blank? # => false 87 | # 88 | # @return [true, false] 89 | alias_method :blank?, :empty? 90 | end 91 | 92 | class Hash 93 | # A hash is blank if it's empty: 94 | # 95 | # {}.blank? # => true 96 | # { key: 'value' }.blank? # => false 97 | # 98 | # @return [true, false] 99 | alias_method :blank?, :empty? 100 | end 101 | 102 | class String 103 | BLANK_RE = /\A[[:space:]]*\z/ 104 | 105 | # A string is blank if it's empty or contains whitespaces only: 106 | # 107 | # ''.blank? # => true 108 | # ' '.blank? # => true 109 | # "\t\n\r".blank? # => true 110 | # ' blah '.blank? # => false 111 | # 112 | # Unicode whitespace is supported: 113 | # 114 | # "\u00a0".blank? # => true 115 | # 116 | # @return [true, false] 117 | def blank? 118 | BLANK_RE === self 119 | end 120 | end 121 | 122 | class Numeric #:nodoc: 123 | # No number is blank: 124 | # 125 | # 1.blank? # => false 126 | # 0.blank? # => false 127 | # 128 | # @return [false] 129 | def blank? 130 | false 131 | end 132 | end 133 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/activity.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Activity 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(params={}) 11 | data = client.paginate("/my/activity", params: params) 12 | raise Errors::UnexpectedData, 'Array of activities expected' unless data.is_a? Array 13 | 14 | data.map do |activity| 15 | Resources::Activity.new({ client: client }.merge(activity)) 16 | end 17 | end 18 | 19 | def get_project(project_id, params={}) 20 | data = client.paginate("/projects/#{project_id}/activity", params: params) 21 | raise Errors::UnexpectedData, 'Array of activities expected' unless data.is_a? Array 22 | 23 | data.map do |activity| 24 | Resources::Activity.new({ client: client }.merge(activity)) 25 | end 26 | end 27 | 28 | def get_story(project_id, story_id, params={}) 29 | data = client.paginate("/projects/#{project_id}/stories/#{story_id}/activity", params: params) 30 | raise Errors::UnexpectedData, 'Array of activities expected' unless data.is_a? Array 31 | 32 | data.map do |activity| 33 | Resources::Activity.new({ client: client }.merge(activity)) 34 | end 35 | end 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/attachment.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Attachment 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def create(comment, file) 11 | data = client.post("/projects/#{comment.project_id}/uploads", body: FileUtility.get_file_upload(file)).body 12 | Resources::FileAttachment.new({ comment: comment }.merge(data)) 13 | end 14 | 15 | # TODO : Discuss before implementing this as it orphans the file. 16 | # It deletes source, but the file name appears in the comments 17 | # def delete(comment, file_attachment_id) 18 | # client.delete("/projects/#{comment.project_id}/stories/#{comment.story_id}/comments/#{comment.id}/file_attachments/#{file_attachment_id}").body 19 | # end 20 | 21 | def get(comment) 22 | comment_target_slug = !comment.story_id.nil? ? "stories/#{comment.story_id}" : "epics/#{comment.epic_id}" 23 | 24 | data = client.get("/projects/#{comment.project_id}/#{comment_target_slug}/comments/#{comment.id}?fields=file_attachments").body["file_attachments"] 25 | raise Errors::UnexpectedData, 'Array of file attachments expected' unless data.is_a? Array 26 | 27 | data.map do |file_attachment| 28 | Resources::FileAttachment.new({ comment: comment }.merge(file_attachment)) 29 | end 30 | end 31 | 32 | # TODO : Implement this properly. 33 | # This results in either content of the file or an S3 link. 34 | # the S3 link is also present in big_url attribute. 35 | # def download(download_path) 36 | # client.get(download_path, url: '').body 37 | # end 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/attachments.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Attachments 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | 11 | def create(comment, files) 12 | return [] if files.to_a.empty? 13 | #Check files before upload to make it all or none. 14 | FileUtility.check_files_exist(files) 15 | attachment = Endpoints::Attachment.new(client) 16 | files.map do | file | 17 | attachment.create(comment, file) 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/blockers.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Blockers 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.get("/projects/#{project_id}/stories/#{story_id}/blockers", params: params).body 12 | raise Errors::UnexpectedData, 'Array of Blockers expected' unless data.is_a? Array 13 | 14 | data.map do |blocker| 15 | Resources::Blocker.new({ client: client, project_id: project_id }.merge(blocker)) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/comment.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Comment 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def create(project_id, story_id: nil, epic_id: nil, params: {}) 11 | raise ArgumentError, 'One of story id or epic id must be provided.' if story_id.nil? && epic_id.nil? 12 | 13 | comment_target_slug = !story_id.nil? ? "stories/#{story_id}" : "epics/#{epic_id}" 14 | 15 | data = client.post("/projects/#{project_id}/#{comment_target_slug}/comments", params: params).body 16 | Resources::Comment.new({ client: client, project_id: project_id }.merge(data)) 17 | end 18 | 19 | def update(comment, params={}) 20 | raise ArgumentError, 'Valid comment required to update.' unless comment.instance_of?(Resources::Comment) 21 | 22 | comment_target_slug = !comment.story_id.nil? ? "stories/#{comment.story_id}" : "epics/#{comment.epic_id}" 23 | 24 | path = "/projects/#{comment.project_id}/#{comment_target_slug}/comments/#{comment.id}" 25 | if params.represented.file_attachment_ids_to_add.present? || params.represented.file_attachment_ids_to_remove.present? 26 | path += "?fields=:default,file_attachments" 27 | end 28 | data = client.put(path, params: params).body 29 | 30 | comment.attributes = data 31 | comment.clean! 32 | comment 33 | end 34 | 35 | def delete(comment) 36 | raise ArgumentError, 'Valid comment required to update.' unless comment.instance_of?(Resources::Comment) 37 | 38 | comment_target_slug = !comment.story_id.nil? ? "stories/#{comment.story_id}" : "epics/#{comment.epic_id}" 39 | 40 | client.delete("/projects/#{comment.project_id}/#{comment_target_slug}/comments/#{comment.id}").body 41 | end 42 | end 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/comments.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Comments 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(project_id, story_id: nil, epic_id: nil, params: {}) 11 | raise ArgumentError, 'One of story id or epic id must be provided.' if story_id.nil? && epic_id.nil? 12 | 13 | comment_target_slug = !story_id.nil? ? "stories/#{story_id}" : "epics/#{epic_id}" 14 | 15 | data = client.paginate("/projects/#{project_id}/#{comment_target_slug}/comments", params: params) 16 | raise Errors::UnexpectedData, 'Array of comments expected' unless data.is_a? Array 17 | 18 | data.map do |comment| 19 | Resources::Comment.new({ 20 | client: client, 21 | project_id: project_id 22 | }.merge(comment)) 23 | end 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/epic.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Epic 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}/epics/#{id}", params: params).body 12 | 13 | Resources::Epic.new({ client: client, project_id: project_id }.merge(data)) 14 | end 15 | 16 | def get_epic(epic_id, params={}) 17 | data = client.get("/epics/#{epic_id}", params: params).body 18 | 19 | Resources::Epic.new({ client: client }.merge(data)) 20 | end 21 | 22 | def create(project_id, params={}) 23 | data = client.post("/projects/#{project_id}/epics", params: params).body 24 | 25 | Resources::Epic.new({ client: client }.merge(data)) 26 | end 27 | 28 | def update(epic, params={}) 29 | raise ArgumentError, 'Valid epic required to update.' unless epic.instance_of?(Resources::Epic) 30 | 31 | data = client.put("/projects/#{epic.project_id}/epics/#{epic.id}", params: params).body 32 | 33 | epic.attributes = data 34 | epic.clean! 35 | epic 36 | end 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/epics.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Epics 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}/epics", params: params) 12 | raise Errors::UnexpectedData, 'Array of epics expected' unless data.is_a? Array 13 | 14 | data.map do |epic| 15 | Resources::Epic.new({ project_id: project_id }.merge(epic)) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/iteration.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Iteration 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(project_id, iteration_number) 11 | data = client.get("/projects/#{project_id}/iterations/#{iteration_number}").body 12 | 13 | Resources::Iteration.new({ client: client, project_id: project_id }.merge(data)) 14 | end 15 | 16 | def get_analytics_cycle_time_details(project_id, iteration_number) 17 | data = client.paginate("/projects/#{project_id}/iterations/#{iteration_number}/analytics/cycle_time_details") 18 | raise Errors::UnexpectedData, 'Array of cycle time details expected' unless data.is_a? Array 19 | 20 | data.map do |cycle_time_details| 21 | Resources::CycleTimeDetails.new( 22 | { project_id: project_id, iteration_number: iteration_number }.merge(cycle_time_details) 23 | ) 24 | end 25 | end 26 | 27 | def get_history(project_id, iteration_number) 28 | data = client.get("/projects/#{project_id}/history/iterations/#{iteration_number}/days").body 29 | raise Errors::UnexpectedData, 'Hash of history data expected' unless data.is_a? Hash 30 | 31 | Resources::DailyHistoryContainer.new({ project_id: project_id, iteration_number: iteration_number }.merge(data)) 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/iterations.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Iterations 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}/iterations", params: params) 12 | raise Errors::UnexpectedData, 'Array of iterations expected' unless data.is_a? Array 13 | 14 | data.map do |iteration| 15 | Resources::Iteration.new({ client: client, project_id: project_id }.merge(iteration)) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/labels.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Labels 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}/labels", params: params) 12 | raise Errors::UnexpectedData, 'Array of labels expected' unless data.is_a? Array 13 | 14 | data.map do |label| 15 | Resources::Label.new({ project_id: project_id }.merge(label)) 16 | end 17 | end 18 | 19 | def add(project_id, params={}) 20 | data = client.post("/projects/#{project_id}/labels", params: params).body 21 | 22 | Resources::Label.new({ project_id: project_id }.merge(data)) 23 | end 24 | end 25 | end 26 | end -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/me.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Me 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get 11 | data = client.get("/me").body 12 | 13 | Resources::Me.new(data) 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/memberships.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Memberships 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}/memberships", params: params) 12 | raise Errors::UnexpectedData, 'Array of memberships expected' unless data.is_a? Array 13 | 14 | data.map do |membership| 15 | Resources::ProjectMembership.new({ project_id: project_id }.merge(membership)) 16 | end 17 | end 18 | 19 | def add(project_id, params={}) 20 | data = client.post("/projects/#{project_id}/memberships", params: params).body 21 | 22 | Resources::ProjectMembership.new({ project_id: project_id }.merge(data)) 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/notifications.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Notifications 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(params={}) 11 | data = client.paginate('/my/notifications', params: params) 12 | raise Errors::UnexpectedData, 'Array of notifications expected' unless data.is_a? Array 13 | 14 | data.map do |notification| 15 | Resources::Notification.new({ client: client }.merge(notification)) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/project.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Project 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(id, params={}) 11 | data = client.get("/projects/#{id}", params: params).body 12 | 13 | Resources::Project.new({ client: client }.merge(data)) 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/projects.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Projects 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(params={}) 11 | data = client.paginate('/projects', params: params) 12 | raise Errors::UnexpectedData, 'Array of projects expected' unless data.is_a? Array 13 | 14 | data.map { |project| Resources::Project.new({ client: client }.merge(project)) } 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/release.rb: -------------------------------------------------------------------------------- 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 18 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/releases.rb: -------------------------------------------------------------------------------- 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 -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/review.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Review 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def update(review, params = {}) 11 | raise ArgumentError, 'Valid review required to update.' unless review.instance_of?(Resources::Review) 12 | 13 | data = client.put("/projects/#{review.project_id}/stories/#{review.story_id}/reviews/#{review.id}", params: params).body 14 | 15 | review.attributes = data 16 | review.clean! 17 | review 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/reviews.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Reviews 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(project_id, story_id, params={}) 11 | params[:fields] ||= ":default,review_type" 12 | data = client.paginate("/projects/#{project_id}/stories/#{story_id}/reviews", params: params) 13 | raise Errors::UnexpectedData, 'Successful responses to this request return an array containing zero or more instances of the review resource. This response was not an array.' unless data.is_a? Array 14 | 15 | data.map do |review| 16 | Resources::Review.new({ client: client, project_id: project_id }.merge(review)) 17 | end 18 | end 19 | end 20 | end 21 | end -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/search.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Search 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(project_id, query, options={}) 11 | raise ArgumentError, 'Valid query string required to search' unless query.is_a?(String) 12 | 13 | options[:params] = { query: query } 14 | data = client.get("/projects/#{project_id}/search", options).body 15 | 16 | raise Errors::UnexpectedData, 'Hash of search results expect' unless data.is_a? Hash 17 | 18 | Resources::SearchResultContainer.new(data) 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/stories.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Stories 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(project_id, params={}) 11 | url = params[:ids] ? "/projects/#{project_id}/stories/bulk" : "/projects/#{project_id}/stories" 12 | data = client.paginate(url, params: params) 13 | 14 | raise Errors::UnexpectedData, 'Array of stories expected' unless data.is_a? Array 15 | 16 | data.map do |story| 17 | Resources::Story.new({ client: client, project_id: project_id }.merge(story)) 18 | end 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 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/story.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Story 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}/stories/#{id}", params: params).body 12 | 13 | Resources::Story.new({ client: client, project_id: project_id }.merge(data)) 14 | end 15 | 16 | def get_story(story_id, params={}) 17 | data = client.get("/stories/#{story_id}", params: params).body 18 | 19 | Resources::Story.new({ client: client }.merge(data)) 20 | end 21 | 22 | def create(project_id, params={}) 23 | data = client.post("/projects/#{project_id}/stories", params: params).body 24 | 25 | Resources::Story.new({ client: client }.merge(data)) 26 | end 27 | 28 | def update(story, params={}) 29 | raise ArgumentError, 'Valid story required to update.' unless story.instance_of?(Resources::Story) 30 | 31 | data = client.put("/projects/#{story.project_id}/stories/#{story.id}", params: params).body 32 | 33 | story.attributes = data 34 | story.clean! 35 | story 36 | end 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/story_owners.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class StoryOwners 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}/owners", params: params) 12 | raise Errors::UnexpectedData, 'Array of story owners expected' unless data.is_a? Array 13 | 14 | data.map do |owner| 15 | Resources::Person.new({ story_id: story_id }.merge(owner)) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/story_transitions.rb: -------------------------------------------------------------------------------- 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 -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/task.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Task 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def create(project_id, story_id, params={}) 11 | data = client.post("/projects/#{project_id}/stories/#{story_id}/tasks", params: params).body 12 | Resources::Task.new({ client: client }.merge(data)) 13 | end 14 | 15 | def update(task, params={}) 16 | raise ArgumentError, 'Valid task required to update.' unless task.instance_of?(Resources::Task) 17 | 18 | data = client.put("/projects/#{task.project_id}/stories/#{task.story_id}/tasks/#{task.id}", 19 | params: params).body 20 | 21 | task.attributes = data 22 | task.clean! 23 | task 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/tasks.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Tasks 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}/tasks", params: params) 12 | raise Errors::UnexpectedData, 'Array of tasks expected' unless data.is_a? Array 13 | 14 | data.map do |task| 15 | Resources::Task.new({ client: client, 16 | project_id: project_id, 17 | story_id: story_id }.merge(task)) 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/webhook.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Webhook 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}/webhooks/#{id}", params: params).body 12 | 13 | Resources::Webhook.new({ client: client, project_id: project_id }.merge(data)) 14 | end 15 | 16 | def create(project_id, params={}) 17 | data = client.post("/projects/#{project_id}/webhooks", params: params).body 18 | 19 | Resources::Webhook.new({ client: client }.merge(data)) 20 | end 21 | 22 | def update(webhook, params={}) 23 | raise ArgumentError, 'Valid webhook required to update.' unless webhook.instance_of?(Resources::Webhook) 24 | 25 | data = client.put("/projects/#{webhook.project_id}/webhooks/#{webhook.id}", params: params).body 26 | 27 | webhook.attributes = data 28 | webhook.clean! 29 | webhook 30 | end 31 | 32 | def delete(webhook) 33 | raise ArgumentError, 'Valid webhook required to update.' unless webhook.instance_of?(Resources::Webhook) 34 | 35 | data = client.delete("/projects/#{webhook.project_id}/webhooks/#{webhook.id}") 36 | data.status == 204 37 | end 38 | 39 | def delete_from_project(project_id, webhook_id) 40 | data = client.delete("/projects/#{project_id}/webhooks/#{webhook_id}") 41 | data.status == 204 42 | end 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/webhooks.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Webhooks 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}/webhooks", params: params) 12 | raise Errors::UnexpectedData, 'Array of webhooks expected' unless data.is_a? Array 13 | 14 | data.map do |webhook| 15 | Resources::Webhook.new({ client: client, project_id: project_id }.merge(webhook)) 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/workspace.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Workspace 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(id, params={}) 11 | data = client.get("/my/workspaces/#{id}", params: params).body 12 | 13 | Resources::Workspace.new({ client: client }.merge(data)) 14 | end 15 | 16 | def create(params={}) 17 | data = client.post("/my/workspaces", params: params).body 18 | 19 | Resources::Workspace.new({ client: client }.merge(data)) 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/tracker_api/endpoints/workspaces.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Endpoints 3 | class Workspaces 4 | attr_accessor :client 5 | 6 | def initialize(client) 7 | @client = client 8 | end 9 | 10 | def get(params={}) 11 | data = client.paginate('/my/workspaces', params: params) 12 | raise Errors::UnexpectedData, 'Array of workspaces expected' unless data.is_a? Array 13 | 14 | data.map { |workspace| Resources::Workspace.new({ client: client }.merge(workspace)) 15 | } 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/tracker_api/error.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | class Error < StandardError 3 | attr_reader :wrapped_exception, :response 4 | 5 | def initialize(wrapped_exception) 6 | @wrapped_exception = wrapped_exception 7 | @response = wrapped_exception.response 8 | message = if wrapped_exception.is_a?(Faraday::ParsingError) 9 | wrapped_exception.message 10 | elsif faraday_response_error?(wrapped_exception) 11 | wrapped_exception.response.inspect 12 | else 13 | wrapped_exception.instance_variable_get(:@wrapped_exception).inspect 14 | end 15 | super(message) 16 | end 17 | 18 | private 19 | 20 | # faraday 16.0 re-organized their errors. The errors we're interested in, 21 | # Faraday::ClientError before 16.0 and Faraday::ServerError introduced in 22 | # 16.0, are represented by this conditional. 23 | def faraday_response_error?(wrapped_exception) 24 | wrapped_exception.is_a?(Faraday::Error) && 25 | wrapped_exception.respond_to?(:response) 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /lib/tracker_api/file_utility.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | class FileUtility 3 | class << self 4 | def get_file_upload(file) 5 | mime_type = MiniMime.lookup_by_filename(file) 6 | { :file => Faraday::UploadIO.new(file, mime_type) } 7 | end 8 | 9 | def check_files_exist(files) 10 | files.each do | file | 11 | raise ArgumentError, 'Attachment file not found.' unless Pathname.new(file).exist? 12 | end 13 | end 14 | end 15 | end 16 | end -------------------------------------------------------------------------------- /lib/tracker_api/logger.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | class Logger < Faraday::Middleware 3 | extend Forwardable 4 | 5 | def initialize(app, logger = nil) 6 | super(app) 7 | @logger = logger || ::Logger.new(STDOUT) 8 | end 9 | 10 | def_delegators :@logger, :debug, :info, :warn, :error, :fatal 11 | 12 | def call(env) 13 | info("#{env[:method]} => #{env[:url].to_s}") 14 | debug('request') { dump_headers env[:request_headers] } 15 | debug('request.body') { env[:body] } 16 | super 17 | end 18 | 19 | def on_complete(env) 20 | info("#{env[:status]} <= #{env[:url].to_s}") 21 | debug('response') { dump_headers env[:response_headers] } 22 | debug('response.body') { env[:body] } 23 | end 24 | 25 | private 26 | 27 | def dump_headers(headers) 28 | headers.map { |k, v| "#{k}: #{v.inspect}" }.join("\n") 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/account.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Account 4 | include Shared::Base 5 | 6 | attribute :created_at, DateTime 7 | attribute :status, String 8 | attribute :kind, String 9 | attribute :name, String 10 | attribute :updated_at, DateTime 11 | attribute :url, String 12 | attribute :plan, String 13 | attribute :days_left, Integer 14 | attribute :over_the_limit, Boolean 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/activity.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Activity 4 | include Shared::Base 5 | include Equalizer.new(:guid) 6 | 7 | attribute :client 8 | 9 | attribute :kind, String 10 | attribute :guid, String 11 | attribute :project_version, Integer 12 | attribute :message, String 13 | attribute :highlight, String 14 | attribute :changes, [Change] 15 | attribute :primary_resources, [PrimaryResource] 16 | attribute :project, Project 17 | attribute :performed_by, Person 18 | attribute :occurred_at, DateTime 19 | 20 | def project=(data) 21 | super.client = client 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/blocker.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Blocker 4 | include Shared::Base 5 | 6 | attribute :client 7 | attribute :project_id, Integer 8 | 9 | attribute :story_id, Integer 10 | attribute :person_id, Integer 11 | attribute :description, String 12 | attribute :resolved, Boolean 13 | attribute :created_at, DateTime 14 | attribute :updated_at, DateTime 15 | attribute :kind, String 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/change.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Change 4 | include Shared::Base 5 | 6 | attribute :change_type, String 7 | attribute :kind, String 8 | attribute :name, String 9 | attribute :new_values, Hash 10 | attribute :original_values, Hash 11 | attribute :story_type, String 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/comment.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Comment 4 | include Shared::Base 5 | 6 | attribute :client 7 | 8 | attribute :project_id, Integer 9 | attribute :story_id, Integer 10 | attribute :epic_id, Integer 11 | attribute :text, String 12 | attribute :person_id, Integer 13 | attribute :person, Person 14 | attribute :created_at, DateTime 15 | attribute :updated_at, DateTime 16 | attribute :file_attachment_ids, [Integer] 17 | attribute :file_attachments, [FileAttachment] 18 | attribute :google_attachment_ids, [Integer] 19 | attribute :file_attachment_ids_to_add, [Integer] 20 | attribute :file_attachment_ids_to_remove, [Integer] 21 | attribute :commit_identifier, String 22 | attribute :commit_type, String 23 | attribute :kind, String 24 | 25 | class UpdateRepresenter < Representable::Decorator 26 | include Representable::JSON 27 | 28 | property :id 29 | property :text 30 | collection :file_attachment_ids_to_add 31 | collection :file_attachment_ids_to_remove 32 | end 33 | 34 | def save 35 | raise ArgumentError, 'Cannot update a comment with an unknown story_id or epic_id.' if story_id.nil? && epic_id.nil? 36 | 37 | Endpoints::Comment.new(client).update(self, UpdateRepresenter.new(Comment.new(self.dirty_attributes))) 38 | end 39 | 40 | def delete 41 | raise ArgumentError, 'Cannot delete a comment with an unknown story_id or epic_id.' if story_id.nil? && epic_id.nil? 42 | 43 | Endpoints::Comment.new(client).delete(self) 44 | end 45 | 46 | # @param [Hash] params attributes to create the comment with 47 | # @return [Comment] newly created Comment 48 | def create_attachments(params) 49 | self.file_attachment_ids_to_add = Endpoints::Attachments.new(client).create(self, params[:files]).collect(&:id) 50 | save 51 | end 52 | 53 | def delete_attachments(attachment_ids = nil) 54 | self.file_attachment_ids_to_remove = attachment_ids || attachments.collect(&:id) 55 | save 56 | end 57 | 58 | # Provides a list of all the attachments on the comment. 59 | # 60 | # @reload Boolean to reload the attachments 61 | # @return [Array[FileAttachments]] 62 | def attachments(reload: false) 63 | if !reload && @file_attachments.present? 64 | @file_attachments 65 | else 66 | @file_attachments = Endpoints::Attachment.new(client).get(self) 67 | end 68 | end 69 | end 70 | end 71 | end 72 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/cycle_time_details.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class CycleTimeDetails 4 | include Shared::Base 5 | 6 | attribute :project_id, Integer 7 | attribute :iteration_number, Integer 8 | attribute :total_cycle_time, Integer 9 | attribute :started_time, Integer 10 | attribute :started_count, Integer 11 | attribute :finished_time, Integer 12 | attribute :finished_count, Integer 13 | attribute :delivered_time, Integer 14 | attribute :delivered_count, Integer 15 | attribute :rejected_time, Integer 16 | attribute :rejected_count, Integer 17 | attribute :story_id, Integer 18 | attribute :kind, String 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/daily_history_container.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class DailyHistoryContainer 4 | include Shared::Base 5 | 6 | attribute :project_id, Integer 7 | attribute :iteration_number, Integer 8 | attribute :header, [String] 9 | attribute :data, [Enumerable] 10 | attribute :kind, String 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/epic.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Epic 4 | include Shared::Base 5 | 6 | attribute :client 7 | 8 | attribute :comment_ids, [Integer] 9 | attribute :comments, [Comment] 10 | attribute :created_at, DateTime 11 | attribute :description, String 12 | attribute :follower_ids, [Integer] 13 | attribute :followers, [Person] 14 | attribute :kind, String 15 | attribute :label, Label 16 | attribute :label_id, Integer 17 | attribute :name, String 18 | attribute :project_id, Integer 19 | attribute :updated_at, DateTime 20 | attribute :completed_at, DateTime 21 | attribute :projected_completion, DateTime 22 | attribute :url, String 23 | 24 | class UpdateRepresenter < Representable::Decorator 25 | include Representable::JSON 26 | 27 | property :name 28 | property :description 29 | property :label, class: Label, decorator: Label::UpdateRepresenter, render_empty: true 30 | end 31 | 32 | # Save changes to an existing Epic. 33 | def save 34 | raise ArgumentError, 'Can not update an epic with an unknown project_id.' if project_id.nil? 35 | 36 | Endpoints::Epic.new(client).update(self, UpdateRepresenter.new(self)) 37 | end 38 | 39 | # Provides a list of all the comments on the epic. 40 | def comments(reload: false) 41 | if !reload && @comments.present? 42 | @comments 43 | else 44 | @comments = Endpoints::Comments.new(client).get(project_id, epic_id: id) 45 | end 46 | end 47 | 48 | # @param [Hash] params attributes to create the comment with 49 | # @return [Comment] newly created Comment 50 | def create_comment(params) 51 | files = params.delete(:files) 52 | comment = Endpoints::Comment.new(client).create(project_id, epic_id: id, params: params) 53 | comment.create_attachments(files: files) if files.present? 54 | comment 55 | end 56 | end 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/epics_search_result.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class EpicsSearchResult 4 | include Shared::Base 5 | 6 | attribute :epics, Array[Resources::Epic] 7 | attribute :total_hits, Integer 8 | attribute :total_hits_with_done, Integer 9 | attribute :kind, String 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/file_attachment.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class FileAttachment 4 | include Shared::Base 5 | 6 | attribute :comment, Comment 7 | 8 | attribute :id, Integer 9 | attribute :big_url, String 10 | attribute :content_type, String 11 | attribute :created_at, DateTime 12 | attribute :download_url, String 13 | attribute :filename, String 14 | attribute :height, Integer 15 | attribute :kind, String 16 | attribute :size, Integer 17 | attribute :thumbnail_url, String 18 | attribute :thumbnailable, Boolean 19 | attribute :uploaded, Boolean 20 | attribute :uploader_id, Integer 21 | attribute :width, Integer 22 | 23 | def delete 24 | comment.delete_attachments([id]) 25 | end 26 | 27 | # TODO : Implement download properly. 28 | # Look at Attchment#download for more details 29 | # The big_url actually has the AWS S3 link for the file 30 | # def download 31 | # file_data = Endpoints::Attachment.new(comment.client).download(download_url) 32 | # File.open(filename, 'wb') { |fp| fp.write(file_data) } 33 | # end 34 | end 35 | end 36 | end 37 | 38 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/iteration.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Iteration 4 | include Virtus.model 5 | include Equalizer.new(:number, :project_id) 6 | 7 | attribute :client 8 | 9 | attribute :finish, DateTime 10 | attribute :kind, String 11 | attribute :length, Integer 12 | attribute :number, Integer 13 | attribute :planned, Boolean 14 | attribute :project_id, Integer 15 | attribute :start, DateTime 16 | attribute :stories, [Story] 17 | attribute :story_ids, [Integer] 18 | attribute :team_strength, Float 19 | attribute :velocity, Float 20 | attribute :points, Integer 21 | attribute :accepted_points, Integer 22 | attribute :effective_points, Float 23 | 24 | def stories=(data) 25 | super.each { |s| s.client = client } 26 | end 27 | 28 | # Provides a list of all the cycle_time_details of each story in the iteration. 29 | # 30 | # @return [Array[CycleTimeDetails]] array of cycle_time_details of iterations in this project 31 | def cycle_time_details 32 | Endpoints::Iteration.new(client).get_analytics_cycle_time_details(project_id, number) 33 | end 34 | 35 | # Returns per day information of story points and counts by state for the given iteration. 36 | # 37 | # @return [DailyHistoryContainer] 38 | def get_history 39 | Endpoints::Iteration.new(client).get_history(project_id, number) 40 | end 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/label.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Label 4 | include Shared::Base 5 | 6 | attribute :created_at, DateTime 7 | attribute :kind, String 8 | attribute :name, String 9 | attribute :project_id, Integer 10 | attribute :updated_at, DateTime 11 | 12 | class UpdateRepresenter < Representable::Decorator 13 | include Representable::JSON 14 | 15 | property :id 16 | property :name 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/me.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Me 4 | include Shared::Base 5 | 6 | attribute :name, String 7 | attribute :initials, String 8 | attribute :username, String 9 | attribute :time_zone, TimeZone 10 | attribute :api_token, String 11 | attribute :has_google_identity, Boolean 12 | attribute :project_ids, [Integer] 13 | attribute :projects, [MembershipSummary] 14 | attribute :workspace_ids, [Integer] 15 | attribute :workspaces, [Workspace] 16 | attribute :email, String 17 | attribute :receives_in_app_notifications, Boolean 18 | attribute :kind, String 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/membership_summary.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class MembershipSummary 4 | include Shared::Base 5 | 6 | attribute :kind, String 7 | attribute :last_viewed_at, DateTime 8 | attribute :project_color, String 9 | attribute :project_id, Integer 10 | attribute :project_name, String 11 | attribute :role, String 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/notification.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Notification 4 | include Shared::Base 5 | 6 | attribute :client 7 | 8 | attribute :message, String 9 | attribute :context, String 10 | attribute :kind, String 11 | attribute :project, Project 12 | attribute :story, Story 13 | attribute :performer, Person 14 | attribute :created_at, DateTime 15 | attribute :updated_at, DateTime 16 | 17 | def project=(data) 18 | super.client = client 19 | end 20 | 21 | def story=(data) 22 | super.client = client 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/person.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Person 4 | include Shared::Base 5 | 6 | attribute :kind, String 7 | attribute :name, String 8 | attribute :email, String 9 | attribute :initials, String 10 | attribute :username, String 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/primary_resource.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class PrimaryResource 4 | include Shared::Base 5 | 6 | attribute :kind, String 7 | attribute :name, String 8 | attribute :story_type, String 9 | attribute :url, String 10 | end 11 | end 12 | end -------------------------------------------------------------------------------- /lib/tracker_api/resources/project_membership.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class ProjectMembership 4 | include Shared::Base 5 | 6 | attribute :person_id, Integer 7 | attribute :project_id, Integer 8 | attribute :role, String 9 | attribute :project_color, String 10 | attribute :wants_comment_notification_emails, Boolean 11 | attribute :kind, String 12 | attribute :person, Person 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/pull_request.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class PullRequest 4 | include Shared::Base 5 | 6 | attribute :client 7 | 8 | attribute :id, Integer 9 | attribute :story_id, Integer 10 | attribute :epic_id, Integer 11 | attribute :owner, String 12 | attribute :repo, String 13 | attribute :number, Integer 14 | attribute :host_url, String 15 | attribute :original_url, String 16 | attribute :status, String 17 | attribute :created_at, DateTime 18 | attribute :updated_at, DateTime 19 | attribute :kind, String 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/release.rb: -------------------------------------------------------------------------------- 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 30 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/review.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Review 4 | include Shared::Base 5 | 6 | attribute :client 7 | 8 | attribute :id, Integer 9 | attribute :story_id, Integer 10 | attribute :project_id, Integer 11 | attribute :review_type_id, Integer 12 | attribute :reviewer_id, Integer 13 | attribute :status, String # (unstarted, in_review, pass, revise) 14 | attribute :created_at, DateTime 15 | attribute :updated_at, DateTime 16 | attribute :kind, String 17 | attribute :review_type, ReviewType 18 | 19 | class UpdateRepresenter < Representable::Decorator 20 | include Representable::JSON 21 | 22 | property :id 23 | property :review_type_id 24 | property :reviewer_id 25 | property :status 26 | end 27 | 28 | def save 29 | raise ArgumentError, 'Cannot update a review with an unknown story_id.' if story_id.nil? 30 | 31 | Endpoints::Review.new(client).update(self, UpdateRepresenter.new(Review.new(dirty_attributes))) 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/review_type.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class ReviewType 4 | include Shared::Base 5 | 6 | attribute :id, Integer 7 | attribute :project_id, Integer 8 | attribute :name, String 9 | attribute :hidden, Boolean 10 | attribute :created_at, DateTime 11 | attribute :updated_at, DateTime 12 | attribute :kind, String 13 | end 14 | end 15 | end -------------------------------------------------------------------------------- /lib/tracker_api/resources/search_result_container.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class SearchResultContainer 4 | include Shared::Base 5 | 6 | attribute :query, String 7 | attribute :stories, Resources::StoriesSearchResult 8 | attribute :epics, Resources::EpicsSearchResult 9 | attribute :kind, String 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/shared/base.rb: -------------------------------------------------------------------------------- 1 | require 'virtus' 2 | if Virtus::Attribute::NullifyBlank.method_defined?(:coerce) 3 | require 'virtus/attribute/nullify_blank' 4 | else 5 | raise """ 6 | WARNING: The above monkey patch can't be applied as expected. 7 | See discussion here: https://github.com/dashofcode/tracker_api/commit/27599e7e2169776c32bbff8c972a31b930452879 8 | """ 9 | end 10 | require 'virtus/dirty_attribute' 11 | 12 | module TrackerApi 13 | module Resources 14 | module Shared 15 | module Base 16 | def self.included(base) 17 | base.class_eval do 18 | include Virtus.model(nullify_blank: true) 19 | include Virtus::DirtyAttribute 20 | include Virtus::DirtyAttribute::InitiallyClean 21 | 22 | include Equalizer.new(:id) 23 | 24 | attribute :id, Integer 25 | end 26 | end 27 | end 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/stories_search_result.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class StoriesSearchResult 4 | include Shared::Base 5 | 6 | attribute :stories, Array[Resources::Story] 7 | attribute :total_hits, Integer 8 | attribute :total_hits_with_done, Integer 9 | attribute :total_points, Float 10 | attribute :total_points_completed, Float 11 | attribute :kind, String 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/story_transition.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class StoryTransition 4 | include Shared::Base 5 | 6 | attribute :state, String 7 | attribute :occurred_at, DateTime 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/task.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Task 4 | include Shared::Base 5 | 6 | attribute :client 7 | 8 | attribute :project_id, Integer 9 | attribute :story_id, Integer 10 | attribute :description, String 11 | attribute :complete, Boolean 12 | attribute :position, Integer 13 | attribute :created_at, DateTime 14 | attribute :updated_at, DateTime 15 | attribute :kind, String 16 | 17 | class UpdateRepresenter < Representable::Decorator 18 | include Representable::JSON 19 | 20 | property :id 21 | property :description 22 | property :complete 23 | property :position 24 | end 25 | 26 | def save 27 | raise ArgumentError, 'Cannot update a task with an unknown project_id.' if project_id.nil? 28 | raise ArgumentError, 'Cannot update a task with an unknown story_id.' if story_id.nil? 29 | 30 | Endpoints::Task.new(client).update(self, UpdateRepresenter.new(Task.new(self.dirty_attributes))) 31 | end 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/time_zone.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class TimeZone 4 | include Virtus.value_object 5 | 6 | values do 7 | attribute :offset, String 8 | attribute :olson_name, String 9 | attribute :kind, String 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/webhook.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Webhook 4 | include Shared::Base 5 | 6 | attribute :client 7 | 8 | attribute :kind, String 9 | attribute :project_id, Integer 10 | attribute :webhook_url, String 11 | attribute :webhook_version, String 12 | attribute :created_at, DateTime 13 | attribute :updated_at, DateTime 14 | 15 | class UpdateRepresenter < Representable::Decorator 16 | include Representable::JSON 17 | 18 | property :project_id 19 | property :webhook_url 20 | property :webhook_version 21 | end 22 | 23 | def delete 24 | raise ArgumentError, 'Can not delete a webhook with an unknown project_id.' if project_id.nil? 25 | 26 | Endpoints::Webhook.new(client).delete(self) 27 | end 28 | 29 | # Save changes to an existing Webhook. 30 | def save 31 | raise ArgumentError, 'Can not update a webhook with an unknown project_id.' if project_id.nil? 32 | 33 | Endpoints::Webhook.new(client).update(self, UpdateRepresenter.new(Webhook.new(self.dirty_attributes))) 34 | end 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/tracker_api/resources/workspace.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | module Resources 3 | class Workspace 4 | include Shared::Base 5 | 6 | attribute :client 7 | 8 | attribute :person, Person 9 | attribute :person_id, Integer 10 | attribute :created_at, DateTime 11 | attribute :project_ids, [Integer] 12 | attribute :projects, [Project] 13 | attribute :kind, String 14 | attribute :name, String 15 | 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/tracker_api/version.rb: -------------------------------------------------------------------------------- 1 | module TrackerApi 2 | VERSION = '1.16.0' 3 | end 4 | -------------------------------------------------------------------------------- /lib/virtus/attribute/nullify_blank.rb: -------------------------------------------------------------------------------- 1 | module Virtus 2 | class Attribute 3 | 4 | # Attribute extension which nullifies blank attributes when coercion failed 5 | # 6 | module NullifyBlank 7 | 8 | # @see [Attribute#coerce] 9 | # 10 | # @api public 11 | def coerce(input) 12 | output = super 13 | 14 | if !value_coerced?(output) && input.blank? 15 | nil 16 | # Added to nullify anything that is blank not just strings. 17 | elsif output.blank? && output != false 18 | nil 19 | else 20 | output 21 | end 22 | end 23 | 24 | end # NullifyBlank 25 | 26 | end # Attribute 27 | end # Virtus 28 | -------------------------------------------------------------------------------- /lib/virtus/dirty_attribute/session.rb: -------------------------------------------------------------------------------- 1 | # @source: https://github.com/ahawkins/virtus-dirty_attribute 2 | module Virtus 3 | module DirtyAttribute 4 | class Session 5 | attr_reader :subject 6 | 7 | def initialize(subject) 8 | @subject = subject 9 | end 10 | 11 | def original_attributes 12 | @_original_attributes ||= get_original_attributes(subject).dup 13 | end 14 | 15 | def dirty_attributes 16 | @_dirty_attributes ||= {} 17 | end 18 | 19 | def dirty!(name, value) 20 | dirty_attributes[name] = value 21 | end 22 | 23 | def attribute_clean!(name) 24 | dirty_attributes.delete name 25 | original_attributes.delete name 26 | end 27 | 28 | def dirty?(name = nil) 29 | name ? dirty_attributes.key?(name) : dirty_attributes.any? 30 | end 31 | 32 | def clean! 33 | original_attributes.clear 34 | dirty_attributes.clear 35 | end 36 | 37 | private 38 | 39 | # Get the original values from the instance variable directly and not 40 | # the possibly overridden accessor. 41 | # 42 | # This allows for accessors that are created to provide lazy loading 43 | # of external resources. 44 | # 45 | # Whenever something is loaded from the server is should be marked clean. 46 | def get_original_attributes(subject) 47 | subject.class.attribute_set.each_with_object({}) do |attribute, attributes| 48 | name = attribute.name 49 | attributes[name] = subject.instance_variable_get("@#{name}") 50 | end 51 | end 52 | end 53 | end 54 | end 55 | -------------------------------------------------------------------------------- /test/error_test.rb: -------------------------------------------------------------------------------- 1 | require_relative 'minitest_helper' 2 | 3 | describe TrackerApi::Error do 4 | let(:pt_user) { PT_USER_1 } 5 | let(:client) { TrackerApi::Client.new token: pt_user[:token] } 6 | let(:options) { { url: nil, headers: nil } } 7 | 8 | it 'raises ClientError for 4xx HTTP status codes' do 9 | (400..499).each do |status_code| 10 | mock_faraday_error(status_code) 11 | assert_raises TrackerApi::Errors::ClientError do 12 | client.send(:request, :get, options) 13 | end 14 | end 15 | end 16 | 17 | it 'raises ServerError for 5xx HTTP status codes' do 18 | (500..599).each do |status_code| 19 | mock_faraday_error(status_code) 20 | assert_raises TrackerApi::Errors::ServerError do 21 | client.send(:request, :get, options) 22 | end 23 | end 24 | end 25 | 26 | it 'raises RuntimeError for HTTP status codes < 400 and > 500' do 27 | [399, 600].each do |status_code| 28 | mock_faraday_error(status_code) 29 | assert_raises RuntimeError, "Expected 4xx or 5xx HTTP status code" do 30 | client.send(:request, :get, options) 31 | end 32 | end 33 | end 34 | 35 | # Simulate the error Faraday will raise with a specific HTTP status code so 36 | # we can test our rescuing of those errors 37 | def mock_faraday_error(status_code) 38 | mocked_error_class = if (500..599).include?(status_code) && Faraday::VERSION.to_f >= 16.0 39 | Faraday::ServerError 40 | else 41 | Faraday::ClientError 42 | end 43 | 44 | ::Faraday::Connection.any_instance.stubs(:get). 45 | raises(mocked_error_class.new(nil, { status: status_code})) 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /test/file_attachment_test.rb: -------------------------------------------------------------------------------- 1 | require_relative 'minitest_helper' 2 | 3 | describe TrackerApi::Resources::FileAttachment 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 | let(:story_id) { '66728004' } 9 | let(:story) { VCR.use_cassette('get story') { project.story(story_id) } } 10 | 11 | it 'can be deleted' do 12 | VCR.use_cassette('delete an attachment', record: :new_episodes) do 13 | comment_with_attachments = story.create_comment(text: "test comment", files: [File.expand_path('../Gemfile', File.dirname(__FILE__))]) 14 | _(comment_with_attachments.attachments(reload: true).size).must_equal 1 15 | comment_with_attachments.attachments.first.delete 16 | _(comment_with_attachments.attachments(reload: true).size).must_equal 0 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /test/iteration_test.rb: -------------------------------------------------------------------------------- 1 | require_relative 'minitest_helper' 2 | 3 | describe TrackerApi::Resources::Iteration 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 | let(:iteration) { VCR.use_cassette('get current iteration') { project.iterations(scope: "current").first } } 9 | 10 | describe "#cycle_time_details" do 11 | it "gets all cycle_time_details for this iteration" do 12 | VCR.use_cassette('get cycle time details', record: :new_episodes) do 13 | cycle_time_details = iteration.cycle_time_details 14 | 15 | _(cycle_time_details).wont_be_empty 16 | cycle_time_detail = cycle_time_details.first 17 | _(cycle_time_detail).must_be_instance_of TrackerApi::Resources::CycleTimeDetails 18 | end 19 | end 20 | end 21 | 22 | describe "#get_history" do 23 | it "gets all history for a particular iteration" do 24 | VCR.use_cassette('get daily history container', record: :new_episodes) do 25 | daily_history_container = iteration.get_history 26 | 27 | _(daily_history_container).must_be_instance_of TrackerApi::Resources::DailyHistoryContainer 28 | end 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /test/minitest_helper.rb: -------------------------------------------------------------------------------- 1 | #Bundler.require(:test) 2 | $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) 3 | 4 | if ENV['COVERAGE'] == 'true' 5 | require 'simplecov' 6 | SimpleCov.start 7 | end 8 | 9 | require 'minitest/byebug' if ENV['DEBUG'] 10 | require 'minitest/autorun' 11 | 12 | require 'mocha' 13 | require('mocha/minitest') 14 | 15 | require 'awesome_print' 16 | require 'multi_json' 17 | require 'vcr' 18 | 19 | require 'tracker_api' 20 | # require File.expand_path('../../lib/tracker_api', __FILE__) 21 | 22 | Dir[File.expand_path('../{support,shared}/**/*.rb', __FILE__)].each { |f| require f } 23 | 24 | VCR.configure do |c| 25 | c.ignore_localhost = true 26 | c.cassette_library_dir = File.expand_path('../vcr/cassettes', __FILE__).to_s 27 | c.default_cassette_options = { serialize_with: :json } 28 | c.hook_into :faraday 29 | c.allow_http_connections_when_no_cassette = false 30 | end 31 | 32 | # These API Tokens are for a user with just one Public Sample Project 33 | PT_USER_1 = { username: 'trackerapi1', password: 'trackerapi1', token: 'd55c3bc1f74346b843ca84ba340b29bf', project_id: 1027488, workspace_id: 375106, id: 1266314 } 34 | PT_USER_2 = { username: 'trackerapi2', password: 'trackerapi2', token: 'ab4c5895f57995bb7547986eacf91160', project_ids: [1027488, 1027492], workspace_id: 581707, id: 1266316 } 35 | PT_USER_3 = { username: 'trackerapi3', password: 'trackerapi3', token: '77f9b9a466c436e6456939208c84c973', project_id: 1027494 } 36 | PT_USERS = [PT_USER_1, PT_USER_2, PT_USER_3] 37 | 38 | LOGGER = ::Logger.new(STDOUT) 39 | # LOGGER.level = ::Logger::DEBUG 40 | -------------------------------------------------------------------------------- /test/release_test.rb: -------------------------------------------------------------------------------- 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 23 | -------------------------------------------------------------------------------- /test/review_test.rb: -------------------------------------------------------------------------------- 1 | require_relative 'minitest_helper' 2 | 3 | describe TrackerApi::Resources::Review do 4 | let(:pt_user) { PT_USER_1 } 5 | let(:client) { TrackerApi::Client.new token: pt_user[:token] } 6 | let(:story) do 7 | TrackerApi::Resources::Story.new( 8 | client: client, 9 | project_id: pt_user[:project_id], 10 | id: '66728004' 11 | ) 12 | end 13 | let(:reviews) { VCR.use_cassette('get story reviews') { story.reviews } } 14 | let(:existing_review) { reviews.first } 15 | 16 | it 'can update an existing review' do 17 | new_state = 'pass' 18 | existing_review.status = new_state 19 | 20 | VCR.use_cassette('save review', record: :new_episodes) do 21 | existing_review.save 22 | end 23 | 24 | _(existing_review.status).must_equal new_state 25 | _(existing_review.clean?).must_equal true 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /test/task_test.rb: -------------------------------------------------------------------------------- 1 | require_relative 'minitest_helper' 2 | 3 | describe TrackerApi::Resources::Task 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 | let(:story_id) { '66728004' } 9 | let(:story) { VCR.use_cassette('get story') { project.story(story_id) } } 10 | let(:tasks) { VCR.use_cassette('get tasks', record: :new_episodes) { 11 | VCR.use_cassette('get tasks for story') { story.tasks } } } 12 | let(:task) { tasks.first } 13 | 14 | it 'can update an existing task' do 15 | new_description = "#{task.description}+" 16 | task.description = new_description 17 | task.complete = true 18 | 19 | VCR.use_cassette('save task', record: :new_episodes) do 20 | task.save 21 | end 22 | 23 | _(task.description).must_equal new_description 24 | _(task.complete).must_equal true 25 | _(task.clean?).must_equal true 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /test/vcr/cassettes/client_get_single_epic_by_epic_id.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/epics/1087314?fields=%3Adefault%2Clabel_id","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":["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":["Wed, 03 May 2017 23:29:50 GMT"],"Etag":["\"16fa2db17e653781a8158dcd83c85549\""],"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":["83a1d5edaef1ef6083fcb6068dd06bfb"],"X-Runtime":["0.057815"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["241"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["102072a1-25b8-4ba6-4773-560f7eb224b8"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["420"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"id\":1087314,\"kind\":\"epic\",\"created_at\":\"2014-03-02T07:11:07Z\",\"updated_at\":\"2014-03-02T07:11:07Z\",\"project_id\":1027488,\"name\":\"Admin Users\",\"label_id\":7849080,\"description\":\"Get the Admin users working on the site\",\"url\":\"https://www.pivotaltracker.com/epic/show/1087314\",\"label\":{\"id\":7849080,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"admin\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:50 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/client_get_single_story_by_story_id.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/stories/66728004?fields=%3Adefault%2Cowned_by","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":["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":["Wed, 03 May 2017 23:30:03 GMT"],"Etag":["\"ecbeb5a97319b337e5f11374e371b2be\""],"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":["95f9c3475f72a6044bb0aed45924b35d"],"X-Runtime":["0.082890"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["242"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["f97d056d-d0ba-4fa5-6bfb-37eb812ddc38"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["993"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728004,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-05-03T23:30:01Z\",\"story_type\":\"bug\",\"name\":\"Some product photos not scaled properly when browsing products+++++++++\",\"description\":\"++++++++++\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728004\",\"project_id\":1027488,\"owned_by\":{\"kind\":\"person\",\"id\":1266314,\"name\":\"Tracker API User1\",\"email\":\"forestcarlisle+trackerapi1@gmail.com\",\"initials\":\"TU1\",\"username\":\"trackerapi1\"},\"owner_ids\":[1266314,1266316],\"labels\":[{\"id\":11049868,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":11049870,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":14060665,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"super-special-label\",\"created_at\":\"2016-02-12T23:45:13Z\",\"updated_at\":\"2016-02-12T23:45:13Z\"}]}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:30:03 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/create_epic_comment.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"post","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/epics/4737194/comments","body":{"encoding":"UTF-8","string":"{\"text\":\"Test creating a comment\"}"},"headers":{"User-Agent":["Ruby/2.7.1 (x86_64-darwin19; ruby) TrackerApi/1.12.0 Faraday/1.3.0"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Accept":["application/json"],"Content-Type":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"Cache-Control":["max-age=0, private, must-revalidate"],"X-Tracker-Project-Version":["727"],"X-Request-Id":["f2b97d78-d9fc-40cf-8c59-01f3820ab130"],"ETag":["W/\"61de286759b9d4574641e38bf4d1fc55\""],"X-Frame-Options":["SAMEORIGIN"],"X-Runtime":["0.239854"],"X-Content-Type-Options":["nosniff, nosniff"],"Date":["Wed, 03 Mar 2021 09:22:13 GMT"],"X-Powered-By":["Phusion Passenger"],"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":["20"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-XSS-Protection":["1; mode=block"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"comment\",\"id\":222405254,\"epic_id\":4737194,\"text\":\"Test creating a comment\",\"person_id\":1266314,\"created_at\":\"2021-03-03T09:22:13Z\",\"updated_at\":\"2021-03-03T09:22:13Z\"}"}},"recorded_at":"Wed, 03 Mar 2021 09:22:13 GMT"}],"recorded_with":"VCR 6.0.0"} -------------------------------------------------------------------------------- /test/vcr/cassettes/create_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"post","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories","body":{"encoding":"UTF-8","string":"{\"name\":\"Test story\"}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 23:29:42 GMT"],"Etag":["\"6e18b43307677a9d6818da591ed233f3\""],"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":["invalidate, pass"],"X-Request-Id":["ab8f50efd38e2dc5091a818e3a94b1f4"],"X-Runtime":["0.294540"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["234"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["d8f816a8-bf0d-43c1-5a43-42e657cb2249"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["310"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":144829981,\"project_id\":1027488,\"name\":\"Test story\",\"story_type\":\"feature\",\"current_state\":\"unscheduled\",\"requested_by_id\":1266314,\"owner_ids\":[],\"labels\":[],\"created_at\":\"2017-05-03T23:29:42Z\",\"updated_at\":\"2017-05-03T23:29:42Z\",\"url\":\"https://www.pivotaltracker.com/story/show/144829981\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:42 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_all_notifications.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/my/notifications","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":["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":["Wed, 03 May 2017 23:34:47 GMT"],"Etag":["\"1e6ae1ddb4189a1a6bdf060a51acc4a4\""],"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":["1ac54de54f161f8b27c8d1669b070c8d"],"X-Runtime":["0.034673"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Last-Notification-Timestamp":["1493854445000"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["9c757dac-96e7-4e08-72aa-bfccf8c11600"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["566"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"kind\":\"notification\",\"id\":343759627,\"project\":{\"kind\":\"project\",\"id\":1027488,\"name\":\"My Sample Project\"},\"performer\":{\"kind\":\"person\",\"id\":1266316,\"name\":\"Tracker API User2\"},\"message\":\"You were mentioned by Tracker API User2\",\"context\":\"@trackerapi1 yo.\",\"notification_type\":\"comment_with_mention\",\"new_attachment_count\":0,\"action\":\"create\",\"story\":{\"kind\":\"story\",\"id\":66728014,\"name\":\"Shopper should be able to enter credit card information and shipping address\"},\"comment_id\":170363537,\"created_at\":\"2017-05-03T23:34:05Z\",\"updated_at\":\"2017-05-03T23:34:05Z\"}]"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:34:47 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_all_workspaces.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/my/workspaces?fields=%3Adefault%2Cprojects%28id%2Cname%29","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":["ab4c5895f57995bb7547986eacf91160"]}},"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:38 GMT"],"Etag":["\"a80576b5a281d7a36a8e3aada2cb8c7c\""],"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":["b2ed5572fdb888e16c4afa2da854149b"],"X-Runtime":["0.029837"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["e4fb6b48-667d-4a1a-6f0c-16daf96e4a2f"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["216"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"kind\":\"workspace\",\"projects\":[{\"id\":1027488,\"name\":\"My Sample Project\"},{\"id\":1027492,\"name\":\"My Sample Project\"}],\"id\":581707,\"name\":\"Multi-Project Workspace\",\"person_id\":1266316,\"project_ids\":[1027488,1027492]}]"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:38 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_another_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728000","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":["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":["Wed, 03 May 2017 23:29:46 GMT"],"Etag":["\"54b8cf5cab3b547d4f390d2f2ab6002b\""],"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":["b858777f0d497d9678dde1a19a5dd4ba"],"X-Runtime":["0.045680"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["238"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["70c9e407-f6ef-4487-77fd-d21129247d9f"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["644"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728000,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-01-03T23:49:51Z\",\"estimate\":1,\"story_type\":\"feature\",\"name\":\"Shopper should be able to remove product from shopping cart\",\"current_state\":\"rejected\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728000\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849086,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"cart\",\"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\"}]}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:46 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_comments.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/comments","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":["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":["Wed, 03 May 2017 23:29:38 GMT"],"Etag":["\"e2ea467dbb96dcb2386a4d77ac8b3141\""],"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":["372dd57cf261d1d1c3f525f5246a5e05"],"X-Runtime":["0.024526"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["230"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["a9e5e009-4081-4bfa-613e-e7dd1335ef64"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["715"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"kind\":\"comment\",\"id\":120836920,\"story_id\":66728004,\"text\":\"This is a comment.++\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:13:55Z\",\"updated_at\":\"2017-05-03T23:23:34Z\"},{\"kind\":\"comment\",\"id\":120836938,\"story_id\":66728004,\"text\":\"This is another comment.\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:14:04Z\",\"updated_at\":\"2015-12-17T22:14:04Z\"},{\"kind\":\"comment\",\"id\":155658605,\"story_id\":66728004,\"text\":\"Test creating a comment\",\"person_id\":1266314,\"created_at\":\"2016-11-16T14:17:47Z\",\"updated_at\":\"2016-11-16T14:17:47Z\"},{\"kind\":\"comment\",\"id\":170362899,\"story_id\":66728004,\"text\":\"Test creating a comment\",\"person_id\":1266314,\"created_at\":\"2017-05-03T23:23:33Z\",\"updated_at\":\"2017-05-03T23:23:33Z\"}]"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:38 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_daily_history_container.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/history/iterations/283/days","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.5.0 (x86_64-darwin17; ruby) TrackerApi/1.9.1 Faraday/0.15.4"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"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":["Wed, 10 Jul 2019 04:20:08 GMT"],"Etag":["W/\"28d10f48867d1b3680a81a878bd4ba4e\""],"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"],"X-Request-Id":["8e55283c-cc89-48b6-bb8b-8b74833aba72"],"X-Runtime":["0.236481"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["588"],"X-Vcap-Request-Id":["e0e3defe-a75c-4b64-4a3e-7ad525b12a01"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["418"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"daily_history_container\",\"header\":[\"date\",\"points_accepted\",\"points_delivered\",\"points_finished\",\"points_started\",\"points_rejected\",\"points_planned\",\"points_unstarted\",\"points_unscheduled\",\"counts_accepted\",\"counts_delivered\",\"counts_finished\",\"counts_started\",\"counts_rejected\",\"counts_planned\",\"counts_unstarted\",\"counts_unscheduled\"],\"data\":[[\"2019-07-09\",0.0,2.0,2.0,3.0,1.0,0.0,1.0,0.0,0,1,2,3,1,0,3,0]]}"},"http_version":null},"recorded_at":"Wed, 10 Jul 2019 04:20:05 GMT"}],"recorded_with":"VCR 5.0.0"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_epic.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/epics/4737194","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.7.1 (x86_64-darwin19; ruby) TrackerApi/1.12.0 Faraday/1.3.0"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Accept":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"Cache-Control":["max-age=0, private, must-revalidate"],"X-Tracker-Project-Version":["705"],"X-Request-Id":["6a66b335-175a-4a71-b68e-1ac2306cea6a"],"ETag":["W/\"533c78c1f44f57a69022792057206e38\""],"X-Frame-Options":["SAMEORIGIN"],"X-Runtime":["0.051479"],"X-Content-Type-Options":["nosniff, nosniff"],"Date":["Wed, 03 Mar 2021 09:21:51 GMT"],"X-Powered-By":["Phusion Passenger"],"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":["20"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-XSS-Protection":["1; mode=block"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"id\":4737194,\"kind\":\"epic\",\"created_at\":\"2021-03-03T08:35:42Z\",\"updated_at\":\"2021-03-03T09:21:04Z\",\"project_id\":1027488,\"name\":\"Test\",\"url\":\"https://www.pivotaltracker.com/epic/show/4737194\",\"label\":{\"id\":22934751,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"test\",\"created_at\":\"2021-03-03T08:35:42Z\",\"updated_at\":\"2021-03-03T08:35:42Z\"}}"}},"recorded_at":"Wed, 03 Mar 2021 09:21:51 GMT"}],"recorded_with":"VCR 6.0.0"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_epics.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/epics","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":["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":["Wed, 03 May 2017 23:29:51 GMT"],"Etag":["\"50d5d9653574e5f2088f09f04069f82c\""],"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":["3d842eb83c1d46779d65c0cc77ae31a5"],"X-Runtime":["0.041290"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["241"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["996229c4-381e-448b-4fe2-30b2e83ee729"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["796"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"id\":1087314,\"kind\":\"epic\",\"created_at\":\"2014-03-02T07:11:07Z\",\"updated_at\":\"2014-03-02T07:11:07Z\",\"project_id\":1027488,\"name\":\"Admin Users\",\"description\":\"Get the Admin users working on the site\",\"url\":\"https://www.pivotaltracker.com/epic/show/1087314\",\"label\":{\"id\":7849080,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"admin\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}},{\"id\":1087316,\"kind\":\"epic\",\"created_at\":\"2014-03-02T07:11:07Z\",\"updated_at\":\"2014-03-02T07:11:07Z\",\"project_id\":1027488,\"name\":\"Shoppers\",\"description\":\"Allow shoppers to use the site\",\"url\":\"https://www.pivotaltracker.com/epic/show/1087316\",\"label\":{\"id\":7849082,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"shopping\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}}]"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:51 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_me.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/me","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":["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":["Wed, 03 May 2017 23:30:01 GMT"],"Etag":["\"48e9db07a22d66874d2c47803d38fb67\""],"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":["fb4b1401a9c3acba4a4401fff7897f7a"],"X-Runtime":["0.027231"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["b621e371-a4f8-49a2-416b-22808ef69c4d"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["621"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"me\",\"id\":1266314,\"name\":\"Tracker API User1\",\"initials\":\"TU1\",\"username\":\"trackerapi1\",\"time_zone\":{\"kind\":\"time_zone\",\"olson_name\":\"America/Los_Angeles\",\"offset\":\"-07:00\"},\"api_token\":\"d55c3bc1f74346b843ca84ba340b29bf\",\"has_google_identity\":false,\"projects\":[{\"kind\":\"membership_summary\",\"id\":4001820,\"project_id\":1027488,\"project_name\":\"My Sample Project\",\"project_color\":\"555555\",\"favorite\":false,\"role\":\"owner\",\"last_viewed_at\":\"2017-05-03T19:41:42Z\"}],\"email\":\"forestcarlisle+trackerapi1@gmail.com\",\"receives_in_app_notifications\":true,\"created_at\":\"2014-03-02T07:09:48Z\",\"updated_at\":\"2017-05-03T23:17:22Z\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:30:01 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_owners_for_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/owners","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":["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":["Wed, 03 May 2017 23:29:41 GMT"],"Etag":["\"1b3412c670febaa8cc831588a4b38288\""],"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":["90a173a6ecfe172dd1311beb096ff5f6"],"X-Runtime":["0.049767"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["233"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["cd264716-e329-4fe1-5fad-714c80c4ecc4"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["295"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"kind\":\"person\",\"id\":1266314,\"name\":\"Tracker API User1\",\"email\":\"forestcarlisle+trackerapi1@gmail.com\",\"initials\":\"TU1\",\"username\":\"trackerapi1\"},{\"kind\":\"person\",\"id\":1266316,\"name\":\"Tracker API User2\",\"email\":\"forestcarlisle+trackerapi2@gmail.com\",\"initials\":\"TU2\",\"username\":\"trackerapi2\"}]"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:41 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_project.json: -------------------------------------------------------------------------------- 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.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 23:29:38 GMT"],"Etag":["\"928382b6b491b74decd2f365a3b52efb\""],"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":["da203112fff8e7ae79c3274c56e8ed30"],"X-Runtime":["0.045395"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["230"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["09701d50-04b4-4c36-534d-be1d56ea3308"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["847"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"id\":1027488,\"kind\":\"project\",\"name\":\"My Sample Project\",\"version\":230,\"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\":169,\"enable_following\":true}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:38 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","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":["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":["Wed, 03 May 2017 23:29:38 GMT"],"Etag":["\"eba1e032cc7698b812898cba67ce9ddf\""],"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":["83c1fc2b64e46026482431c386efb178"],"X-Runtime":["0.038293"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["230"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["05d7e020-f0e6-43a2-4b1e-5df3139d5a01"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["702"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728004,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-05-03T23:28:56Z\",\"story_type\":\"bug\",\"name\":\"Some product photos not scaled properly when browsing products++++++++\",\"description\":\"+++++++++\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728004\",\"project_id\":1027488,\"owner_ids\":[1266314,1266316],\"labels\":[{\"id\":11049868,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":11049870,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"}],\"owned_by_id\":1266314}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:38 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_story_comments.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/comments","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":["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":["Wed, 03 May 2017 23:29:33 GMT"],"Etag":["\"e2ea467dbb96dcb2386a4d77ac8b3141\""],"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":["811b5fb9b0c1b82368f48b331eebbdf1"],"X-Runtime":["0.037190"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["230"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["e1cebe00-a4fd-4beb-430f-937dfc15c6c1"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["715"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"kind\":\"comment\",\"id\":120836920,\"story_id\":66728004,\"text\":\"This is a comment.++\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:13:55Z\",\"updated_at\":\"2017-05-03T23:23:34Z\"},{\"kind\":\"comment\",\"id\":120836938,\"story_id\":66728004,\"text\":\"This is another comment.\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:14:04Z\",\"updated_at\":\"2015-12-17T22:14:04Z\"},{\"kind\":\"comment\",\"id\":155658605,\"story_id\":66728004,\"text\":\"Test creating a comment\",\"person_id\":1266314,\"created_at\":\"2016-11-16T14:17:47Z\",\"updated_at\":\"2016-11-16T14:17:47Z\"},{\"kind\":\"comment\",\"id\":170362899,\"story_id\":66728004,\"text\":\"Test creating a comment\",\"person_id\":1266314,\"created_at\":\"2017-05-03T23:23:33Z\",\"updated_at\":\"2017-05-03T23:23:33Z\"}]"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:33 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_story_in_epic.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728030","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.1 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":["Thu, 10 Aug 2017 00:43:48 GMT"],"Etag":["\"ad00e2519a528a75040db99754645a00\""],"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":["9cf32ccf6c3d7c7a9ef006f20ade805b"],"X-Runtime":["0.038823"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["307"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["7fee37f6-76fe-4ec5-4b1b-9f05ff3d471f"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["650"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728030,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-08-09T23:58:18Z\",\"estimate\":3,\"story_type\":\"feature\",\"name\":\"Admin can review all order questions and send responses to shoppers\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728030\",\"project_id\":1027488,\"owner_ids\":[],\"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\":7849094,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"orders\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"}]}"},"http_version":null},"recorded_at":"Thu, 10 Aug 2017 00:43:54 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_story_no_existing_labels.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/82330712","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":["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":["Wed, 03 May 2017 23:29:44 GMT"],"Etag":["\"b944c5d03a5f9caf10dc234e66f9ecda\""],"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":["3707afef70ebe98dec72b7c60b57831b"],"X-Runtime":["0.047150"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["236"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["2739202d-70c9-4f8d-6a5b-054b38cbbb33"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["354"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":82330712,\"created_at\":\"2014-11-08T00:23:58Z\",\"updated_at\":\"2017-05-03T23:27:49Z\",\"estimate\":1,\"story_type\":\"feature\",\"name\":\"Test story\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/82330712\",\"project_id\":1027488,\"owner_ids\":[1266316,1266314],\"labels\":[],\"owned_by_id\":1266316}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:44 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_story_transitions.json: -------------------------------------------------------------------------------- 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.7.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":["Wed, 03 May 2017 23:29:40 GMT"],"Etag":["\"967a44e1aeaba9aa5d3432b3ac55f0f6\""],"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":["ec071679965406a96b272826499cfdc0"],"X-Runtime":["0.056078"],"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":["232"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["7c3f7094-2b98-4090-7c93-25dd66e6bed8"],"X-Xss-Protection":["1; mode=block"],"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":"Wed, 03 May 2017 23:29:40 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_story_with_owners.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004?fields=%3Adefault%2Cowners","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":["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":["Wed, 03 May 2017 23:29:41 GMT"],"Etag":["\"45a798c33dcf2584e78161a838831ffd\""],"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":["3d3f41df5e5566d40cfad01104118592"],"X-Runtime":["0.048824"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["233"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["4c0bb18f-c3aa-418a-5307-06ad1f72f21d"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["1007"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728004,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-05-03T23:29:39Z\",\"story_type\":\"bug\",\"name\":\"Some product photos not scaled properly when browsing products++++++++\",\"description\":\"+++++++++\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728004\",\"project_id\":1027488,\"owner_ids\":[1266314,1266316],\"owners\":[{\"kind\":\"person\",\"id\":1266314,\"name\":\"Tracker API User1\",\"email\":\"forestcarlisle+trackerapi1@gmail.com\",\"initials\":\"TU1\",\"username\":\"trackerapi1\"},{\"kind\":\"person\",\"id\":1266316,\"name\":\"Tracker API User2\",\"email\":\"forestcarlisle+trackerapi2@gmail.com\",\"initials\":\"TU2\",\"username\":\"trackerapi2\"}],\"labels\":[{\"id\":11049868,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":11049870,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"}],\"owned_by_id\":1266314}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:41 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_story_with_pull_requests.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004?fields=%3Adefault%2Cpull_requests","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.7.2 (x86_64-darwin19; ruby) TrackerApi/1.13.0 Faraday/1.4.1"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Accept":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"Cache-Control":["max-age=0, private, must-revalidate"],"X-Tracker-Project-Version":["728"],"X-Request-Id":["e17a5715-671b-487e-b1c2-561cc87c09bd"],"ETag":["W/\"d8502383608d12d511d24d83e41e7948\""],"X-Frame-Options":["SAMEORIGIN"],"X-Runtime":["0.066465"],"X-Content-Type-Options":["nosniff, nosniff"],"Date":["Fri, 23 Apr 2021 21:44:02 GMT"],"X-Powered-By":["Phusion Passenger"],"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":["20"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-XSS-Protection":["1; mode=block"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728004,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2021-04-23T21:23:18Z\",\"story_type\":\"bug\",\"name\":\"Some product photos not scaled properly when browsing products+++++++++++++++++++++++++++\",\"description\":\"++++++++++++++++\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728004\",\"project_id\":1027488,\"owner_ids\":[1266314,1266316],\"labels\":[{\"id\":11049870,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":14060665,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"super-special-label\",\"created_at\":\"2016-02-12T23:45:13Z\",\"updated_at\":\"2016-02-12T23:45:13Z\"}],\"pull_requests\":[{\"id\":1606521,\"kind\":\"pull_request\",\"story_id\":66728004,\"owner\":\"ProductPlan\",\"repo\":\"tracker_api\",\"host_url\":\"https://github.com/\",\"original_url\":\"https://github.com/ProductPlan/tracker_api/pull/148\",\"status\":\"unknown\",\"number\":148,\"created_at\":\"2021-04-23T21:23:18Z\",\"updated_at\":\"2021-04-23T21:23:18Z\"}],\"owned_by_id\":1266314}"}},"recorded_at":"Fri, 23 Apr 2021 21:44:02 GMT"}],"recorded_with":"VCR 6.0.0"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_tasks.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","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":["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":["Wed, 03 May 2017 23:29:52 GMT"],"Etag":["\"73f8af883896b14862f8595eca98c711\""],"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":["7f8f22c288d0f6c3d5b9768954002ba3"],"X-Runtime":["0.032824"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["241"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["1ad2a026-8889-4b6c-78a2-35ac749ece0b"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["857"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728004,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-05-03T23:29:47Z\",\"story_type\":\"bug\",\"name\":\"Some product photos not scaled properly when browsing products+++++++++\",\"description\":\"++++++++++\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728004\",\"project_id\":1027488,\"owner_ids\":[1266314,1266316],\"labels\":[{\"id\":11049868,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":11049870,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":14060665,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"super-special-label\",\"created_at\":\"2016-02-12T23:45:13Z\",\"updated_at\":\"2016-02-12T23:45:13Z\"}],\"owned_by_id\":1266314}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:52 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_workspace.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/my/workspaces/375106","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":["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":["Wed, 03 May 2017 23:29:51 GMT"],"Etag":["\"416b574e9e3c936a067f766c0ac0f0cd\""],"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":["bcf760c4a1f6cd551b0b9bb13e733aa1"],"X-Runtime":["0.041356"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["32a18141-48ff-446c-6ad0-70d6052a9f9d"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["109"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"id\":375106,\"kind\":\"workspace\",\"name\":\"Multi-Project Workspace\",\"person_id\":1266314,\"project_ids\":[1027488]}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:51 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/get_workspace_projects.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/my/workspaces/581707?fields=%3Adefault%2Cprojects%28id%2Cname%29","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":["ab4c5895f57995bb7547986eacf91160"]}},"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:30:03 GMT"],"Etag":["\"4df6da31f198f5941fc271ef908a519d\""],"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":["303816a49adccc88043a088decd2a7b3"],"X-Runtime":["0.038220"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["2"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["1d7348ee-6698-41bc-6415-7e924102c91d"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["182"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"id\":581707,\"kind\":\"workspace\",\"name\":\"Multi-Project Workspace\",\"person_id\":1266316,\"projects\":[{\"id\":1027488,\"name\":\"My Sample Project\"},{\"id\":1027492,\"name\":\"My Sample Project\"}]}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:30:03 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_comment.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/comments/120836920","body":{"encoding":"UTF-8","string":"{\"text\":\"This is a comment.+++\"}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 23:29:39 GMT"],"Etag":["\"32f56ee2d2f58495f5243892aa8ab824\""],"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":["invalidate, pass"],"X-Request-Id":["51304f42f751d73a2484764013fcd838"],"X-Runtime":["0.344871"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["231"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["76b36118-3332-4513-5eef-f0667c4b9bb6"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["176"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"comment\",\"id\":120836920,\"story_id\":66728004,\"text\":\"This is a comment.+++\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:13:55Z\",\"updated_at\":\"2017-05-03T23:29:39Z\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:39 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_epic_comment.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/epics/4737194/comments/222404217","body":{"encoding":"UTF-8","string":"{\"text\":\"Test creating a comment+++\"}"},"headers":{"User-Agent":["Ruby/2.7.1 (x86_64-darwin19; ruby) TrackerApi/1.12.0 Faraday/1.3.0"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Accept":["application/json"],"Content-Type":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"Cache-Control":["max-age=0, private, must-revalidate"],"X-Tracker-Project-Version":["715"],"X-Request-Id":["470028e7-fbfa-455e-a994-58ceea2e583a"],"ETag":["W/\"bb994f35ba8eea5cd965644f11b4ed58\""],"X-Frame-Options":["SAMEORIGIN"],"X-Runtime":["0.425120"],"X-Content-Type-Options":["nosniff, nosniff"],"Date":["Wed, 03 Mar 2021 09:21:59 GMT"],"X-Powered-By":["Phusion Passenger"],"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":["20"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-XSS-Protection":["1; mode=block"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"comment\",\"id\":222404217,\"epic_id\":4737194,\"text\":\"Test creating a comment+++\",\"person_id\":1266314,\"created_at\":\"2021-03-03T08:41:25Z\",\"updated_at\":\"2021-03-03T09:21:59Z\"}"}},"recorded_at":"Wed, 03 Mar 2021 09:22:00 GMT"}],"recorded_with":"VCR 6.0.0"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_previously_no_label_story_with_new_label.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/82330712","body":{"encoding":"UTF-8","string":"{\"labels\":[{\"name\":\"super-special-label\"}]}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 23:29:45 GMT"],"Etag":["\"7c79f7ca965c79f24799b8be284662c7\""],"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":["invalidate, pass"],"X-Request-Id":["7ac3cc1cf3fa28ac607fd855cfd75092"],"X-Runtime":["0.223347"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["237"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["38521c79-b355-46b8-618f-f8537233ca95"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["506"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":82330712,\"project_id\":1027488,\"name\":\"Test story\",\"story_type\":\"feature\",\"current_state\":\"started\",\"estimate\":1,\"requested_by_id\":1266314,\"owned_by_id\":1266316,\"owner_ids\":[1266316,1266314],\"labels\":[{\"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-11-08T00:23:58Z\",\"updated_at\":\"2017-05-03T23:29:45Z\",\"url\":\"https://www.pivotaltracker.com/story/show/82330712\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:45 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_review.json: -------------------------------------------------------------------------------- 1 | { "http_interactions": [ { "request": { "method": "put", "uri": "https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/reviews/1129224", "body": { "encoding": "UTF-8", "string": "{\"status\":\"pass\"}" }, "headers": { "User-Agent": [ "Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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": ["Wed, 03 May 2017 23:29:39 GMT"], "Etag": ["\"32f56ee2d2f58495f5243892aa8ab824\""], "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": ["invalidate, pass"], "X-Request-Id": ["51304f42f751d73a2484764013fcd838"], "X-Runtime": ["0.344871"], "X-Tracker-Client-Pinger-Interval": ["20"], "X-Tracker-Project-Version": ["231"], "X-Ua-Compatible": ["IE=Edge,chrome=1"], "X-Vcap-Request-Id": ["76b36118-3332-4513-5eef-f0667c4b9bb6"], "X-Xss-Protection": ["1; mode=block"], "Content-Length": ["176"], "Connection": ["keep-alive"] }, "body": { "encoding": "ASCII-8BIT", "string": "{\"kind\":\"review\",\"id\":1129224,\"story_id\":66728004,\"review_type_id\":2293634,\"reviewer_id\":1266314,\"status\":\"pass\",\"created_at\":\"2020-06-03T15:55:47Z\",\"updated_at\":\"2020-06-03T15:56:00Z\"}" }, "http_version": null }, "recorded_at": "Wed, 03 May 2017 23:29:39 GMT" } ], "recorded_with": "VCR 2.9.3" } 2 | -------------------------------------------------------------------------------- /test/vcr/cassettes/save_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","body":{"encoding":"UTF-8","string":"{\"name\":\"Some product photos not scaled properly when browsing products+++++++++\"}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 23:29:47 GMT"],"Etag":["\"fb7156f862d01043483eff7d0098a100\""],"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":["invalidate, pass"],"X-Request-Id":["77e969adf743c1d34de820d64b42f1f0"],"X-Runtime":["0.177926"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["239"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["5e913406-c526-4818-761c-f67b4af7a498"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["857"],"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-05-03T23:29:46Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728004\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:47 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_story_comment.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/comments/120836920","body":{"encoding":"UTF-8","string":"{\"text\":\"This is a comment.+++\"}"},"headers":{"User-Agent":["Ruby/2.7.1 (x86_64-darwin19; ruby) TrackerApi/1.12.0 Faraday/1.3.0"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"],"Accept":["application/json"],"Content-Type":["application/json"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"Cache-Control":["max-age=0, private, must-revalidate"],"X-Tracker-Project-Version":["726"],"X-Request-Id":["ca50d90b-16ef-44df-beef-831f46518859"],"ETag":["W/\"5a111cf1c6b1601c8741e19299251617\""],"X-Frame-Options":["SAMEORIGIN"],"X-Runtime":["0.298672"],"X-Content-Type-Options":["nosniff, nosniff"],"Date":["Wed, 03 Mar 2021 09:22:12 GMT"],"X-Powered-By":["Phusion Passenger"],"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":["20"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains; preload"],"X-XSS-Protection":["1; mode=block"],"Via":["1.1 google"],"Alt-Svc":["clear"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"comment\",\"id\":120836920,\"story_id\":66728004,\"text\":\"This is a comment.+++\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:13:55Z\",\"updated_at\":\"2021-03-03T09:22:12Z\"}"}},"recorded_at":"Wed, 03 Mar 2021 09:22:13 GMT"}],"recorded_with":"VCR 6.0.0"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_story_in_epic.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728030","body":{"encoding":"UTF-8","string":"{}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 23:29:46 GMT"],"Etag":["\"8ba3267b1f66ab13dd9745281838d7d8\""],"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":["invalidate, pass"],"X-Request-Id":["6bedd31826663a38a6345422fc2abcf0"],"X-Runtime":["0.050612"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["238"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["55431dae-0304-4270-53ef-bc551b1cdd60"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["650"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728030,\"project_id\":1027488,\"name\":\"Admin can review all order questions and send responses to shoppers\",\"story_type\":\"feature\",\"current_state\":\"started\",\"estimate\":2,\"requested_by_id\":1266314,\"owner_ids\":[],\"labels\":[{\"kind\":\"label\",\"id\":7849080,\"project_id\":1027488,\"name\":\"admin\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"},{\"kind\":\"label\",\"id\":7849094,\"project_id\":1027488,\"name\":\"orders\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"}],\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-05-03T23:29:45Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728030\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:46 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_story_with_multiple_changes.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","body":{"encoding":"UTF-8","string":"{\"name\":\"Some product photos not scaled properly when browsing products+++++++++\",\"description\":\"++++++++++\"}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 23:29:46 GMT"],"Etag":["\"fb7156f862d01043483eff7d0098a100\""],"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":["invalidate, pass"],"X-Request-Id":["e4b300cb4447f51ea1338d8f1c70712c"],"X-Runtime":["0.292102"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["239"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["3c00b7de-ba0d-4698-4e35-dfc571336d9b"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["857"],"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-05-03T23:29:46Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728004\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:46 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_story_with_new_label.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","body":{"encoding":"UTF-8","string":"{\"labels\":[{\"id\":11049868,\"name\":\"label1\"},{\"id\":11049870,\"name\":\"label2\"},{\"name\":\"super-special-label\"}]}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 23:29:44 GMT"],"Etag":["\"194af773e5eac159a94f51a8e6393f36\""],"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":["invalidate, pass"],"X-Request-Id":["29ac7522fa4c7f1af579495d253a5d1d"],"X-Runtime":["0.355225"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["236"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["51e670f2-fcef-4824-4aa8-7857880b2cc0"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["855"],"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-05-03T23:29:44Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728004\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:44 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_story_with_one_owner.json: -------------------------------------------------------------------------------- 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.7.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":["Wed, 03 May 2017 23:29:47 GMT"],"Etag":["\"83abc0af762bf15405646ae6917ecf77\""],"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":["invalidate, pass"],"X-Request-Id":["b7e8d43f38338c493d2bf06fb3c2ee75"],"X-Runtime":["0.185787"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["240"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["6488c3cb-bd7d-41c1-5b1c-5c55b051510c"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["849"],"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-05-03T23:29:47Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728004\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:47 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_story_with_two_owners.json: -------------------------------------------------------------------------------- 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.7.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":["Wed, 03 May 2017 23:29:47 GMT"],"Etag":["\"8fedae9c6a22d36cd8eb9468a0a31524\""],"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":["invalidate, pass"],"X-Request-Id":["a9d69187516ce8aa19f96c11c0f70b76"],"X-Runtime":["0.238806"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["241"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["84141c71-2467-462a-50f4-49bb8beccd6e"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["857"],"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-05-03T23:29:47Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728004\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:29:47 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/cassettes/save_task.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/tasks/22778038","body":{"encoding":"UTF-8","string":"{\"description\":\"Check unscaled+++++\"}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 23:30:03 GMT"],"Etag":["\"438d00a2165f6b912ce7883db225b615\""],"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":["invalidate, pass"],"X-Request-Id":["20155f37c92ba8eaa3b568e5e5cc5527"],"X-Runtime":["0.196687"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["243"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["3d5f3dee-f9ed-4561-4cfa-5349001668c7"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["186"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"task\",\"id\":22778038,\"story_id\":66728004,\"description\":\"Check unscaled+++++\",\"complete\":true,\"position\":1,\"created_at\":\"2014-06-02T12:44:52Z\",\"updated_at\":\"2017-05-03T23:30:03Z\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 23:30:03 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/client_get_single_epic_by_epic_id.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/epics/1087314?fields=%3Adefault%2Clabel_id","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:52 GMT"],"X-Tracker-Project-Version":["110"],"X-Request-Id":["798d97291a0d37c3945ad19ecb8ca7cc"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"16fa2db17e653781a8158dcd83c85549\""],"X-Runtime":["0.056851"],"X-Rack-Cache":["miss"],"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":"{\"id\":1087314,\"kind\":\"epic\",\"created_at\":\"2014-03-02T07:11:07Z\",\"updated_at\":\"2014-03-02T07:11:07Z\",\"project_id\":1027488,\"name\":\"Admin Users\",\"label_id\":7849080,\"description\":\"Get the Admin users working on the site\",\"url\":\"https://www.pivotaltracker.com/epic/show/1087314\",\"label\":{\"id\":7849080,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"admin\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}}"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:52 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/create_comment.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"post","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/comments","body":{"encoding":"UTF-8","string":"{\"text\":\"Test creating a comment\"}"},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin14; ruby) TrackerApi/1.4.1 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":["Wed, 16 Nov 2016 14:17:47 GMT"],"Etag":["\"05a4afa88e8d89128c99e3803eb746cd\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains"],"X-Powered-By":["Phusion Passenger"],"X-Rack-Cache":["invalidate, pass"],"X-Request-Id":["c64522554bfcacb90f63fea5c9025473"],"X-Runtime":["0.148598"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["155"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["27b5c8de-19f9-46c8-42b0-8fd3f82ed5cb"],"Content-Length":["178"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"comment\",\"id\":155658605,\"story_id\":66728004,\"text\":\"Test creating a comment\",\"person_id\":1266314,\"created_at\":\"2016-11-16T14:17:47Z\",\"updated_at\":\"2016-11-16T14:17:47Z\"}"},"http_version":null},"recorded_at":"Wed, 16 Nov 2016 14:17:48 GMT"}],"recorded_with":"VCR 3.0.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/create_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"post","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories","body":{"encoding":"UTF-8","string":"{\"name\":\"Test story\"}"},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 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":["Sat, 13 Feb 2016 23:35:53 GMT"],"X-Tracker-Project-Version":["111"],"X-Request-Id":["b7a8364782090ee97919912047293e83"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"16412711e1d7a521a62acb3228755435\""],"X-Runtime":["0.242162"],"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\":113692661,\"project_id\":1027488,\"name\":\"Test story\",\"story_type\":\"feature\",\"current_state\":\"unscheduled\",\"requested_by_id\":1266314,\"owner_ids\":[],\"labels\":[],\"created_at\":\"2016-02-13T23:35:53Z\",\"updated_at\":\"2016-02-13T23:35:53Z\",\"url\":\"https://www.pivotaltracker.com/story/show/113692661\"}"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:53 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/create_story_comment.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"post","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728030/comments","body":{"encoding":"UTF-8","string":"{\"text\":\"This is a test comment.\"}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 21:02:53 GMT"],"Etag":["\"3fba2b6ec156f4e8954c8d3e767717d1\""],"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":["invalidate, pass"],"X-Request-Id":["7f10e8cdc65f73f587649605d8433060"],"X-Runtime":["0.174983"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["169"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["84551415-6a75-4d7d-4ef2-ba36472bf425"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["178"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"comment\",\"id\":170349667,\"story_id\":66728030,\"text\":\"This is a test comment.\",\"person_id\":1266314,\"created_at\":\"2017-05-03T21:02:53Z\",\"updated_at\":\"2017-05-03T21:02:53Z\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 21:02:53 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_all_notifications.json: -------------------------------------------------------------------------------- 1 | { 2 | "http_interactions": [ 3 | { 4 | "request": { 5 | "method": "get", 6 | "uri": "https://www.pivotaltracker.com/services/v5/my/notifications", 7 | "body": { 8 | "encoding": "US-ASCII", 9 | "string": "" 10 | }, 11 | "headers": { 12 | "User-Agent": ["Ruby/2.1.5 (x86_64-darwin14.0; ruby) TrackerApi/0.2.6 Faraday/0.9.0"], 13 | "X-TrackerToken": ["d55c3bc1f74346b843ca84ba340b29bf"] 14 | } 15 | }, 16 | "response": { 17 | "status": { 18 | "code": 200, 19 | "message": null 20 | }, 21 | "headers": { 22 | "Content-Type": ["application/json; charset=utf-8"], 23 | "Status": ["200 OK"], 24 | "X-Tracker-Last-Notification-Timestamp": ["1422318958000"], 25 | "X-UA-Compatible": ["IE=Edge,chrome=1"], 26 | "ETag": ["\"8b9fdbed1595a4d0dd400be2e7d9fed9\""], 27 | "Cache-Control": ["max-age=0, private, must-revalidate"], 28 | "X-Request-Id": ["f699c20a0214ecb5df9fd0b3d2a9a611"], 29 | "X-Runtime": ["0.049450"], 30 | "Date": ["Tue, 27 Jan 2015 00:36:39 GMT"], 31 | "X-Rack-Cache": ["miss"], 32 | "X-Powered-By": ["Phusion Passenger 4.0.41"], 33 | "Server": ["nginx/1.6.0 + Phusion Passenger 4.0.41"], 34 | "Access-Control-Allow-Origin": ["*"], 35 | "Access-Control-Allow-Credentials": ["false"], 36 | "Access-Control-Allow-Methods": ["GET, POST, PUT, DELETE, OPTIONS"], 37 | "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"], 38 | "X-Tracker-Client-Pinger-Interval": ["8"] 39 | }, 40 | "body": { 41 | "encoding": "UTF-8", 42 | "string": "[{\"kind\":\"notification\",\"id\":110356882,\"project\":{\"kind\":\"project\",\"id\":1027488,\"name\":\"My Sample Project\"},\"performer\":{\"kind\":\"person\",\"id\":1266316,\"name\":\"Tracker API User2\"},\"message\":\"Tracker API User2 has made you an owner of this story\",\"notification_type\":\"story\",\"action\":\"ownership\",\"story\":{\"kind\":\"story\",\"id\":82330712,\"name\":\"Test story\"},\"created_at\":\"2015-01-27T00:35:58Z\",\"updated_at\":\"2015-01-27T00:35:58Z\"}]" 43 | }, 44 | "http_version": null 45 | }, 46 | "recorded_at": "Tue, 27 Jan 2015 00:36:39 GMT" 47 | } 48 | ], 49 | "recorded_with": "VCR 2.9.3" 50 | } -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_all_workspaces.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/my/workspaces?fields=%3Adefault%2Cprojects%28id%2Cname%29","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.1.7 (x86_64-darwin14.0; ruby) TrackerApi/1.1.1 Faraday/0.9.2"],"X-TrackerToken":["ab4c5895f57995bb7547986eacf91160"]}},"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":["Wed, 25 May 2016 02:27:49 GMT"],"X-Request-Id":["8ea94bdaa44758cd41af559a957129bb"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"a80576b5a281d7a36a8e3aada2cb8c7c\""],"X-Runtime":["0.063218"],"X-Rack-Cache":["miss"],"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\":\"workspace\",\"projects\":[{\"id\":1027488,\"name\":\"My Sample Project\"},{\"id\":1027492,\"name\":\"My Sample Project\"}],\"id\":581707,\"name\":\"Multi-Project Workspace\",\"person_id\":1266316,\"project_ids\":[1027488,1027492]}]"},"http_version":null},"recorded_at":"Wed, 25 May 2016 02:27:49 GMT"}],"recorded_with":"VCR 3.0.2"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_another_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728000","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:48 GMT"],"X-Tracker-Project-Version":["108"],"X-Request-Id":["a14336fe95e930d1ffe6c125cb046295"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"fd4d7bba97e20e9339efa4adfd5dd568\""],"X-Runtime":["0.043272"],"X-Rack-Cache":["miss"],"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\":66728000,\"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 remove product from shopping cart\",\"current_state\":\"delivered\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728000\",\"project_id\":1027488,\"owner_ids\":[],\"labels\":[{\"id\":7849086,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"cart\",\"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\"}]}"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:48 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_comments.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/comments","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin14; ruby) TrackerApi/1.4.1 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":["Wed, 16 Nov 2016 14:14:33 GMT"],"Etag":["\"0deb8dbe1ce2f0d1f95892eb3114789a\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains"],"X-Powered-By":["Phusion Passenger"],"X-Rack-Cache":["miss"],"X-Request-Id":["4e0fe5c2f0ad5f4243b5961ebbf3e767"],"X-Runtime":["0.042615"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["154"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["7b308ac4-1cf5-4318-7843-5dde89abea3d"],"Content-Length":["355"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"[{\"kind\":\"comment\",\"id\":120836920,\"story_id\":66728004,\"text\":\"This is a comment.\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:13:55Z\",\"updated_at\":\"2015-12-17T22:13:55Z\"},{\"kind\":\"comment\",\"id\":120836938,\"story_id\":66728004,\"text\":\"This is another comment.\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:14:04Z\",\"updated_at\":\"2015-12-17T22:14:04Z\"}]"},"http_version":null},"recorded_at":"Wed, 16 Nov 2016 14:14:34 GMT"}],"recorded_with":"VCR 3.0.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_epics.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/epics","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:27 GMT"],"X-Tracker-Project-Version":["107"],"X-Request-Id":["4fdb11cb65651389f33827d213e447e9"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"50d5d9653574e5f2088f09f04069f82c\""],"X-Runtime":["0.063317"],"X-Rack-Cache":["miss"],"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":"[{\"id\":1087314,\"kind\":\"epic\",\"created_at\":\"2014-03-02T07:11:07Z\",\"updated_at\":\"2014-03-02T07:11:07Z\",\"project_id\":1027488,\"name\":\"Admin Users\",\"description\":\"Get the Admin users working on the site\",\"url\":\"https://www.pivotaltracker.com/epic/show/1087314\",\"label\":{\"id\":7849080,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"admin\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}},{\"id\":1087316,\"kind\":\"epic\",\"created_at\":\"2014-03-02T07:11:07Z\",\"updated_at\":\"2014-03-02T07:11:07Z\",\"project_id\":1027488,\"name\":\"Shoppers\",\"description\":\"Allow shoppers to use the site\",\"url\":\"https://www.pivotaltracker.com/epic/show/1087316\",\"label\":{\"id\":7849082,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"shopping\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"}}]"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:27 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_me.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/me","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:35 GMT"],"X-Request-Id":["ec86b6658238816e3e136469ce307a1f"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"0f27015a6615c01d66cb860bab186f90\""],"X-Runtime":["0.038106"],"X-Rack-Cache":["miss"],"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\":\"me\",\"id\":1266314,\"name\":\"Tracker API User1\",\"initials\":\"TU1\",\"username\":\"trackerapi1\",\"time_zone\":{\"kind\":\"time_zone\",\"olson_name\":\"America/Los_Angeles\",\"offset\":\"-08:00\"},\"api_token\":\"d55c3bc1f74346b843ca84ba340b29bf\",\"has_google_identity\":false,\"projects\":[{\"kind\":\"membership_summary\",\"id\":4001820,\"project_id\":1027488,\"project_name\":\"My Sample Project\",\"project_color\":\"555555\",\"role\":\"owner\",\"last_viewed_at\":\"2016-02-12T00:28:40Z\"}],\"email\":\"forestcarlisle+trackerapi1@gmail.com\",\"receives_in_app_notifications\":true,\"created_at\":\"2014-03-02T07:09:48Z\",\"updated_at\":\"2016-02-13T23:35:26Z\"}"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:35 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_owners_for_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/owners","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:52 GMT"],"X-Tracker-Project-Version":["110"],"X-Request-Id":["23fe3f58d3a138a31340f449752d362e"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"1b3412c670febaa8cc831588a4b38288\""],"X-Runtime":["0.075141"],"X-Rack-Cache":["miss"],"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\":\"person\",\"id\":1266314,\"name\":\"Tracker API User1\",\"email\":\"forestcarlisle+trackerapi1@gmail.com\",\"initials\":\"TU1\",\"username\":\"trackerapi1\"},{\"kind\":\"person\",\"id\":1266316,\"name\":\"Tracker API User2\",\"email\":\"forestcarlisle+trackerapi2@gmail.com\",\"initials\":\"TU2\",\"username\":\"trackerapi2\"}]"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:52 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_project_with_epics.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488?fields=%3Adefault%2Cepics%28%3Adefault%2Clabel%28name%29%29","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:51 GMT"],"X-Tracker-Project-Version":["110"],"X-Request-Id":["e8281f25732b88ac04e039835d75b0f3"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"13e9cd36186802ff75f719ab489564ad\""],"X-Runtime":["0.097680"],"X-Rack-Cache":["miss"],"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":"{\"id\":1027488,\"kind\":\"project\",\"name\":\"My Sample Project\",\"version\":110,\"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\":\"-08: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\",\"epics\":[{\"id\":1087314,\"kind\":\"epic\",\"created_at\":\"2014-03-02T07:11:07Z\",\"updated_at\":\"2014-03-02T07:11:07Z\",\"project_id\":1027488,\"name\":\"Admin Users\",\"description\":\"Get the Admin users working on the site\",\"url\":\"https://www.pivotaltracker.com/epic/show/1087314\",\"label\":{\"id\":7849080,\"name\":\"admin\"}},{\"id\":1087316,\"kind\":\"epic\",\"created_at\":\"2014-03-02T07:11:07Z\",\"updated_at\":\"2014-03-02T07:11:07Z\",\"project_id\":1027488,\"name\":\"Shoppers\",\"description\":\"Allow shoppers to use the site\",\"url\":\"https://www.pivotaltracker.com/epic/show/1087316\",\"label\":{\"id\":7849082,\"name\":\"shopping\"}}],\"account_id\":621384,\"current_iteration_number\":105,\"enable_following\":true}"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:51 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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, 15 Feb 2016 19:33:47 GMT"],"X-Tracker-Project-Version":["117"],"X-Request-Id":["0193bdf92aa3fc203b4eeb472f5373d8"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"579dbc669230d59904e8c3fb0f10f358\""],"X-Runtime":["0.048086"],"X-Rack-Cache":["miss"],"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,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2016-02-15T19:33:18Z\",\"story_type\":\"bug\",\"name\":\"Some product photos not scaled properly when browsing products++++++\",\"description\":\"+++++++\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728004\",\"project_id\":1027488,\"owner_ids\":[1266314,1266316],\"labels\":[{\"id\":11049868,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":11049870,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"}],\"owned_by_id\":1266314}"},"http_version":null},"recorded_at":"Mon, 15 Feb 2016 19:33:47 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_story_comments.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/comments","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:53 GMT"],"X-Tracker-Project-Version":["110"],"X-Request-Id":["73c2876bcf361cc7ce8098b1b9113e91"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"0deb8dbe1ce2f0d1f95892eb3114789a\""],"X-Runtime":["0.043681"],"X-Rack-Cache":["miss"],"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\":\"comment\",\"id\":120836920,\"story_id\":66728004,\"text\":\"This is a comment.\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:13:55Z\",\"updated_at\":\"2015-12-17T22:13:55Z\"},{\"kind\":\"comment\",\"id\":120836938,\"story_id\":66728004,\"text\":\"This is another comment.\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:14:04Z\",\"updated_at\":\"2015-12-17T22:14:04Z\"}]"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:52 GMT"},{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects//stories//comments","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"response":{"status":{"code":404,"message":null},"headers":{"Content-Type":["application/json; charset=utf-8"],"Status":["404 Not Found"],"Date":["Mon, 15 Feb 2016 19:50:23 GMT"],"X-Request-Id":["1ac26a97c482fbd8e05a816b39fc91fb"],"X-Runtime":["0.017910"],"X-Rack-Cache":["miss"],"X-Powered-By":["Phusion Passenger Enterprise"],"Server":["nginx + Phusion Passenger"]},"body":{"encoding":"UTF-8","string":"{\"code\":\"route_not_found\",\"kind\":\"error\",\"error\":\"The path you requested has no valid endpoint.\"}"},"http_version":null},"recorded_at":"Mon, 15 Feb 2016 19:50:23 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_story_in_epic.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728030","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":["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":["Wed, 03 May 2017 21:07:05 GMT"],"Etag":["\"eab7cb729be3fb063ebcdc568c312194\""],"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":["ea05a77657fd057fb989ce39f66b6879"],"X-Runtime":["0.050027"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["172"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["bae58468-d607-4e4e-61d4-4f7d6641e05b"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["652"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728030,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-05-03T21:05:07Z\",\"estimate\":1,\"story_type\":\"feature\",\"name\":\"Admin can review all order questions and send responses to shoppers\",\"current_state\":\"unstarted\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728030\",\"project_id\":1027488,\"owner_ids\":[],\"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\":7849094,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"orders\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"}]}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 21:07:05 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_story_no_existing_labels.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/82330712","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.1 (x86_64-darwin14; ruby) TrackerApi/1.4.0 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Wed, 19 Oct 2016 22:02:43 GMT"],"X-Tracker-Project-Version":["152"],"X-Request-Id":["0785925ab787c672fc149a4fc45a5a4c"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"c417249619fc699ecb6ef773d35cf7dd\""],"X-Runtime":["0.050834"],"X-Rack-Cache":["miss"],"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":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":82330712,\"created_at\":\"2014-11-08T00:23:58Z\",\"updated_at\":\"2015-01-27T00:35:58Z\",\"estimate\":1,\"story_type\":\"feature\",\"name\":\"Test story\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/82330712\",\"project_id\":1027488,\"owner_ids\":[1266316,1266314],\"labels\":[],\"owned_by_id\":1266316}"},"http_version":null},"recorded_at":"Wed, 19 Oct 2016 22:02:43 GMT"}],"recorded_with":"VCR 3.0.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_story_owners.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/owners","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:27 GMT"],"X-Tracker-Project-Version":["107"],"X-Request-Id":["c512dc24991a047cda3b80ee7f7a7fbd"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"1b3412c670febaa8cc831588a4b38288\""],"X-Runtime":["0.068294"],"X-Rack-Cache":["miss"],"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\":\"person\",\"id\":1266314,\"name\":\"Tracker API User1\",\"email\":\"forestcarlisle+trackerapi1@gmail.com\",\"initials\":\"TU1\",\"username\":\"trackerapi1\"},{\"kind\":\"person\",\"id\":1266316,\"name\":\"Tracker API User2\",\"email\":\"forestcarlisle+trackerapi2@gmail.com\",\"initials\":\"TU2\",\"username\":\"trackerapi2\"}]"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:27 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_story_transitions.json: -------------------------------------------------------------------------------- 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"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_story_with_owners.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004?fields=%3Adefault%2Cowners","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.1.7 (x86_64-darwin14.0; ruby) TrackerApi/1.1.1 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Wed, 25 May 2016 02:39:30 GMT"],"X-Tracker-Project-Version":["128"],"X-Request-Id":["9ad7de7b05ba5ba68829f040e57bcbe8"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"1fdca41d3806416d2ff9d2521aa430ba\""],"X-Runtime":["0.078259"],"X-Rack-Cache":["miss"],"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,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2016-05-24T22:30:07Z\",\"story_type\":\"bug\",\"name\":\"Some product photos not scaled properly when browsing products++++++++\",\"description\":\"+++++++++\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728004\",\"project_id\":1027488,\"owner_ids\":[1266314,1266316],\"owners\":[{\"kind\":\"person\",\"id\":1266314,\"name\":\"Tracker API User1\",\"email\":\"forestcarlisle+trackerapi1@gmail.com\",\"initials\":\"TU1\",\"username\":\"trackerapi1\"},{\"kind\":\"person\",\"id\":1266316,\"name\":\"Tracker API User2\",\"email\":\"forestcarlisle+trackerapi2@gmail.com\",\"initials\":\"TU2\",\"username\":\"trackerapi2\"}],\"labels\":[{\"id\":11049868,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":11049870,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":14060665,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"super-special-label\",\"created_at\":\"2016-02-12T23:45:13Z\",\"updated_at\":\"2016-02-12T23:45:13Z\"}],\"owned_by_id\":1266314}"},"http_version":null},"recorded_at":"Wed, 25 May 2016 02:39:30 GMT"}],"recorded_with":"VCR 3.0.2"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_tasks.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:37 GMT"],"X-Tracker-Project-Version":["108"],"X-Request-Id":["a913b3a94a9a13a132f0d510ae18a252"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"6a3cc51ca0d1b6f19801b121b557ecb7\""],"X-Runtime":["0.052456"],"X-Rack-Cache":["miss"],"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,\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2016-02-13T23:35:36Z\",\"story_type\":\"bug\",\"name\":\"Some product photos not scaled properly when browsing products++++\",\"description\":\"+++++\",\"current_state\":\"started\",\"requested_by_id\":1266314,\"url\":\"https://www.pivotaltracker.com/story/show/66728004\",\"project_id\":1027488,\"owner_ids\":[1266314,1266316],\"labels\":[{\"id\":11049868,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label1\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":11049870,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"label2\",\"created_at\":\"2015-03-07T12:51:39Z\",\"updated_at\":\"2015-03-07T12:51:39Z\"},{\"id\":14060665,\"project_id\":1027488,\"kind\":\"label\",\"name\":\"super-special-label\",\"created_at\":\"2016-02-12T23:45:13Z\",\"updated_at\":\"2016-02-12T23:45:13Z\"}],\"owned_by_id\":1266314}"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:37 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_tasks_for_story.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/tasks","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin15; ruby) TrackerApi/0.2.12 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Sat, 13 Feb 2016 23:35:37 GMT"],"X-Tracker-Project-Version":["108"],"X-Request-Id":["a8773bd98dc475b32a0c9dc3c5001c9a"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"4d3b48a5065fd5e9c4fa8f4086595ed9\""],"X-Runtime":["0.043603"],"X-Rack-Cache":["miss"],"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\":\"task\",\"id\":22778038,\"story_id\":66728004,\"description\":\"Check unscaled\",\"complete\":false,\"position\":1,\"created_at\":\"2014-06-02T12:44:52Z\",\"updated_at\":\"2014-06-02T12:44:52Z\"},{\"kind\":\"task\",\"id\":32873326,\"story_id\":66728004,\"description\":\"Test task\",\"complete\":false,\"position\":2,\"created_at\":\"2015-06-09T21:24:28Z\",\"updated_at\":\"2015-06-09T21:24:28Z\"},{\"kind\":\"task\",\"id\":33341356,\"story_id\":66728004,\"description\":\"Test task\",\"complete\":false,\"position\":3,\"created_at\":\"2015-06-24T18:04:04Z\",\"updated_at\":\"2015-06-24T18:04:04Z\"},{\"kind\":\"task\",\"id\":33348986,\"story_id\":66728004,\"description\":\"Test task\",\"complete\":false,\"position\":4,\"created_at\":\"2015-06-24T21:05:50Z\",\"updated_at\":\"2015-06-24T21:05:50Z\"},{\"kind\":\"task\",\"id\":40109803,\"story_id\":66728004,\"description\":\"Test task\",\"complete\":false,\"position\":5,\"created_at\":\"2016-02-13T23:35:36Z\",\"updated_at\":\"2016-02-13T23:35:36Z\"}]"},"http_version":null},"recorded_at":"Sat, 13 Feb 2016 23:35:37 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_workspace.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/my/workspaces/375106","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.1.7 (x86_64-darwin14.0; ruby) TrackerApi/1.1.1 Faraday/0.9.2"],"X-TrackerToken":["d55c3bc1f74346b843ca84ba340b29bf"]}},"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":["Wed, 25 May 2016 02:27:50 GMT"],"X-Request-Id":["053ec593d3e5d88b17ad2197fa9300ec"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"f99a89b7ccb408ba3825caea4c88e1b0\""],"X-Runtime":["0.065733"],"X-Rack-Cache":["miss"],"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\":\"workspace\",\"id\":375106,\"name\":\"Multi-Project Workspace\",\"person_id\":1266314,\"project_ids\":[1027488]}"},"http_version":null},"recorded_at":"Wed, 25 May 2016 02:27:50 GMT"}],"recorded_with":"VCR 3.0.2"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/get_workspace_projects.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"get","uri":"https://www.pivotaltracker.com/services/v5/my/workspaces/581707?fields=%3Adefault%2Cprojects%28id%2Cname%29","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Ruby/2.1.7 (x86_64-darwin14.0; ruby) TrackerApi/1.1.1 Faraday/0.9.2"],"X-TrackerToken":["ab4c5895f57995bb7547986eacf91160"]}},"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":["Wed, 25 May 2016 02:27:49 GMT"],"X-Request-Id":["1010962fe376409c1e8e83de9b3c05be"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"58110b19fda6dfb316c0b93fff8aab95\""],"X-Runtime":["0.052909"],"X-Rack-Cache":["miss"],"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\":\"workspace\",\"projects\":[{\"id\":1027488,\"name\":\"My Sample Project\"},{\"id\":1027492,\"name\":\"My Sample Project\"}],\"id\":581707,\"name\":\"Multi-Project Workspace\",\"person_id\":1266316,\"project_ids\":[1027488,1027492]}"},"http_version":null},"recorded_at":"Wed, 25 May 2016 02:27:48 GMT"}],"recorded_with":"VCR 3.0.2"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/save_comment.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/comments/120836920","body":{"encoding":"UTF-8","string":"{\"text\":\"This is a comment.+\"}"},"headers":{"User-Agent":["Ruby/2.2.3 (x86_64-darwin14; ruby) TrackerApi/1.4.1 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":["Wed, 16 Nov 2016 14:20:30 GMT"],"Etag":["\"d4458c709c842d1e8544e2b3397418f9\""],"Server":["nginx + Phusion Passenger"],"Status":["200 OK"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains"],"X-Powered-By":["Phusion Passenger"],"X-Rack-Cache":["invalidate, pass"],"X-Request-Id":["87382a7f1e4c3dd82514cde390832f7f"],"X-Runtime":["0.211884"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["156"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["3ba8192f-073e-44f9-50b2-74fca707f240"],"Content-Length":["174"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"comment\",\"id\":120836920,\"story_id\":66728004,\"text\":\"This is a comment.+\",\"person_id\":1266314,\"created_at\":\"2015-12-17T22:13:55Z\",\"updated_at\":\"2016-11-16T14:20:30Z\"}"},"http_version":null},"recorded_at":"Wed, 16 Nov 2016 14:20:30 GMT"}],"recorded_with":"VCR 3.0.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/save_previously_no_label_story_with_new_label.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/82330712","body":{"encoding":"UTF-8","string":"{\"labels\":[{\"name\":\"super-special-label\"}]}"},"headers":{"User-Agent":["Ruby/2.2.1 (x86_64-darwin14; ruby) TrackerApi/1.4.0 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":["Wed, 19 Oct 2016 22:03:47 GMT"],"X-Tracker-Project-Version":["153"],"X-Request-Id":["9309467ba390eac143a26031f9efcbcd"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"702ec0ceab01c6c09792aeba14f63817\""],"X-Runtime":["0.199548"],"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":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":82330712,\"project_id\":1027488,\"name\":\"Test story\",\"story_type\":\"feature\",\"current_state\":\"started\",\"estimate\":1,\"requested_by_id\":1266314,\"owned_by_id\":1266316,\"owner_ids\":[1266316,1266314],\"labels\":[{\"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-11-08T00:23:58Z\",\"updated_at\":\"2016-10-19T22:03:47Z\",\"url\":\"https://www.pivotaltracker.com/story/show/82330712\"}"},"http_version":null},"recorded_at":"Wed, 19 Oct 2016 22:03:47 GMT"}],"recorded_with":"VCR 3.0.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/save_story_in_epic.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728030","body":{"encoding":"UTF-8","string":"{\"current_state\":\"started\"}"},"headers":{"User-Agent":["Ruby/2.3.1 (x86_64-darwin15; ruby) TrackerApi/1.7.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":["Wed, 03 May 2017 21:07:06 GMT"],"Etag":["\"b7f8c2d73bde6919afa35553624afa7b\""],"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":["invalidate, pass"],"X-Request-Id":["0d98bd1960496cf6e5e51fdd2ac6e39e"],"X-Runtime":["0.269131"],"X-Tracker-Client-Pinger-Interval":["20"],"X-Tracker-Project-Version":["173"],"X-Ua-Compatible":["IE=Edge,chrome=1"],"X-Vcap-Request-Id":["13f91bf1-59c1-487f-5dfb-fbbe42a08ead"],"X-Xss-Protection":["1; mode=block"],"Content-Length":["650"],"Connection":["keep-alive"]},"body":{"encoding":"ASCII-8BIT","string":"{\"kind\":\"story\",\"id\":66728030,\"project_id\":1027488,\"name\":\"Admin can review all order questions and send responses to shoppers\",\"story_type\":\"feature\",\"current_state\":\"started\",\"estimate\":1,\"requested_by_id\":1266314,\"owner_ids\":[],\"labels\":[{\"kind\":\"label\",\"id\":7849080,\"project_id\":1027488,\"name\":\"admin\",\"created_at\":\"2014-03-02T07:11:04Z\",\"updated_at\":\"2014-03-02T07:11:04Z\"},{\"kind\":\"label\",\"id\":7849094,\"project_id\":1027488,\"name\":\"orders\",\"created_at\":\"2014-03-02T07:11:05Z\",\"updated_at\":\"2014-03-02T07:11:05Z\"}],\"created_at\":\"2014-02-17T00:00:00Z\",\"updated_at\":\"2017-05-03T21:07:06Z\",\"url\":\"https://www.pivotaltracker.com/story/show/66728030\"}"},"http_version":null},"recorded_at":"Wed, 03 May 2017 21:07:06 GMT"}],"recorded_with":"VCR 2.9.3"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/save_story_with_one_owner.json: -------------------------------------------------------------------------------- 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"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/save_story_with_two_owners.json: -------------------------------------------------------------------------------- 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"} -------------------------------------------------------------------------------- /test/vcr/x-cassettes/save_task.json: -------------------------------------------------------------------------------- 1 | {"http_interactions":[{"request":{"method":"put","uri":"https://www.pivotaltracker.com/services/v5/projects/1027488/stories/66728004/tasks/22778038","body":{"encoding":"UTF-8","string":"{\"description\":\"Check unscaled+\",\"complete\":true}"},"headers":{"User-Agent":["Ruby/2.1.3 (x86_64-darwin15.0; ruby) TrackerApi/1.0.0 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":["Fri, 18 Mar 2016 19:14:30 GMT"],"X-Tracker-Project-Version":["122"],"X-Request-Id":["8e0ec08fef65b2f8fa9bae27a697c8db"],"X-UA-Compatible":["IE=Edge,chrome=1"],"ETag":["\"914ce4063b95be351bc4878e1242b175\""],"X-Runtime":["0.175452"],"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\":\"task\",\"id\":22778038,\"story_id\":66728004,\"description\":\"Check unscaled+\",\"complete\":true,\"position\":1,\"created_at\":\"2014-06-02T12:44:52Z\",\"updated_at\":\"2016-03-18T19:14:30Z\"}"},"http_version":null},"recorded_at":"Fri, 18 Mar 2016 19:14:30 GMT"}],"recorded_with":"VCR 3.0.1"} -------------------------------------------------------------------------------- /test/workspace_test.rb: -------------------------------------------------------------------------------- 1 | require_relative 'minitest_helper' 2 | 3 | describe TrackerApi::Resources::Workspace do 4 | let(:pt_user) { PT_USER_2 } 5 | let(:client) { TrackerApi::Client.new token: pt_user[:token] } 6 | let(:workspace_id) { pt_user[:workspace_id] } 7 | let(:workspace) { VCR.use_cassette('get workspace') { client.workspace(workspace_id) } } 8 | 9 | describe '.projects' do 10 | it 'gets all projects for this workspace' do 11 | VCR.use_cassette('get workspace projects', record: :new_episodes) do 12 | workspace = client.workspace(pt_user[:workspace_id], fields: ':default,projects(id,name)') 13 | projects = workspace.projects 14 | 15 | _(projects).wont_be_empty 16 | 17 | _(projects.size).must_equal 2 18 | _(projects.first).must_be_instance_of TrackerApi::Resources::Project 19 | 20 | _(pt_user[:project_ids]).must_include projects.first.id 21 | _(pt_user[:project_ids]).must_include projects.last.id 22 | end 23 | end 24 | 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /tracker_api.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | lib = File.expand_path('../lib', __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | require 'tracker_api/version' 5 | 6 | Gem::Specification.new do |spec| 7 | spec.name = 'tracker_api' 8 | spec.version = TrackerApi::VERSION 9 | spec.authors = ['Phil Phillips', 'Forest Carlisle', 'ProductPlan'] 10 | spec.email = ['irving.phillips@gmail.com'] 11 | spec.summary = %q{API client for the Pivotal Tracker v5 API} 12 | spec.description = %q{This gem allows you to easily use the Pivotal Tracker v5 API.} 13 | spec.homepage = 'https://github.com/irphilli/tracker_api' 14 | spec.license = 'MIT' 15 | 16 | spec.files = `git ls-files`.split($/) 17 | spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } 18 | spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) 19 | spec.require_paths = ['lib'] 20 | 21 | spec.add_development_dependency 'bundler', '> 1.3' 22 | spec.add_development_dependency 'rake' 23 | spec.add_development_dependency 'minitest' 24 | spec.add_development_dependency 'mocha' 25 | spec.add_development_dependency 'awesome_print' 26 | spec.add_development_dependency 'vcr' 27 | spec.add_development_dependency 'simplecov' 28 | # spec.add_development_dependency 'minitest-byebug' 29 | 30 | spec.add_dependency 'addressable' 31 | spec.add_dependency 'virtus' 32 | spec.add_dependency 'faraday', ['>= 1.10', '< 3.0'] 33 | spec.add_dependency 'faraday-multipart' 34 | spec.add_dependency 'equalizer' 35 | spec.add_dependency 'representable' 36 | spec.add_dependency 'multi_json' 37 | spec.add_dependency 'mini_mime' 38 | end 39 | --------------------------------------------------------------------------------