Sha256: b03697e958a11f33ac86ab5b76d76949689991d0707e305c2a8216960834364e

Contents?: true

Size: 606 Bytes

Versions: 1

Compression:

Stored size: 606 Bytes

Contents

module PGit
  module Pivotal
    class Request
      def before_initialize
        @project_id = current_project.id
      end

      def api_version
        "v5"
      end

      def get_request
        `curl -X GET -H 'X-TrackerToken: #{api_token}' #{link}`
      end

      def link
        "https://www.pivotaltracker.com/services/#{api_version}/#{sublink}"
      end

      def api_token
        current_project.api_token
      end

      def current_project
        PGit::CurrentProject.new(configuration)
      end

      def configuration
        PGit::Configuration.new
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pgit-1.0.0 lib/pgit/pivotal/request.rb