celerity 0.8.9 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +2 -2
- data/celerity.gemspec +8 -8
- data/lib/celerity/browser.rb +4 -2
- data/lib/celerity/element_collection.rb +8 -0
- data/lib/celerity/elements/image.rb +1 -1
- data/lib/celerity/htmlunit/{htmlunit-2.9-SNAPSHOT.jar → htmlunit-2.9.jar} +0 -0
- data/lib/celerity/htmlunit/htmlunit-core-js-2.9.jar +0 -0
- data/lib/celerity/htmlunit/{httpclient-4.1.1.jar → httpclient-4.1.2.jar} +0 -0
- data/lib/celerity/htmlunit/{httpcore-4.1.jar → httpcore-4.1.2.jar} +0 -0
- data/lib/celerity/htmlunit/{httpmime-4.1.1.jar → httpmime-4.1.2.jar} +0 -0
- data/lib/celerity/htmlunit/nekohtml-1.9.15.jar +0 -0
- data/lib/celerity/version.rb +1 -1
- data/tasks/snapshot.rake +1 -1
- metadata +8 -8
- data/lib/celerity/htmlunit/htmlunit-core-js-2.9-SNAPSHOT.jar +0 -0
- data/lib/celerity/htmlunit/nekohtml-1.9.15-20101026.093020-2.jar +0 -0
data/VERSION.yml
CHANGED
data/celerity.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{celerity}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.9.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jari Bakken", "T. Alexander Lystad", "Knut Johannes Dahle"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-08-18}
|
13
13
|
s.description = %q{Celerity is a JRuby wrapper around HtmlUnit – a headless Java browser with JavaScript support. It provides a simple API for programmatic navigation through web applications. Celerity provides a superset of Watir's API.}
|
14
14
|
s.email = %q{jari.bakken@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -57,12 +57,12 @@ Gem::Specification.new do |s|
|
|
57
57
|
"lib/celerity/htmlunit/commons-lang-2.6.jar",
|
58
58
|
"lib/celerity/htmlunit/commons-logging-1.1.1.jar",
|
59
59
|
"lib/celerity/htmlunit/cssparser-0.9.5.jar",
|
60
|
-
"lib/celerity/htmlunit/htmlunit-2.9
|
61
|
-
"lib/celerity/htmlunit/htmlunit-core-js-2.9
|
62
|
-
"lib/celerity/htmlunit/httpclient-4.1.
|
63
|
-
"lib/celerity/htmlunit/httpcore-4.1.jar",
|
64
|
-
"lib/celerity/htmlunit/httpmime-4.1.
|
65
|
-
"lib/celerity/htmlunit/nekohtml-1.9.15
|
60
|
+
"lib/celerity/htmlunit/htmlunit-2.9.jar",
|
61
|
+
"lib/celerity/htmlunit/htmlunit-core-js-2.9.jar",
|
62
|
+
"lib/celerity/htmlunit/httpclient-4.1.2.jar",
|
63
|
+
"lib/celerity/htmlunit/httpcore-4.1.2.jar",
|
64
|
+
"lib/celerity/htmlunit/httpmime-4.1.2.jar",
|
65
|
+
"lib/celerity/htmlunit/nekohtml-1.9.15.jar",
|
66
66
|
"lib/celerity/htmlunit/sac-1.3.jar",
|
67
67
|
"lib/celerity/htmlunit/serializer-2.7.1.jar",
|
68
68
|
"lib/celerity/htmlunit/xalan-2.7.1.jar",
|
data/lib/celerity/browser.rb
CHANGED
@@ -96,8 +96,9 @@ module Celerity
|
|
96
96
|
def goto(uri, headers = nil)
|
97
97
|
uri = "http://#{uri}" unless uri =~ %r{://}
|
98
98
|
|
99
|
-
request = HtmlUnit::
|
100
|
-
|
99
|
+
request = HtmlUnit::WebRequest.new(::Java::JavaNet::URL.new(uri))
|
100
|
+
|
101
|
+
request.setAdditionalHeaders(headers) if headers
|
101
102
|
request.setCharset(@charset)
|
102
103
|
|
103
104
|
rescue_status_code_exception do
|
@@ -129,6 +130,7 @@ module Celerity
|
|
129
130
|
|
130
131
|
def close
|
131
132
|
@page = nil
|
133
|
+
@object = nil
|
132
134
|
@webclient.closeAllWindows
|
133
135
|
@viewer.close
|
134
136
|
end
|
@@ -32,6 +32,14 @@ module Celerity
|
|
32
32
|
end
|
33
33
|
alias_method :size, :length
|
34
34
|
|
35
|
+
#
|
36
|
+
# Returns true if the collection is empty.
|
37
|
+
#
|
38
|
+
|
39
|
+
def empty?
|
40
|
+
length == 0
|
41
|
+
end
|
42
|
+
|
35
43
|
#
|
36
44
|
# @yieldparam [Celerity::Element] element Iterate through the elements in this collection.
|
37
45
|
#
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/celerity/version.rb
CHANGED
data/tasks/snapshot.rake
CHANGED
@@ -4,7 +4,7 @@ task :snapshot, :file do |t, args|
|
|
4
4
|
sh "cp #{args.file} ./"
|
5
5
|
basename = File.basename(args.file)
|
6
6
|
else
|
7
|
-
url = "http://build.canoo.com/htmlunit/artifacts
|
7
|
+
url = "http://build.canoo.com/htmlunit/artifacts//htmlunit-2.9-with-dependencies.zip"
|
8
8
|
sh "curl -O #{url}"
|
9
9
|
basename = File.basename(url)
|
10
10
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: celerity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.9.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jari Bakken
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2011-
|
15
|
+
date: 2011-08-18 00:00:00 +02:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
@@ -109,12 +109,12 @@ files:
|
|
109
109
|
- lib/celerity/htmlunit/commons-lang-2.6.jar
|
110
110
|
- lib/celerity/htmlunit/commons-logging-1.1.1.jar
|
111
111
|
- lib/celerity/htmlunit/cssparser-0.9.5.jar
|
112
|
-
- lib/celerity/htmlunit/htmlunit-2.9
|
113
|
-
- lib/celerity/htmlunit/htmlunit-core-js-2.9
|
114
|
-
- lib/celerity/htmlunit/httpclient-4.1.
|
115
|
-
- lib/celerity/htmlunit/httpcore-4.1.jar
|
116
|
-
- lib/celerity/htmlunit/httpmime-4.1.
|
117
|
-
- lib/celerity/htmlunit/nekohtml-1.9.15
|
112
|
+
- lib/celerity/htmlunit/htmlunit-2.9.jar
|
113
|
+
- lib/celerity/htmlunit/htmlunit-core-js-2.9.jar
|
114
|
+
- lib/celerity/htmlunit/httpclient-4.1.2.jar
|
115
|
+
- lib/celerity/htmlunit/httpcore-4.1.2.jar
|
116
|
+
- lib/celerity/htmlunit/httpmime-4.1.2.jar
|
117
|
+
- lib/celerity/htmlunit/nekohtml-1.9.15.jar
|
118
118
|
- lib/celerity/htmlunit/sac-1.3.jar
|
119
119
|
- lib/celerity/htmlunit/serializer-2.7.1.jar
|
120
120
|
- lib/celerity/htmlunit/xalan-2.7.1.jar
|
Binary file
|
Binary file
|