Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Hi! I cleaned up your code for you! #1

Open
wants to merge 1 commit into from

1 participant

@GunioRobot

Hi there!

This is WhitespaceBot. I'm an open-source robot that removes trailing white space in your code, and gives you a gitignore file if you didn't have one!

Why whitespace? Whitespace is an eyesore for developers who use text editors with dark themes. It's not a huge deal, but it's a bit annoying if you use Vim in a terminal. Really, I'm just a proof of concept - GitHub's V3 API allows robots to automatically improve open source projects, and that's really cool. Hopefully, somebody, maybe you!, will fork me and make me even more useful. My owner is funding a bounty to anybody who can add security fixing features to me.

I've only cleaned your most popular project, and I've added you to a list of users not to contact again, so you won't get any more pull requests from me unless you ask. If I'm misbehaving, please email my owner and tell him to turn me off! If this is pull request is of no use to you, please just ignore it.

Thanks!
WhiteSpacebot from Gun.io.

@joemcmahon
Collaborator

Whitespace-only cleanup, pulled from Gun.io WhitespaceBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 30, 2011
  1. Remove whitespace [Gun.io WhitespaceBot]

    Gun.io Whitespace Robot authored
This page is out of date. Refresh to see the latest.
View
20 .gitignore
@@ -0,0 +1,20 @@
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+*.pyc
+
+# Logs and databases #
+######################
+*.log
+
+# OS generated files #
+######################
+.DS_Store*
+ehthumbs.db
+Icon?
+Thumbs.db
View
2  BUILDING_FROM_SELENIUM.txt
@@ -5,7 +5,7 @@ version control. To create this file, follow these steps:
1) Find a iedoc.xml, and put it in the perl/ directory.
To download and extract iedoc.xml from the latest nightly selenium-core
build, run:
-
+
perl util/fetch_iedoc_xml.pl
2) Generate lib/WWW/Selenium.pm and t/selenium-core.t from iedoc.xml:
View
10 Changes
@@ -33,7 +33,7 @@ Revision history for Perl extension Test::WWW::Selenium.
1.18 - Mon Aug 31 23:20:21 PDT 2009
- Update list of commands that do not require a locator (barbie++)
- Update Module::Install to 0.91
- - Ensure that do_command reuses LWP objects and caches
+ - Ensure that do_command reuses LWP objects and caches
connections for performance (konobi++)
- Minor POD touchups by (dandv++)
@@ -99,7 +99,7 @@ Revision history for Perl extension Test::WWW::Selenium.
1.03 - Tue Jun 27 22:47:43 PDT 2006
- Unit tests don't test stderr using Test::Builder::Tester
- - When the Test-Simple folks get T::B::Tester working better I'll
+ - When the Test-Simple folks get T::B::Tester working better I'll
re-enable these tests
1.02 - Sat Jun 24 17:25:35 PDT 2006
@@ -111,9 +111,9 @@ Revision history for Perl extension Test::WWW::Selenium.
- failed action_ok() doesn't die anymore, the test just fails
1.01 - Thu Jun 22 13:57:33 PDT 2006
- - No longer call WWW::Selenium::AUTOLOAD if method can't be
+ - No longer call WWW::Selenium::AUTOLOAD if method can't be
found (rt bug #20042)
- - Update sample Test::WWW::Selenium code to actually work
+ - Update sample Test::WWW::Selenium code to actually work
(Thanks, Shane Landrum)
1.00 - Mon Jun 12 08:53:18 PDT 2006
@@ -166,7 +166,7 @@ Revision history for Perl extension Test::WWW::Selenium.
- minor testing improvements
0.06 Thu Mar 9 00:01:34 PST 2006
- - Added descriptive png images to doc/
+ - Added descriptive png images to doc/
- Added support for CGI driver to store/retrive commands and results
- Added script to convert a wiki syntax file into a perl script
View
8 README
@@ -1,6 +1,6 @@
-Test-WWW-Selenium is a perl driver and test library for Selenium Remote
-Control (SRC). You will need to setup a Selenium Server that can launch
-browsers.
+Test-WWW-Selenium is a perl driver and test library for Selenium Remote
+Control (SRC). You will need to setup a Selenium Server that can launch
+browsers.
Selenium Remote Control (SRC) is a test tool that allows you to write
automated web application UI tests in any programming language against
@@ -21,7 +21,7 @@ Selenium Server. (The Selenium Server is a Java application.)
The Selenium Server is available here:
http://www.openqa.org/selenium-rc/
-
+
or on CPAN in the Alien-SeleniumRC package:
http://search.cpan.org/dist/Alien-SeleniumRC
View
14 build.xml
@@ -59,7 +59,7 @@
</perl>
<make />
</target>
-
+
<target name="pre-test">
<condition property="skiptests-headless">
<or>
@@ -74,7 +74,7 @@
</or>
</condition>
</target>
-
+
<target name="test-nonheadless" depends="init, make, pre-test" unless="skiptests-nonheadless">
<echo>${selenium-server}</echo>
<java jar="${selenium-server}" fork="true" spawn="true"/>
@@ -89,7 +89,7 @@
</condition>
<fail if="build.failed" message="perl tests failed!" />
</target>
-
+
<target name="test-headless" depends="init, make, pre-test" unless="skiptests-headless">
<echo>${selenium-server}</echo>
<java jar="${selenium-server}" fork="true" spawn="true"/>
@@ -108,9 +108,9 @@
</condition>
<fail if="build.failed" message="perl tests failed!" />
</target>
-
+
<target name="test" depends="test-headless, test-nonheadless" />
-
+
<target name="dist" depends="generate-sources, doc">
<mkdir dir="target" />
<property name="project.version" value="UNKNOWNVERSION" />
@@ -131,9 +131,9 @@
<zipfileset dir="doc" prefix="perl" />
</zip>
</target>
-
+
<target name="clean">
- <delete file="lib/WWW/Selenium.pm" />
+ <delete file="lib/WWW/Selenium.pm" />
<mkdir dir="doc" />
<delete dir="doc" />
<mkdir dir="blib" />
View
6 t/WWW/Selenium.pm
@@ -11,9 +11,9 @@ my $ua_timeout = 180;
sub new {
my $class = shift;
my %opts = (
- host => 'localhost',
- port => 4444,
- browser => '*firefox',
+ host => 'localhost',
+ port => 4444,
+ browser => '*firefox',
browser_url => 'http://example.com',
no_deprecation_msg => 1,
@_,
View
4 t/selenium-compat.t
@@ -4,7 +4,7 @@ use warnings;
use Test::More tests => 27;
use Test::Exception;
-# The purpose of these tests are to ensure that WWW::Selenium does not
+# The purpose of these tests are to ensure that WWW::Selenium does not
# break backwards compatibility with previously released versions.
BEGIN {
@@ -113,7 +113,7 @@ Get_selected_options: {
Two_selected: {
$sel->_set_mock_response_content('first response,second');
- is_deeply [$sel->get_selected_options('id=foo')],
+ is_deeply [$sel->get_selected_options('id=foo')],
['first response', 'second'];
}
}
View
10 t/selenium-rc.t
@@ -12,9 +12,9 @@ BEGIN {
}
Good_usage: {
- my $sel = WWW::Selenium->new( host => 'localhost',
- port => 4444,
- browser => '*firefox',
+ my $sel = WWW::Selenium->new( host => 'localhost',
+ port => 4444,
+ browser => '*firefox',
browser_url => 'http://foo.com'
);
isa_ok $sel, 'WWW::Selenium';
@@ -75,7 +75,7 @@ Failing_command: {
throws_ok { $sel->get_title } qr#Error: foo#;
$Mock_resp->mock( content => sub { 'OK' } );
}
-
+
Multi_values: {
my $sel = WWW::Selenium->new( browser_url => 'http://foo.com' );
$Mock_resp->mock( content => sub { 'OK,SESSION_ID' } );
@@ -92,7 +92,7 @@ Multi_values: {
'c:\foo\bar',
'c:\I came, I \saw\, I conquered',
],
- 'one\\\\,two' => ['one\\,two'],
+ 'one\\\\,two' => ['one\\,two'],
'one\\\\\\,two' => ['one\\', 'two'],
);
my $tester = sub {
View
8 t/test-selenium.t
@@ -32,7 +32,7 @@ Good_usage: {
Browser_gets_closed: {
$Mock_resp->mock('content' => sub { 'OK' });
- $sel = undef;
+ $sel = undef;
req_ok('cmd=testComplete&sessionId=SESSION_ID');
}
}
@@ -124,7 +124,7 @@ Commands: {
$Mock_resp->mock('content' => sub { 'OK' });
}
-no_locatior: {
+no_locatior: {
$Mock_resp->mock('content' => sub { 'OK,SESSION_ID' });
for my $getter (qw(alert prompt location title)) {
$Mock_resp->mock('content' => sub { 'OK,SESSION_ID' });
@@ -194,7 +194,7 @@ Relative_location: {
Default_test_names: {
Default_names_off: {
$Mock_resp->mock('content' => sub { 'OK,SESSION_ID' });
- my $sel = Test::WWW::Selenium->new(browser_url => 'http://foo.com',
+ my $sel = Test::WWW::Selenium->new(browser_url => 'http://foo.com',
default_names => 0);
$sel->open;
$Mock_resp->mock('content' => sub { 'OK' });
@@ -204,7 +204,7 @@ Default_test_names: {
}
Test_name_provided: {
$Mock_resp->mock('content' => sub { 'OK,SESSION_ID' });
- my $sel = Test::WWW::Selenium->new(browser_url => 'http://foo.com',
+ my $sel = Test::WWW::Selenium->new(browser_url => 'http://foo.com',
default_names => 1);
$sel->open;
$Mock_resp->mock('content' => sub { 'OK' });
View
2  todo.txt
@@ -9,7 +9,7 @@
- fix google example to work in non-us countries
-- Change documentation
+- Change documentation
- to not use phrases like "We support"
- to not say "never throws an exception"
View
22 util/WWW/Selenium/XMLParseUtils.pm
@@ -21,7 +21,7 @@ sub strip_blockquotes {
. "\n\n=back\n\n";
# hack for Element Filters section - it's inconsistent with the
- # other sections, and shouldn't be in a blockquote
+ # other sections, and shouldn't be in a blockquote
# Remove this once fixed
if ($lines[0] =~ m/^Element filters can be used/) {
$new_text = "\n" . join("\n", @lines) . "\n";
@@ -40,7 +40,7 @@ sub html2pod {
my $orig_text = $text;
$text =~ s#<p>(.+?)</p>#\n$1\n#smg; # p's should be spaced out a bit
$text =~ s#^</?(?:p|dl)>##smg; # <p>s and <dl>s on their own line
- $text =~ s#</?(?:p|dl)>##g; # <p>s and <dl>s
+ $text =~ s#</?(?:p|dl)>##g; # <p>s and <dl>s
$text =~ s#<a name="[^"]+">([^<]*)</a>#$1#g; # don't need anchors
$text =~ s#<h3>([^<]+)</h3>#\n\n=head3 $1\n\n#g; # headings
$text =~ s#<em>([^<]+)</em>#I<$1>#g; # italics
@@ -92,8 +92,8 @@ sub extract_functions {
$text = html2pod($text);
$text =~ s#\n{2,}#\n\n#g;
- push @functions, {
- name => $perl_name,
+ push @functions, {
+ name => $perl_name,
text => $text,
return_type => $return_type,
params => $params,
@@ -139,14 +139,14 @@ sub _extract_params {
$name = camel2perl($name);
push @params, { name => $name, desc => $desc };
}
- my $names = join ', ',
- map { "\$$_->{name}" }
+ my $names = join ', ',
+ map { "\$$_->{name}" }
@params;
my $desc = '';
if (@params) {
$desc = "=over\n\n"
- . join("\n\n",
- map { "\$$_->{name} is $_->{desc}" }
+ . join("\n\n",
+ map { "\$$_->{name} is $_->{desc}" }
@params)
. "\n\n=back\n";
}
@@ -162,9 +162,9 @@ sub _extract_return_type {
return ('', '');
}
-sub camel2perl {
- my $n = shift;
- $n =~ s/([a-z]+)([A-Z]+)/"$1_" . lc($2)/eg;
+sub camel2perl {
+ my $n = shift;
+ $n =~ s/([a-z]+)([A-Z]+)/"$1_" . lc($2)/eg;
return $n;
}
View
44 util/create_www_selenium.pl
@@ -11,7 +11,7 @@
$iedoc =~ s{^<\?.+?<top>}{#}s; # strip the xml header
$iedoc =~ s#\n##smg; # newlines shouldn't matter to them, but they do matter to us
-$iedoc = html2pod($iedoc);
+$iedoc = html2pod($iedoc);
$iedoc = strip_blockquotes($iedoc);
@@ -50,7 +50,7 @@
my @functions = extract_functions($iedoc, $function_extras);
my @extra_cmds = (
- {
+ {
name => 'waitForTextPresent',
params => '$text, $timeout',
desc => 'Waits until $text is present in the html source',
@@ -63,9 +63,9 @@
);
# Print Selenium.pm
-write_file("lib/WWW/Selenium.pm", join('', pm_header(),
- $selenium_description,
- pm_constructor(),
+write_file("lib/WWW/Selenium.pm", join('', pm_header(),
+ $selenium_description,
+ pm_constructor(),
map({ $_->{text} } @functions),
map({create_function(%$_)} @extra_cmds),
pm_footer() ) );
@@ -113,13 +113,13 @@ =head1 NAME
=head1 SYNOPSIS
use WWW::Selenium;
-
- my $sel = WWW::Selenium->new( host => "localhost",
- port => 4444,
- browser => "*iexplore",
+
+ my $sel = WWW::Selenium->new( host => "localhost",
+ port => 4444,
+ browser => "*iexplore",
browser_url => "http://www.google.com",
);
-
+
$sel->start;
$sel->open("http://www.google.com");
$sel->type("q", "hello world");
@@ -212,7 +212,7 @@ =head2 METHODS
Server as a proxy and to have all annoying prompts
("save your password?" "forms are insecure" "make Firefox your default
browser?" disabled. You may optionally specify
-an absolute path to your firefox executable, or just say "*firefox".
+an absolute path to your firefox executable, or just say "*firefox".
If no absolute path is specified, we'll look for
firefox.exe in a default location (normally c:\program files\mozilla
firefox\firefox.exe), which you can override by
@@ -227,7 +227,7 @@ =head2 METHODS
Server as a proxy and to have all annoying prompts
("save your password?" "forms are insecure" "make Firefox your default
browser?" disabled. You may optionally specify
-an absolute path to your iexplore executable, or just say "*iexplore".
+an absolute path to your iexplore executable, or just say "*iexplore".
If no absolute path is specified, we'll look for
iexplore.exe in a default location (normally c:\program files\internet
explorer\iexplore.exe), which you can override by
@@ -287,8 +287,8 @@ sub new {
sub start {
my $self = shift;
return if $self->{session_id};
- $self->{session_id} = $self->get_string("getNewBrowserSession",
- $self->{browser_start_command},
+ $self->{session_id} = $self->get_string("getNewBrowserSession",
+ $self->{browser_start_command},
$self->{browser_url});
}
@@ -329,9 +329,9 @@ sub do_command {
if (defined $self->{session_id}) {
$$params .= "&sessionId=$self->{session_id}";
}
- # We use the full version of LWP to make sure we issue an
+ # We use the full version of LWP to make sure we issue an
# HTTP 1.1 request (SRC-25)
-
+
my $method = $get ? 'GET' : 'POST';
print "---> Requesting $method $fullurl ($content)\n" if $self->{verbose};
my $header = HTTP::Headers->new(
@@ -339,7 +339,7 @@ sub do_command {
Content_Type => 'application/x-www-form-urlencoded; charset=utf-8'
)
);
- my $response = $self->ua->request(
+ my $response = $self->ua->request(
HTTP::Request->new($method => $fullurl, $header, $content) );
my $result;
if ($response->is_success) {
@@ -466,7 +466,7 @@ sub pm_footer {
Verify the location of the current page ends with the expected location.
If an URL querystring is provided, this is checked as well.
-$expected_location is the location to match.
+$expected_location is the location to match.
Note: This function is deprecated, use get_location() instead.
@@ -485,7 +485,7 @@ sub is_location {
Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button.
-$locator is an element locator pointing to a checkbox or radio button.
+$locator is an element locator pointing to a checkbox or radio button.
Note: This function is deprecated, use is_checked() instead.
@@ -504,8 +504,8 @@ sub get_checked {
See the select command for more information about option locators.
-$locator is an element locator.
-$option_locator is an option locator, typically just an option label (e.g. "John Smith").
+$locator is an element locator.
+$option_locator is an option locator, typically just an option label (e.g. "John Smith").
Note: This function is deprecated, use the get_selected_*() methods instead.
@@ -528,7 +528,7 @@ sub is_selected {
Gets all option labels for selected options in the specified select or multi-select element.
-$locator is an element locator.
+$locator is an element locator.
Note: This function is deprecated, use get_selected_labels() instead.
View
2  util/fetch_iedoc_xml.pl
@@ -42,4 +42,4 @@ sub fetch_and_extract {
$zip->extractTree;
chdir '..';
return $src_dir;
-}
+}
Something went wrong with that request. Please try again.