moto 0.0.44 → 0.0.45
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/clients/website.rb +1 -1
- data/lib/empty_listener.rb +16 -16
- data/lib/exceptions/moto.rb +6 -6
- data/lib/exceptions/test_forced_failure.rb +6 -6
- data/lib/exceptions/test_forced_passed.rb +6 -6
- data/lib/exceptions/test_skipped.rb +6 -6
- data/lib/runner_logging.rb +26 -26
- 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: 570e7afde242d9a25456c73cf5775608e9c0d7b2
|
4
|
+
data.tar.gz: 2b98124618ef7ba8c535daa0d6108258f67c7d89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb1b7e3f51d037c34b682a11d07e1aa28d670e9ba642f0df105f74794f75b2bba18838dc2ffa9ac17f23dd158360bbeb53a1bf706540105268d138b193c41702
|
7
|
+
data.tar.gz: 1a3ee13460b66f2be096c9856e2c891fa21b5bdf7d1d821295c4841b92649bf859df11d2beb54a39ae993f93442e817296af823fc580bdf87e9b32853ca25296
|
data/lib/clients/website.rb
CHANGED
@@ -69,7 +69,7 @@ module Moto
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def handle_test_exception(test, exception)
|
72
|
-
Thread.current['capybara_session'].save_screenshot "#{test.dir}/#{test.filename}_#{Time.new.strftime('%Y%m%d_%H%M%S')}.png"
|
72
|
+
#Thread.current['capybara_session'].save_screenshot "#{test.dir}/#{test.filename}_#{Time.new.strftime('%Y%m%d_%H%M%S')}.png"
|
73
73
|
end
|
74
74
|
|
75
75
|
end
|
data/lib/empty_listener.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
module Moto
|
2
|
-
module EmptyListener
|
3
|
-
|
4
|
-
def start_run
|
5
|
-
end
|
6
|
-
|
7
|
-
def end_run
|
8
|
-
end
|
9
|
-
|
10
|
-
def start_test(test)
|
11
|
-
end
|
12
|
-
|
13
|
-
def end_test(test)
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
1
|
+
module Moto
|
2
|
+
module EmptyListener
|
3
|
+
|
4
|
+
def start_run
|
5
|
+
end
|
6
|
+
|
7
|
+
def end_run
|
8
|
+
end
|
9
|
+
|
10
|
+
def start_test(test)
|
11
|
+
end
|
12
|
+
|
13
|
+
def end_test(test)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
17
|
end
|
data/lib/exceptions/moto.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
module Moto
|
2
|
-
module Exceptions
|
3
|
-
class MotoException < RuntimeError
|
4
|
-
|
5
|
-
end
|
6
|
-
end
|
1
|
+
module Moto
|
2
|
+
module Exceptions
|
3
|
+
class MotoException < RuntimeError
|
4
|
+
|
5
|
+
end
|
6
|
+
end
|
7
7
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
module Moto
|
2
|
-
module Exceptions
|
3
|
-
class TestForcedFailure < MotoException
|
4
|
-
|
5
|
-
end
|
6
|
-
end
|
1
|
+
module Moto
|
2
|
+
module Exceptions
|
3
|
+
class TestForcedFailure < MotoException
|
4
|
+
|
5
|
+
end
|
6
|
+
end
|
7
7
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
module Moto
|
2
|
-
module Exceptions
|
3
|
-
class TestForcedPassed < MotoException
|
4
|
-
|
5
|
-
end
|
6
|
-
end
|
1
|
+
module Moto
|
2
|
+
module Exceptions
|
3
|
+
class TestForcedPassed < MotoException
|
4
|
+
|
5
|
+
end
|
6
|
+
end
|
7
7
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
module Moto
|
2
|
-
module Exceptions
|
3
|
-
class TestSkipped < MotoException
|
4
|
-
|
5
|
-
end
|
6
|
-
end
|
1
|
+
module Moto
|
2
|
+
module Exceptions
|
3
|
+
class TestSkipped < MotoException
|
4
|
+
|
5
|
+
end
|
6
|
+
end
|
7
7
|
end
|
data/lib/runner_logging.rb
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
module Moto
|
2
|
-
module RunnerLogging
|
3
|
-
|
4
|
-
|
5
|
-
# TODO: merge it somehow with TestLogging. Parametrize logger object?
|
6
|
-
def self.included(cls)
|
7
|
-
def cls.method_added(name)
|
8
|
-
excluded_methods = Moto::EmptyListener.instance_methods(false)
|
9
|
-
excluded_methods << :new
|
10
|
-
excluded_methods << :initialize
|
11
|
-
# TODO: configure more excluded classes/methods
|
12
|
-
return if @added
|
13
|
-
@added = true # protect from recursion
|
14
|
-
original_method = "original_#{name}"
|
15
|
-
alias_method original_method, name
|
16
|
-
define_method(name) do |*args|
|
17
|
-
@context.runner.logger.debug("#{self.class.name}::#{__callee__} ENTER >>> #{args}") unless excluded_methods.include? name
|
18
|
-
result = send original_method, *args
|
19
|
-
@context.runner.logger.debug("#{self.class.name}::#{__callee__} LEAVE <<< #{result} ") unless excluded_methods.include? name
|
20
|
-
result
|
21
|
-
end
|
22
|
-
@added = false
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
end
|
1
|
+
module Moto
|
2
|
+
module RunnerLogging
|
3
|
+
|
4
|
+
|
5
|
+
# TODO: merge it somehow with TestLogging. Parametrize logger object?
|
6
|
+
def self.included(cls)
|
7
|
+
def cls.method_added(name)
|
8
|
+
excluded_methods = Moto::EmptyListener.instance_methods(false)
|
9
|
+
excluded_methods << :new
|
10
|
+
excluded_methods << :initialize
|
11
|
+
# TODO: configure more excluded classes/methods
|
12
|
+
return if @added
|
13
|
+
@added = true # protect from recursion
|
14
|
+
original_method = "original_#{name}"
|
15
|
+
alias_method original_method, name
|
16
|
+
define_method(name) do |*args|
|
17
|
+
@context.runner.logger.debug("#{self.class.name}::#{__callee__} ENTER >>> #{args}") unless excluded_methods.include? name
|
18
|
+
result = send original_method, *args
|
19
|
+
@context.runner.logger.debug("#{self.class.name}::#{__callee__} LEAVE <<< #{result} ") unless excluded_methods.include? name
|
20
|
+
result
|
21
|
+
end
|
22
|
+
@added = false
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
27
|
end
|
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.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bartek Wilczek
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-04-
|
14
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|