watir 4.0.0.rc5-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile ADDED
@@ -0,0 +1,30 @@
1
+ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
2
+
3
+ require 'bundler'
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ namespace :build do
7
+ desc "Build for Windows platform."
8
+ task :win => :build do
9
+ begin
10
+ ENV["build_for_windows"] = "true"
11
+ Rake::Task["build"].reenable
12
+ Rake::Task["build"].invoke
13
+ ensure
14
+ ENV["build_for_windows"] = nil
15
+ end
16
+ end
17
+
18
+ desc "Build for all platforms."
19
+ task :all => [:build, "build:win"]
20
+ end
21
+
22
+ namespace :release do
23
+ desc "Release for Windows platform."
24
+ task :win => "build:win" do
25
+ sh "gem push #{Dir["pkg/*mingw32.gem"].sort_by{|f| File.mtime(f)}.last}"
26
+ end
27
+
28
+ desc "Release for all platforms."
29
+ task :all => [:release, "release:win"]
30
+ end
@@ -0,0 +1,48 @@
1
+ require File.expand_path('version', File.dirname(__FILE__))
2
+
3
+ module Watir
4
+ class Browser
5
+ class << self
6
+ def new(browser=nil, *args)
7
+ if browser && browser.to_sym != :ie && Watir.driver == :classic
8
+ Watir.driver = :webdriver
9
+ end
10
+ Watir.load_driver
11
+
12
+ if Watir.driver == :webdriver
13
+ # remove this class method for WebDriver to avoid endless loop
14
+ singleton_class = class << self; self end
15
+ singleton_class.send :remove_method, :new
16
+ end
17
+
18
+ new browser.nil? && Watir.driver == :webdriver ? :firefox : browser, *args
19
+ end
20
+ end
21
+ end
22
+
23
+ class << self
24
+ def load_driver
25
+ require "watir-#{driver}"
26
+ end
27
+
28
+ def driver
29
+ @driver || ENV["WATIR_DRIVER"] || default_driver
30
+ end
31
+
32
+ def driver=(driver)
33
+ allowed_drivers = %w[webdriver classic]
34
+ unless allowed_drivers.map(&:to_sym).include?(driver.to_sym)
35
+ raise "Supported drivers are #{allowed_drivers.join(", ")}."
36
+ end
37
+ @driver = driver
38
+ end
39
+
40
+ def default_driver
41
+ if ENV['OS'] == 'Windows_NT'
42
+ :classic
43
+ else
44
+ :webdriver
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,3 @@
1
+ module Watir
2
+ BUNDLE_VERSION = '4.0.0.rc5'
3
+ end
data/lib/watir.rb ADDED
@@ -0,0 +1 @@
1
+ require File.expand_path('watir/loader', File.dirname(__FILE__))
data/watir.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require "bundler"
3
+ $:.push File.expand_path("../lib", __FILE__)
4
+ require "watir/version"
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "watir"
8
+ s.version = Watir::BUNDLE_VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.authors = ["Bret Pettichord"]
11
+ s.email = ["bret@pettichord.com"]
12
+ s.homepage = "http://github.com/watir/watir"
13
+ s.summary = %q{Watir}
14
+ s.description = %q{Automated testing tool for web applications. By Testers. For Testers.}
15
+ s.rubyforge_project = "watir"
16
+ s.files = %x{git ls-files}.split("\n")
17
+ s.require_paths = ["lib"]
18
+ s.add_dependency "commonwatir", "~>4"
19
+ s.add_dependency "watir-webdriver"
20
+
21
+ if ENV["build_for_windows"]
22
+ s.platform = Gem::Platform::MINGW
23
+ s.add_dependency "watir-classic", "~> 3.1"
24
+ end
25
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: watir
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.0.0.rc5
5
+ prerelease: 6
6
+ platform: x86-mingw32
7
+ authors:
8
+ - Bret Pettichord
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: commonwatir
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '4'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '4'
30
+ - !ruby/object:Gem::Dependency
31
+ name: watir-webdriver
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: watir-classic
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '3.1'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '3.1'
62
+ description: Automated testing tool for web applications. By Testers. For Testers.
63
+ email:
64
+ - bret@pettichord.com
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - Rakefile
70
+ - lib/watir.rb
71
+ - lib/watir/loader.rb
72
+ - lib/watir/version.rb
73
+ - watir.gemspec
74
+ homepage: http://github.com/watir/watir
75
+ licenses: []
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>'
90
+ - !ruby/object:Gem::Version
91
+ version: 1.3.1
92
+ requirements: []
93
+ rubyforge_project: watir
94
+ rubygems_version: 1.8.24
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: Watir
98
+ test_files: []
99
+ has_rdoc: