lib/testdroid_api/projects.rb in testdroid-api-client-0.2.3 vs lib/testdroid_api/projects.rb in testdroid-api-client-0.3.0

- old
+ new

@@ -1,21 +1,19 @@ - module TestdroidAPI - class Projects < CloudListResource - end + class Projects < CloudListResource + end - class Project < CloudResource + class Project < CloudResource - def initialize(uri, client, params= {}) - super uri, client,"project", params - @uri, @client = uri, client - sub_items :runs, :files, :config - end - #Start a new test run - #run_parameters - example {:params => {'name' => 'test'}} - def run(run_parameters={:params => {}}) - resp = @client.post("#{@uri}/runs", run_parameters) - Run.new("#{@uri}/runs/#{resp['id']}", @client, resp) - end + def initialize(uri, client, params= {}) + super uri, client, "project", params + @uri, @client = uri, client + sub_items :runs, :files, :config + end + def run(run_parameters = {}) + resp = @client.post("#{@uri}/runs", run_parameters) + Run.new("#{@uri}/runs/#{resp['id']}", @client, resp) end + + end end