tddium-preview 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tddium-preview (0.9.4)
4
+ tddium-preview (0.9.5)
5
5
  bundler
6
6
  highline
7
7
  json
8
- tddium_client (~> 0.1.0)
9
- tddium_reporting (>= 0.0.5)
8
+ tddium_client (~> 0.1.1)
9
+ tddium_reporting (>= 0.0.6)
10
10
  thor
11
11
 
12
12
  GEM
@@ -42,7 +42,7 @@ GEM
42
42
  gherkin (2.4.21)
43
43
  json (>= 1.4.6)
44
44
  highline (1.6.2)
45
- httparty (0.8.0)
45
+ httparty (0.8.1)
46
46
  multi_json
47
47
  multi_xml
48
48
  json (1.6.1)
@@ -68,13 +68,14 @@ GEM
68
68
  rspec-expectations (2.6.0)
69
69
  diff-lcs (~> 1.1.2)
70
70
  rspec-mocks (2.6.0)
71
- simplecov (0.4.2)
72
- simplecov-html (~> 0.4.4)
73
- simplecov-html (0.4.5)
71
+ simplecov (0.5.3)
72
+ multi_json (~> 1.0.3)
73
+ simplecov-html (~> 0.5.3)
74
+ simplecov-html (0.5.3)
74
75
  sinatra (1.2.6)
75
76
  rack (~> 1.1)
76
77
  tilt (< 2.0, >= 1.2.2)
77
- tddium_client (0.1.0)
78
+ tddium_client (0.1.1)
78
79
  httparty
79
80
  json
80
81
  tddium_reporting (0.0.6)
data/bin/tddium CHANGED
@@ -7,5 +7,19 @@ require 'yaml'
7
7
  YAML::ENGINE.yamler = 'syck' if defined?(YAML::ENGINE)
8
8
 
9
9
  $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
10
+
11
+ if ENV['COVERAGE']
12
+ begin
13
+ require 'rubygems'
14
+ require 'simplecov'
15
+ SimpleCov.root(ENV['COVERAGE_ROOT'])
16
+ SimpleCov.start do
17
+ add_group "Commands", "lib/tddium/commands"
18
+ end
19
+ rescue => e
20
+ STDERR.puts "Can't load simplecov: #{e.inspect} #{e.backtrace}"
21
+ end
22
+ end
23
+
10
24
  require "tddium"
11
25
  Tddium.start
@@ -13,3 +13,21 @@ Feature: spec command
13
13
  Then the exit status should not be 0
14
14
  And the output should contain "tddium login"
15
15
  And the output should contain "tddium heroku"
16
+
17
+ Scenario: Output machine readable data
18
+ Given the destination repo exists
19
+ And a git repo is initialized
20
+ And the user is logged in with a configured suite
21
+ And the user can create a session
22
+ And the user successfully registers tests for the suite
23
+ And the tests start successfully
24
+ And the test all pass
25
+ When I run `tddium spec --machine`
26
+ Then the exit status should be 0
27
+ And the output should not contain "Ctrl-C"
28
+ And the output should contain:
29
+ """
30
+ %%%% TDDIUM CI DATA %%%%
31
+ ---
32
+ :session_id: 1
33
+ """
@@ -12,6 +12,20 @@ Given /^the user is logged in$/ do
12
12
  }
13
13
  end
14
14
 
15
+ Given /^the user is logged in with a configured suite(?: on branch "(.*)")?$/ do |branch|
16
+ @api_key = "abcdef"
17
+ branch ||= "master"
18
+ Antilles.install(:get, "/1/users", SAMPLE_USER_RESPONSE)
19
+ Antilles.install(:get, "/1/accounts/usage", SAMPLE_ACCOUNT_USAGE)
20
+ steps %Q{
21
+ Given a file named ".tddium.mimic" with:
22
+ """
23
+ {"api_key":"#{@api_key}", "branches":{"#{branch}":{"id":1}}}
24
+ """
25
+ And the user has a suite for "repo" on "#{branch}"
26
+ }
27
+ end
28
+
15
29
  Given /^the user can log in and gets API key "([^"]*)"$/ do |apikey|
16
30
  Antilles.install(:post, "/1/users/sign_in", {:status=>0, :api_key=>apikey})
17
31
  end
