moto 0.0.23 → 0.0.24
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/cli.rb +10 -2
- data/lib/runner.rb +0 -6
- data/lib/test_generator.rb +6 -5
- data/lib/thread_context.rb +3 -0
- data/lib/version.rb +1 -1
- 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: ae9e65a6ed5be9e5dcab4f274fb56543e43ce7a8
|
4
|
+
data.tar.gz: 5bcddba5dd2dd8b16e5108219488579eea8827df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b7a58130b054529d9de03e161077931c772beefd3e8c6ae803dab00507ffd9e2caaf6c8dc79f7f106b05fb1115e5ef8de581f8bf72452c6935b91561d76b8e2
|
7
|
+
data.tar.gz: aebd387ed9021158a73b7daa28badaeaea4416a246e0c68b77cf5b5d9032f1e49583cb824b39604d254d83698f5feee584bd642fe48c9defe395276551a37e5b
|
data/lib/cli.rb
CHANGED
@@ -70,6 +70,14 @@ module Moto
|
|
70
70
|
exit 1
|
71
71
|
end
|
72
72
|
|
73
|
+
# Requires custom initializer if provided by application that uses Moto
|
74
|
+
if File.exists?( "#{MotoApp::DIR}/lib/initializer.rb" )
|
75
|
+
require("#{Moto::DIR}/lib/initializer.rb")
|
76
|
+
require("#{MotoApp::DIR}/lib/initializer.rb")
|
77
|
+
initializer = MotoApp::Initializer.new(self)
|
78
|
+
initializer.init
|
79
|
+
end
|
80
|
+
|
73
81
|
tg = TestGenerator.new(MotoApp::DIR)
|
74
82
|
test_paths_absolute.each do |test_path|
|
75
83
|
test_classes << tg.generate(test_path)
|
@@ -80,10 +88,10 @@ module Moto
|
|
80
88
|
listener = 'Moto::Listeners::' + r.camelize
|
81
89
|
listeners << listener.constantize
|
82
90
|
end
|
83
|
-
|
91
|
+
|
84
92
|
runner = Moto::Runner.new(test_classes, listeners, argv[:environments], argv[:config], argv[:name])
|
85
93
|
runner.run
|
86
94
|
end
|
87
|
-
|
95
|
+
|
88
96
|
end
|
89
97
|
end
|
data/lib/runner.rb
CHANGED
@@ -56,12 +56,6 @@ module Moto
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def run
|
59
|
-
if File.exists?( "#{MotoApp::DIR}/lib/initializer.rb" )
|
60
|
-
require("#{Moto::DIR}/lib/initializer.rb")
|
61
|
-
require("#{MotoApp::DIR}/lib/initializer.rb")
|
62
|
-
initializer = MotoApp::Initializer.new(self)
|
63
|
-
initializer.init
|
64
|
-
end
|
65
59
|
@listeners.each { |l| l.start_run }
|
66
60
|
@tests.each do |test|
|
67
61
|
@thread_pool.schedule do
|
data/lib/test_generator.rb
CHANGED
@@ -46,16 +46,17 @@ module Moto
|
|
46
46
|
generate_for_run_body(test_path_absolute, method_body)
|
47
47
|
end
|
48
48
|
end
|
49
|
-
|
49
|
+
|
50
|
+
# Generates objects with tests that are supposed to be executed in this run.
|
50
51
|
def generate_for_full_class_code(test_path_absolute)
|
51
52
|
require test_path_absolute
|
52
|
-
class_name = test_path_absolute.gsub("#{MotoApp::DIR}/",'moto_app/').
|
53
|
-
test_object = class_name.
|
53
|
+
class_name = test_path_absolute.gsub("#{MotoApp::DIR}/",'moto_app/').camelize.chomp('.rb').constantize
|
54
|
+
test_object = class_name.new
|
54
55
|
test_object.static_path = test_path_absolute
|
55
56
|
test_object.evaled = false
|
56
|
-
test_object
|
57
|
+
test_object
|
57
58
|
end
|
58
|
-
|
59
|
+
|
59
60
|
def generate_for_run_body(test_path_absolute, method_body)
|
60
61
|
base = Moto::Test
|
61
62
|
base_class_string = method_body.match( /^#\s*BASE_CLASS:\s(\S+)/ )
|
data/lib/thread_context.rb
CHANGED
data/lib/version.rb
CHANGED
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.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bartek Wilczek
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-02-
|
13
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|