Sha256: f9ebf3a1021da3a41e2cca2d0b7d820187567e3ad86c4d3f4ee22b7031305348

Contents?: true

Size: 901 Bytes

Versions: 14

Compression:

Stored size: 901 Bytes

Contents

module Kaya
  module API

    class Suite

      def self.info(suite_id)
        suite_id = suite_id.to_i if suite_id.respond_to? :to_i
        response = {
          "project_name" => Dir.pwd.split("/").last,
          "suite" => nil,
          "message" => nil
        }
        suite = Kaya::Suites::Suite.get(suite_id)
        if suite.nil?
          response["message"] = "Suite not found"
        else
          response["suite"] = suite.api_response
        end
        response
      end


      def self.status suite_id
        response = info(suite_id)

        output = if response["message"]
          {
            "suite_id" => nil,
            "message" => response["message"]
          }
        else
          {
            "suite_id" => response["suite"]["_id"],
            "status" => response["suite"]["status"]
          }
        end
        output
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kaya-0.0.14 lib/kaya/API/suite.rb
kaya-0.0.13 lib/kaya/API/suite.rb
kaya-0.0.12 lib/kaya/API/suite.rb
kaya-0.0.11 lib/kaya/API/suite.rb
kaya-0.0.10 lib/kaya/API/suite.rb
kaya-0.0.9 lib/kaya/API/suite.rb
kaya-0.0.8 lib/kaya/API/suite.rb
kaya-0.0.7 lib/kaya/API/suite.rb
kaya-0.0.6 lib/kaya/API/suite.rb
kaya-0.0.5 lib/kaya/API/suite.rb
kaya-0.0.4 lib/kaya/API/suite.rb
kaya-0.0.3 lib/kaya/API/suite.rb
kaya-0.0.2 lib/kaya/API/suite.rb
kaya-0.0.1 lib/kaya/API/suite.rb