caius-celerity 0.0.6.10 → 0.0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +335 -0
- data/benchmark/bm_2000_spans.rb +48 -0
- data/benchmark/bm_digg.rb +26 -0
- data/benchmark/bm_google_images.rb +36 -0
- data/benchmark/bm_input_locator.rb +69 -0
- data/benchmark/bm_text_input.rb +19 -0
- data/benchmark/loader.rb +14 -0
- data/celerity.gemspec +33 -0
- data/config/hoe.rb +78 -0
- data/config/requirements.rb +9 -0
- data/lib/celerity/version.rb +1 -1
- data/spec/area_spec.rb +97 -0
- data/spec/areas_spec.rb +40 -0
- data/spec/browser_authentication_spec.rb +20 -0
- data/spec/browser_spec.rb +537 -0
- data/spec/button_spec.rb +244 -0
- data/spec/buttons_spec.rb +51 -0
- data/spec/checkbox_spec.rb +302 -0
- data/spec/checkboxes_spec.rb +38 -0
- data/spec/clickable_element_spec.rb +43 -0
- data/spec/dd_spec.rb +143 -0
- data/spec/dds_spec.rb +39 -0
- data/spec/default_viewer_spec.rb +24 -0
- data/spec/div_spec.rb +235 -0
- data/spec/divs_spec.rb +39 -0
- data/spec/dl_spec.rb +143 -0
- data/spec/dls_spec.rb +39 -0
- data/spec/dt_spec.rb +143 -0
- data/spec/dts_spec.rb +39 -0
- data/spec/element_spec.rb +150 -0
- data/spec/em_spec.rb +116 -0
- data/spec/ems_spec.rb +39 -0
- data/spec/filefield_spec.rb +133 -0
- data/spec/filefields_spec.rb +40 -0
- data/spec/form_spec.rb +59 -0
- data/spec/forms_spec.rb +41 -0
- data/spec/frame_spec.rb +139 -0
- data/spec/frames_spec.rb +71 -0
- data/spec/hidden_spec.rb +127 -0
- data/spec/hiddens_spec.rb +39 -0
- data/spec/hn_spec.rb +104 -0
- data/spec/hns_spec.rb +45 -0
- data/spec/html/2000_spans.html +2009 -0
- data/spec/html/bug_duplicate_attributes.html +14 -0
- data/spec/html/bug_javascript_001.html +11 -0
- data/spec/html/definition_lists.html +48 -0
- data/spec/html/euc-jp_text.html +17 -0
- data/spec/html/forms_with_input_elements.html +124 -0
- data/spec/html/frame_1.html +18 -0
- data/spec/html/frame_2.html +16 -0
- data/spec/html/frames.html +11 -0
- data/spec/html/iframes.html +12 -0
- data/spec/html/images.html +27 -0
- data/spec/html/images/1.gif +0 -0
- data/spec/html/images/2.gif +0 -0
- data/spec/html/images/3.gif +0 -0
- data/spec/html/images/button.jpg +0 -0
- data/spec/html/images/circle.jpg +0 -0
- data/spec/html/images/map.gif +0 -0
- data/spec/html/images/map2.gif +0 -0
- data/spec/html/images/minus.gif +0 -0
- data/spec/html/images/originaltriangle.jpg +0 -0
- data/spec/html/images/plus.gif +0 -0
- data/spec/html/images/square.jpg +0 -0
- data/spec/html/images/triangle.jpg +0 -0
- data/spec/html/iso-2022-jp_text.html +17 -0
- data/spec/html/jquery.html +29 -0
- data/spec/html/latin1_text.html +17 -0
- data/spec/html/multiple_ids.html +14 -0
- data/spec/html/non_control_elements.html +115 -0
- data/spec/html/right_click.html +16 -0
- data/spec/html/shift_jis_text.html +17 -0
- data/spec/html/tables.html +119 -0
- data/spec/html/timeout.html +16 -0
- data/spec/html/tiny_mce.html +29 -0
- data/spec/html/utf8_text.html +15 -0
- data/spec/htmlunit_spec.rb +47 -0
- data/spec/image_spec.rb +221 -0
- data/spec/images_spec.rb +39 -0
- data/spec/index_offset_spec.rb +26 -0
- data/spec/label_spec.rb +88 -0
- data/spec/labels_spec.rb +40 -0
- data/spec/li_spec.rb +139 -0
- data/spec/link_spec.rb +200 -0
- data/spec/links_spec.rb +47 -0
- data/spec/lis_spec.rb +40 -0
- data/spec/listener_spec.rb +142 -0
- data/spec/map_spec.rb +102 -0
- data/spec/maps_spec.rb +40 -0
- data/spec/meta_spec.rb +29 -0
- data/spec/metas_spec.rb +38 -0
- data/spec/ol_spec.rb +87 -0
- data/spec/ols_spec.rb +40 -0
- data/spec/option_spec.rb +156 -0
- data/spec/p_spec.rb +171 -0
- data/spec/pre_spec.rb +135 -0
- data/spec/pres_spec.rb +40 -0
- data/spec/ps_spec.rb +40 -0
- data/spec/radio_spec.rb +314 -0
- data/spec/radios_spec.rb +42 -0
- data/spec/select_list_spec.rb +320 -0
- data/spec/select_lists_spec.rb +47 -0
- data/spec/span_spec.rb +184 -0
- data/spec/spans_spec.rb +64 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +66 -0
- data/spec/strong_spec.rb +101 -0
- data/spec/strongs_spec.rb +40 -0
- data/spec/table_bodies_spec.rb +57 -0
- data/spec/table_body_spec.rb +109 -0
- data/spec/table_cell_spec.rb +84 -0
- data/spec/table_cells_spec.rb +59 -0
- data/spec/table_footer_spec.rb +96 -0
- data/spec/table_footers_spec.rb +55 -0
- data/spec/table_header_spec.rb +101 -0
- data/spec/table_headers_spec.rb +55 -0
- data/spec/table_row_spec.rb +106 -0
- data/spec/table_rows_spec.rb +58 -0
- data/spec/table_spec.rb +169 -0
- data/spec/tables_spec.rb +42 -0
- data/spec/text_field_spec.rb +331 -0
- data/spec/text_fields_spec.rb +44 -0
- data/spec/ul_spec.rb +88 -0
- data/spec/uls_spec.rb +40 -0
- data/spec/watir_compatibility_spec.rb +268 -0
- data/support/spec_server.rb +122 -0
- data/tasks/benchmark.rake +4 -0
- data/tasks/deployment.rake +43 -0
- data/tasks/environment.rake +7 -0
- data/tasks/fix.rake +25 -0
- data/tasks/rspec.rake +31 -0
- data/tasks/simple_ci.rake +94 -0
- data/tasks/snapshot.rake +22 -0
- data/tasks/specserver.rake +21 -0
- data/tasks/website.rake +17 -0
- data/tasks/yard.rake +9 -0
- data/website/benchmarks.html +237 -0
- data/website/css/color.css +153 -0
- data/website/css/hacks.css +3 -0
- data/website/css/layout.css +179 -0
- data/website/css/screen.css +5 -0
- data/website/css/textmate.css +226 -0
- data/website/css/typography.css +72 -0
- data/website/gfx/body_bg.gif +0 -0
- data/website/gfx/button_bg.jpg +0 -0
- data/website/gfx/header_bg.jpg +0 -0
- data/website/gfx/header_left.jpg +0 -0
- data/website/gfx/header_right.jpg +0 -0
- data/website/gfx/nav_bg.jpg +0 -0
- data/website/index.html +133 -0
- data/website/yard/Celerity.html +50 -0
- data/website/yard/Celerity/Area.html +212 -0
- data/website/yard/Celerity/Areas.html +103 -0
- data/website/yard/Celerity/Browser.html +5594 -0
- data/website/yard/Celerity/Button.html +312 -0
- data/website/yard/Celerity/Buttons.html +103 -0
- data/website/yard/Celerity/CheckBox.html +347 -0
- data/website/yard/Celerity/CheckBoxes.html +103 -0
- data/website/yard/Celerity/ClickableElement.html +448 -0
- data/website/yard/Celerity/Container.html +7676 -0
- data/website/yard/Celerity/Dd.html +198 -0
- data/website/yard/Celerity/Dds.html +103 -0
- data/website/yard/Celerity/DefaultViewer.html +101 -0
- data/website/yard/Celerity/DisabledElement.html +252 -0
- data/website/yard/Celerity/Div.html +198 -0
- data/website/yard/Celerity/Divs.html +103 -0
- data/website/yard/Celerity/Dl.html +198 -0
- data/website/yard/Celerity/Dls.html +103 -0
- data/website/yard/Celerity/Dt.html +198 -0
- data/website/yard/Celerity/Dts.html +103 -0
- data/website/yard/Celerity/Element.html +1703 -0
- data/website/yard/Celerity/ElementCollection.html +725 -0
- data/website/yard/Celerity/ElementLocator.html +589 -0
- data/website/yard/Celerity/Em.html +198 -0
- data/website/yard/Celerity/Ems.html +103 -0
- data/website/yard/Celerity/Exception.html +23 -0
- data/website/yard/Celerity/Exception/CelerityException.html +32 -0
- data/website/yard/Celerity/Exception/MissingWayOfFindingObjectException.html +32 -0
- data/website/yard/Celerity/Exception/NavigationException.html +33 -0
- data/website/yard/Celerity/Exception/NoValueFoundException.html +33 -0
- data/website/yard/Celerity/Exception/ObjectDisabledException.html +33 -0
- data/website/yard/Celerity/Exception/ObjectReadOnlyException.html +33 -0
- data/website/yard/Celerity/Exception/UnexpectedPageException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownCellException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownFormException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownFrameException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownObjectException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownRowException.html +33 -0
- data/website/yard/Celerity/FileField.html +289 -0
- data/website/yard/Celerity/FileFields.html +103 -0
- data/website/yard/Celerity/Form.html +284 -0
- data/website/yard/Celerity/Forms.html +103 -0
- data/website/yard/Celerity/Frame.html +527 -0
- data/website/yard/Celerity/Frames.html +103 -0
- data/website/yard/Celerity/H1.html +198 -0
- data/website/yard/Celerity/H1s.html +103 -0
- data/website/yard/Celerity/H2.html +198 -0
- data/website/yard/Celerity/H2s.html +103 -0
- data/website/yard/Celerity/H3.html +198 -0
- data/website/yard/Celerity/H3s.html +103 -0
- data/website/yard/Celerity/H4.html +198 -0
- data/website/yard/Celerity/H4s.html +103 -0
- data/website/yard/Celerity/H5.html +198 -0
- data/website/yard/Celerity/H5s.html +103 -0
- data/website/yard/Celerity/H6.html +198 -0
- data/website/yard/Celerity/H6s.html +103 -0
- data/website/yard/Celerity/Hidden.html +285 -0
- data/website/yard/Celerity/Hiddens.html +103 -0
- data/website/yard/Celerity/Image.html +645 -0
- data/website/yard/Celerity/Images.html +103 -0
- data/website/yard/Celerity/InputElement.html +271 -0
- data/website/yard/Celerity/Label.html +210 -0
- data/website/yard/Celerity/Labels.html +103 -0
- data/website/yard/Celerity/Li.html +198 -0
- data/website/yard/Celerity/Link.html +295 -0
- data/website/yard/Celerity/Links.html +103 -0
- data/website/yard/Celerity/Lis.html +103 -0
- data/website/yard/Celerity/Listener.html +821 -0
- data/website/yard/Celerity/Map.html +198 -0
- data/website/yard/Celerity/Maps.html +103 -0
- data/website/yard/Celerity/Meta.html +196 -0
- data/website/yard/Celerity/Metas.html +103 -0
- data/website/yard/Celerity/MethodGenerator.html +195 -0
- data/website/yard/Celerity/NonControlElement.html +212 -0
- data/website/yard/Celerity/Ol.html +198 -0
- data/website/yard/Celerity/Ols.html +103 -0
- data/website/yard/Celerity/Option.html +348 -0
- data/website/yard/Celerity/Options.html +103 -0
- data/website/yard/Celerity/P.html +198 -0
- data/website/yard/Celerity/Pre.html +198 -0
- data/website/yard/Celerity/Pres.html +103 -0
- data/website/yard/Celerity/Ps.html +103 -0
- data/website/yard/Celerity/Radio.html +339 -0
- data/website/yard/Celerity/RadioCheckCommon.html +453 -0
- data/website/yard/Celerity/Radios.html +103 -0
- data/website/yard/Celerity/SelectList.html +1122 -0
- data/website/yard/Celerity/SelectLists.html +103 -0
- data/website/yard/Celerity/ShortInspect.html +108 -0
- data/website/yard/Celerity/Span.html +198 -0
- data/website/yard/Celerity/Spans.html +103 -0
- data/website/yard/Celerity/Strong.html +198 -0
- data/website/yard/Celerity/Strongs.html +103 -0
- data/website/yard/Celerity/Table.html +1287 -0
- data/website/yard/Celerity/TableBodies.html +103 -0
- data/website/yard/Celerity/TableBody.html +203 -0
- data/website/yard/Celerity/TableCell.html +279 -0
- data/website/yard/Celerity/TableCells.html +103 -0
- data/website/yard/Celerity/TableElement.html +437 -0
- data/website/yard/Celerity/TableFooter.html +203 -0
- data/website/yard/Celerity/TableFooters.html +103 -0
- data/website/yard/Celerity/TableHeader.html +203 -0
- data/website/yard/Celerity/TableHeaders.html +103 -0
- data/website/yard/Celerity/TableRow.html +478 -0
- data/website/yard/Celerity/TableRows.html +103 -0
- data/website/yard/Celerity/Tables.html +103 -0
- data/website/yard/Celerity/TextField.html +938 -0
- data/website/yard/Celerity/TextFields.html +103 -0
- data/website/yard/Celerity/Th.html +208 -0
- data/website/yard/Celerity/Ul.html +209 -0
- data/website/yard/Celerity/Uls.html +103 -0
- data/website/yard/Celerity/Util.html +264 -0
- data/website/yard/Celerity/VERSION.html +44 -0
- data/website/yard/HtmlUnit.html +23 -0
- data/website/yard/HtmlUnit/Html.html +23 -0
- data/website/yard/HtmlUnit/Util.html +23 -0
- data/website/yard/Java/ComGargoylesoftwareHtmlunitHtml/HtmlPage.html +90 -0
- data/website/yard/Java/JavaLang/Iterable.html +103 -0
- data/website/yard/Java/OrgW3cDom/NamedNodeMap.html +97 -0
- data/website/yard/README.txt.html +116 -0
- data/website/yard/String.html +103 -0
- data/website/yard/all-files.html +22 -0
- data/website/yard/all-methods.html +3276 -0
- data/website/yard/all-namespaces.html +258 -0
- data/website/yard/app.js +18 -0
- data/website/yard/index.html +19 -0
- data/website/yard/jquery.js +11 -0
- data/website/yard/style.css +68 -0
- data/website/yard/syntax_highlight.css +21 -0
- metadata +285 -13
data/tasks/fix.rake
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
namespace :fix do
|
2
|
+
|
3
|
+
desc 'Make all ruby files use LF line endings'
|
4
|
+
task :crlf do
|
5
|
+
files = FileList['**/*.rb']
|
6
|
+
files.each do |f|
|
7
|
+
next if File.directory?(f)
|
8
|
+
s = IO.read(f)
|
9
|
+
s.gsub!(/\r?\n/, "\n")
|
10
|
+
File.open(f, "w") { |io| io.write(s) }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
desc 'Remove trailing whitespace from all ruby files'
|
15
|
+
task :trailing_whitespace do
|
16
|
+
files = FileList['**/*.rb']
|
17
|
+
files.each do |f|
|
18
|
+
next if File.directory?(f)
|
19
|
+
s = IO.read(f)
|
20
|
+
s.gsub!(/\s*?($)/, '\1')
|
21
|
+
File.open(f, "w") { |io| io.write(s) }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
data/tasks/rspec.rake
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
begin
|
2
|
+
require 'spec'
|
3
|
+
rescue LoadError
|
4
|
+
require 'rubygems'
|
5
|
+
require 'spec'
|
6
|
+
end
|
7
|
+
|
8
|
+
begin
|
9
|
+
require 'spec/rake/spectask'
|
10
|
+
rescue LoadError
|
11
|
+
puts <<-EOS
|
12
|
+
To use rspec for testing you must install rspec gem:
|
13
|
+
gem install rspec
|
14
|
+
EOS
|
15
|
+
exit(0)
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "Run the specs under spec/"
|
19
|
+
Spec::Rake::SpecTask.new do |t|
|
20
|
+
t.spec_opts = ['--options', "spec/spec.opts"]
|
21
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
22
|
+
# t.ruby_opts = %w[--headless] if RUBY_PLATFORM =~ /java/
|
23
|
+
|
24
|
+
begin
|
25
|
+
require 'rcov'
|
26
|
+
t.rcov = true
|
27
|
+
t.rcov_opts = ['--exclude', 'spec,fcntl,path_helper,yaml', '--no-rcovrt']
|
28
|
+
rescue LoadError
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "fileutils"
|
3
|
+
require "erb"
|
4
|
+
require "pp"
|
5
|
+
|
6
|
+
begin
|
7
|
+
require "mongrel"
|
8
|
+
rescue LoadError
|
9
|
+
end
|
10
|
+
|
11
|
+
task :simple_ci do
|
12
|
+
INTERVAL = (60*5)
|
13
|
+
CI_ROOT = File.dirname(__FILE__) + "/../simple_ci"
|
14
|
+
ROOT = File.expand_path(CI_ROOT + "/..")
|
15
|
+
Dir.mkdir(CI_ROOT) unless File.exist?(CI_ROOT)
|
16
|
+
|
17
|
+
class SpecFile < Struct.new(:file, :describes)
|
18
|
+
attr_accessor :passed
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_specs
|
22
|
+
Dir[File.dirname(__FILE__) + '/../spec/**/*_spec.rb'].map do |file|
|
23
|
+
SpecFile.new(file, File.read(file)[/describe\(?\s*["'](.+?)["']/, 1] || File.basename(file) )
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class SimpleCI < Mongrel::HttpHandler
|
28
|
+
def self.template=(rhtml); @@template = rhtml; end
|
29
|
+
|
30
|
+
def initialize(results)
|
31
|
+
@results = results
|
32
|
+
super()
|
33
|
+
end
|
34
|
+
|
35
|
+
def process(request, response)
|
36
|
+
response.start(200) do |header, io|
|
37
|
+
if @results
|
38
|
+
io.write ERB.new(@@template).result
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
@results = {}
|
46
|
+
SimpleCI.template = <<-HTML
|
47
|
+
<html>
|
48
|
+
<head>
|
49
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
50
|
+
<title>Celerity Simple CI</title>
|
51
|
+
<style type="text/css" media="screen">
|
52
|
+
body {font: 10px/16px "Lucida Grande", Geneva, Arial, Verdana, sans-serif; background-color: #fff;color: #333;}
|
53
|
+
a{color:#2971a7;}
|
54
|
+
a:link,a:visited,a:active{text-decoration:none}
|
55
|
+
a:hover{text-decoration:underline}
|
56
|
+
table{border-collapse:collapse;border-spacing:0;margin-left:24px;}
|
57
|
+
</style>
|
58
|
+
</head>
|
59
|
+
|
60
|
+
<h1> Celerity </h1>
|
61
|
+
<h3><a href="result/">Test Results</a></h3>
|
62
|
+
<h3><a href="coverage/">Code Coverage</a></h3>
|
63
|
+
</html>
|
64
|
+
HTML
|
65
|
+
|
66
|
+
begin
|
67
|
+
@server = Mongrel::HttpServer.new('0.0.0.0', '8080')
|
68
|
+
rescue NameError
|
69
|
+
abort("Run `(jruby -S) gem install mongrel` to use this task.")
|
70
|
+
end
|
71
|
+
@server.register("/result", Mongrel::DirHandler.new(CI_ROOT))
|
72
|
+
@server.register("/coverage", Mongrel::DirHandler.new(CI_ROOT + "/coverage/coverage"))
|
73
|
+
@server.register("/", SimpleCI.new(@results))
|
74
|
+
Thread.new { @server.run.join }
|
75
|
+
puts "simple_ci started on #{@server.host}:#{@server.port}"
|
76
|
+
loop do
|
77
|
+
puts %x{svn up}
|
78
|
+
puts "*** running specs at #{Time.now}"
|
79
|
+
specs = get_specs
|
80
|
+
|
81
|
+
pp specs if $DEBUG
|
82
|
+
puts "*** running rcov at #{Time.now}"
|
83
|
+
puts %x{jruby -S rake --trace --silent spec > #{CI_ROOT}/index2.html}
|
84
|
+
FileUtils.mv(CI_ROOT + "/index2.html", CI_ROOT + "/index.html", :verbose => true)
|
85
|
+
Dir[CI_ROOT + "/coverage/*"].each { |f| FileUtils.rm_r(f, :verbose => true) }
|
86
|
+
FileUtils.mv(CI_ROOT + "/../coverage", CI_ROOT + "/coverage", :verbose => true)
|
87
|
+
puts "\n*** sleeping #{Time.now}"
|
88
|
+
sleep(INTERVAL)
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
|
94
|
+
|
data/tasks/snapshot.rake
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
desc 'Download and unpack the latest HtmlUnit assembly'
|
2
|
+
task :snapshot do
|
3
|
+
files = %w[ http://build.canoo.com/htmlunit/artifacts/htmlunit-2.6-SNAPSHOT-with-dependencies.zip ]
|
4
|
+
|
5
|
+
files.each do |url|
|
6
|
+
basename = File.basename(url)
|
7
|
+
shortname = basename[/(.+?)\.zip/, 1].sub("-with-dependencies", '')
|
8
|
+
sh "curl -O #{url}"
|
9
|
+
sh "rm -rf lib/celerity/htmlunit/*.jar"
|
10
|
+
sh "unzip -tq #{basename}"
|
11
|
+
sh %Q{unzip -C #{basename} "#{shortname}/lib/*.jar" -d lib/celerity/htmlunit }
|
12
|
+
|
13
|
+
puts "Fixing paths..."
|
14
|
+
sh "cp -R lib/celerity/htmlunit/#{shortname}/lib/*.jar lib/celerity/htmlunit/"
|
15
|
+
|
16
|
+
puts "Cleaning..."
|
17
|
+
rm_r "lib/celerity/htmlunit/#{shortname}/"
|
18
|
+
rm basename
|
19
|
+
|
20
|
+
puts "...done!"
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
namespace :specserver do
|
2
|
+
task :http do
|
3
|
+
require File.dirname(__FILE__) + "/../support/spec_server.rb"
|
4
|
+
s = Celerity::SpecServer.new
|
5
|
+
s.run
|
6
|
+
puts "server started on #{s.host}\n log at: #{s.log_file}"
|
7
|
+
s.thread.join
|
8
|
+
end
|
9
|
+
|
10
|
+
desc "Run HTTPS webserver for specs"
|
11
|
+
task :https do
|
12
|
+
require File.dirname(__FILE__) + "/../support/spec_server.rb"
|
13
|
+
s = Celerity::SpecServer.new(:ssl => true)
|
14
|
+
s.run
|
15
|
+
puts "server started on #{s.host}\n log at: #{s.log_file}"
|
16
|
+
s.thread.join
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "Run HTTP webserver for specs"
|
21
|
+
task :specserver => [:'specserver:http']
|
data/tasks/website.rake
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#desc 'Generate website files'
|
2
|
+
#task :website_generate => :ruby_env do
|
3
|
+
# (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
|
4
|
+
# sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
|
5
|
+
# end
|
6
|
+
#end
|
7
|
+
|
8
|
+
desc 'Upload website files to rubyforge'
|
9
|
+
task :website_upload do
|
10
|
+
host = "#{rubyforge_username}@rubyforge.org"
|
11
|
+
remote_dir = "/var/www/gforge-projects/#{PATH}/"
|
12
|
+
local_dir = 'website'
|
13
|
+
sh %{rsync -rlgoDCv #{local_dir}/ #{host}:#{remote_dir}}
|
14
|
+
end
|
15
|
+
|
16
|
+
#desc 'Generate and upload website files'
|
17
|
+
#task :website => [:website_generate, :website_upload, :publish_docs]
|
data/tasks/yard.rake
ADDED
@@ -0,0 +1,237 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
|
3
|
+
<head>
|
4
|
+
<title>Celerity | Easy and fast functional test automation for web applications</title>
|
5
|
+
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
|
6
|
+
<link rel="stylesheet" type="text/css" media="screen" href="css/screen.css" />
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div id="container">
|
10
|
+
<div id="header">
|
11
|
+
<h1><a href=".">Celerity</a></h1>
|
12
|
+
<div id="tagline">
|
13
|
+
{ French célérité > Latin celeritas > Latin celer, fast, swift. <br />
|
14
|
+
Rapidity of motion; quickness; swiftness. }
|
15
|
+
</div>
|
16
|
+
<div id="leftSlice"></div>
|
17
|
+
<div id="rightSlice"></div>
|
18
|
+
</div>
|
19
|
+
<div id="nav">
|
20
|
+
<ul>
|
21
|
+
<li><a accesskey="h" title="Front page" href="." hreflang="en">Home</a></li>
|
22
|
+
<li><a accesskey="p" title="Celerity at Rubyforge" href="http://rubyforge.org/projects/celerity/" hreflang="en">Rubyforge project</a></li>
|
23
|
+
<li><a accesskey="d" title="Download Celerity" href="http://rubyforge.org/frs/?group_id=6198" hreflang="en">Download</a></li>
|
24
|
+
<li><a accesskey="o" title="Documentation" href="http://celerity.rubyforge.org/doc/" hreflang="en">Documentation</a></li>
|
25
|
+
<li><a accesskey="f" title="Discuss Celerity" href="http://rubyforge.org/forum/?group_id=6198" hreflang="en">Forum</a></li>
|
26
|
+
<li><a accesskey="m" title="Stay up-to-date" href="http://rubyforge.org/mail/?group_id=6198" hreflang="en">Mailing lists</a></li>
|
27
|
+
<li><a accesskey="s" title="Infinite monkey theorem" href="http://celerity.rubyforge.org/svn/" hreflang="en">Browse source</a></li>
|
28
|
+
<li><a accesskey="b" title="Report and browse bugs" href="http://rubyforge.org/tracker/?atid=24033&group_id=6198&func=browse" hreflang="en">Bug tracker</a></li>
|
29
|
+
<li><a accesskey="e" title="Request and browse new features" href="http://rubyforge.org/tracker/?atid=24036&group_id=6198&func=browse" hreflang="en">Feature tracker</a></li>
|
30
|
+
<li><a accesskey="n" title="Benchmarks" href="benchmarks.html" hreflang="en">Benchmarks</a></li>
|
31
|
+
<li><a accesskey="w" title="Wiki/FAQ" href="http://celerity.rubyforge.org/wiki/wiki.pl" hreflang="en">Wiki/FAQ</a></li>
|
32
|
+
<li><a accesskey="t" title="Tutorial" href="http://celerity.rubyforge.org/wiki/wiki.pl?GettingStarted" hreflang="en">Tutorial</a></li>
|
33
|
+
</ul>
|
34
|
+
</div>
|
35
|
+
<div id="content">
|
36
|
+
<h2>Benchmarks</h2>
|
37
|
+
<p>We've played a little with some early crude benchmarking. <del datetime="20080515">Three</del> <ins datetime="20080515">Four</ins> scenarios were benchmarked in Celerity and Watir.</p>
|
38
|
+
<ul>
|
39
|
+
<li><a href="http://celerity.rubyforge.org/svn/trunk/benchmark/bm_2000_spans.rb">Scenario 1: 2000 span elements (local file)</a></li>
|
40
|
+
<li><a href="http://celerity.rubyforge.org/svn/trunk/benchmark/bm_google_images.rb">Scenario 2: Looping a Google image search result</a></li>
|
41
|
+
<li><a href="http://celerity.rubyforge.org/svn/trunk/benchmark/bm_digg.rb">Scenario 3: Counting the number of "diggs" on digg.com's front page</a></li>
|
42
|
+
<li><a href="http://celerity.rubyforge.org/svn/trunk/benchmark/bm_input_locator.rb">Scenario 4: Locating different HTML input elements (local file)</a></li>
|
43
|
+
</ul>
|
44
|
+
|
45
|
+
<h2>Results: Overview</h2>
|
46
|
+
<p>This table provides a quick overview. For more accurate numbers, see below.</p>
|
47
|
+
<table>
|
48
|
+
<tr>
|
49
|
+
<th>Scenario</th>
|
50
|
+
<th>Watir (total)</th>
|
51
|
+
<th>Celerity (total)</th>
|
52
|
+
<th>Time reduction</th>
|
53
|
+
</tr>
|
54
|
+
<tr>
|
55
|
+
<td>1</td>
|
56
|
+
<td>316,97 s</td>
|
57
|
+
<td>0,59 s</td>
|
58
|
+
<td>99,81 %</td>
|
59
|
+
</tr>
|
60
|
+
<tr>
|
61
|
+
<td>2</td>
|
62
|
+
<td>278 s</td>
|
63
|
+
<td>86 s</td>
|
64
|
+
<td>69 %</td>
|
65
|
+
</tr>
|
66
|
+
<tr>
|
67
|
+
<td>3</td>
|
68
|
+
<td>128 s</td>
|
69
|
+
<td>33 s</td>
|
70
|
+
<td>74 %</td>
|
71
|
+
</tr>
|
72
|
+
<tr>
|
73
|
+
<td>4</td>
|
74
|
+
<td>185,00 s</td>
|
75
|
+
<td>4,67 s</td>
|
76
|
+
<td>97,48 %</td>
|
77
|
+
</tr>
|
78
|
+
</table>
|
79
|
+
<h2>Notes</h2>
|
80
|
+
<ul>
|
81
|
+
<li>Celerity 0.0.2 on JRuby 1.1 and Watir 1.5.4 on Ruby 1.8.6 was used.</li>
|
82
|
+
<li>Neither Watir nor Celerity downloaded any images in these scenarios. Watir (IE) had them cached, and disabling images in IE did not seem to affect the benchmarks (compared to when they are cached).</li>
|
83
|
+
</ul>
|
84
|
+
<h2>Results: Actual output from benchmark scripts</h2>
|
85
|
+
<p></p>
|
86
|
+
<h3>Watir on Ruby: Scenario 1</h3>
|
87
|
+
<pre>
|
88
|
+
n = 100
|
89
|
+
user system total real
|
90
|
+
Loop through all spans (n = 1) 62.469000 16.312000 78.781000 (198.016000)
|
91
|
+
Last span by id (String) 15.968000 4.953000 20.921000 ( 59.500000)
|
92
|
+
Last span by id (Regexp) 17.140000 5.015000 22.155000 ( 59.454000)
|
93
|
+
|
94
|
+
total : 316.97000002861
|
95
|
+
average: 105.656666676203
|
96
|
+
|
97
|
+
</pre>
|
98
|
+
|
99
|
+
<h3>Celerity on JRuby: Scenario 1</h3>
|
100
|
+
<pre>
|
101
|
+
n = 100
|
102
|
+
user system total real
|
103
|
+
Loop through all spans (n = 1) 0.438000 0.000000 0.438000 ( 0.446355)
|
104
|
+
Last span by id (String) 0.016000 0.000000 0.016000 ( 0.013113)
|
105
|
+
Last span by id (Regexp) 0.141000 0.000000 0.141000 ( 0.132035)
|
106
|
+
|
107
|
+
total : 0.5915031433105469
|
108
|
+
average: 0.19716771443684897
|
109
|
+
|
110
|
+
</pre>
|
111
|
+
|
112
|
+
<h3>Watir on Ruby: Scenario 2</h3>
|
113
|
+
<pre>
|
114
|
+
n = 5
|
115
|
+
user system total real
|
116
|
+
Google image search results 44.234000 11.047000 55.281000 (277.734000)
|
117
|
+
|
118
|
+
total : 277.733999967575
|
119
|
+
average: 277.733999967575
|
120
|
+
|
121
|
+
</pre>
|
122
|
+
|
123
|
+
<h3>Celerity on JRuby: Scenario 2</h3>
|
124
|
+
<pre>
|
125
|
+
n = 5
|
126
|
+
user system total real
|
127
|
+
Google image search results 86.016000 0.000000 86.016000 ( 86.005572)
|
128
|
+
|
129
|
+
total : 86.00557208061218
|
130
|
+
average: 86.00557208061218
|
131
|
+
|
132
|
+
</pre>
|
133
|
+
|
134
|
+
<h3>Watir on Ruby: Scenario 3</h3>
|
135
|
+
<pre>
|
136
|
+
n = 5
|
137
|
+
user system total real
|
138
|
+
Diggs on front page 7.344000 2.000000 9.344000 (127.907000)
|
139
|
+
|
140
|
+
total : 127.90700006485
|
141
|
+
average: 127.90700006485
|
142
|
+
|
143
|
+
</pre>
|
144
|
+
|
145
|
+
<h3>Celerity on JRuby: Scenario 3</h3>
|
146
|
+
<pre>
|
147
|
+
n = 5
|
148
|
+
user system total real
|
149
|
+
Diggs on front page 33.422000 0.000000 33.422000 ( 33.427076)
|
150
|
+
|
151
|
+
total : 33.4270761013031
|
152
|
+
average: 33.4270761013031
|
153
|
+
|
154
|
+
</pre>
|
155
|
+
|
156
|
+
<h3>Watir on Ruby: Scenario 4</h3>
|
157
|
+
<pre>
|
158
|
+
n = 1000
|
159
|
+
user system total real
|
160
|
+
text input by id (String) 1.093000 0.281000 1.374000 ( 2.765000)
|
161
|
+
text input by id (Regexp) 1.063000 0.250000 1.313000 ( 2.766000)
|
162
|
+
text input by name (String) 1.625000 0.281000 1.906000 ( 4.282000)
|
163
|
+
text input by name (Regexp) 1.594000 0.281000 1.875000 ( 4.266000)
|
164
|
+
select list by id (String) 1.813000 0.328000 2.141000 ( 4.704000)
|
165
|
+
select list by id (Regexp) 1.766000 0.235000 2.001000 ( 4.672000)
|
166
|
+
select list by name (String) 1.671000 0.312000 1.983000 ( 4.656000)
|
167
|
+
select list by name (Regexp) 1.797000 0.313000 2.110000 ( 4.671000)
|
168
|
+
checkbox by id (String) 5.844000 1.203000 7.047000 ( 14.047000)
|
169
|
+
checkbox by id (Regexp) 5.515000 1.203000 6.718000 ( 13.937000)
|
170
|
+
checkbox by name (String) 5.578000 1.063000 6.641000 ( 14.031000)
|
171
|
+
checkbox by name (Regexp) 5.328000 1.062000 6.390000 ( 14.359000)
|
172
|
+
checkbox by id (String) and value (String) 9.406000 2.188000 11.594000 ( 28.578000)
|
173
|
+
checkbox by id (Regexp) and value (Regexp) 9.718000 2.078000 11.796000 ( 25.437000)
|
174
|
+
checkbox by name (String) and value (String) 6.390000 1.203000 7.593000 ( 16.453000)
|
175
|
+
checkbox by name (Regexp) and value (Regexp) 9.578000 1.719000 11.297000 ( 25.375000)
|
176
|
+
|
177
|
+
total : 184.998999834061
|
178
|
+
average: 11.5624374896288
|
179
|
+
|
180
|
+
</pre>
|
181
|
+
|
182
|
+
<h3>Celerity on JRuby: Scenario 4</h3>
|
183
|
+
<pre>
|
184
|
+
n = 1000
|
185
|
+
user system total real
|
186
|
+
text input by id (String) 0.063000 0.000000 0.063000 ( 0.053699)
|
187
|
+
text input by id (Regexp) 0.360000 0.000000 0.360000 ( 0.357198)
|
188
|
+
text input by name (String) 0.313000 0.000000 0.313000 ( 0.322434)
|
189
|
+
text input by name (Regexp) 0.297000 0.000000 0.297000 ( 0.298454)
|
190
|
+
select list by id (String) 0.031000 0.000000 0.031000 ( 0.028299)
|
191
|
+
select list by id (Regexp) 0.297000 0.000000 0.297000 ( 0.303616)
|
192
|
+
select list by name (String) 0.219000 0.000000 0.219000 ( 0.228946)
|
193
|
+
select list by name (Regexp) 0.250000 0.000000 0.250000 ( 0.242370)
|
194
|
+
checkbox by id (String) 0.031000 0.000000 0.031000 ( 0.032020)
|
195
|
+
checkbox by id (Regexp) 0.360000 0.000000 0.360000 ( 0.348517)
|
196
|
+
checkbox by name (String) 0.469000 0.000000 0.469000 ( 0.469942)
|
197
|
+
checkbox by name (Regexp) 0.485000 0.000000 0.485000 ( 0.495507)
|
198
|
+
checkbox by id (String) and value (String) 0.015000 0.000000 0.015000 ( 0.029422)
|
199
|
+
checkbox by id (Regexp) and value (Regexp) 0.312000 0.000000 0.312000 ( 0.322679)
|
200
|
+
checkbox by name (String) and value (String) 0.547000 0.000000 0.547000 ( 0.536925)
|
201
|
+
checkbox by name (Regexp) and value (Regexp) 0.609000 0.000000 0.609000 ( 0.600956)
|
202
|
+
|
203
|
+
total : 4.670983791351318
|
204
|
+
average: 0.2919364869594574
|
205
|
+
|
206
|
+
</pre>
|
207
|
+
</div>
|
208
|
+
</div>
|
209
|
+
<div id="footer">
|
210
|
+
<p>
|
211
|
+
<span class="w3cbutton">
|
212
|
+
<a href="http://validator.w3.org/check?uri=referer" title="Valid XHTML 1.0 Strict" hreflang="en">
|
213
|
+
<span class="w3c">W3C</span>
|
214
|
+
<span class="spec">XHTML 1.0</span>
|
215
|
+
</a>
|
216
|
+
</span>
|
217
|
+
|
218
|
+
<span class="w3cbutton">
|
219
|
+
<a href="http://jigsaw.w3.org/css-validator/check/referer" title="Valid CSS" hreflang="en">
|
220
|
+
<span class="w3c">W3C</span>
|
221
|
+
<span class="spec">CSS</span>
|
222
|
+
</a>
|
223
|
+
</span>
|
224
|
+
<!--
|
225
|
+
<span class="w3cbutton">
|
226
|
+
<a href="http://www.w3.org/WAI/WCAG1AAA-Conformance" title="Conforming with the highest level (AAA) of the Web Content Accessibility Guidelines 1.0" hreflang="en">
|
227
|
+
<span class="w3c">W3C</span>
|
228
|
+
<span class="spec">WAI‑<span class="red">AAA</span> WCAG 1.0</span>
|
229
|
+
</a>
|
230
|
+
</span>-->
|
231
|
+
</p>
|
232
|
+
<address>
|
233
|
+
<a href="mailto:tinius.alexander@lystadonline.no">T. Alexander Lystad</a>, 29th May 2008
|
234
|
+
</address>
|
235
|
+
</div>
|
236
|
+
</body>
|
237
|
+
</html>
|