keeptesting 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ /.keeptesting
data/bin/keeptesting CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  require "keeptesting"
4
4
  require "optparse"
5
- require 'fssm'
6
-
5
+ require "fssm"
6
+ require "yaml"
7
7
 
8
8
 
9
9
  def usage
@@ -12,21 +12,28 @@ def usage
12
12
  Usage: keeptesting [options] 'FAILURE-MATCHING-REGEX' 'TEST-COMMAND'
13
13
 
14
14
  Run tests whenever files change in the current directory or subdirectories.
15
-
16
- Spits back indication of test success or failure, based on specified regex
15
+ Display indication of test success or failure, based on given regex
17
16
  that detects errors/failures in the output of a test run.
17
+
18
18
  Starts embedded webserver by default, letting you see test feedback in browser
19
19
  window. Can also run in the command line.
20
20
 
21
+ If you have a .keeptesting dotfile present, you can just type 'keeptesting' to
22
+ run with the options, error detection and test command etc specified in
23
+ the dotfile.
24
+
21
25
  Note: Be sure to use quotes around params like the examples!
22
26
 
23
27
  Examples:
24
28
 
25
- keeptesting 'Error|Failure' 'rake test' (Run tests whenever anything changes)
26
- keeptesting -p 'test' -p 'lib' -c 'Error|Failure' 'rake test' (Test on changes in test/ or lib/)
29
+ keeptesting 'Error|Failure' 'rake test' Run tests whenever anything changes
30
+ keeptesting -p 'test' -p 'lib' -c 'Error|Failure' 'rake test' Test on changes in test/ or lib/
31
+ keeptesting -d 'Error|Failure' 'rake test' Store current config in .keeptesting
32
+ keeptesting Run using .keeptesting config file
27
33
 
28
34
  -c, --command-line-mode Commandline mode
29
35
  -p, --watched-path Path to watch for changes
36
+ -d, --store-dotfile Save current keeptesting config in dotfile
30
37
  -h, --help Display usage
31
38
  -v, --version Display version number
32
39
 
@@ -34,10 +41,13 @@ USAGE
34
41
  end
35
42
 
36
43
 
37
-
38
44
  def parse_options
39
45
  options = {}
40
-
46
+
47
+ if ARGV.size == 0
48
+ return YAML.load(File.read(".keeptesting"))
49
+ end
50
+
41
51
  ARGV.each do |arg|
42
52
  if arg == "-v" || arg == "--version"
43
53
  puts Keeptesting::VERSION; exit
@@ -68,6 +78,12 @@ def parse_options
68
78
  options[:watched_paths] == ["**/*"]
69
79
  end
70
80
 
81
+ if ARGV.include?("-d") || ARGV.include?("--store-dotfile")
82
+ File.open(".keeptesting", "w+") do |f|
83
+ f.write(YAML::dump(options))
84
+ end
85
+ end
86
+
71
87
  return options
72
88
  end
73
89
 
@@ -1,3 +1,3 @@
1
1
  module Keeptesting
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
data/todo.org CHANGED
@@ -1,7 +1,3 @@
1
- * improve overall interface
2
- ** .keeptesting
3
- *** enable dotfile for standard options
4
- *** can just start with keeptesting w/o options
5
1
  * swap out fssm w/ guard/listen
6
2
  ** fssm is dead!
7
3
  * improve web console
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.4.0
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-22 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: OptionParser
16
- requirement: &24000840 !ruby/object:Gem::Requirement
16
+ requirement: &12231800 !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: *24000840
24
+ version_requirements: *12231800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: fssm
27
- requirement: &24000300 !ruby/object:Gem::Requirement
27
+ requirement: &12231260 !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: *24000300
35
+ version_requirements: *12231260
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sinatra
38
- requirement: &23999780 !ruby/object:Gem::Requirement
38
+ requirement: &12230840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *23999780
46
+ version_requirements: *12230840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: mocha
49
- requirement: &23999360 !ruby/object:Gem::Requirement
49
+ requirement: &12230300 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *23999360
57
+ version_requirements: *12230300
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: shoulda
60
- requirement: &23998820 !ruby/object:Gem::Requirement
60
+ requirement: &12229780 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *23998820
68
+ version_requirements: *12229780
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
- requirement: &23998240 !ruby/object:Gem::Requirement
71
+ requirement: &12229280 !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: :development
78
78
  prerelease: false
79
- version_requirements: *23998240
79
+ version_requirements: *12229280
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: shoulda-context
82
- requirement: &23997800 !ruby/object:Gem::Requirement
82
+ requirement: &12228820 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *23997800
90
+ version_requirements: *12228820
91
91
  description: ! 'Usage: keeptesting [options] TESTCOMMAND'
92
92
  email:
93
93
  - thomas@kjeldahlnilsson.net