Permalink
Browse files

reorganize folder structure

  • Loading branch information...
1 parent a9450b5 commit e959f9a7820fc925da3b23816649be751a012899 Zhimin Zhan committed Oct 14, 2011
View
@@ -1,5 +1,11 @@
CHANGELOG
=========
+
+ 2.0
+ [Update] Deprecate support for FireWatir, speed up loading
+ [Update] Drop constant naming RWebUnit
+ [Refactoring] internal folder structure like extensions and plugins
+
1.9.3
[Enhacement] take_screenshot with to_dir arguments
View
@@ -45,6 +45,7 @@ Rake::RDocTask.new do |rdoc|
rdoc.title = 'RWebSpec'
rdoc.rdoc_files.include('lib/rwebspec.rb')
rdoc.rdoc_files.include('lib/rwebspec/*.rb')
+ rdoc.rdoc_files.include('lib/extensions/*.rb')
rdoc.rdoc_files.delete("lib/rwebspec/web_testcase.rb")
rdoc.rdoc_files.delete("lib/rwebspec/checkJSDialog.rb")
rdoc.options += [
@@ -70,8 +71,8 @@ end
spec = Gem::Specification.new do |s|
s.platform= Gem::Platform::RUBY
s.name = "rwebspec"
- s.version = "1.9.3"
- s.summary = "Executable functional specification for web applications in RSpec syntax and Watir"
+ s.version = "2.0.0"
+ s.summary = "Web application functional specification in Ruby"
s.description = "Executable functional specification for web applications in RSpec syntax and Watir"
s.author = "Zhimin Zhan"
@@ -90,7 +91,6 @@ spec = Gem::Specification.new do |s|
s.files = s.files + Dir.glob( "sample/**/*")
s.files = s.files + Dir.glob( "docs/**/*" )
s.add_dependency(%q<rspec>, ["= 1.1.12"])
-
s.add_dependency("commonwatir", ">= 2.0")
end
@@ -1,4 +1,3 @@
-
module FireWatir
class Firefox
File renamed without changes.
No changes.
@@ -12,11 +12,6 @@ def debug(message)
# Support of iTest to ajust the intervals between keystroke/mouse operations
def operation_delay
begin
- if $ITEST2_OPERATION_DELAY && $ITEST2_OPERATION_DELAY > 0 &&
- $ITEST2_OPERATION_DELAY < 30000 then # max 30 seconds
- Thread.pass
- sleep($ITEST2_OPERATION_DELAY / 1000)
- end
if $TESTWISE_OPERATION_DELAY && $TESTWISE_OPERATION_DELAY > 0 &&
$TESTWISE_OPERATION_DELAY < 30000 then # max 30 seconds
View
@@ -1,30 +1,36 @@
#***********************************************************
-#* Copyright (c) 2006 - 2010, Zhimin Zhan.
+#* Copyright (c) 2006 - 2011, Zhimin Zhan.
#* Distributed open-source, see full license in MIT-LICENSE
#***********************************************************
-require "rubygems";
+require "rubygems"
-# Try load firewatir first, which depends on ActiveSupport 2.3.9
-begin
- require "firewatir";
- $firewatir_loaded = true
-rescue LoadError => e
- puts e
- $firewatir_loaded = false
+# From 2.0, no default support for FireWatir.
+#
+if $ENABLE_FIREFOX
+ # Try load firewatir first, which depends on ActiveSupport
+ puts "Deprecated: Please use watir-webdriver or selenium-webdriver to run tests in Firefox"
+ begin
+ require "firewatir";
+ $firewatir_loaded = true
+ rescue LoadError => e
+ puts e
+ $firewatir_loaded = false
+ end
end
# Load active_support, so that we can use 1.days.ago
begin
require 'active_support/basic_object'
require 'active_support/duration'
+ require 'active_support/core_ext'
rescue LoadError => no_as1_err
# active_support 2.0 loaded error
end
-require 'active_support/core_ext'
+
require 'spec'
unless defined? RWEBSPEC_VERSION
- RWEBSPEC_VERSION = RWEBUNIT_VERSION = "1.9.3"
+ RWEBSPEC_VERSION = RWEBUNIT_VERSION = "2.0.0"
end
if RUBY_PLATFORM =~ /mswin/ or RUBY_PLATFORM =~ /mingw/
@@ -47,12 +53,14 @@
require File.dirname(__FILE__) + "/rwebspec/context"
require File.dirname(__FILE__) + "/rwebspec/rspec_helper"
require File.dirname(__FILE__) + "/rwebspec/load_test_helper"
-require File.dirname(__FILE__) + "/rspec_extensions"
-require File.dirname(__FILE__) + "/watir_extensions"
-if RUBY_PLATFORM =~ /mswin/ or RUBY_PLATFORM =~ /mingw/
- require File.dirname(__FILE__) + "/window_script_extensions.rb"
-end
require File.dirname(__FILE__) + "/rwebspec/matchers/contains_text"
-require File.dirname(__FILE__) + "/rwebspec/testwise_plugin"
+
+require File.dirname(__FILE__) + "/extensions/rspec_extensions"
+require File.dirname(__FILE__) + "/extensions/watir_extensions"
+require File.dirname(__FILE__) + "/extensions/firewatir_extensions" if $ENABLE_FIREFOX
+if RUBY_PLATFORM =~ /mswin/ or RUBY_PLATFORM =~ /mingw/
+ require File.dirname(__FILE__) + "/extensions/window_script_extensions.rb"
+end
+require File.dirname(__FILE__) + "/plugins/testwise_plugin.rb"
View
@@ -6,7 +6,7 @@
# You can just use
# click_button("submit")
#
-require File.join(File.dirname(__FILE__), 'testwise_plugin')
+require File.join(File.dirname(__FILE__), '../plugins/testwise_plugin')
require File.join(File.dirname(__FILE__), 'popup')
require File.join(File.dirname(__FILE__), 'matchers', "contains_text.rb")
View
@@ -1,3 +0,0 @@
-# legacy code to support old 'require rwebunit'
-require File.dirname(__FILE__) + "/rwebspec"
-RWebUnit = RWebSpec
View
@@ -2,13 +2,13 @@
Gem::Specification.new do |s|
s.name = %q{rwebspec}
- s.version = "1.6.4"
+ s.version = "2.0.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Zhimin Zhan"]
- s.date = %q{2010-10-18}
+ s.date = %q{2011-10-14}
s.email = %q{zhimin@agileway.net}
- s.files = ["Rakefile", "README", "CHANGELOG", "MIT-LICENSE", "lib/rspec_extensions.rb", "lib/rwebspec", "lib/rwebspec/assert.rb", "lib/rwebspec/clickJSDialog.rb", "lib/rwebspec/context.rb", "lib/rwebspec/driver.rb", "lib/rwebspec/testwise_plugin.rb", "lib/rwebspec/matchers", "lib/rwebspec/matchers/contains_text.rb", "lib/rwebspec/popup.rb", "lib/rwebspec/rspec_helper.rb", "lib/rwebspec/test_script.rb", "lib/rwebspec/test_utils.rb", "lib/rwebspec/using_pages.rb", "lib/rwebspec/web_browser.rb", "lib/rwebspec/web_page.rb", "lib/rwebspec/web_testcase.rb", "lib/rwebspec.rb", "lib/watir_extensions.rb", "lib/rwebspec/load_test_helper.rb", "lib/rwebspec/database_checker.rb", "lib/window_script_extensions.rb"]
+ s.files = ["Rakefile", "README", "CHANGELOG", "MIT-LICENSE", "lib/extensions/rspec_extensions.rb", "lib/rwebspec", "lib/rwebspec/assert.rb", "lib/rwebspec/clickJSDialog.rb", "lib/rwebspec/context.rb", "lib/rwebspec/driver.rb", "lib/plugins/testwise_plugin.rb", "lib/rwebspec/matchers", "lib/rwebspec/matchers/contains_text.rb", "lib/rwebspec/popup.rb", "lib/rwebspec/rspec_helper.rb", "lib/rwebspec/test_script.rb", "lib/rwebspec/test_utils.rb", "lib/rwebspec/using_pages.rb", "lib/rwebspec/web_browser.rb", "lib/rwebspec/web_page.rb", "lib/rwebspec/web_testcase.rb", "lib/rwebspec.rb", "lib/extensions/watir_extensions.rb", "lib/rwebspec/load_test_helper.rb", "lib/rwebspec/database_checker.rb", "lib/extensions/window_script_extensions.rb"]
s.has_rdoc = true
s.homepage = %q{http://github.com/zhimin/rwebspec/tree/master}
s.require_paths = ["lib"]
@@ -23,13 +23,13 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<rspec>, ["= 1.1.12"])
- s.add_runtime_dependency(%q<commonwatir>, [">= 1.6.5"])
+ s.add_runtime_dependency(%q<commonwatir>, [">= 2.0"])
else
s.add_dependency(%q<rspec>, ["= 1.1.12"])
- s.add_dependency(%q<commonwatir>, [">= 1.6.5"])
+ s.add_dependency(%q<commonwatir>, [">= 2.0"])
end
else
s.add_dependency(%q<rspec>, ["= 1.1.12"])
- s.add_dependency(%q<commonwatir>, [">= 1.6.5"])
+ s.add_dependency(%q<commonwatir>, [">= 2.0"])
end
end
View
@@ -2,13 +2,13 @@
require "spec"
require 'uri'
-require File.join(File.dirname(__FILE__), "..", "lib/rspec_extensions.rb")
+require File.join(File.dirname(__FILE__), "..", "lib/extensions/rspec_extensions.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/driver.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/context.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/web_browser.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/web_page.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/assert.rb")
-require File.join(File.dirname(__FILE__), "..", "lib/watir_extensions.rb")
+require File.join(File.dirname(__FILE__), "..", "lib/extensions/watir_extensions.rb")
require 'test/unit/assertions'
$:.unshift File.join(File.dirname(__FILE__), "..", "lib/rwebspec")
View
@@ -2,13 +2,13 @@
require "spec"
require 'uri'
-require File.join(File.dirname(__FILE__), "..", "lib/rspec_extensions.rb")
+require File.join(File.dirname(__FILE__), "..", "lib/extensions/rspec_extensions.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/driver.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/context.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/web_browser.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/web_page.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/assert.rb")
-require File.join(File.dirname(__FILE__), "..", "lib/watir_extensions.rb")
+require File.join(File.dirname(__FILE__), "..", "lib/extensions/watir_extensions.rb")
require 'test/unit/assertions'
$:.unshift File.join(File.dirname(__FILE__), "..", "lib/rwebspec")
View
@@ -2,13 +2,13 @@
require "spec"
require 'uri'
-require File.join(File.dirname(__FILE__), "..", "lib/rspec_extensions.rb")
+require File.join(File.dirname(__FILE__), "..", "lib/extensions/rspec_extensions.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/driver.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/context.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/web_browser.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/web_page.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/assert.rb")
-require File.join(File.dirname(__FILE__), "..", "lib/watir_extensions.rb")
+require File.join(File.dirname(__FILE__), "..", "lib/extensions/watir_extensions.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/web_page.rb")
require 'test/unit/assertions'
View
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + "/stack"
$:.unshift File.join(File.dirname(__FILE__), "..", "lib/rwebspec")
gem "rspec"
-require File.join(File.dirname(__FILE__), "..", "lib/rspec_extensions.rb")
+require File.join(File.dirname(__FILE__), "..", "lib/extensions/rspec_extensions.rb")
test_suite "Test suite syntax" do
before(:each) do
View
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + "/stack"
$:.unshift File.join(File.dirname(__FILE__), "..", "lib/rwebspec")
gem "rspec"
-require File.join(File.dirname(__FILE__), "..", "lib/rspec_extensions.rb")
+require File.join(File.dirname(__FILE__), "..", "lib/extensions/rspec_extensions.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/test_utils.rb")
require File.join(File.dirname(__FILE__), "..", "lib/rwebspec/assert.rb")

0 comments on commit e959f9a

Please sign in to comment.