moto 0.0.40 → 0.0.41

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b5492188f2eeb8cc2270194377f7da621456203
4
- data.tar.gz: 95f4afebe273fdcf4a6a5482457f0193aee3dc6c
3
+ metadata.gz: bf93fd70753923c7fc9cbfe2dc875ecdf1cfe921
4
+ data.tar.gz: 8ff87b16800860ce7822ca64a043b38f81595546
5
5
  SHA512:
6
- metadata.gz: 8f0d02d6cffea6babcb5126ae4e0c538a8600fce9617e6566a2709dbd582e3de82b54eeb47f414166aa19fce854022966a2b36c703071df84861b061e9052bcb
7
- data.tar.gz: 4d636279703d273404c25ca98c6c83a74676da594daf0d33ee6fc87854a743743cc5cc5a935b3fe8519dec776046527ffcb114f1d0acb44ae4192694dbc282d5
6
+ metadata.gz: 70bd158386cfec28f21f84f865436208fb1c6e643e76482660189c26c38d49170335eb111811bf76641b2bb3ffc68be13113e68408316c2ba993b3cffcfbd3ee
7
+ data.tar.gz: c7b4f4568a95e40913d2008ef376e1b53db7bf585aa67f70fb223d08a6d31b2ac67ba6f02a83391edef32358f2293a021ec95da9e668051e53a0db1257cbcc54
@@ -17,11 +17,11 @@ module Moto
17
17
 
18
18
  def start_run
19
19
  # TODO: make session driver configurable
20
- if context.moto_app_config[:capybara][:default_selector]
21
- Capybara.default_selector = context.moto_app_config[:capybara][:default_selector]
20
+ if context.moto_app_config_rb[:moto][:clients][:website][:capybara][:default_selector]
21
+ Capybara.default_selector = context.moto_app_config_rb[:moto][:clients][:website][:capybara][:default_selector]
22
22
  end
23
23
 
24
- Thread.current['capybara_session'] = Capybara::Session.new(context.moto_app_config[:capybara][:default_driver])
24
+ Thread.current['capybara_session'] = Capybara::Session.new(context.moto_app_config_rb[:moto][:clients][:website][:capybara][:default_driver])
25
25
  @pages = {}
26
26
  end
27
27
 
@@ -53,7 +53,7 @@ module Moto
53
53
  private
54
54
 
55
55
  def register_grid_driver
56
- grid_config = context.moto_app_config[:capybara][:grid]
56
+ grid_config = context.moto_app_config_rb[:moto][:clients][:website][:capybara][:grid]
57
57
  return if grid_config.nil?
58
58
  if grid_config[:capabilities].nil?
59
59
  capabilities = Selenium::WebDriver::Remote::Capabilities.firefox
@@ -20,10 +20,6 @@ module Moto
20
20
  @environments = environments.empty? ? environments << :__default : environments
21
21
  end
22
22
 
23
- def running_thread_count
24
- Thread.list.select {|thread| thread.status == "run"}.count
25
- end
26
-
27
23
  def run
28
24
  test_provider = TestProvider.new(@test_paths_absolute, @environments, @config[:moto][:test_runner][:test_repeats])
29
25
  threads_max = @config[:moto][:test_runner][:thread_count] || 1
@@ -8,7 +8,8 @@ module Moto
8
8
  # all resources specific for single thread will be initialized here. E.g. browser session
9
9
  attr_reader :logger
10
10
  attr_reader :test
11
- attr_reader :moto_app_config
11
+ attr_reader :moto_app_config_yml
12
+ attr_reader :moto_app_config_rb
12
13
 
13
14
  def initialize(config, test, test_reporter)
14
15
  @config = config
@@ -20,11 +21,14 @@ module Moto
20
21
  # TODO: temporary fix
21
22
  Thread.current['context'] = self
22
23
 
23
- # TODO: temporary fix
24
- @moto_app_config = {}
24
+ # TODO: temporary fix (Configs rework incoming)
25
+ @moto_app_config_yml = {}
25
26
  Dir.glob('config/*.yml').each do |f|
26
- @moto_app_config.deep_merge! YAML.load_file(f)
27
+ @moto_app_config_yml.deep_merge! YAML.load_file(f)
27
28
  end
29
+
30
+ # TODO: temporary fix (Configs rework incoming)
31
+ @moto_app_config_rb = eval(File.read("#{MotoApp::DIR}/config/moto.rb"))
28
32
  end
29
33
 
30
34
  def client(name)
@@ -69,9 +73,9 @@ module Moto
69
73
  key = key.to_s
70
74
  key = "#{@test.env.to_s}.#{key}" if @test.env != :__default
71
75
  code = if key.include? '.'
72
- "@moto_app_config#{key.split('.').map { |a| "['#{a}']" }.join('')}"
76
+ "@moto_app_config_yml#{key.split('.').map { |a| "['#{a}']" }.join('')}"
73
77
  else
74
- "@moto_app_config['#{key}']"
78
+ "@moto_app_config_yml['#{key}']"
75
79
  end
76
80
  begin
77
81
  v = eval code
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Moto
2
- VERSION = '0.0.40'
2
+ VERSION = '0.0.41'
3
3
  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.40
4
+ version: 0.0.41
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-21 00:00:00.000000000 Z
14
+ date: 2016-04-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport