moto 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6cf3761a2134fbbd3904f830f1859e6c1a3e491
4
- data.tar.gz: 11eadb0c92343bb40269aa47c1c60977491299c0
3
+ metadata.gz: 776153fef5beb29eac2fc72a127bef0b758963f6
4
+ data.tar.gz: 38a3ab889e36e15cb575a0acb36211dbb08b85ab
5
5
  SHA512:
6
- metadata.gz: 52db2179d7ca76c27adc91cba3f3bbfb05b7002739e7b0954f1a4808b1c8669e278cbcdbd4a05c809403f953e535245ffba639a0b15403a2fa339a444b3067b0
7
- data.tar.gz: eebc34cb6d2330a1d1d152f0525e29cdec5b69110b2666dcc245176581e773ac4fde6b9c6cc600a8e070b1f2f43f8a2732b126d96b9c4cdcda6f775fd922e631
6
+ metadata.gz: 34166bde0159c88eda0700ef0d0a4932a586d75273408e4ab846b64caf7f5a4df3a8bdd1d42cf3b965c4f9d8f6b3eb2e68c68a4c4e497eb1827f729671c501f7
7
+ data.tar.gz: 06a4ba918622d73382088c0232ae843e82fb62818352a2b1a07d87a89c175de29b4733275b9fc3ddcbcc622a733b9f5fc49a9854b580a07832c5078751b9cb42
data/lib/cli.rb CHANGED
@@ -23,6 +23,7 @@ module Moto
23
23
  end
24
24
 
25
25
  require_relative './empty_listener'
26
+ require_relative './forward_context_methods'
26
27
  require_relative './test_logging'
27
28
  require_relative './runner_logging'
28
29
  require_relative './runner'
@@ -3,6 +3,7 @@ module Moto
3
3
 
4
4
  class Base
5
5
  include Moto::EmptyListener
6
+ include Moto::ForwardContextMethods
6
7
 
7
8
  # include Moto::RunnerLogging
8
9
  include Moto::TestLogging
@@ -16,7 +17,7 @@ module Moto
16
17
  def init
17
18
  # abstract
18
19
  end
19
-
20
+
20
21
  end
21
22
  end
22
23
  end
@@ -0,0 +1,21 @@
1
+ module Moto
2
+ module ForwardContextMethods
3
+
4
+ def client(name)
5
+ @context.client(name)
6
+ end
7
+
8
+ def logger
9
+ @context.logger
10
+ end
11
+
12
+ def const(key)
13
+ @context.const(key)
14
+ end
15
+
16
+ def current_test
17
+ @context.current_test
18
+ end
19
+
20
+ end
21
+ end
@@ -3,19 +3,19 @@ module Moto
3
3
  class Page
4
4
 
5
5
  include Moto::TestLogging
6
+ include Moto::ForwardContextMethods
6
7
 
7
8
  ignore_logging :const
8
9
  ignore_logging :session
10
+
11
+ attr_reader :website
12
+ attr_reader :context
9
13
 
10
14
  def initialize(website)
11
15
  @website = website
12
16
  @context = @website.context
13
17
  end
14
18
 
15
- def const(key)
16
- @website.context.const(key)
17
- end
18
-
19
19
  def session
20
20
  @website.session
21
21
  end
@@ -2,6 +2,7 @@ module Moto
2
2
  class Test
3
3
 
4
4
  include Moto::Assert
5
+ include Moto::ForwardContextMethods
5
6
 
6
7
  attr_writer :context
7
8
  attr_accessor :result
@@ -33,10 +34,6 @@ module Moto
33
34
  set_name
34
35
  end
35
36
 
36
- def logger
37
- @context.logger
38
- end
39
-
40
37
  def set_name
41
38
  if @env == :__default
42
39
  return @name = "#{self.class.to_s}" if @params.empty?
@@ -59,10 +56,6 @@ module Moto
59
56
  File.basename(path, ".*")
60
57
  end
61
58
 
62
- def const(key)
63
- @context.const(key)
64
- end
65
-
66
59
  def run
67
60
  # abstract
68
61
  end
@@ -75,10 +68,6 @@ module Moto
75
68
  # abstract
76
69
  end
77
70
 
78
- def client(name)
79
- @context.client(name)
80
- end
81
-
82
71
  def skip(msg = nil)
83
72
  if msg.nil?
84
73
  msg = "Test skipped with no reason given."
@@ -49,7 +49,9 @@ module Moto
49
49
  instance.start_run
50
50
  instance.start_test(@current_test)
51
51
  return instance
52
- rescue Exception => e
52
+ rescue Exception => e
53
+ # puts e
54
+ # puts e.backtrace
53
55
  return nil
54
56
  end
55
57
  end
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.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartek Wilczek
@@ -15,14 +15,14 @@ dependencies:
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: '3.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: '3.2'
28
28
  - !ruby/object:Gem::Dependency
@@ -55,6 +55,7 @@ files:
55
55
  - lib/assert.rb
56
56
  - lib/cli.rb
57
57
  - lib/empty_listener.rb
58
+ - lib/forward_context_methods.rb
58
59
  - lib/page.rb
59
60
  - lib/parser.rb
60
61
  - lib/result.rb