keeptesting 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/keeptesting.gemspec CHANGED
@@ -20,12 +20,11 @@ Gem::Specification.new do |s|
20
20
 
21
21
  # specify any dependencies here; for example:
22
22
  # s.add_development_dependency "rspec"
23
- s.add_runtime_dependency "OptionParser"
24
23
  s.add_runtime_dependency "fssm"
25
24
  s.add_runtime_dependency "sinatra"
26
25
 
27
26
  s.add_development_dependency "mocha"
28
- s.add_development_dependency "shoulda"
29
27
  s.add_development_dependency "minitest"
28
+ s.add_development_dependency "shoulda"
30
29
  s.add_development_dependency "shoulda-context"
31
30
  end
@@ -14,13 +14,19 @@ module Keeptesting
14
14
  end
15
15
 
16
16
  RESULT_FILE_PATH = "/tmp/keeptesting-state.txt"
17
-
17
+
18
+ def store_running_status
19
+ File.open RESULT_FILE_PATH, "w" do |filebody|
20
+ filebody.write("Running tests...\n")
21
+ end
22
+ end
23
+
18
24
  def store_last_test_summary(success, output)
19
25
  File.open RESULT_FILE_PATH, "w" do |filebody|
20
26
  if success
21
- filebody.write("success\n")
27
+ filebody.write("Success\n")
22
28
  else
23
- filebody.write("failure\n")
29
+ filebody.write("Failure\n")
24
30
  end
25
31
  filebody.write(output)
26
32
  end
@@ -37,12 +43,13 @@ module Keeptesting
37
43
  end
38
44
 
39
45
  def testrun(options)
46
+ store_running_status
40
47
  cmd = options[:test_command]
41
48
  test_output = `#{cmd} 2>&1`
42
49
  test_succeeded = Keeptesting::Common::test_success?(test_output, options[:failure_regex])
43
50
  store_last_test_summary(test_succeeded, test_output)
44
51
  end
45
-
52
+
46
53
  def watch_files(options)
47
54
  Thread.new do
48
55
  console = self
@@ -61,7 +68,7 @@ module Keeptesting
61
68
 
62
69
  def start_console
63
70
  webconsole_path = File.dirname(__FILE__) + '/../../webconsole.rb'
64
- puts "\n\n\n*** keeptesting web console starting - goto http://localhost:5000 ***\n\n\n"
71
+ puts "\n\n\nWeb console ready at http://localhost:5000\n\n\n"
65
72
  puts `ruby #{webconsole_path} -e development -p 5000`
66
73
  end
67
74
 
@@ -1,3 +1,3 @@
1
1
  module Keeptesting
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
data/todo.org CHANGED
@@ -1,15 +1,13 @@
1
- * swap out fssm w/ guard/listen
2
- ** fssm is dead!
3
1
  * improve web console
4
2
  ** show error when backend is down
5
3
  ** prettier html output
6
- ** less chatty communication w. server, use websockets?
7
- ** show yellow/working feedback (need websocket/push for this)
4
+ * swap out fssm w/ guard/listen
5
+ ** fssm is dead!
8
6
  * test that everything works x-platform
7
+ * final code cleanup
9
8
  * create proper documentation
10
9
  ** website
11
10
  ** great readme page with screencaptures and workflow examples
12
11
  ** screencast
13
12
  ** blog post - release announcement
14
- * final code cleanup
15
13
  * release 1.0
data/webconsole.rb CHANGED
@@ -21,7 +21,7 @@ def index
21
21
  <meta charset="utf-8">
22
22
  <title>Keeptesting</title>
23
23
  </head>
24
- <body>
24
+ <body class="yellow">
25
25
 
26
26
  <style>
