Skip to content

Commit cae9f3f

Browse files
author
Philippe Hanrigou
committed
Merge branch 'master' of git://github.com/skippy/selenium-client into exp
Conflicts: README.markdown Rakefile lib/selenium/rake/remote_control_start_task.rb
2 parents 49ffb05 + 0d9da9a commit cae9f3f

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

README.markdown

+4-1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ Contribute and Join the Fun!
283283
* We also have a [continuous integration server](http://xserve.openqa.org:8080/view/Ruby%20Client)
284284

285285
* Stories live in [Pivotal Tracker](https://www.pivotaltracker.com/projects/6280)
286+
* To build, run `rake clean default package`. You can then install the
287+
generated gem with `sudo gem install pkg/*.gem`
288+
* You can also run all integration tests with `rake ci:integration`
289+
286290

287291
Core Team
288292
=========
@@ -300,7 +304,6 @@ Contributors
300304
* Rick Lee-Morlang (`rleemorlang`):
301305
- Patch for incremental calls to `wait_for_text`
302306
- Regex support in `wait_for_text`
303-
304307

305308
* [Paul Boone](http://www.mindbucket.com) (`paulboone`)
306309
- Fixed method_missing in selenium_helper to only delegate to methods

Rakefile

+13-4
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ file "target/iedoc.xml" do
5757
end
5858
end
5959

60-
desc "Generate driver from iedoc.xml"
61-
file "lib/selenium/client/generated_driver.rb" => [ "target/iedoc.xml" ] do
60+
task :clean_driver_build do
61+
rm 'lib/selenium/client/generated_driver.rb'
62+
end
63+
64+
file "lib/selenium/client/generated_driver.rb" => [ :clean_driver_build, "target/iedoc.xml" ] do
6265
sh "ant generate-sources"
6366
end
6467

@@ -67,7 +70,6 @@ Rake::TestTask.new(:'test:unit') do |t|
6770
t.test_files = FileList['test/unit/**/*_test.rb']
6871
t.warning = true
6972
end
70-
task :"test:unit" => "lib/selenium/client/generated_driver.rb"
7173

7274
Selenium::Rake::RemoteControlStartTask.new do |rc|
7375
rc.port = 4444
@@ -223,7 +225,14 @@ Rake::GemPackageTask.new(specification) do |package|
223225
end
224226

225227
desc "Build the RubyGem"
226-
task :gem
228+
task :gem => "lib/selenium/client/generated_driver.rb"
229+
230+
desc "Create a gemspec file"
231+
task :make_spec do
232+
File.open("#{specification.name}.gemspec", "w") do |file|
233+
file.puts specification.to_ruby
234+
end
235+
end
227236

228237
desc "Generate documentation"
229238
Rake::RDocTask.new("rdoc") do |rdoc|

lib/selenium/rake/remote_control_start_task.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ module Rake
2424
# http://archiva.openqa.org/repository/snapshots/org/openqa/selenium/selenium-remote-control/1.0-SNAPSHOT/
2525
class RemoteControlStartTask
2626
attr_accessor :port, :timeout_in_seconds, :background,
27-
:wait_until_up_and_running, :additional_args
27+
:wait_until_up_and_running, :additional_args,
28+
:log_to
2829
attr_reader :jar_file
2930

3031
def initialize(name = :'selenium:rc:start')
@@ -51,6 +52,7 @@ def define
5152
remote_control = Selenium::RemoteControl::RemoteControl.new("0.0.0.0", @port, @timeout_in_seconds)
5253
remote_control.jar_file = @jar_file
5354
remote_control.additional_args = @additional_args
55+
remote_control.log_to = @log_to
5456
remote_control.start :background => @background
5557
if @background && @wait_until_up_and_running
5658
puts "Waiting for Remote Control to be up and running..."

lib/selenium/remote_control/remote_control.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module RemoteControl
33

44
class RemoteControl
55
attr_reader :host, :port, :timeout_in_seconds
6-
attr_accessor :additional_args, :jar_file
6+
attr_accessor :additional_args, :jar_file, :log_to
77

88
def initialize(host, port, timeout_in_seconds = 2 * 60)
99
@host, @port, @timeout_in_seconds = host, port, timeout_in_seconds
@@ -16,6 +16,7 @@ def start(options = {})
1616
command << " -port #{@port}"
1717
command << " -timeout #{@timeout_in_seconds}"
1818
command << " #{additional_args.join(' ')}" unless additional_args.empty?
19+
command << " > #{log_to}" if log_to
1920

2021
@shell.run command, {:background => options[:background]}
2122
end
Binary file not shown.

0 commit comments

Comments
 (0)