selenium-connect 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -1
- data/lib/selenium-connect.rb +1 -1
- data/lib/selenium-connect/configuration.rb +21 -2
- data/lib/selenium-connect/rake.task +1 -1
- data/selenium-connect.gemspec +1 -1
- data/spec/acceptance_spec.rb +1 -1
- data/spec/example.yaml +23 -0
- data/spec/sauce_spec.rb +1 -1
- data/spec/yaml_spec.rb +11 -0
- metadata +4 -2
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm 1.9.3@selenium-
|
1
|
+
rvm 1.9.3@selenium-connect
|
data/lib/selenium-connect.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
module SeleniumConnect
|
2
2
|
class Configuration
|
3
|
+
#YAML Config File
|
4
|
+
attr_accessor :config_file
|
5
|
+
|
3
6
|
#Selenium Server
|
4
7
|
attr_accessor :host, :port, :version,
|
5
8
|
:background, :log, :jar
|
@@ -12,17 +15,33 @@ module SeleniumConnect
|
|
12
15
|
attr_accessor :sauce_username, :sauce_api_key,
|
13
16
|
:os, :browser_version, :description
|
14
17
|
|
15
|
-
def
|
16
|
-
|
18
|
+
def config_file=(file)
|
19
|
+
set_config_values_from_file(get_config_values_from_file(file))
|
17
20
|
end
|
18
21
|
|
19
22
|
private
|
20
23
|
|
24
|
+
def initialize
|
25
|
+
defaults
|
26
|
+
end
|
27
|
+
|
21
28
|
def defaults
|
22
29
|
@host = 'localhost' unless host
|
23
30
|
@port = 4444 unless port
|
24
31
|
@log = false unless log
|
25
32
|
@browser = 'firefox' unless browser
|
26
33
|
end
|
34
|
+
|
35
|
+
def get_config_values_from_file(file)
|
36
|
+
require 'yaml'
|
37
|
+
YAML.load_file(file)
|
38
|
+
end
|
39
|
+
|
40
|
+
def set_config_values_from_file(config_file_values)
|
41
|
+
@host = config_file_values['host'] || host
|
42
|
+
@port = config_file_values['port'] || port
|
43
|
+
@log = config_file_values['log'] || log
|
44
|
+
@browser = config_file_values['browser'] || browser
|
45
|
+
end
|
27
46
|
end
|
28
47
|
end
|
data/selenium-connect.gemspec
CHANGED
data/spec/acceptance_spec.rb
CHANGED
data/spec/example.yaml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#Setup & Debugging
|
2
|
+
jar:
|
3
|
+
log:
|
4
|
+
|
5
|
+
|
6
|
+
#Where to run your tests
|
7
|
+
host: 'alocalhost'
|
8
|
+
port:
|
9
|
+
|
10
|
+
|
11
|
+
#Browser & Host
|
12
|
+
browser: 'afirefox'
|
13
|
+
browser_path:
|
14
|
+
profile_path:
|
15
|
+
profile_name:
|
16
|
+
|
17
|
+
|
18
|
+
#Saucelabs
|
19
|
+
os:
|
20
|
+
sauce_username:
|
21
|
+
sauce_api_key:
|
22
|
+
browser_version:
|
23
|
+
description:
|
data/spec/sauce_spec.rb
CHANGED
data/spec/yaml_spec.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium-connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: selenium-webdriver
|
@@ -98,7 +98,9 @@ files:
|
|
98
98
|
- lib/selenium-connect/server.rb
|
99
99
|
- selenium-connect.gemspec
|
100
100
|
- spec/acceptance_spec.rb
|
101
|
+
- spec/example.yaml
|
101
102
|
- spec/sauce_spec.rb
|
103
|
+
- spec/yaml_spec.rb
|
102
104
|
homepage: https://github.com/arrgyle/selenium-connect
|
103
105
|
licenses:
|
104
106
|
- MIT
|