Sha256: 4ecd61a76a542e96f82ad5c9e540cb49700788308dbddc28a1a7653be0ae88ad

Contents?: true

Size: 1.45 KB

Versions: 2

Compression:

Stored size: 1.45 KB

Contents

module StaleFishFixtures
  class << self

    def update_projects_fixture
      connection["/projects"].get
    end

    def update_project_fixture
      connection["/projects/59022"].get
    end

    def update_stories_fixture
      connection["/projects/59022/stories?limit=20"].get
    end

    def update_memberships_fixture
      connection["/projects/59022/memberships"].get
    end

    def update_tasks_fixture
      connection["/projects/59022/stories/2606200/tasks"].get
    end

    def update_activity_fixture
      connection["/activities"].get
    end

    def update_project_activity_fixture
      connection["/projects/59022/activities"].get
    end

    def update_iterations_all_fixture
      connection["/projects/59022/iterations"].get
    end
    
    def update_iterations_current_fixture
      connection["/projects/59022/iterations/current"].get
    end

    def update_iterations_backlog_fixture
      connection["/projects/59022/iterations/backlog"].get
    end

    def update_iterations_done_fixture
      connection["/projects/59022/iterations/done"].get
    end

    def create_new_story
      connection["/projects/59022/stories"].post("<story><name>Create stuff</name></story>", :content_type => 'application/xml')
    end

    protected

      def connection
        @connection ||= RestClient::Resource.new('http://www.pivotaltracker.com/services/v3', :headers => {'X-TrackerToken' => TOKEN, 'Content-Type' => 'application/xml'})
      end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pivotal-tracker-0.1.3 spec/support/stale_fish_fixtures.rb
pivotal-tracker-0.1.2 spec/support/stale_fish_fixtures.rb