moto 0.0.12 → 0.0.13
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.
- checksums.yaml +4 -4
- data/lib/test.rb +5 -3
- data/lib/thread_context.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7550522b02155701cb2e5d0024dcb9e30aa824cc
|
4
|
+
data.tar.gz: 41543499d254a63ca3c075e8cf1ab8cf0f92cfcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12d0db076633022ac6438a195d4108d73d3cc0da4efd470095fa6155f25609f49a9e8169d64038051c9a9dd736e1faa2738fe888ba6901a6471db61b7c362fa2
|
7
|
+
data.tar.gz: eed952611e3ca4296247d454b19f64371816c1a3a932c0eea8ee28d40fd6e71552381670750a3595d090f0604d67951bbd1473aa7be34ba38bfbdf290c8dab78
|
data/lib/test.rb
CHANGED
@@ -29,19 +29,21 @@ module Moto
|
|
29
29
|
@result = Moto::Result::PENDING
|
30
30
|
end
|
31
31
|
|
32
|
-
def init(env, params)
|
32
|
+
def init(env, params, params_index)
|
33
33
|
@env = env
|
34
34
|
@params = params
|
35
|
-
set_name
|
35
|
+
set_name(params_index)
|
36
36
|
end
|
37
37
|
|
38
|
-
def set_name
|
38
|
+
def set_name(params_index)
|
39
39
|
if @env == :__default
|
40
40
|
return @name = "#{self.class.to_s}" if @params.empty?
|
41
41
|
return @name = "#{self.class.to_s}/#{@params['__name']}" if @params.key?('__name')
|
42
|
+
return @name = "#{self.class.to_s}/params_#{params_index}" unless @params.key?('__name')
|
42
43
|
else
|
43
44
|
return @name = "#{self.class.to_s}/#{@env}" if @params.empty?
|
44
45
|
return @name = "#{self.class.to_s}/#{@env}/#{@params['__name']}" if @params.key?('__name')
|
46
|
+
return @name = "#{self.class.to_s}/#{@env}/params_#{params_index}" unless @params.key?('__name')
|
45
47
|
end
|
46
48
|
@name = self.class.to_s
|
47
49
|
end
|
data/lib/thread_context.rb
CHANGED
@@ -86,10 +86,10 @@ module Moto
|
|
86
86
|
params_all = YAML.load_file(params_path) if File.exists?(params_path)
|
87
87
|
# or convert keys to symbols?
|
88
88
|
# params_all = YAML.load_file(params_path).map{|h| Hash[ h.map{|k,v| [ k.to_sym, v ] } ] } if File.exists?(params_path)
|
89
|
-
params_all.
|
89
|
+
params_all.each_with_index do |params, params_index|
|
90
90
|
# TODO: add filtering out params that are specific to certain envs
|
91
91
|
(1..max_attempts).each do |attempt|
|
92
|
-
test.init(env, params)
|
92
|
+
test.init(env, params, params_index)
|
93
93
|
# TODO: log path might be specified (to some extent) by the configuration
|
94
94
|
test.log_path = "#{test.dir}/#{test.name.gsub(/\s+/, '_').gsub('::', '_').gsub('/', '_')}.log"
|
95
95
|
@logger = Logger.new(File.open(test.log_path, File::WRONLY | File::TRUNC | File::CREAT))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bartek Wilczek
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-11-
|
12
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|