frameworks-capybara 0.0.39 → 0.0.40
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/frameworks-capybara.gemspec +2 -2
- data/lib/frameworks/capybara.rb +3 -2
- data/lib/monkey-patches/webdriver-patches.rb +41 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.40
|
data/frameworks-capybara.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{frameworks-capybara}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.40"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["mcrmfc"]
|
12
|
-
s.date = %q{2011-09-
|
12
|
+
s.date = %q{2011-09-07}
|
13
13
|
s.description = %q{gem to aid setup of Capybara for testing bbc sites}
|
14
14
|
s.email = %q{mcrobbins@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/frameworks/capybara.rb
CHANGED
@@ -74,9 +74,10 @@ class CapybaraSetup
|
|
74
74
|
profile["network.proxy.https"] = @proxy_host
|
75
75
|
profile["network.proxy.http_port"] = 80
|
76
76
|
profile["network.proxy.https_port"] = 80
|
77
|
+
profile.native_events = true
|
77
78
|
opts[:profile] = profile
|
78
|
-
|
79
|
-
profile = Selenium::WebDriver::Firefox::Profile.from_name
|
79
|
+
else
|
80
|
+
profile = Selenium::WebDriver::Firefox::Profile.from_name opts[:profile]
|
80
81
|
profile.native_events = true
|
81
82
|
opts[:profile] = profile
|
82
83
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'selenium-webdriver'
|
2
2
|
|
3
3
|
#Monkey Patch's - Use with care!
|
4
|
-
#
|
4
|
+
#Path to allow true custom capabilities
|
5
|
+
#e.g. job name for sauce labs
|
5
6
|
module Selenium
|
6
7
|
module WebDriver
|
7
8
|
module Remote
|
@@ -29,3 +30,42 @@ module Selenium
|
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
33
|
+
##
|
34
|
+
#Patch to allow following of symlinks when serializing ff profiles
|
35
|
+
#This means we can put certs and key db files into a secure location
|
36
|
+
#on the ci box and then check in symlinks to these files.
|
37
|
+
#
|
38
|
+
#I think this should be fixed in Webdriver itself
|
39
|
+
#TODO: File bug with selenium-webdriver
|
40
|
+
module Selenium
|
41
|
+
module WebDriver
|
42
|
+
module Zipper
|
43
|
+
def self.zip(path)
|
44
|
+
# can't use Tempfile here since it doesn't support File::BINARY mode on 1.8
|
45
|
+
# can't use Dir.mktmpdir(&blk) because of http://jira.codehaus.org/browse/JRUBY-4082
|
46
|
+
tmp_dir = Dir.mktmpdir
|
47
|
+
begin
|
48
|
+
zip_path = File.join(tmp_dir, "webdriver-zip")
|
49
|
+
|
50
|
+
Zip::ZipFile.open(zip_path, Zip::ZipFile::CREATE) { |zip|
|
51
|
+
::Find.find(path) do |file|
|
52
|
+
next if File.directory?(file)
|
53
|
+
entry = file.sub("#{path}/", '')
|
54
|
+
#PATCH begin
|
55
|
+
entry = Zip::ZipEntry.new(zip_path, entry)
|
56
|
+
entry.follow_symlinks = true
|
57
|
+
#PATCH end - nothing removed from original
|
58
|
+
|
59
|
+
zip.add entry, file
|
60
|
+
end
|
61
|
+
}
|
62
|
+
|
63
|
+
FileUtils.copy(zip_path, "/Users/robbim02/workspace/matty4.zip")
|
64
|
+
File.open(zip_path, "rb") { |io| Base64.strict_encode64 io.read }
|
65
|
+
ensure
|
66
|
+
FileUtils.rm_rf tmp_dir
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end # Zipper
|
70
|
+
end # WebDriver
|
71
|
+
end # Selenium
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frameworks-capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 79
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 40
|
10
|
+
version: 0.0.40
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- mcrmfc
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-07 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|