Sha256: 547be8cc12fe82fc9d6f0aa4e6425d937f2fe57e64f93815207fed335718dc26

Contents?: true

Size: 1.73 KB

Versions: 11

Compression:

Stored size: 1.73 KB

Contents

module StaleFishFixtures
  class << self

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

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

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

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

    def update_tasks_fixture
      connection["/projects/102622/stories/4459994/tasks"].get
    end

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

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

    def update_iterations_all_fixture
      connection["/projects/102622/iterations"].get
    end

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

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

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

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

    def update_notes_fixture
      connection["/projects/102622/stories/4460038/notes"].get
    end

#    def upload_attachment_fixture
#      connection["/projects/102622/stories/4473735/attachments"].post(:Filedata => File.new(File.dirname(__FILE__) + '/../../LICENSE'))
#    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

11 entries across 11 versions & 3 rubygems

Version Path
pivotal-tracker-0.5.0 spec/support/stale_fish_fixtures.rb
pivotal-tracker-0.4.1 spec/support/stale_fish_fixtures.rb
pivotal-tracker-0.4.0 spec/support/stale_fish_fixtures.rb
tsenart-pivotal-tracker-0.5.0 spec/support/stale_fish_fixtures.rb
tsenart-pivotal-tracker-0.4.0 spec/support/stale_fish_fixtures.rb
topprospect-pivotal-tracker-0.1.1 spec/support/stale_fish_fixtures.rb
topprospect-pivotal-tracker-0.0.1 spec/support/stale_fish_fixtures.rb
pivotal-tracker-0.3.1 spec/support/stale_fish_fixtures.rb
pivotal-tracker-0.3.0 spec/support/stale_fish_fixtures.rb
pivotal-tracker-0.2.2 spec/support/stale_fish_fixtures.rb
pivotal-tracker-0.2.1 spec/support/stale_fish_fixtures.rb