celerity 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. data/History.txt +15 -1
  2. data/Manifest.txt +174 -0
  3. data/README.txt +19 -10
  4. data/config/hoe.rb +68 -0
  5. data/config/requirements.rb +15 -0
  6. data/lib/celerity.rb +14 -11
  7. data/lib/celerity/collections.rb +37 -8
  8. data/lib/celerity/container.rb +100 -3
  9. data/lib/celerity/disabled_element.rb +4 -2
  10. data/lib/celerity/element.rb +21 -8
  11. data/lib/celerity/element_collections.rb +4 -7
  12. data/lib/celerity/element_locator.rb +1 -0
  13. data/lib/celerity/elements/button.rb +6 -2
  14. data/lib/celerity/elements/file_field.rb +1 -1
  15. data/lib/celerity/elements/form.rb +1 -2
  16. data/lib/celerity/elements/frame.rb +0 -3
  17. data/lib/celerity/elements/image.rb +1 -4
  18. data/lib/celerity/elements/label.rb +1 -0
  19. data/lib/celerity/elements/link.rb +2 -0
  20. data/lib/celerity/elements/option.rb +1 -0
  21. data/lib/celerity/elements/radio_check.rb +3 -5
  22. data/lib/celerity/elements/select_list.rb +3 -10
  23. data/lib/celerity/elements/table.rb +8 -22
  24. data/lib/celerity/elements/table_body.rb +5 -11
  25. data/lib/celerity/elements/table_cell.rb +1 -0
  26. data/lib/celerity/elements/table_footer.rb +30 -0
  27. data/lib/celerity/elements/table_header.rb +30 -0
  28. data/lib/celerity/elements/table_row.rb +5 -3
  29. data/lib/celerity/elements/text_field.rb +18 -13
  30. data/lib/celerity/exception.rb +8 -8
  31. data/lib/celerity/extra/method_generator.rb +5 -2
  32. data/lib/celerity/htmlunit/htmlunit-2.2-SNAPSHOT.jar +0 -0
  33. data/lib/celerity/ie.rb +195 -141
  34. data/lib/celerity/non_control_elements.rb +30 -4
  35. data/lib/celerity/version.rb +1 -1
  36. data/lib/celerity/watir_compatibility.rb +62 -0
  37. data/setup.rb +0 -2
  38. data/spec/area_spec.rb +4 -1
  39. data/spec/areas_spec.rb +1 -1
  40. data/spec/button_spec.rb +35 -17
  41. data/spec/buttons_spec.rb +1 -1
  42. data/spec/checkbox_spec.rb +6 -4
  43. data/spec/checkboxes_spec.rb +1 -1
  44. data/spec/div_spec.rb +20 -19
  45. data/spec/divs_spec.rb +2 -2
  46. data/spec/element_spec.rb +13 -2
  47. data/spec/filefield_spec.rb +6 -3
  48. data/spec/filefields_spec.rb +1 -1
  49. data/spec/form_spec.rb +4 -1
  50. data/spec/forms_spec.rb +1 -1
  51. data/spec/frame_spec.rb +6 -2
  52. data/spec/hidden_spec.rb +8 -4
  53. data/spec/hiddens_spec.rb +1 -1
  54. data/spec/hn_spec.rb +86 -0
  55. data/spec/hns_spec.rb +41 -0
  56. data/spec/html/bug_duplicate_attributes.html +14 -0
  57. data/spec/html/bug_javascript_001.html +11 -0
  58. data/spec/html/forms_with_input_elements.html +11 -11
  59. data/spec/html/images.html +18 -15
  60. data/spec/html/latin1_text.html +16 -0
  61. data/spec/html/non_control_elements.html +28 -4
  62. data/spec/html/tables.html +3 -3
  63. data/spec/html/utf8_text.html +15 -0
  64. data/spec/htmlunit_spec.rb +27 -0
  65. data/spec/ie_spec.rb +47 -12
  66. data/spec/image_spec.rb +4 -7
  67. data/spec/images_spec.rb +3 -2
  68. data/spec/label_spec.rb +4 -3
  69. data/spec/labels_spec.rb +1 -1
  70. data/spec/li_spec.rb +11 -8
  71. data/spec/link_spec.rb +5 -1
  72. data/spec/links_spec.rb +2 -1
  73. data/spec/lis_spec.rb +3 -2
  74. data/spec/map_spec.rb +4 -1
  75. data/spec/maps_spec.rb +1 -1
  76. data/spec/meta_spec.rb +6 -0
  77. data/spec/ol_spec.rb +73 -0
  78. data/spec/ols_spec.rb +41 -0
  79. data/spec/option_spec.rb +129 -0
  80. data/spec/p_spec.rb +4 -1
  81. data/spec/pre_spec.rb +4 -1
  82. data/spec/pres_spec.rb +1 -1
  83. data/spec/ps_spec.rb +2 -1
  84. data/spec/radio_spec.rb +7 -19
  85. data/spec/radios_spec.rb +1 -1
  86. data/spec/select_list_spec.rb +19 -57
  87. data/spec/select_lists_spec.rb +3 -2
  88. data/spec/span_spec.rb +8 -5
  89. data/spec/spans_spec.rb +2 -1
  90. data/spec/spec_helper.rb +8 -43
  91. data/spec/table_bodies_spec.rb +17 -4
  92. data/spec/table_body_spec.rb +47 -16
  93. data/spec/table_cell_spec.rb +5 -3
  94. data/spec/table_cells_spec.rb +1 -1
  95. data/spec/table_footer_spec.rb +94 -0
  96. data/spec/table_footers_spec.rb +53 -0
  97. data/spec/table_header_spec.rb +94 -0
  98. data/spec/table_headers_spec.rb +53 -0
  99. data/spec/table_row_spec.rb +25 -4
  100. data/spec/table_rows_spec.rb +1 -1
  101. data/spec/table_spec.rb +22 -2
  102. data/spec/tables_spec.rb +2 -1
  103. data/spec/text_field_spec.rb +52 -20
  104. data/spec/text_fields_spec.rb +1 -1
  105. data/spec/ul_spec.rb +73 -0
  106. data/spec/uls_spec.rb +41 -0
  107. data/spec/watir_compatability_spec.rb +253 -0
  108. data/support/celerity_viewer/rubycocoa/CelerityViewer.icns +0 -0
  109. data/support/celerity_viewer/rubycocoa/English.lproj/Main.nib/classes.nib +37 -0
  110. data/support/celerity_viewer/rubycocoa/English.lproj/Main.nib/info.nib +19 -0
  111. data/support/celerity_viewer/rubycocoa/English.lproj/Main.nib/keyedobjects.nib +0 -0
  112. data/support/celerity_viewer/rubycocoa/Info.plist.erb +28 -0
  113. data/support/celerity_viewer/rubycocoa/MainController.rb +23 -0
  114. data/support/celerity_viewer/rubycocoa/README +94 -0
  115. data/support/celerity_viewer/rubycocoa/Rakefile +100 -0
  116. data/support/celerity_viewer/rubycocoa/distributed_viewer.rb +86 -0
  117. data/support/celerity_viewer/rubycocoa/main.m +7 -0
  118. data/support/celerity_viewer/rubycocoa/main.rb +27 -0
  119. data/support/spec_server.rb +64 -0
  120. data/tasks/benchmark.rake +1 -0
  121. data/tasks/rdoc.rake +4 -0
  122. data/tasks/rspec.rake +10 -3
  123. data/tasks/simple_ci.rake +94 -0
  124. data/tasks/specserver.rake +21 -0
  125. metadata +160 -114
  126. data/spec/table_bodies.rb +0 -40
  127. data/tasks/testserver.rake +0 -32
