chemlab 0.1.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chemlab/configuration.rb +10 -0
- data/lib/chemlab/element.rb +1 -0
- data/lib/chemlab/page.rb +1 -1
- data/lib/chemlab/runtime/browser.rb +7 -8
- data/lib/chemlab/version.rb +1 -1
- metadata +21 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f0b5037bcd95b14883e19ae66a22f4a217d7f7039f8415e5c4b3a83cbde48a4
|
4
|
+
data.tar.gz: 1adda9dc72c6e0cba6d591d480400ad9814d1a48240f8f6de8a6bb1c7b400c18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9809aa90b7ac8430e7b1e437cffb8ba29f8399f02f8444df0442fc566bfc5c2ee2e658bc9366068e794da81ac3b497b313b8ae185f0f1d470f563375946f68d6
|
7
|
+
data.tar.gz: cb791af4b7fd2c0ee1befc8e0f915a075f88c516a6dae65d18c2a89921af0632866a053e677823e4a30ab2a946594eb5f93ec15fcea552726ffe2340dedf58ee
|
@@ -16,6 +16,16 @@ module Chemlab
|
|
16
16
|
@browser = Runtime::Browser.new(browser)
|
17
17
|
end
|
18
18
|
|
19
|
+
attr_reader :libraries
|
20
|
+
# Specify which libraries to load
|
21
|
+
def libraries=(libraries = [])
|
22
|
+
@libraries = Chemlab.const_set('Vendor', Module.new)
|
23
|
+
|
24
|
+
libraries.each do |library|
|
25
|
+
@libraries.const_set(library.to_s, library)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
19
29
|
# Call RSpec.configure for additional configuration
|
20
30
|
def configure_rspec
|
21
31
|
RSpec.configure do |rspec|
|
data/lib/chemlab/element.rb
CHANGED
data/lib/chemlab/page.rb
CHANGED
@@ -1,36 +1,35 @@
|
|
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
|
8
6
|
class Browser
|
9
7
|
extend SingleForwardable
|
10
|
-
include ActiveSupport::Configurable
|
11
8
|
attr_accessor :session
|
12
9
|
attr_reader :browser_options
|
13
10
|
|
14
11
|
def initialize(browser_options)
|
15
12
|
@browser_options = browser_options
|
13
|
+
@session = Session.new(browser_options)
|
16
14
|
end
|
17
15
|
|
18
16
|
def self.navigate_to(page_class)
|
19
|
-
Chemlab.configuration.browser.navigate_to(page_class.
|
17
|
+
Chemlab.configuration.browser.navigate_to(page_class.path)
|
20
18
|
end
|
21
19
|
|
22
|
-
def navigate_to(
|
23
|
-
@session
|
20
|
+
def navigate_to(path)
|
21
|
+
@session ||= Chemlab.configuration.browser.session
|
22
|
+
@session.engine.goto(Chemlab.configuration.base_url + path)
|
24
23
|
end
|
25
24
|
|
26
25
|
# An individual session
|
27
26
|
class Session
|
28
27
|
attr_reader :engine
|
29
28
|
|
30
|
-
def initialize(
|
29
|
+
def initialize(browser)
|
31
30
|
@engine = Watir::Browser.new(*browser)
|
32
31
|
|
33
|
-
@engine.goto(Chemlab.configuration.base_url)
|
32
|
+
# @engine.goto(Chemlab.configuration.base_url)
|
34
33
|
end
|
35
34
|
|
36
35
|
def current_url
|
data/lib/chemlab/version.rb
CHANGED
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.1
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab Quality
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -87,103 +87,75 @@ dependencies:
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 0.9.1
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: 6.0.2.2
|
96
|
-
type: :runtime
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 6.0.2.2
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: airborne
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: 0.2.13
|
110
|
-
type: :runtime
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: 0.2.13
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: nokogiri
|
90
|
+
name: rspec
|
119
91
|
requirement: !ruby/object:Gem::Requirement
|
120
92
|
requirements:
|
121
93
|
- - "~>"
|
122
94
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
124
|
-
type: :
|
95
|
+
version: '3.7'
|
96
|
+
type: :development
|
125
97
|
prerelease: false
|
126
98
|
version_requirements: !ruby/object:Gem::Requirement
|
127
99
|
requirements:
|
128
100
|
- - "~>"
|
129
101
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
102
|
+
version: '3.7'
|
131
103
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
104
|
+
name: rspec-retry
|
133
105
|
requirement: !ruby/object:Gem::Requirement
|
134
106
|
requirements:
|
135
107
|
- - "~>"
|
136
108
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
138
|
-
type: :
|
109
|
+
version: 0.6.1
|
110
|
+
type: :development
|
139
111
|
prerelease: false
|
140
112
|
version_requirements: !ruby/object:Gem::Requirement
|
141
113
|
requirements:
|
142
114
|
- - "~>"
|
143
115
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
116
|
+
version: 0.6.1
|
145
117
|
- !ruby/object:Gem::Dependency
|
146
|
-
name:
|
118
|
+
name: rspec_junit_formatter
|
147
119
|
requirement: !ruby/object:Gem::Requirement
|
148
120
|
requirements:
|
149
121
|
- - "~>"
|
150
122
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
152
|
-
type: :
|
123
|
+
version: 0.4.1
|
124
|
+
type: :development
|
153
125
|
prerelease: false
|
154
126
|
version_requirements: !ruby/object:Gem::Requirement
|
155
127
|
requirements:
|
156
128
|
- - "~>"
|
157
129
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
130
|
+
version: 0.4.1
|
159
131
|
- !ruby/object:Gem::Dependency
|
160
|
-
name:
|
132
|
+
name: nokogiri
|
161
133
|
requirement: !ruby/object:Gem::Requirement
|
162
134
|
requirements:
|
163
135
|
- - "~>"
|
164
136
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
166
|
-
type: :
|
137
|
+
version: 1.10.9
|
138
|
+
type: :development
|
167
139
|
prerelease: false
|
168
140
|
version_requirements: !ruby/object:Gem::Requirement
|
169
141
|
requirements:
|
170
142
|
- - "~>"
|
171
143
|
- !ruby/object:Gem::Version
|
172
|
-
version:
|
144
|
+
version: 1.10.9
|
173
145
|
- !ruby/object:Gem::Dependency
|
174
|
-
name:
|
146
|
+
name: rake
|
175
147
|
requirement: !ruby/object:Gem::Requirement
|
176
148
|
requirements:
|
177
149
|
- - "~>"
|
178
150
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
151
|
+
version: 12.3.0
|
180
152
|
type: :runtime
|
181
153
|
prerelease: false
|
182
154
|
version_requirements: !ruby/object:Gem::Requirement
|
183
155
|
requirements:
|
184
156
|
- - "~>"
|
185
157
|
- !ruby/object:Gem::Version
|
186
|
-
version:
|
158
|
+
version: 12.3.0
|
187
159
|
- !ruby/object:Gem::Dependency
|
188
160
|
name: selenium-webdriver
|
189
161
|
requirement: !ruby/object:Gem::Requirement
|