@@ -0,0 +1,17 @@
1
+ Given /^the user can create a session$/ do
2
+ Antilles.install(:post, "/1/sessions", {:status=>0, :session=>{"id"=>SAMPLE_SESSION_ID}}, :code=>201)
3
+ end
4
+
5
+ Given /^the user successfully registers tests for the suite$/ do
6
+ Antilles.install(:post, "/1/sessions/#{SAMPLE_SESSION_ID}/test_executions/register", {:status=>0})
7
+ end
8
+
9
+ Given /^the tests start successfully$/ do
10
+ Antilles.install(:post, "/1/sessions/#{SAMPLE_SESSION_ID}/test_executions/start", SAMPLE_START_TEST_EXECUTIONS_RESPONSE)
11
+ end
12
+
13
+ Given /^the test all pass$/ do
14
+ Antilles.install(:get, "/1/sessions/#{SAMPLE_SESSION_ID}/test_executions", SAMPLE_TEST_EXECUTIONS_PASSED_RESPONSE)
15
+ end
16
+
17
+
@@ -4,12 +4,14 @@ def make_suite_response(name, branch)
4
4
  suite = SAMPLE_SUITE_RESPONSE
5
5
  suite["repo_name"] = name
6
6
  suite["branch"] = branch
7
- suite["git_repo_uri"] = "file:///#{Dir.tmpdir}/aruba/repo"
7
+ suite["git_repo_uri"] = "file:///#{Dir.tmpdir}/tddium-aruba/repo"
8
+ suite["repoman_current"] = true
8
9
  suite
9
10
  end
10
11
 