27
27
  .red {
@@ -30,9 +30,12 @@ def index
30
30
  .green {
31
31
  background-color: #3BFF3E;
32
32
  }
33
+ .yellow {
34
+ background-color: #FFCB3B;
35
+ }
33
36
  </style>
34
37
 
35
- <h1>Keep testing!</h1>
38
+ <h1>Starting up!</h1>
36
39
 
37
40
  <div id="test-output">
38
41
  Waiting for first test result...
@@ -65,10 +68,18 @@ var showLastTest = function(){
65
68
  var result = last_test.result;
66
69
 
67
70
  header.html(result);
68
- if(result.match(/success/)){
69
- body.removeClass("red").addClass("green");
70
- } else {
71
- body.removeClass("green").addClass("red");
71
+ body.removeClass("red green yellow")
72
+
73
+ if(result.match(/Success/)){
74
+ body.addClass("green");
75
+ }
76
+
77
+ if(result.match(/Running/)){
78
+ body.addClass("yellow");
79
+ }
80
+
81
+ if(result.match(/Failure/)){
82
+ body.addClass("red");
72
83
  }
73
84
 
74
85
  var test_output = last_test.output;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keeptesting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-23 00:00:00.000000000Z
12
+ date: 2012-04-24 00:00:00.000000000Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: OptionParser
16
- requirement: &8653180 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: *8653180
25
14
  - !ruby/object:Gem::Dependency
26
15
  name: fssm
27
- requirement: &8652640 !ruby/object:Gem::Requirement
16
+ requirement: &21170740 !ruby/object:Gem::Requirement
28
17
  none: false
29
18
  requirements:
30
19
  - - ! '>='
@@ -32,10 +21,10 @@ dependencies:
32
21
  version: '0'
33
22
  type: :runtime
34
23
  prerelease: false
35
- version_requirements: *8652640
24
+ version_requirements: *21170740
36
25
  - !ruby/object:Gem::Dependency
37
26
  name: sinatra
38
- requirement: &8652100 !ruby/object:Gem::Requirement
27
+ requirement: &21170200 !ruby/object:Gem::Requirement
39
28
  none: false
40
29
  requirements:
41
30
  - - ! '>='
@@ -43,10 +32,10 @@ dependencies:
43
32
  version: '0'
44
33
  type: :runtime
45
34
  prerelease: false
46
- version_requirements: *8652100
35
+ version_requirements: *21170200
47
36
  - !ruby/object:Gem::Dependency
48
37
  name: mocha
49
- requirement: &8651620 !ruby/object:Gem::Requirement
38
+ requirement: &21169780 !ruby/object:Gem::Requirement
50
39
  none: false
51
40
  requirements:
52
41
  - - ! '>='
@@ -54,10 +43,10 @@ dependencies:
54
43
  version: '0'
55
44
  type: :development
56
45
  prerelease: false
57
- version_requirements: *8651620
46
+ version_requirements: *21169780
58
47
  - !ruby/object:Gem::Dependency
59
- name: shoulda
60
- requirement: &8648960 !ruby/object:Gem::Requirement
48
+ name: minitest
49
+ requirement: &21169240 !ruby/object:Gem::Requirement
61
50
  none: false
62
51
  requirements:
63
52
  - - ! '>='
@@ -65,10 +54,10 @@ dependencies:
65
54
  version: '0'
66
55
  type: :development
67
56
  prerelease: false
68
- version_requirements: *8648960
57
+ version_requirements: *21169240
69
58
  - !ruby/object:Gem::Dependency
70
- name: minitest
71
- requirement: &8648500 !ruby/object:Gem::Requirement
59
+ name: shoulda
60
+ requirement: &21168700 !ruby/object:Gem::Requirement
72
61
  none: false
73
62
  requirements:
74
63
  - - ! '>='
@@ -76,10 +65,10 @@ dependencies:
76
65
  version: '0'
77
66
  type: :development
78
67
  prerelease: false
79
- version_requirements: *8648500
68
+ version_requirements: *21168700
80
69
  - !ruby/object:Gem::Dependency
81
70
  name: shoulda-context
82
- requirement: &8648040 !ruby/object:Gem::Requirement
71
+ requirement: &21166100 !ruby/object:Gem::Requirement
83
72
  none: false
84
73
  requirements:
85
74
  - - ! '>='
@@ -87,7 +76,7 @@ dependencies:
87
76
  version: '0'
88
77
  type: :development
89
78
  prerelease: false
90
- version_requirements: *8648040
79
+ version_requirements: *21166100
91
80
  description: ! 'Usage: keeptesting [options] TESTCOMMAND'
92
81
  email:
93
82
  - thomas@kjeldahlnilsson.net