@@ -1,32 +0,0 @@
1
- desc "Run webserver for tests (when using MRI)"
2
- task :testserver do
3
- # ========= WEBRick stuff ==========
4
- require 'webrick'
5
- doc_root = File.join(File.dirname(__FILE__),"..", "spec", "html")
6
- log_file = File.join(File.dirname(__FILE__), "..", "log", "webrick_log.txt")
7
- unless File.exist?(log_file)
8
- FileUtils.mkdir_p(File.dirname(log_file))
9
- FileUtils.touch(log_file)
10
- end
11
-
12
- server_port = 2000
13
- TEST_HOST = "http://localhost:#{server_port.to_s}"
14
-
15
- class PostServlet < WEBrick::HTTPServlet::AbstractServlet
16
- def do_POST(req, resp)
17
- resp['content-type'] = 'text/plain'
18
- resp.body << "You posted the following content:\n"
19
- resp.body << req.body
20
- end
21
- end
22
-
23
- server = WEBrick::HTTPServer.new(:Port => server_port,
24
- :DocumentRoot => doc_root,
25
- :Logger => WEBrick::Log.new(log_file, WEBrick::BasicLog::WARN),
26
- :AccessLog => [])
27
- server.mount("/", WEBrick::HTTPServlet::FileHandler, doc_root, {:FancyIndexing=>true})
28
- server.mount("/post_to_me", PostServlet)
29
-
30
- WEBRICK_SERVER = Thread.new { server.start }
31
- WEBRICK_SERVER.join
32
- end