11
12
  Given /^the user has a suite for "([^"]*)" on "([^"]*)"$/ do |name, branch|
12
13
  Antilles.install(:get, "/1/suites", {:status=>0, :suites=>[make_suite_response(name, branch)]})
14
+ Antilles.install(:get, "/1/suites/1", {:status=>0, :suite=>make_suite_response(name, branch)})
13
15
  end
14
16
 
15
17
  Given /^the user has no suites/ do
@@ -32,3 +34,5 @@ Given /^I choose defaults for test pattern, CI and campfire settings$/ do
32
34
  And I respond to "Campfire subdomain" with "disable"
33
35
  }
34
36
  end
37
+
38
+
@@ -3,6 +3,6 @@
3
3
  Before do
4
4
  @aruba_timeout_seconds = 10
5
5
  @aruba_io_wait_seconds = 2
6
- @dirs = [Dir.tmpdir, "aruba"]
6
+ @dirs = [Dir.tmpdir, "tddium-aruba"]
7
7
  FileUtils.rm_rf(current_dir)
8
8
  end
@@ -2,65 +2,82 @@
2
2
 
3
3
  require 'aruba/api'
4
4
 
5
- SAMPLE_API_KEY = "afb12412bdafe124124asfasfabebafeabwbawf1312342erbfasbb"
6
- SAMPLE_APP_NAME = "tddelicious"
7
- SAMPLE_BRANCH_NAME = "test"
8
- SAMPLE_BUNDLER_VERSION = "Bundler version 1.10.10"
9
- SAMPLE_DATE_TIME = "2011-03-11T08:43:02Z"
10
- SAMPLE_EMAIL = "someone@example.com"
11
- SAMPLE_FILE_PATH = "./my_user_file.png"
12
- SAMPLE_FILE_PATH2 = "./my_user_file2.png"
13
- SAMPLE_INVITATION_TOKEN = "TZce3NueiXp2lMTmaeRr"
14
- SAMPLE_HEROKU_CONFIG = {"TDDIUM_API_KEY" => SAMPLE_API_KEY, "TDDIUM_USER_NAME" => SAMPLE_EMAIL}
15
- SAMPLE_LICENSE_TEXT = "LICENSE"
16
- SAMPLE_PASSWORD = "foobar"
17
- SAMPLE_NEW_PASSWORD = "foobar2"
18
- SAMPLE_REPORT_URL = "http://api.tddium.com/1/sessions/1/test_executions/report"
19
- SAMPLE_RUBYGEMS_VERSION = "1.3.7"
20
- SAMPLE_RUBY_VERSION = "ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.5.0]"
21
- SAMPLE_RECURLY_URL = "https://tddium.recurly.com/account/1"
22
- SAMPLE_SESSION_ID = 1
23
- SAMPLE_SUITE_ID = 1
24
- SAMPLE_USER_ID = 1
25
- SAMPLE_ROLE = "member"
26
- SAMPLE_ACCOUNT_NAME = "owner@example.com"
27
- DEFAULT_TEST_PATTERN = "**/*_spec.rb"
28
- SAMPLE_SUITE_PATTERN = "features/*.feature, spec/**/*_spec.rb"
29
- CUSTOM_TEST_PATTERN = "**/cat_spec.rb"
30
- SAMPLE_SSH_PUBKEY = "ssh-rsa 1234567890"
31
- SAMPLE_SUITE_RESPONSE = {"repo_name" => SAMPLE_APP_NAME,
32
- "branch" => SAMPLE_BRANCH_NAME,
33
- "id" => SAMPLE_SUITE_ID,
34
- "ruby_version"=>SAMPLE_RUBY_VERSION,
35
- "rubygems_version"=>SAMPLE_RUBYGEMS_VERSION,
36
- "bundler_version"=>SAMPLE_BUNDLER_VERSION,
37
- "ci_ssh_pubkey" => SAMPLE_SSH_PUBKEY,
38
- "test_pattern" => SAMPLE_SUITE_PATTERN}
39
- SAMPLE_SUITES_RESPONSE = {"suites" => [SAMPLE_SUITE_RESPONSE]}
40
- SAMPLE_TDDIUM_CONFIG_FILE = ".tddium.test"
41
- SAMPLE_TDDIUM_DEPLOY_KEY_FILE = ".tddium-deploy-key.test"
42
- SAMPLE_TEST_EXECUTION_STATS = "total 1, notstarted 0, started 1, passed 0, failed 0, pending 0, error 0", "start_time"
43
- SAMPLE_USER_RESPONSE = {"status"=>0, "user"=>
44
- { "id"=>SAMPLE_USER_ID,
45
- "api_key" => SAMPLE_API_KEY,
46
- "email" => SAMPLE_EMAIL,
47
- "created_at" => SAMPLE_DATE_TIME,
48
- "account" => SAMPLE_EMAIL,
49
- "recurly_url" => SAMPLE_RECURLY_URL}}
50
- SAMPLE_ADDED_USER_RESPONSE = {"status"=>0, "user"=>
51
- { "id"=>SAMPLE_USER_ID,
52
- "api_key" => SAMPLE_API_KEY,
53
- "email" => SAMPLE_EMAIL,
54
- "created_at" => SAMPLE_DATE_TIME,
55
- "account" => SAMPLE_ACCOUNT_NAME,
56
- "account_role" => SAMPLE_ROLE}}
57
- SAMPLE_HEROKU_USER_RESPONSE = {"user"=>
58
- { "id"=>SAMPLE_USER_ID,
59
- "api_key" => SAMPLE_API_KEY,
60
- "email" => SAMPLE_EMAIL,
61
- "created_at" => SAMPLE_DATE_TIME,
62
- "heroku_needs_activation" => true,
63
- "recurly_url" => SAMPLE_RECURLY_URL}}
64
- PASSWORD_ERROR_EXPLANATION = "bad confirmation"
65
- PASSWORD_ERROR_RESPONSE = {"status"=>1, "explanation"=> PASSWORD_ERROR_EXPLANATION}
66
- SAMPLE_ACCOUNT_USAGE = {"status"=>0, "usage"=>"Usage: something"}
5
+ SAMPLE_API_KEY = "afb12412bdafe124124asfasfabebafeabwbawf1312342erbfasbb"
6
+ SAMPLE_APP_NAME = "tddelicious"
7
+ SAMPLE_BRANCH_NAME = "test"
8
+ SAMPLE_BUNDLER_VERSION = "Bundler version 1.10.10"
9
+ SAMPLE_DATE_TIME = "2011-03-11T08:43:02Z"
10
+ SAMPLE_EMAIL = "someone@example.com"
11
+ SAMPLE_FILE_PATH = "./my_user_file.png"
12
+ SAMPLE_FILE_PATH2 = "./my_user_file2.png"
13
+ SAMPLE_INVITATION_TOKEN = "TZce3NueiXp2lMTmaeRr"
14
+ SAMPLE_HEROKU_CONFIG = {"TDDIUM_API_KEY" => SAMPLE_API_KEY, "TDDIUM_USER_NAME" => SAMPLE_EMAIL}
15
+ SAMPLE_LICENSE_TEXT = "LICENSE"
16
+ SAMPLE_PASSWORD = "foobar"
17
+ SAMPLE_NEW_PASSWORD = "foobar2"
18
+ SAMPLE_REPORT_URL = "http://api.tddium.com/1/sessions/1/test_executions/report"
19
+ SAMPLE_RUBYGEMS_VERSION = "1.3.7"
20
+ SAMPLE_RUBY_VERSION = "ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.5.0]"
21
+ SAMPLE_RECURLY_URL = "https://tddium.recurly.com/account/1"
22
+ SAMPLE_SESSION_ID = 1
23
+ SAMPLE_SUITE_ID = 1
24
+ SAMPLE_USER_ID = 1
25
+ SAMPLE_ROLE = "member"
26
+ SAMPLE_ACCOUNT_NAME = "owner@example.com"
27
+ DEFAULT_TEST_PATTERN = "**/*_spec.rb"
28
+ SAMPLE_SUITE_PATTERN = "features/*.feature, spec/**/*_spec.rb"
29
+ CUSTOM_TEST_PATTERN = "**/cat_spec.rb"
30
+ SAMPLE_SSH_PUBKEY = "ssh-rsa 1234567890"
31
+ SAMPLE_SUITE_RESPONSE = {"repo_name" => SAMPLE_APP_NAME,
32
+ "branch" => SAMPLE_BRANCH_NAME,
33
+ "id" => SAMPLE_SUITE_ID,
34
+ "ruby_version"=>SAMPLE_RUBY_VERSION,
35
+ "rubygems_version"=>SAMPLE_RUBYGEMS_VERSION,
36
+ "bundler_version"=>SAMPLE_BUNDLER_VERSION,
37
+ "ci_ssh_pubkey" => SAMPLE_SSH_PUBKEY,
38
+ "test_pattern" => SAMPLE_SUITE_PATTERN}
39
+ SAMPLE_SUITES_RESPONSE = {"suites" => [SAMPLE_SUITE_RESPONSE]}
40
+ SAMPLE_TDDIUM_CONFIG_FILE = ".tddium.test"
41
+ SAMPLE_TDDIUM_DEPLOY_KEY_FILE = ".tddium-deploy-key.test"
42
+ SAMPLE_TEST_EXECUTION_STATS = "total 1, notstarted 0, started 1, passed 0, failed 0, pending 0, error 0", "start_time"
43
+ SAMPLE_USER_RESPONSE = {"status"=>0, "user"=>
44
+ { "id"=>SAMPLE_USER_ID,
45
+ "api_key" => SAMPLE_API_KEY,
46
+ "email" => SAMPLE_EMAIL,
47
+ "created_at" => SAMPLE_DATE_TIME,
48
+ "account" => SAMPLE_EMAIL,
49
+ "recurly_url" => SAMPLE_RECURLY_URL}}
50
+ SAMPLE_ADDED_USER_RESPONSE = {"status"=>0, "user"=>
51
+ { "id"=>SAMPLE_USER_ID,
52
+ "api_key" => SAMPLE_API_KEY,
53
+ "email" => SAMPLE_EMAIL,
54
+ "created_at" => SAMPLE_DATE_TIME,
55
+ "account" => SAMPLE_ACCOUNT_NAME,
56
+ "account_role" => SAMPLE_ROLE}}
57
+ SAMPLE_HEROKU_USER_RESPONSE = {"user"=>
58
+ { "id"=>SAMPLE_USER_ID,
59
+ "api_key" => SAMPLE_API_KEY,
60
+ "email" => SAMPLE_EMAIL,
61
+ "created_at" => SAMPLE_DATE_TIME,
62
+ "heroku_needs_activation" => true,
63
+ "recurly_url" => SAMPLE_RECURLY_URL}}
64
+ PASSWORD_ERROR_EXPLANATION = "bad confirmation"
65
+ PASSWORD_ERROR_RESPONSE = {"status"=>1, "explanation"=> PASSWORD_ERROR_EXPLANATION}
66
+ SAMPLE_ACCOUNT_USAGE = {"status"=>0, "usage"=>"Usage: something"}
67
+ SAMPLE_START_TEST_EXECUTIONS_RESPONSE = {"status"=>0, "started"=>4, "report"=>SAMPLE_REPORT_URL}
68
+ SAMPLE_TEST_EXECUTIONS_PASSED_RESPONSE = {
69
+ "status"=>0,
70
+ "report"=>SAMPLE_REPORT_URL,
71
+ "tests"=>{"spec/mouse_spec.rb"=>{"finished" => true, "status"=>"passed"},
72
+ "spec/pig_spec.rb"=>{"finished" => true, "status"=>"passed"},
73
+ "spec/dog_spec.rb"=>{"finished" => true, "status"=>"passed"},
74
+ "spec/cat_spec.rb"=>{"finished" => true, "status"=>"passed"}}}
75
+ SAMPLE_TEST_EXECUTIONS_FINISHED_RESPONSE = {
76
+ "status"=>0,
77
+ "report"=>SAMPLE_REPORT_URL,
78
+ "tests"=>{"spec/mouse_spec.rb"=>{"finished" =>
79
+ true, "status"=>"pending"}, "spec/pig_spec.rb"=>{"finished" => true,
80
+ "status"=>"error"}, "spec/dog_spec.rb"=>{"finished" => true,
81
+ "status"=>"failed"}, "spec/cat_spec.rb"=>{"finished" => true,
82
+ "status"=>"passed"}}}
83
+
@@ -5,3 +5,6 @@ require 'aruba/cucumber'
5
5
  require 'pickle/parser'
6
6
 
7
7
  ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
8
+ #ENV['COVERAGE'] = "true"
9
+ ENV['COVERAGE_ROOT'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../')}"
10
+
@@ -11,7 +11,10 @@ class Tddium
11
11
  method_option :max_parallelism, :type => :numeric, :default => nil
12
12
  method_option :test_pattern, :type => :string, :default => nil
13
13
  method_option :force, :type => :boolean, :default => false
14
+ method_option :machine, :type => :boolean, :default => false
14
15
  def spec
16
+ machine_data = {}
17
+
15
18
  set_shell
16
19
  set_default_environment
17
20
  git_version_ok
@@ -43,85 +46,88 @@ class Tddium
43
46
  start_time = Time.now
44
47
 
45
48
  # Call the API to get the suite and its tests
46
- begin
47
- suite_details = call_api(:get, current_suite_path)
48
-
49
- exit_failure Text::Error::GIT_REPO_NOT_READY unless suite_details["suite"]["repoman_current"]
50
-
51
- # Push the latest code to git
52
- exit_failure Text::Error::GIT_PUSH_FAILED unless update_git_remote_and_push(suite_details)
49
+ suite_details = call_api(:get, current_suite_path)
53
50
 
54
- # Create a session
55
- new_session = call_api(:post, Api::Path::SESSIONS)
56
- session_id = new_session["session"]["id"]
51
+ exit_failure Text::Error::GIT_REPO_NOT_READY unless suite_details["suite"]["repoman_current"]
57
52
 
58
- # Register the tests
59
- call_api(:post, "#{Api::Path::SESSIONS}/#{session_id}/#{Api::Path::REGISTER_TEST_EXECUTIONS}", {:suite_id => current_suite_id, :test_pattern => test_pattern})
53
+ # Push the latest code to git
54
+ exit_failure Text::Error::GIT_PUSH_FAILED unless update_git_remote_and_push(suite_details)
60
55
 
61
- # Start the tests
62
- start_test_executions = call_api(:post, "#{Api::Path::SESSIONS}/#{session_id}/#{Api::Path::START_TEST_EXECUTIONS}", test_execution_params)
63
-
64
- say Text::Process::STARTING_TEST % start_test_executions["started"]
56
+ # Create a session
57
+ new_session = call_api(:post, Api::Path::SESSIONS)
58
+ machine_data[:session_id] = session_id = new_session["session"]["id"]
65
59
 
66
- tests_not_finished_yet = true
67
- finished_tests = {}
68
- test_statuses = Hash.new(0)
60
+ # Register the tests
61
+ call_api(:post, "#{Api::Path::SESSIONS}/#{session_id}/#{Api::Path::REGISTER_TEST_EXECUTIONS}", {:suite_id => current_suite_id, :test_pattern => test_pattern})
69
62
 
70
- say Text::Process::CHECK_TEST_REPORT % start_test_executions["report"]
71
- say Text::Process::TERMINATE_INSTRUCTION
72
- while tests_not_finished_yet do
73
- # Poll the API to check the status
74
- current_test_executions = call_api(:get, "#{Api::Path::SESSIONS}/#{session_id}/#{Api::Path::TEST_EXECUTIONS}")
75
-
76
- # Catch Ctrl-C to interrupt the test
77
- Signal.trap(:INT) do
78
- say Text::Process::INTERRUPT
79
- say Text::Process::CHECK_TEST_STATUS
80
- tests_not_finished_yet = false
81
- end
63
+ # Start the tests
64
+ start_test_executions = call_api(:post, "#{Api::Path::SESSIONS}/#{session_id}/#{Api::Path::START_TEST_EXECUTIONS}", test_execution_params)
65
+
66
+ say Text::Process::STARTING_TEST % start_test_executions["started"]
67
+
68
+ tests_not_finished_yet = true
69
+ finished_tests = {}
70
+ test_statuses = Hash.new(0)
71
+
72
+ say Text::Process::CHECK_TEST_REPORT % start_test_executions["report"] unless options[:machine]
73
+ say Text::Process::TERMINATE_INSTRUCTION unless options[:machine]
74
+ while tests_not_finished_yet do
75
+ # Poll the API to check the status
76
+ current_test_executions = call_api(:get, "#{Api::Path::SESSIONS}/#{session_id}/#{Api::Path::TEST_EXECUTIONS}")
77
+
78
+ # Catch Ctrl-C to interrupt the test
79
+ Signal.trap(:INT) do
80
+ say Text::Process::INTERRUPT
81
+ say Text::Process::CHECK_TEST_STATUS
82
+ tests_not_finished_yet = false
83
+ end
82
84
 
83
- # Print out the progress of running tests
84
- current_test_executions["tests"].each do |test_name, result_params|
85
- test_status = result_params["status"]
86
- if result_params["finished"] && !finished_tests[test_name]
87
- message = case test_status
88
- when "passed" then [".", :green, false]
89
- when "failed" then ["F", :red, false]
90
- when "error" then ["E", nil, false]
91
- when "pending" then ["*", :yellow, false]
92
- when "skipped" then [".", :yellow, false]
93
- else [".", nil, false]
94
- end
95
- finished_tests[test_name] = test_status
96
- test_statuses[test_status] += 1
97
- say *message
98
- end
85
+ # Print out the progress of running tests
86
+ current_test_executions["tests"].each do |test_name, result_params|
87
+ test_status = result_params["status"]
88
+ if result_params["finished"] && !finished_tests[test_name]
89
+ message = case test_status
90
+ when "passed" then [".", :green, false]
91
+ when "failed" then ["F", :red, false]
92
+ when "error" then ["E", nil, false]
93
+ when "pending" then ["*", :yellow, false]
94
+ when "skipped" then [".", :yellow, false]
95
+ else [".", nil, false]
96
+ end
97
+ finished_tests[test_name] = test_status
98
+ test_statuses[test_status] += 1
99
+ say *message
99
100
  end
101
+ end
100
102
 
101
- # If all tests finished, exit the loop else sleep
102
- if finished_tests.size == current_test_executions["tests"].size
103
- tests_not_finished_yet = false
104
- else
105
- sleep(Default::SLEEP_TIME_BETWEEN_POLLS)
106
- end
103
+ # If all tests finished, exit the loop else sleep
104
+ if finished_tests.size == current_test_executions["tests"].size
105
+ tests_not_finished_yet = false
106
+ else
107
+ sleep(Default::SLEEP_TIME_BETWEEN_POLLS)
107
108
  end
109
+ end
108
110
 
109
- # Print out the result
110
- say ""
111
- say Text::Process::FINISHED_TEST % (Time.now - start_time)
112
- say "#{finished_tests.size} tests, #{test_statuses["failed"]} failures, #{test_statuses["error"]} errors, #{test_statuses["pending"]} pending"
113
-
114
- # Save the spec options
115
- write_suite(suite_details["suite"].merge({"id" => current_suite_id}),
116
- {"user_data_file" => user_data_file_path,
117
- "max_parallelism" => max_parallelism,
118
- "test_pattern" => test_pattern})
119
-
120
- exit_failure if test_statuses["failed"] > 0 || test_statuses["error"] > 0
121
- rescue TddiumClient::Error::Base
122
- exit_failure "Failed due to error communicating with Tddium"
123
- rescue RuntimeError => e
124
- exit_failure "Failed due to internal error: #{e.inspect} #{e.backtrace}"
111
+ # Print out the result
112
+ say ""
113
+ say Text::Process::FINISHED_TEST % (Time.now - start_time)
114
+ say "#{finished_tests.size} tests, #{test_statuses["failed"]} failures, #{test_statuses["error"]} errors, #{test_statuses["pending"]} pending"
115
+
116
+ # Save the spec options
117
+ write_suite(suite_details["suite"].merge({"id" => current_suite_id}),
118
+ {"user_data_file" => user_data_file_path,
119
+ "max_parallelism" => max_parallelism,
120
+ "test_pattern" => test_pattern})
121
+
122
+ exit_failure if test_statuses["failed"] > 0 || test_statuses["error"] > 0
123
+ rescue TddiumClient::Error::Base
124
+ exit_failure "Failed due to error communicating with Tddium"
125
+ rescue RuntimeError => e
126
+ exit_failure "Failed due to internal error: #{e.inspect} #{e.backtrace}"
127
+ ensure
128
+ if options[:machine] && machine_data.size > 0
129
+ say "%%%% TDDIUM CI DATA %%%%"
130
+ say YAML.dump(machine_data)
125
131
  end
126
132
  end
127
133
  end
@@ -3,5 +3,5 @@ Copyright (c) 2011 Solano Labs All Rights Reserved
3
3
  =end
4
4
 
5
5
  module TddiumVersion
6
- VERSION = "0.9.4"
6
+ VERSION = "0.9.5"
7
7
  end
data/tddium.gemspec CHANGED
@@ -35,8 +35,8 @@ EOF
35
35
  s.add_runtime_dependency("thor")
36
36
  s.add_runtime_dependency("highline")
37
37
  s.add_runtime_dependency("json")
38
- s.add_runtime_dependency("tddium_client", "~> 0.1.0")
39
- s.add_runtime_dependency("tddium_reporting", ">=0.0.5")
38
+ s.add_runtime_dependency("tddium_client", "~> 0.1.1")
39
+ s.add_runtime_dependency("tddium_reporting", ">=0.0.6")
40
40
  s.add_runtime_dependency("bundler")
41
41
 
42
42
  s.add_development_dependency("rspec")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tddium-preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &6523240 !ruby/object:Gem::Requirement
16
+ requirement: &13163640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *6523240
24
+ version_requirements: *13163640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: highline
27
- requirement: &6522580 !ruby/object:Gem::Requirement
27
+ requirement: &13162900 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *6522580
35
+ version_requirements: *13162900
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: json
38
- requirement: &6521940 !ruby/object:Gem::Requirement
38
+ requirement: &13162160 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,32 +43,32 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *6521940
46
+ version_requirements: *13162160
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: tddium_client
49
- requirement: &6521380 !ruby/object:Gem::Requirement
49
+ requirement: &13161400 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.1.0
54
+ version: 0.1.1
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *6521380
57
+ version_requirements: *13161400
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: tddium_reporting
60
- requirement: &6520820 !ruby/object:Gem::Requirement
60
+ requirement: &13160780 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
64
64
  - !ruby/object:Gem::Version
65
- version: 0.0.5
65
+ version: 0.0.6
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *6520820
68
+ version_requirements: *13160780
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
- requirement: &6520400 !ruby/object:Gem::Requirement
71
+ requirement: &13160380 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *6520400
79
+ version_requirements: *13160380
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &6519860 !ruby/object:Gem::Requirement
82
+ requirement: &13159640 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *6519860
90
+ version_requirements: *13159640
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: fakefs
93
- requirement: &6519420 !ruby/object:Gem::Requirement
93
+ requirement: &13158920 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *6519420
101
+ version_requirements: *13158920
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: simplecov
104
- requirement: &6518940 !ruby/object:Gem::Requirement
104
+ requirement: &13158240 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *6518940
112
+ version_requirements: *13158240
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rake
115
- requirement: &6518500 !ruby/object:Gem::Requirement
115
+ requirement: &13157580 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,7 +120,7 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *6518500
123
+ version_requirements: *13157580
124
124
  description: ! 'tddium runs your rspec, cucumber, and test::unit tests in our managed
125
125
 
126
126
  cloud environment. You can run tests by hand, or enable our hosted CI to watch
@@ -167,6 +167,7 @@ files:
167
167
  - features/step_definitions/login_steps.rb
168
168
  - features/step_definitions/mimic_steps.rb
169
169
  - features/step_definitions/password_steps.rb
170
+ - features/step_definitions/session_steps.rb
170
171
  - features/step_definitions/suite_steps.rb
171
172
  - features/step_definitions/upgrade_steps.rb
172
173
  - features/suite_command.feature