sauron 0.1.10 → 0.1.17
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/VERSION +1 -1
- data/generators/sauron/templates/config/hydra.yml +1 -1
- data/lib/sauron/sauron_template.rb +9 -7
- data/lib/sauron.rb +2 -2
- data/sauron.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.17
|
|
@@ -5,10 +5,12 @@ class SauronTemplate
|
|
|
5
5
|
attr_accessor :framework, :workers, :hydra
|
|
6
6
|
|
|
7
7
|
def initialize
|
|
8
|
-
|
|
8
|
+
if File.exists? config_file
|
|
9
|
+
config = YAML::load(ERB.new(IO.read(config_file)).result)
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
self.framework = config[:framework]
|
|
12
|
+
self.workers = config[:workers]
|
|
13
|
+
end
|
|
12
14
|
end
|
|
13
15
|
|
|
14
16
|
def config_file
|
|
@@ -16,7 +18,7 @@ class SauronTemplate
|
|
|
16
18
|
end
|
|
17
19
|
|
|
18
20
|
def set_hydra
|
|
19
|
-
if hydra = !!(`rake -T hydra:sauron` =~ /hydra:sauron/)
|
|
21
|
+
if self.hydra = !!(`rake -T hydra:sauron` =~ /hydra:sauron/)
|
|
20
22
|
message "Using hydra to run multiple tests in parallel"
|
|
21
23
|
else
|
|
22
24
|
message "You don't have hydra properly setup. All tests will be run in single-threaded mode."
|
|
@@ -35,7 +37,7 @@ class SauronTemplate
|
|
|
35
37
|
when 'testunit'
|
|
36
38
|
system "time ruby -I.:lib:test -rubygems -e \"require '#{file}'\""
|
|
37
39
|
when 'rspec'
|
|
38
|
-
system "time ruby script/spec -O spec/
|
|
40
|
+
system "time ruby script/spec -O spec/spec.opts #{file}"
|
|
39
41
|
end
|
|
40
42
|
end
|
|
41
43
|
|
|
@@ -45,13 +47,13 @@ class SauronTemplate
|
|
|
45
47
|
message "running #{files.first.size} tests: #{joined_files}"
|
|
46
48
|
|
|
47
49
|
if hydra
|
|
48
|
-
system "time rake hydra:sauron RAILS_ENV=test FILE_LIST=#{joined_files} SAURON_WORKERS=#{
|
|
50
|
+
system "time rake hydra:sauron RAILS_ENV=test FILE_LIST=#{joined_files} SAURON_WORKERS=#{workers}"
|
|
49
51
|
else
|
|
50
52
|
case framework
|
|
51
53
|
when 'testunit'
|
|
52
54
|
system "time ruby -I.:lib:test -rubygems -e \"%w[#{files.join(' ')}].each {|f| require f}\""
|
|
53
55
|
when 'rspec'
|
|
54
|
-
system "time ruby script/spec -O spec/
|
|
56
|
+
system "time ruby script/spec -O spec/spec.opts #{files.join(' ')}"
|
|
55
57
|
end
|
|
56
58
|
end
|
|
57
59
|
end
|
data/lib/sauron.rb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'sauron/sauron_template'
|
|
2
2
|
|
|
3
|
-
Sauron = SauronTemplate
|
|
3
|
+
Sauron = SauronTemplate.new
|
data/sauron.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sauron
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 57
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 17
|
|
10
|
+
version: 0.1.17
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Jaime Bellmyer
|