davidtrogers-webrat 0.4.4.1 → 0.4.4.2
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/.document +4 -0
- data/.dotest/0001 +34 -0
- data/.dotest/0002 +34 -0
- data/.dotest/binary +1 -0
- data/.dotest/final-commit +1 -0
- data/.dotest/head-name +1 -0
- data/.dotest/info +5 -0
- data/.dotest/keep +1 -0
- data/.dotest/last +1 -0
- data/.dotest/msg +0 -0
- data/.dotest/msg-clean +0 -0
- data/.dotest/next +1 -0
- data/.dotest/onto +1 -0
- data/.dotest/orig-head +1 -0
- data/.dotest/patch +29 -0
- data/.dotest/sign +1 -0
- data/.dotest/utf8 +1 -0
- data/.dotest/whitespace +1 -0
- data/.gitignore +16 -0
- data/History.txt +8 -0
- data/Rakefile +207 -160
- data/VERSION +1 -0
- data/lib/webrat.rb +31 -0
- data/lib/webrat/core.rb +14 -0
- data/lib/webrat/core/configuration.rb +102 -0
- data/lib/webrat/core/elements/area.rb +31 -0
- data/lib/webrat/core/elements/element.rb +33 -0
- data/lib/webrat/core/elements/field.rb +405 -0
- data/lib/webrat/core/elements/form.rb +103 -0
- data/lib/webrat/core/elements/label.rb +31 -0
- data/lib/webrat/core/elements/link.rb +92 -0
- data/lib/webrat/core/elements/select_option.rb +35 -0
- data/lib/webrat/core/locators.rb +20 -0
- data/lib/webrat/core/locators/area_locator.rb +38 -0
- data/lib/webrat/core/locators/button_locator.rb +54 -0
- data/lib/webrat/core/locators/field_by_id_locator.rb +37 -0
- data/lib/webrat/core/locators/field_labeled_locator.rb +56 -0
- data/lib/webrat/core/locators/field_locator.rb +25 -0
- data/lib/webrat/core/locators/field_named_locator.rb +41 -0
- data/lib/webrat/core/locators/form_locator.rb +19 -0
- data/lib/webrat/core/locators/label_locator.rb +34 -0
- data/lib/webrat/core/locators/link_locator.rb +66 -0
- data/lib/webrat/core/locators/locator.rb +20 -0
- data/lib/webrat/core/locators/select_option_locator.rb +59 -0
- data/lib/webrat/core/logging.rb +24 -0
- data/lib/webrat/core/matchers.rb +4 -0
- data/lib/webrat/core/matchers/have_content.rb +73 -0
- data/lib/webrat/core/matchers/have_selector.rb +74 -0
- data/lib/webrat/core/matchers/have_tag.rb +21 -0
- data/lib/webrat/core/matchers/have_xpath.rb +147 -0
- data/lib/webrat/core/methods.rb +63 -0
- data/lib/webrat/core/mime.rb +29 -0
- data/lib/webrat/core/save_and_open_page.rb +50 -0
- data/lib/webrat/core/scope.rb +350 -0
- data/lib/webrat/core/session.rb +290 -0
- data/lib/webrat/core/xml.rb +115 -0
- data/lib/webrat/core/xml/hpricot.rb +19 -0
- data/lib/webrat/core/xml/nokogiri.rb +76 -0
- data/lib/webrat/core/xml/rexml.rb +24 -0
- data/lib/webrat/core_extensions/blank.rb +58 -0
- data/lib/webrat/core_extensions/deprecate.rb +8 -0
- data/lib/webrat/core_extensions/detect_mapped.rb +12 -0
- data/lib/webrat/core_extensions/meta_class.rb +6 -0
- data/lib/webrat/core_extensions/nil_to_param.rb +5 -0
- data/lib/webrat/core_extensions/tcp_socket.rb +27 -0
- data/lib/webrat/mechanize.rb +74 -0
- data/lib/webrat/merb.rb +9 -0
- data/lib/webrat/merb_session.rb +65 -0
- data/lib/webrat/rack.rb +24 -0
- data/lib/webrat/rack_test.rb +32 -0
- data/lib/webrat/rails.rb +105 -0
- data/lib/webrat/rspec-rails.rb +13 -0
- data/lib/webrat/selenium.rb +81 -0
- data/lib/webrat/selenium/application_server.rb +73 -0
- data/lib/webrat/selenium/location_strategy_javascript/button.js +19 -0
- data/lib/webrat/selenium/location_strategy_javascript/label.js +15 -0
- data/lib/webrat/selenium/location_strategy_javascript/webrat.js +5 -0
- data/lib/webrat/selenium/location_strategy_javascript/webratlink.js +12 -0
- data/lib/webrat/selenium/location_strategy_javascript/webratlinkwithin.js +15 -0
- data/lib/webrat/selenium/location_strategy_javascript/webratselectwithoption.js +5 -0
- data/lib/webrat/selenium/matchers.rb +4 -0
- data/lib/webrat/selenium/matchers/have_content.rb +66 -0
- data/lib/webrat/selenium/matchers/have_selector.rb +49 -0
- data/lib/webrat/selenium/matchers/have_tag.rb +72 -0
- data/lib/webrat/selenium/matchers/have_xpath.rb +45 -0
- data/lib/webrat/selenium/merb_application_server.rb +48 -0
- data/lib/webrat/selenium/rails_application_server.rb +42 -0
- data/lib/webrat/selenium/selenium_extensions.js +6 -0
- data/lib/webrat/selenium/selenium_rc_server.rb +84 -0
- data/lib/webrat/selenium/selenium_session.rb +238 -0
- data/lib/webrat/selenium/silence_stream.rb +18 -0
- data/lib/webrat/selenium/sinatra_application_server.rb +35 -0
- data/lib/webrat/sinatra.rb +44 -0
- data/spec/fakes/test_session.rb +34 -0
- data/spec/integration/merb/.gitignore +21 -0
- data/spec/integration/merb/Rakefile +35 -0
- data/spec/integration/merb/app/controllers/application.rb +2 -0
- data/spec/integration/merb/app/controllers/exceptions.rb +13 -0
- data/spec/integration/merb/app/controllers/testing.rb +18 -0
- data/spec/integration/merb/app/views/exceptions/not_acceptable.html.erb +63 -0
- data/spec/integration/merb/app/views/exceptions/not_found.html.erb +47 -0
- data/spec/integration/merb/app/views/layout/application.html.erb +12 -0
- data/spec/integration/merb/app/views/testing/show_form.html.erb +27 -0
- data/spec/integration/merb/config/environments/development.rb +15 -0
- data/spec/integration/merb/config/environments/rake.rb +11 -0
- data/spec/integration/merb/config/environments/test.rb +14 -0
- data/spec/integration/merb/config/init.rb +25 -0
- data/spec/integration/merb/config/rack.rb +11 -0
- data/spec/integration/merb/config/router.rb +33 -0
- data/spec/integration/merb/spec/spec.opts +1 -0
- data/spec/integration/merb/spec/spec_helper.rb +24 -0
- data/spec/integration/merb/spec/webrat_spec.rb +32 -0
- data/spec/integration/merb/tasks/merb.thor/app_script.rb +31 -0
- data/spec/integration/merb/tasks/merb.thor/common.rb +64 -0
- data/spec/integration/merb/tasks/merb.thor/gem_ext.rb +124 -0
- data/spec/integration/merb/tasks/merb.thor/main.thor +150 -0
- data/spec/integration/merb/tasks/merb.thor/ops.rb +93 -0
- data/spec/integration/merb/tasks/merb.thor/utils.rb +40 -0
- data/spec/integration/rack/Rakefile +5 -0
- data/spec/integration/rack/rack_app.rb +16 -0
- data/spec/integration/rack/test/test_helper.rb +20 -0
- data/spec/integration/rack/test/webrat_rack_test.rb +67 -0
- data/spec/integration/rails/.gitignore +3 -0
- data/spec/integration/rails/Rakefile +30 -0
- data/spec/integration/rails/app/controllers/application.rb +15 -0
- data/spec/integration/rails/app/controllers/buttons_controller.rb +7 -0
- data/spec/integration/rails/app/controllers/fields_controller.rb +4 -0
- data/spec/integration/rails/app/controllers/links_controller.rb +7 -0
- data/spec/integration/rails/app/controllers/webrat_controller.rb +39 -0
- data/spec/integration/rails/app/helpers/buttons_helper.rb +2 -0
- data/spec/integration/rails/app/helpers/fields_helper.rb +2 -0
- data/spec/integration/rails/app/helpers/links_helper.rb +2 -0
- data/spec/integration/rails/app/views/buttons/show.html.erb +11 -0
- data/spec/integration/rails/app/views/fields/show.html.erb +9 -0
- data/spec/integration/rails/app/views/links/show.html.erb +4 -0
- data/spec/integration/rails/app/views/webrat/before_redirect_form.html.erb +4 -0
- data/spec/integration/rails/app/views/webrat/buttons.html.erb +11 -0
- data/spec/integration/rails/app/views/webrat/form.html.erb +28 -0
- data/spec/integration/rails/config/boot.rb +109 -0
- data/spec/integration/rails/config/environment.rb +12 -0
- data/spec/integration/rails/config/environments/development.rb +17 -0
- data/spec/integration/rails/config/environments/selenium.rb +22 -0
- data/spec/integration/rails/config/environments/test.rb +22 -0
- data/spec/integration/rails/config/initializers/inflections.rb +10 -0
- data/spec/integration/rails/config/initializers/mime_types.rb +5 -0
- data/spec/integration/rails/config/initializers/new_rails_defaults.rb +17 -0
- data/spec/integration/rails/config/locales/en.yml +5 -0
- data/spec/integration/rails/config/routes.rb +17 -0
- data/spec/integration/rails/public/404.html +30 -0
- data/spec/integration/rails/public/422.html +30 -0
- data/spec/integration/rails/public/500.html +33 -0
- data/spec/integration/rails/script/about +4 -0
- data/spec/integration/rails/script/console +3 -0
- data/spec/integration/rails/script/dbconsole +3 -0
- data/spec/integration/rails/script/destroy +3 -0
- data/spec/integration/rails/script/generate +3 -0
- data/spec/integration/rails/script/performance/benchmarker +3 -0
- data/spec/integration/rails/script/performance/profiler +3 -0
- data/spec/integration/rails/script/performance/request +3 -0
- data/spec/integration/rails/script/plugin +3 -0
- data/spec/integration/rails/script/process/inspector +3 -0
- data/spec/integration/rails/script/process/reaper +3 -0
- data/spec/integration/rails/script/process/spawner +3 -0
- data/spec/integration/rails/script/runner +3 -0
- data/spec/integration/rails/script/server +3 -0
- data/spec/integration/rails/test/integration/button_click_test.rb +80 -0
- data/spec/integration/rails/test/integration/fill_in_test.rb +24 -0
- data/spec/integration/rails/test/integration/link_click_test.rb +21 -0
- data/spec/integration/rails/test/integration/webrat_test.rb +75 -0
- data/spec/integration/rails/test/test_helper.rb +25 -0
- data/spec/integration/sinatra/Rakefile +5 -0
- data/spec/integration/sinatra/classic_app.rb +64 -0
- data/spec/integration/sinatra/modular_app.rb +16 -0
- data/spec/integration/sinatra/test/classic_app_test.rb +37 -0
- data/spec/integration/sinatra/test/modular_app_test.rb +18 -0
- data/spec/integration/sinatra/test/test_helper.rb +16 -0
- data/spec/private/core/configuration_spec.rb +106 -0
- data/spec/private/core/field_spec.rb +85 -0
- data/spec/private/core/link_spec.rb +24 -0
- data/spec/private/core/logging_spec.rb +10 -0
- data/spec/private/core/session_spec.rb +198 -0
- data/spec/private/mechanize/mechanize_session_spec.rb +81 -0
- data/spec/private/merb/merb_session_spec.rb +42 -0
- data/spec/private/nokogiri_spec.rb +77 -0
- data/spec/private/rails/attaches_file_spec.rb +81 -0
- data/spec/private/rails/rails_session_spec.rb +110 -0
- data/spec/public/basic_auth_spec.rb +24 -0
- data/spec/public/check_spec.rb +191 -0
- data/spec/public/choose_spec.rb +118 -0
- data/spec/public/click_area_spec.rb +106 -0
- data/spec/public/click_button_spec.rb +496 -0
- data/spec/public/click_link_spec.rb +511 -0
- data/spec/public/fill_in_spec.rb +209 -0
- data/spec/public/locators/field_by_xpath_spec.rb +19 -0
- data/spec/public/locators/field_labeled_spec.rb +172 -0
- data/spec/public/locators/field_with_id_spec.rb +16 -0
- data/spec/public/matchers/contain_spec.rb +114 -0
- data/spec/public/matchers/have_selector_spec.rb +142 -0
- data/spec/public/matchers/have_tag_spec.rb +39 -0
- data/spec/public/matchers/have_xpath_spec.rb +136 -0
- data/spec/public/reload_spec.rb +10 -0
- data/spec/public/save_and_open_spec.rb +51 -0
- data/spec/public/select_date_spec.rb +112 -0
- data/spec/public/select_datetime_spec.rb +137 -0
- data/spec/public/select_spec.rb +249 -0
- data/spec/public/select_time_spec.rb +100 -0
- data/spec/public/set_hidden_field_spec.rb +5 -0
- data/spec/public/submit_form_spec.rb +5 -0
- data/spec/public/visit_spec.rb +58 -0
- data/spec/public/within_spec.rb +177 -0
- data/spec/rcov.opts +1 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +50 -0
- data/vendor/selenium-server.jar +0 -0
- metadata +309 -16
data/.document
ADDED
data/.dotest/0001
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
From ccdd07219286155c63e4db295aebcb768bc275bf Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: davidtrogers <david.t.rogers@gmail.com>
|
|
3
|
+
Date: Tue, 26 May 2009 22:17:55 -0400
|
|
4
|
+
Subject: trying yet again to build this gem :-)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
VERSION | 2 +-
|
|
8
|
+
webrat.gemspec | 2 +-
|
|
9
|
+
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
10
|
+
|
|
11
|
+
diff --git a/VERSION b/VERSION
|
|
12
|
+
index 3b77b494a2e70cf4aa2800eab1e9b1cb6572afc4..77d6f4ca23711533e724789a0a0045eab28c5ea6 100644
|
|
13
|
+
--- a/VERSION
|
|
14
|
+
+++ b/VERSION
|
|
15
|
+
@@ -1 +1 @@
|
|
16
|
+
-0.4.4.2
|
|
17
|
+
+0.0.0
|
|
18
|
+
diff --git a/webrat.gemspec b/webrat.gemspec
|
|
19
|
+
index 752a14ff8fca2cae03a148e2ad2badfe80989cb6..d9061e244f0107ac06e3479a58c4e326d497bdfe 100644
|
|
20
|
+
--- a/webrat.gemspec
|
|
21
|
+
+++ b/webrat.gemspec
|
|
22
|
+
@@ -2,7 +2,7 @@
|
|
23
|
+
|
|
24
|
+
Gem::Specification.new do |s|
|
|
25
|
+
s.name = %q{webrat}
|
|
26
|
+
- s.version = "0.4.4.2"
|
|
27
|
+
+ s.version = "0.0.0"
|
|
28
|
+
|
|
29
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
30
|
+
s.authors = ["Dave Rogers"]
|
|
31
|
+
--
|
|
32
|
+
1.5.4.3
|
|
33
|
+
|
|
34
|
+
|
data/.dotest/0002
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
From 2581869c832668aacf48e2e6dd7212721a6edceb Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: davidtrogers <david.t.rogers@gmail.com>
|
|
3
|
+
Date: Tue, 26 May 2009 22:20:13 -0400
|
|
4
|
+
Subject: trying again
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
webrat.gemspec | 4 ++--
|
|
8
|
+
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
9
|
+
|
|
10
|
+
diff --git a/webrat.gemspec b/webrat.gemspec
|
|
11
|
+
index d9061e244f0107ac06e3479a58c4e326d497bdfe..764cf448b3bf7c6cf44086e4783df0ddb3cb5cd3 100644
|
|
12
|
+
--- a/webrat.gemspec
|
|
13
|
+
+++ b/webrat.gemspec
|
|
14
|
+
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
15
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
16
|
+
s.authors = ["Dave Rogers"]
|
|
17
|
+
s.date = %q{2009-05-26}
|
|
18
|
+
- s.description = %q{"webrat rules"}
|
|
19
|
+
+ s.description = %q{webrat rocks the house}
|
|
20
|
+
s.email = %q{david.t.rogers@gmail.com}
|
|
21
|
+
s.extra_rdoc_files = [
|
|
22
|
+
"README.rdoc"
|
|
23
|
+
@@ -206,7 +206,7 @@ Gem::Specification.new do |s|
|
|
24
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
|
25
|
+
s.require_paths = ["lib"]
|
|
26
|
+
s.rubygems_version = %q{1.3.3}
|
|
27
|
+
- s.summary = %q{"Webrat rules the school"}
|
|
28
|
+
+ s.summary = %q{webrat rocks}
|
|
29
|
+
s.test_files = [
|
|
30
|
+
"spec/integration/sinatra/classic_app.rb",
|
|
31
|
+
"spec/integration/sinatra/modular_app.rb",
|
|
32
|
+
--
|
|
33
|
+
1.5.4.3
|
|
34
|
+
|
data/.dotest/binary
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
t
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
trying yet again to build this gem :-)
|
data/.dotest/head-name
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
refs/heads/master
|
data/.dotest/info
ADDED
data/.dotest/keep
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
t
|
data/.dotest/last
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2
|
data/.dotest/msg
ADDED
|
File without changes
|
data/.dotest/msg-clean
ADDED
|
File without changes
|
data/.dotest/next
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1
|
data/.dotest/onto
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4c5649e84445bdb08fb834705ec6793c831a85cc
|
data/.dotest/orig-head
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2581869c832668aacf48e2e6dd7212721a6edceb
|
data/.dotest/patch
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
VERSION | 2 +-
|
|
3
|
+
webrat.gemspec | 2 +-
|
|
4
|
+
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
5
|
+
|
|
6
|
+
diff --git a/VERSION b/VERSION
|
|
7
|
+
index 3b77b494a2e70cf4aa2800eab1e9b1cb6572afc4..77d6f4ca23711533e724789a0a0045eab28c5ea6 100644
|
|
8
|
+
--- a/VERSION
|
|
9
|
+
+++ b/VERSION
|
|
10
|
+
@@ -1 +1 @@
|
|
11
|
+
-0.4.4.2
|
|
12
|
+
+0.0.0
|
|
13
|
+
diff --git a/webrat.gemspec b/webrat.gemspec
|
|
14
|
+
index 752a14ff8fca2cae03a148e2ad2badfe80989cb6..d9061e244f0107ac06e3479a58c4e326d497bdfe 100644
|
|
15
|
+
--- a/webrat.gemspec
|
|
16
|
+
+++ b/webrat.gemspec
|
|
17
|
+
@@ -2,7 +2,7 @@
|
|
18
|
+
|
|
19
|
+
Gem::Specification.new do |s|
|
|
20
|
+
s.name = %q{webrat}
|
|
21
|
+
- s.version = "0.4.4.2"
|
|
22
|
+
+ s.version = "0.0.0"
|
|
23
|
+
|
|
24
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
25
|
+
s.authors = ["Dave Rogers"]
|
|
26
|
+
--
|
|
27
|
+
1.5.4.3
|
|
28
|
+
|
|
29
|
+
|
data/.dotest/sign
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
data/.dotest/utf8
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
t
|
data/.dotest/whitespace
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
data/.gitignore
ADDED
data/History.txt
CHANGED
|
@@ -11,6 +11,14 @@
|
|
|
11
11
|
* Filled in tests on click link lh 195 (diabolo)
|
|
12
12
|
* Added current_url to selenium session lh 215 (Luke Amdor)
|
|
13
13
|
* Added silence spec to selenium lh 238 (Martin Gamsjaeger aka snusnu)
|
|
14
|
+
* Added ability to configure the browser startup timeout for selenium lh 242 (Mike Gaffney, Mark Dodwell)
|
|
15
|
+
* Added delegation for field_named lh194 (pivotal labs)
|
|
16
|
+
* Added fix to keep from escaping field values in mechanize mode lh256 (jish)
|
|
17
|
+
* Adding fixes for click button/link and made the integration specs pass for the same in selenium lh254 (Ldiehl, Matthias Marschall)
|
|
18
|
+
* Adding clicking link by id in selenium mode lh221 (larrytheliquid)
|
|
19
|
+
* Adding fix for have_selector and have_xpath in descendent blocks lh234 (Thomas Jack)
|
|
20
|
+
* Adding fix for fields with labels with special characters (Thomas Jack, Mike Gaffney, Bryan Hemlkamp)
|
|
21
|
+
* Deprecated current_page lh50 (Mike Gaffney)
|
|
14
22
|
|
|
15
23
|
== 0.4.4 / 2009-04-06
|
|
16
24
|
|
data/Rakefile
CHANGED
|
@@ -1,164 +1,211 @@
|
|
|
1
|
-
|
|
2
|
-
require
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require '
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
require 'rubygems'
|
|
2
|
+
require 'rake'
|
|
3
|
+
|
|
4
|
+
begin
|
|
5
|
+
require 'jeweler'
|
|
6
|
+
Jeweler::Tasks.new do |gem|
|
|
7
|
+
gem.name = "webrat"
|
|
8
|
+
#gem.executables = "steamer"
|
|
9
|
+
gem.summary = %Q{modified version of webrat}
|
|
10
|
+
gem.email = "david.t.rogers@gmail.com"
|
|
11
|
+
gem.homepage = "http://github.com/davidtrogers/webrat"
|
|
12
|
+
gem.authors = ["brynary"]
|
|
13
|
+
# gem.version = "#{version}.#{Time.now.to_i}"
|
|
14
|
+
gem.rdoc_options = ["--inline-source", "--charset=UTF-8"]
|
|
15
|
+
gem.require_paths = ["lib"]
|
|
16
|
+
gem.rubygems_version = %q{1.3.3}
|
|
17
|
+
gem.add_dependency "activerecord"
|
|
18
|
+
# puts "version: #{version}.#{Time.now.to_i}"
|
|
19
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
|
20
|
+
# if s.respond_to? :specification_version then
|
|
21
|
+
# current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
22
|
+
# s.specification_version = 2
|
|
23
|
+
# if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
24
|
+
# else
|
|
25
|
+
# end
|
|
26
|
+
# else
|
|
27
|
+
# end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
rescue LoadError
|
|
31
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
|
32
|
+
end
|
|
9
33
|
|
|
34
|
+
# require 'rubygems'
|
|
35
|
+
# require "rake/gempackagetask"
|
|
36
|
+
# require 'rake/rdoctask'
|
|
37
|
+
# require "rake/clean"
|
|
38
|
+
# require 'spec'
|
|
39
|
+
# require 'spec/rake/spectask'
|
|
40
|
+
# require 'spec/rake/verify_rcov'
|
|
41
|
+
# require File.expand_path('./lib/webrat.rb')
|
|
42
|
+
|
|
10
43
|
##############################################################################
|
|
11
44
|
# Package && release
|
|
12
45
|
##############################################################################
|
|
13
|
-
#spec = Gem::Specification.new do |s|
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
#
|
|
34
|
-
#end
|
|
35
|
-
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
desc "
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
46
|
+
# spec = Gem::Specification.new do |s|
|
|
47
|
+
# s.name = "webrat"
|
|
48
|
+
# s.version = "#{Webrat::VERSION}.0.#{Time.now.to_i}"
|
|
49
|
+
# s.platform = Gem::Platform::RUBY
|
|
50
|
+
# s.author = "Bryan Helmkamp"
|
|
51
|
+
# s.email = "bryan" + "@" + "brynary.com"
|
|
52
|
+
# s.homepage = "http://github.com/brynary/webrat"
|
|
53
|
+
# s.summary = "Webrat. Ruby Acceptance Testing for Web applications"
|
|
54
|
+
# s.bindir = "bin"
|
|
55
|
+
# s.description = s.summary
|
|
56
|
+
# s.require_path = "lib"
|
|
57
|
+
# s.files = %w(History.txt install.rb MIT-LICENSE.txt README.rdoc Rakefile) + Dir["lib/**/*"] + Dir["vendor/**/*"]
|
|
58
|
+
#
|
|
59
|
+
# # rdoc
|
|
60
|
+
# s.has_rdoc = true
|
|
61
|
+
# s.extra_rdoc_files = %w(README.rdoc MIT-LICENSE.txt)
|
|
62
|
+
#
|
|
63
|
+
# # Dependencies
|
|
64
|
+
# s.add_dependency "nokogiri", ">= 1.2.0"
|
|
65
|
+
#
|
|
66
|
+
# s.rubyforge_project = "webrat"
|
|
67
|
+
# end
|
|
68
|
+
# #
|
|
69
|
+
#
|
|
70
|
+
# begin
|
|
71
|
+
# require 'jeweler'
|
|
72
|
+
# Jeweler::Tasks.new do |gemspec|
|
|
73
|
+
# gemspec.name = "webrat"
|
|
74
|
+
# gemspec.summary = "webrat rocks the house"
|
|
75
|
+
# gemspec.email = "david.t.rogers@gmail.com"
|
|
76
|
+
# gemspec.homepage = "http://github.com/davidtrogers/webrat"
|
|
77
|
+
# gemspec.description = "TODO"
|
|
78
|
+
# gemspec.authors = ["Dave Rogers"]
|
|
79
|
+
# gemspec.add_dependency "nokogiri", ">= 1.2.0"
|
|
80
|
+
# #
|
|
81
|
+
# # s.rubyforge_project = "webrat"
|
|
82
|
+
# end
|
|
83
|
+
# rescue LoadError
|
|
84
|
+
# puts "Webrat not available."
|
|
85
|
+
# end
|
|
86
|
+
#
|
|
87
|
+
#
|
|
88
|
+
# desc "Generate a gemspec file"
|
|
89
|
+
# task :gemspec do
|
|
90
|
+
# File.open("#{spec.name}.gemspec", 'w') do |f|
|
|
91
|
+
# f.write spec.to_yaml
|
|
92
|
+
# end
|
|
93
|
+
# end
|
|
94
|
+
#
|
|
95
|
+
# Rake::GemPackageTask.new(spec) do |package|
|
|
96
|
+
# package.gem_spec = spec
|
|
97
|
+
# end
|
|
98
|
+
#
|
|
99
|
+
# desc 'Show information about the gem.'
|
|
100
|
+
# task :debug_gem do
|
|
101
|
+
# puts spec.to_ruby
|
|
102
|
+
# end
|
|
103
|
+
#
|
|
104
|
+
# CLEAN.include ["pkg", "*.gem", "doc", "ri", "coverage"]
|
|
105
|
+
#
|
|
106
|
+
# desc "Upload rdoc to brynary.com"
|
|
107
|
+
# task :publish_rdoc => :docs do
|
|
108
|
+
# sh "scp -r doc/ brynary.com:/apps/uploads/webrat"
|
|
109
|
+
# end
|
|
110
|
+
#
|
|
111
|
+
# desc "Run API and Core specs"
|
|
112
|
+
# Spec::Rake::SpecTask.new do |t|
|
|
113
|
+
# t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
|
|
114
|
+
# t.spec_files = FileList['spec/public/**/*_spec.rb'] + FileList['spec/private/**/*_spec.rb']
|
|
115
|
+
# end
|
|
116
|
+
#
|
|
117
|
+
# desc "Run all specs in spec directory with RCov"
|
|
118
|
+
# Spec::Rake::SpecTask.new(:rcov) do |t|
|
|
119
|
+
# t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
|
|
120
|
+
# t.spec_files = FileList['spec/public/**/*_spec.rb'] + FileList['spec/private/**/*_spec.rb']
|
|
121
|
+
# t.rcov = true
|
|
122
|
+
# t.rcov_opts = lambda do
|
|
123
|
+
# IO.readlines(File.dirname(__FILE__) + "/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
|
|
124
|
+
# end
|
|
125
|
+
# end
|
|
126
|
+
#
|
|
127
|
+
# RCov::VerifyTask.new(:verify_rcov => :rcov) do |t|
|
|
128
|
+
# t.threshold = 96.2 # Make sure you have rcov 0.7 or higher!
|
|
129
|
+
# end
|
|
130
|
+
#
|
|
131
|
+
# desc 'Install the package as a gem.'
|
|
132
|
+
# task :install_gem => [:clean, :package] do
|
|
133
|
+
# gem_filename = Dir['pkg/*.gem'].first
|
|
134
|
+
# sh "sudo gem install --no-rdoc --no-ri --local #{gem_filename}"
|
|
135
|
+
# end
|
|
136
|
+
#
|
|
137
|
+
# desc "Delete generated RDoc"
|
|
138
|
+
# task :clobber_docs do
|
|
139
|
+
# FileUtils.rm_rf("doc")
|
|
140
|
+
# end
|
|
141
|
+
#
|
|
142
|
+
# desc "Generate RDoc"
|
|
143
|
+
# task :docs => :clobber_docs do
|
|
144
|
+
# system "hanna --title 'Webrat #{Webrat::VERSION} API Documentation'"
|
|
145
|
+
# end
|
|
146
|
+
#
|
|
147
|
+
# desc "Run specs using jruby"
|
|
148
|
+
# task "spec:jruby" do
|
|
149
|
+
# result = system "jruby -S rake spec"
|
|
150
|
+
# raise "JRuby tests failed" unless result
|
|
151
|
+
# end
|
|
152
|
+
#
|
|
153
|
+
# desc "Run each spec in isolation to test for dependency issues"
|
|
154
|
+
# task :spec_deps do
|
|
155
|
+
# Dir["spec/**/*_spec.rb"].each do |test|
|
|
156
|
+
# if !system("spec #{test} &> /dev/null")
|
|
157
|
+
# puts "Dependency Issues: #{test}"
|
|
158
|
+
# end
|
|
159
|
+
# end
|
|
160
|
+
# end
|
|
161
|
+
#
|
|
162
|
+
# task :prepare do
|
|
163
|
+
# system "ln -s ../../../../.. ./spec/integration/rails/vendor/plugins/webrat"
|
|
164
|
+
# end
|
|
165
|
+
#
|
|
166
|
+
# namespace :spec do
|
|
167
|
+
# desc "Run the integration specs"
|
|
168
|
+
# task :integration => ["integration:rails", "integration:merb", "integration:sinatra"]
|
|
169
|
+
#
|
|
170
|
+
# namespace :integration do
|
|
171
|
+
# desc "Run the Rails integration specs"
|
|
172
|
+
# task :rails => ['rails:webrat'] #,'rails:selenium'] currently not running selenium as it doesn't pass.
|
|
173
|
+
#
|
|
174
|
+
# namespace :rails do
|
|
175
|
+
# task :selenium do
|
|
176
|
+
# Dir.chdir "spec/integration/rails" do
|
|
177
|
+
# result = system "rake test_unit:selenium"
|
|
178
|
+
# raise "Rails integration tests failed" unless result
|
|
179
|
+
# end
|
|
180
|
+
# end
|
|
181
|
+
#
|
|
182
|
+
# task :webrat do
|
|
183
|
+
# Dir.chdir "spec/integration/rails" do
|
|
184
|
+
# result = system "rake test_unit:rails"
|
|
185
|
+
# raise "Rails integration tests failed" unless result
|
|
186
|
+
# end
|
|
187
|
+
# end
|
|
188
|
+
# end
|
|
189
|
+
#
|
|
190
|
+
# desc "Run the Merb integration specs"
|
|
191
|
+
# task :merb do
|
|
192
|
+
# Dir.chdir "spec/integration/merb" do
|
|
193
|
+
# result = system "rake spec"
|
|
194
|
+
# raise "Merb integration tests failed" unless result
|
|
195
|
+
# end
|
|
196
|
+
# end
|
|
197
|
+
#
|
|
198
|
+
# desc "Run the Sinatra integration specs"
|
|
199
|
+
# task :sinatra do
|
|
200
|
+
# Dir.chdir "spec/integration/sinatra" do
|
|
201
|
+
# result = system "rake test"
|
|
202
|
+
# raise "Sinatra tntegration tests failed" unless result
|
|
203
|
+
# end
|
|
204
|
+
# end
|
|
205
|
+
# end
|
|
206
|
+
# end
|
|
207
|
+
#
|
|
208
|
+
# task :default => :spec
|
|
209
|
+
#
|
|
210
|
+
# task :precommit => ["spec", "spec:jruby", "spec:integration"]
|
|
211
|
+
#
|