chemlab 0.3.0 → 0.4.0

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
  SHA256:
3
- metadata.gz: 54a5d88ddf3133ff144ecb7b07771103c69ea27229d7e97226b31d2a7299d7b6
4
- data.tar.gz: 5c51476ac2884004e0d8e7b53d307624481849921e98529a2a841735ed5bcb30
3
+ metadata.gz: 07bc21e85bd30535258248b34722848feed23de49fea1217442efa6f5fe86f9b
4
+ data.tar.gz: d38fbd55e058dfdc124d3d497fc45928bdea73c3eceaaf7f81c7330f18d793bb
5
5
  SHA512:
6
- metadata.gz: c9537dd5363ae31263637e3d292e77799bf16bef065acc99fd9069514380c05fa1f6b8325ac725e8e6878d8cbf47f8225775233a0c398eec78461fc66fc13811
7
- data.tar.gz: f9a71e2c3a44b409d9dad5f21108101d5339a0c7dc0b6f4e22e4f48273143bb9e36541e5df5de7d73e28b95eda1bd41d7bf2a9b89a4938e4d5137dc98aa4651a
6
+ metadata.gz: 2f621b4f87dbf07474a77fb2ad309b9cfbbb34cc9f1e5158bfc343d58e3005d5612ee38f8877410c444c44280031f2bb67a2516d078c08e22071a16f726dd1a1
7
+ data.tar.gz: e837e155b3743c861e238de0da9f3306a5a2222c6df73d4fdb3d7655626ca05c2cefd89f8db5433023c8a65f2df3378190818aef1bee9d63564e7f6b4369a811
@@ -18,7 +18,7 @@ module Chemlab
18
18
 
19
19
  attr_reader :libraries
20
20
  # Specify which libraries to load
21
- def libraries=(libraries=[])
21
+ def libraries=(libraries = [])
22
22
  @libraries = Chemlab.const_set('Vendor', Module.new)
23
23
 
24
24
  libraries.each do |library|
@@ -8,6 +8,7 @@ module Chemlab
8
8
  link
9
9
  checkbox
10
10
  image
11
+ radio
11
12
  ].freeze
12
13
 
13
14
  SELECTABLES = %i[
data/lib/chemlab/page.rb CHANGED
@@ -4,7 +4,7 @@ module Chemlab
4
4
  # Representation of a Page on the UI
5
5
  class Page < Component
6
6
 
7
- attribute :url
7
+ attribute :path
8
8
 
9
9
  def visit
10
10
  Runtime::Browser.navigate_to(self.class)
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/configurable'
4
-
5
3
  module Chemlab
6
4
  module Runtime
7
5
  # The browser configurator
@@ -13,25 +11,26 @@ module Chemlab
13
11
 
14
12
  def initialize(browser_options)
15
13
  @browser_options = browser_options
14
+ @session = Session.new(browser_options)
16
15
  end
17
16
 
18
17
  def self.navigate_to(page_class)
19
- Chemlab.configuration.browser.navigate_to(page_class.url)
18
+ Chemlab.configuration.browser.navigate_to(page_class.path)
20
19
  end
21
20
 
22
- def navigate_to(url)
23
- @session = Chemlab.configuration.browser.session ||= Session.new(url, browser_options)
24
- @session.engine.goto(Chemlab.configuration.base_url + url)
21
+ def navigate_to(path)
22
+ @session ||= Chemlab.configuration.browser.session
23
+ @session.engine.goto(Chemlab.configuration.base_url + path)
25
24
  end
26
25
 
27
26
  # An individual session
28
27
  class Session
29
28
  attr_reader :engine
30
29
 
31
- def initialize(url, browser)
30
+ def initialize(browser)
32
31
  @engine = Watir::Browser.new(*browser)
33
32
 
34
- @engine.goto(Chemlab.configuration.base_url)
33
+ # @engine.goto(Chemlab.configuration.base_url)
35
34
  end
36
35
 
37
36
  def current_url
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chemlab
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chemlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-28 00:00:00.000000000 Z
11
+ date: 2021-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase