yellowlab-akephalos 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT_LICENSE +20 -0
- data/README.md +109 -0
- data/bin/akephalos +88 -0
- data/lib/akephalos.rb +19 -0
- data/lib/akephalos/capybara.rb +343 -0
- data/lib/akephalos/client.rb +181 -0
- data/lib/akephalos/client/cookies.rb +73 -0
- data/lib/akephalos/client/filter.rb +120 -0
- data/lib/akephalos/configuration.rb +49 -0
- data/lib/akephalos/console.rb +32 -0
- data/lib/akephalos/cucumber.rb +6 -0
- data/lib/akephalos/htmlunit.rb +36 -0
- data/lib/akephalos/htmlunit/ext/confirm_handler.rb +18 -0
- data/lib/akephalos/htmlunit/ext/http_method.rb +30 -0
- data/lib/akephalos/node.rb +188 -0
- data/lib/akephalos/page.rb +113 -0
- data/lib/akephalos/remote_client.rb +92 -0
- data/lib/akephalos/server.rb +79 -0
- data/lib/akephalos/version.rb +3 -0
- data/src/htmlunit/apache-mime4j-0.6.jar +0 -0
- data/src/htmlunit/commons-codec-1.4.jar +0 -0
- data/src/htmlunit/commons-collections-3.2.1.jar +0 -0
- data/src/htmlunit/commons-io-1.4.jar +0 -0
- data/src/htmlunit/commons-lang-2.4.jar +0 -0
- data/src/htmlunit/commons-logging-1.1.1.jar +0 -0
- data/src/htmlunit/cssparser-0.9.5.jar +0 -0
- data/src/htmlunit/htmlunit-2.8.jar +0 -0
- data/src/htmlunit/htmlunit-core-js-2.8.jar +0 -0
- data/src/htmlunit/httpclient-4.0.1.jar +0 -0
- data/src/htmlunit/httpcore-4.0.1.jar +0 -0
- data/src/htmlunit/httpmime-4.0.1.jar +0 -0
- data/src/htmlunit/nekohtml-1.9.14.jar +0 -0
- data/src/htmlunit/sac-1.3.jar +0 -0
- data/src/htmlunit/serializer-2.7.1.jar +0 -0
- data/src/htmlunit/xalan-2.7.1.jar +0 -0
- data/src/htmlunit/xercesImpl-2.9.1.jar +0 -0
- data/src/htmlunit/xml-apis-1.3.04.jar +0 -0
- metadata +167 -0
@@ -0,0 +1,79 @@
|
|
1
|
+
require "pathname"
|
2
|
+
require "drb/drb"
|
3
|
+
require "akephalos/client"
|
4
|
+
|
5
|
+
# In ruby-1.8.7 and later, the message for a NameError exception is lazily
|
6
|
+
# evaluated. There are, however, different implementations of this between ruby
|
7
|
+
# and jruby, so we realize these messages when sending over DRb.
|
8
|
+
class NameError::Message
|
9
|
+
# @note This method is called by DRb before sending the error to the remote
|
10
|
+
# connection.
|
11
|
+
# @return [String] the inner message.
|
12
|
+
def _dump
|
13
|
+
to_s
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
[
|
18
|
+
Akephalos::Page,
|
19
|
+
Akephalos::Node,
|
20
|
+
Akephalos::Client::Cookies,
|
21
|
+
Akephalos::Client::Cookies::Cookie
|
22
|
+
].each { |klass| klass.send(:include, DRbUndumped) }
|
23
|
+
|
24
|
+
module Akephalos
|
25
|
+
|
26
|
+
# The ClientManager is shared over DRb with the remote process, and
|
27
|
+
# facilitates communication between the processes.
|
28
|
+
#
|
29
|
+
# @api private
|
30
|
+
class ClientManager
|
31
|
+
include DRbUndumped
|
32
|
+
|
33
|
+
# @return [Akephalos::Client] a new client instance
|
34
|
+
def self.new_client(options = {})
|
35
|
+
# Store the client to ensure it isn't prematurely garbage collected.
|
36
|
+
@client = Client.new(options)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Set the global configuration settings for Akephalos.
|
40
|
+
#
|
41
|
+
# @param [Hash] config the configuration settings
|
42
|
+
# @return [Hash] the configuration
|
43
|
+
def self.configuration=(config)
|
44
|
+
Akephalos.configuration = config
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
# Akephalos::Server is used by `akephalos --server` to start a DRb server
|
50
|
+
# serving Akephalos::ClientManager.
|
51
|
+
class Server
|
52
|
+
|
53
|
+
# Start DRb service for Akephalos::ClientManager.
|
54
|
+
#
|
55
|
+
# @param [String] port attach server to
|
56
|
+
def self.start!(port)
|
57
|
+
abort_on_parent_exit!
|
58
|
+
DRb.start_service("druby://127.0.0.1:#{port}", ClientManager)
|
59
|
+
DRb.thread.join
|
60
|
+
end
|
61
|
+
|
62
|
+
private
|
63
|
+
|
64
|
+
# Exit if STDIN is no longer readable, which corresponds to the process
|
65
|
+
# which started the server exiting prematurely.
|
66
|
+
#
|
67
|
+
# @api private
|
68
|
+
def self.abort_on_parent_exit!
|
69
|
+
Thread.new do
|
70
|
+
begin
|
71
|
+
STDIN.read
|
72
|
+
rescue IOError
|
73
|
+
exit
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yellowlab-akephalos
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 6
|
10
|
+
version: 0.2.6
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Bernerd Schaefer
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-08-16 00:00:00 +10:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: capybara
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 62196353
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 0
|
33
|
+
- 0
|
34
|
+
- beta
|
35
|
+
- 1
|
36
|
+
version: 1.0.0.beta1
|
37
|
+
type: :runtime
|
38
|
+
version_requirements: *id001
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: jruby-jars
|
41
|
+
prerelease: false
|
42
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
hash: 3
|
48
|
+
segments:
|
49
|
+
- 0
|
50
|
+
version: "0"
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: sinatra
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
type: :development
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rspec
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 3
|
76
|
+
segments:
|
77
|
+
- 2
|
78
|
+
- 3
|
79
|
+
- 0
|
80
|
+
version: 2.3.0
|
81
|
+
type: :development
|
82
|
+
version_requirements: *id004
|
83
|
+
description: Headless Browser for Integration Testing with Capybara
|
84
|
+
email: bj.schaefer@gmail.com
|
85
|
+
executables:
|
86
|
+
- akephalos
|
87
|
+
extensions: []
|
88
|
+
|
89
|
+
extra_rdoc_files: []
|
90
|
+
|
91
|
+
files:
|
92
|
+
- lib/akephalos.rb
|
93
|
+
- lib/akephalos/client.rb
|
94
|
+
- lib/akephalos/page.rb
|
95
|
+
- lib/akephalos/capybara.rb
|
96
|
+
- lib/akephalos/server.rb
|
97
|
+
- lib/akephalos/remote_client.rb
|
98
|
+
- lib/akephalos/version.rb
|
99
|
+
- lib/akephalos/htmlunit.rb
|
100
|
+
- lib/akephalos/node.rb
|
101
|
+
- lib/akephalos/cucumber.rb
|
102
|
+
- lib/akephalos/client/filter.rb
|
103
|
+
- lib/akephalos/client/cookies.rb
|
104
|
+
- lib/akephalos/configuration.rb
|
105
|
+
- lib/akephalos/console.rb
|
106
|
+
- lib/akephalos/htmlunit/ext/http_method.rb
|
107
|
+
- lib/akephalos/htmlunit/ext/confirm_handler.rb
|
108
|
+
- src/htmlunit/serializer-2.7.1.jar
|
109
|
+
- src/htmlunit/xml-apis-1.3.04.jar
|
110
|
+
- src/htmlunit/xercesImpl-2.9.1.jar
|
111
|
+
- src/htmlunit/commons-lang-2.4.jar
|
112
|
+
- src/htmlunit/xalan-2.7.1.jar
|
113
|
+
- src/htmlunit/commons-io-1.4.jar
|
114
|
+
- src/htmlunit/httpmime-4.0.1.jar
|
115
|
+
- src/htmlunit/htmlunit-2.8.jar
|
116
|
+
- src/htmlunit/htmlunit-core-js-2.8.jar
|
117
|
+
- src/htmlunit/httpclient-4.0.1.jar
|
118
|
+
- src/htmlunit/cssparser-0.9.5.jar
|
119
|
+
- src/htmlunit/nekohtml-1.9.14.jar
|
120
|
+
- src/htmlunit/apache-mime4j-0.6.jar
|
121
|
+
- src/htmlunit/commons-codec-1.4.jar
|
122
|
+
- src/htmlunit/sac-1.3.jar
|
123
|
+
- src/htmlunit/httpcore-4.0.1.jar
|
124
|
+
- src/htmlunit/commons-logging-1.1.1.jar
|
125
|
+
- src/htmlunit/commons-collections-3.2.1.jar
|
126
|
+
- README.md
|
127
|
+
- MIT_LICENSE
|
128
|
+
- bin/akephalos
|
129
|
+
has_rdoc: true
|
130
|
+
homepage: http://bernerdschaefer.github.com/akephalos
|
131
|
+
licenses: []
|
132
|
+
|
133
|
+
post_install_message:
|
134
|
+
rdoc_options: []
|
135
|
+
|
136
|
+
require_paths:
|
137
|
+
- lib
|
138
|
+
- src
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
hash: 3
|
145
|
+
segments:
|
146
|
+
- 0
|
147
|
+
version: "0"
|
148
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
hash: 23
|
154
|
+
segments:
|
155
|
+
- 1
|
156
|
+
- 3
|
157
|
+
- 6
|
158
|
+
version: 1.3.6
|
159
|
+
requirements: []
|
160
|
+
|
161
|
+
rubyforge_project: akephalos
|
162
|
+
rubygems_version: 1.6.2
|
163
|
+
signing_key:
|
164
|
+
specification_version: 3
|
165
|
+
summary: Headless Browser for Integration Testing with Capybara
|
166
|
+
test_files: []
|
167
|
+
|