selenium-prep 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/; +63 -0
- data/README.txt +1 -1
- data/lib/selenium-prep/system/path.rb +8 -5
- data/lib/selenium-prep/version.rb +1 -1
- data/selenium-prep.gemspec +1 -1
- data/spec/url_spec.rb +4 -4
- metadata +4 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ada60431a0bdf9ef9907fc4e91cee6e53446979
|
4
|
+
data.tar.gz: 023975108b18e24195ed60ca92345bafe2e46f6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3954abe7fb4571570f0d49b269d3149471960d98367854fd226de7bdf48313ffbded9ac64eb19d2eec93f81c44a8f16d3cceb805ca8f566a4b2b0e753d1d9c9
|
7
|
+
data.tar.gz: 52b01363e5046af850575dc294c8640e4c87386cac2bd90e61cc2383a6bbd298c94655b04323e4eba73b315011ab315cbc0b6d8a2a075f9b8b4ae987e1cd1ae0
|
data/;
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
= selenium-prep
|
2
|
+
|
3
|
+
== DESCRIPTION:
|
4
|
+
|
5
|
+
selenium-prep automatically configures your machine for local Selenium execution by downloading the necessary files and adding them to your system path.
|
6
|
+
|
7
|
+
== INSTALLATION:
|
8
|
+
|
9
|
+
gem install selenium-prep
|
10
|
+
|
11
|
+
== USAGE:
|
12
|
+
|
13
|
+
=== Environment Variables
|
14
|
+
|
15
|
+
SE_OS_TYPE (e.g., 'linux32', 'linux64', 'mac32', 'win32', 'win64' -- automatically detected)
|
16
|
+
SE_OS_TYPE_BIT (e.g., '32', '64' -- defaults to '32')
|
17
|
+
SE_DOWNLOAD_LOCATION (e.g., full path)
|
18
|
+
|
19
|
+
NOTE: SE_DOWNLOAD_LOCATION is the only variable you need to set. If is not set properly, a RuntimeError will be returned along with a helpful message.
|
20
|
+
|
21
|
+
=== Prep
|
22
|
+
|
23
|
+
SeleniumPrep.prep
|
24
|
+
|
25
|
+
NOTE: This will download the files for your OS, attempt to set the path on your system, and check that the path is set correctly. If not, it will provide some debugging output.
|
26
|
+
|
27
|
+
=== Downloading
|
28
|
+
|
29
|
+
SeleniumPrep.download
|
30
|
+
|
31
|
+
NOTE: The downloader will check to see if the download directory is empty. If not, it will prompt you to proceed, overwriting files of the same name.
|
32
|
+
|
33
|
+
=== Check System Path
|
34
|
+
|
35
|
+
Find out if your path is set correctly and if not provide some debugging output.
|
36
|
+
|
37
|
+
SeleniumPrep.path_set?
|
38
|
+
|
39
|
+
NOTE: Will return a boolean result in addition to debugging output.
|
40
|
+
|
41
|
+
== LICENSE:
|
42
|
+
|
43
|
+
The MIT License (MIT)
|
44
|
+
|
45
|
+
Copyright (c) 2014 Dave Haeffner
|
46
|
+
|
47
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
48
|
+
of this software and associated documentation files (the "Software"), to deal
|
49
|
+
in the Software without restriction, including without limitation the rights
|
50
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
51
|
+
copies of the Software, and to permit persons to whom the Software is
|
52
|
+
furnished to do so, subject to the following conditions:
|
53
|
+
|
54
|
+
The above copyright notice and this permission notice shall be included in all
|
55
|
+
copies or substantial portions of the Software.
|
56
|
+
|
57
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
58
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
59
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
60
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
61
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
62
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
63
|
+
SOFTWARE.
|
data/README.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
== DESCRIPTION:
|
4
4
|
|
5
|
-
selenium-prep
|
5
|
+
selenium-prep automatically configures your machine for local Selenium execution by downloading the necessary files and adding them to your system path.
|
6
6
|
|
7
7
|
== INSTALLATION:
|
8
8
|
|
@@ -8,11 +8,14 @@ module SeleniumPrep
|
|
8
8
|
ConfigChecker.new
|
9
9
|
case ENV['SE_OS_TYPE']
|
10
10
|
when 'win32', 'win64'
|
11
|
-
system("set path=%path%;#{ENV['SE_DOWNLOAD_LOCATION']}")
|
12
|
-
system('reg.exe ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_EXPAND_SZ /d %path% /f')
|
13
|
-
|
14
|
-
broadcast_windows_system_message
|
15
11
|
ENV['PATH'] = "#{ENV['PATH']};#{ENV['SE_DOWNLOAD_LOCATION']}"
|
12
|
+
require 'win32/registry'
|
13
|
+
Win32::Registry::HKEY_LOCAL_MACHINE.open(
|
14
|
+
"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment",
|
15
|
+
Win32::Registry::KEY_WRITE) do |key|
|
16
|
+
key['PATH'] = ENV['PATH']
|
17
|
+
end
|
18
|
+
broadcast_windows_system_message
|
16
19
|
when 'mac32', 'linux32', 'linux64'
|
17
20
|
unless set?
|
18
21
|
unless bash_updated?
|
@@ -46,7 +49,7 @@ module SeleniumPrep
|
|
46
49
|
|
47
50
|
def self.broadcast_windows_system_message
|
48
51
|
# See https://github.com/tourdedave/selenium-prep/issues/3 for details
|
49
|
-
require 'Win32API'
|
52
|
+
require 'Win32API'
|
50
53
|
|
51
54
|
send_message_timeout = Win32API.new('user32', 'SendMessageTimeout', 'LLLPLLP', 'L')
|
52
55
|
hwnd_broadcast = 0xffff
|
data/selenium-prep.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ['Dave Haeffner']
|
10
10
|
spec.email = ['dhaeffner@gmail.com']
|
11
11
|
spec.summary = %q{See README.txt for details}
|
12
|
-
spec.description = %q{selenium-prep
|
12
|
+
spec.description = %q{selenium-prep automatically configures your machine for local Selenium execution by downloading the necessary files and adding them to your system path.}
|
13
13
|
spec.homepage = 'https://github.com/tourdedave/selenium-prep'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
data/spec/url_spec.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require_relative '../lib/selenium-prep/urls'
|
2
|
-
require '
|
2
|
+
require 'rest-client'
|
3
3
|
|
4
4
|
describe 'Selenium URLs are valid -> ', :acceptance do
|
5
5
|
|
6
6
|
def request(url)
|
7
|
-
|
7
|
+
RestClient.head url
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'Browser Drivers' do
|
@@ -13,14 +13,14 @@ describe 'Selenium URLs are valid -> ', :acceptance do
|
|
13
13
|
urls.flatten.each do |url|
|
14
14
|
response = request url
|
15
15
|
expect(response.code).to eql 200
|
16
|
-
expect(response.headers[
|
16
|
+
expect(response.headers[:content_type]).to include('zip')
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'Standalone Server' do
|
21
21
|
response = request SeleniumPrep::URLs::SERVER
|
22
22
|
expect(response.code).to eql 200
|
23
|
-
expect(response.headers[
|
23
|
+
expect(response.headers[:content_type]).to eql('application/java-archive')
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium-prep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Haeffner
|
@@ -94,11 +94,8 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 4.3.1
|
97
|
-
description: selenium-prep
|
98
|
-
|
99
|
-
standalone server to a specified location. It will then check your system PATH to
|
100
|
-
see if the directory is in it. If not, it will provide you with information on how
|
101
|
-
to configure it for your operating system.
|
97
|
+
description: selenium-prep automatically configures your machine for local Selenium
|
98
|
+
execution by downloading the necessary files and adding them to your system path.
|
102
99
|
email:
|
103
100
|
- dhaeffner@gmail.com
|
104
101
|
executables: []
|
@@ -106,6 +103,7 @@ extensions: []
|
|
106
103
|
extra_rdoc_files: []
|
107
104
|
files:
|
108
105
|
- ".gitignore"
|
106
|
+
- ";"
|
109
107
|
- Gemfile
|
110
108
|
- Guardfile
|
111
109
|
- README.txt
|