jacuzzi 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/jacuzzi +1 -1
- data/lib/jacuzzi.rb +7 -2
- metadata +1 -1
data/bin/jacuzzi
CHANGED
@@ -5,7 +5,7 @@ require 'bundler/setup'
|
|
5
5
|
|
6
6
|
require 'trollop'
|
7
7
|
opts = Trollop::options do
|
8
|
-
version "jacuzzi 0.0.
|
8
|
+
version "jacuzzi 0.0.5 (c) 2011 Matthew Trost"
|
9
9
|
banner <<-EOS
|
10
10
|
jacuzzi pulls your RSpec+Capybara+Selenium tests down from a git repo, and runs them.
|
11
11
|
|
data/lib/jacuzzi.rb
CHANGED
@@ -9,10 +9,12 @@ class Jacuzzi
|
|
9
9
|
puts "Welcome to the jacuzzi -- who knows what bugs you'll catch?"
|
10
10
|
@test_paths = []
|
11
11
|
|
12
|
+
puts "Building temporary directories ..."
|
12
13
|
%x[mkdir ./.jacuzzi]
|
13
14
|
%x[mkdir ./.jacuzzi/spec]
|
14
15
|
%x[mkdir ./.jacuzzi/tmp]
|
15
16
|
|
17
|
+
puts "Generating spec helper ..."
|
16
18
|
spec_helper_content = <<HEREDOC
|
17
19
|
RSpec.configure do |config|
|
18
20
|
config.include Capybara::DSL
|
@@ -24,26 +26,29 @@ HEREDOC
|
|
24
26
|
end
|
25
27
|
|
26
28
|
def heat
|
29
|
+
puts "Cranking up the heat (retrieving tests) ..."
|
27
30
|
%x[git clone #{@test_source} ./.jacuzzi/tmp/tests]
|
28
31
|
|
29
32
|
Find.find('./.jacuzzi/tmp/tests/') do |path|
|
30
33
|
@test_paths << path if File.extname(path) == '.rb'
|
31
34
|
end
|
32
35
|
|
36
|
+
puts "Tests retrieved:"
|
33
37
|
@test_paths.each do |path|
|
34
38
|
%x[cp #{path} ./.jacuzzi/spec/#{File.basename(path)}]
|
35
39
|
end
|
40
|
+
p @test_paths
|
36
41
|
|
42
|
+
puts "Generating Capybara config settings ..."
|
37
43
|
capybara_spec_content = <<HEREDOC
|
38
44
|
require 'rspec'
|
39
45
|
require 'capybara'
|
40
46
|
require 'capybara/dsl'
|
41
|
-
require 'spec_helper.rb'
|
47
|
+
require './.jacuzzi/spec/spec_helper.rb'
|
42
48
|
|
43
49
|
Capybara.default_driver = :selenium
|
44
50
|
Capybara.app_host = "#{@app_host}"
|
45
51
|
HEREDOC
|
46
|
-
|
47
52
|
File.open('./.jacuzzi/spec/capybara_spec.rb', 'w') {|file|
|
48
53
|
file.write(capybara_spec_content)
|
49
54
|
}
|