sauce 0.12.6 → 0.12.7

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/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/README.markdown CHANGED
@@ -1,41 +1,72 @@
1
- sauce
2
- =====
3
-
4
- Ruby access to Sauce OnDemand
1
+ Sauce OnDemand is a Selenium testing cloud service, developed by Sauce
2
+ Labs Inc (saucelabs.com). This is the Ruby client adapter for Sauce
3
+ OnDemand.
5
4
 
6
5
  Features
7
6
  --------
8
- Current:
9
7
 
10
8
  * Drop-in replacement for Selenium::Client::Driver that takes care of connecting to Sauce OnDemand
11
9
  * RSpec, Test::Unit, and Rails integration for tests, including automatic setup of Sauce Connect
12
10
  * ActiveRecord-like interface for tunnels and jobs: Find/create/destroy
13
- * Start/stop local instances of Sauce RC
14
-
15
- Planned:
16
-
17
- * Webrat integration
18
- * Extend to automatic retrieval of jobs logs, videos, reverse tunnels
19
11
 
20
12
  Install
21
13
  -------
14
+
22
15
  `gem install sauce`
23
16
 
17
+ Rails Integration
18
+ -------
19
+
20
+ You can use either RSpec or Test::Unit with Rails and Sauce OnDemand. To get started, run the generator:
21
+
22
+ `script/generate sauce USERNAME ACCESS_KEY`
23
+
24
+ The generator will take care of setting up your helpers with Sauce OnDemand
25
+ configuration, which you can tweak inside the `Sauce.config` block if necessary.
26
+
27
+ ### Example RSpec test for Rails
28
+
29
+ Here's an example test for RSpec. Drop something like this in spec/selenium/example.rb:
30
+
31
+ require "spec_helper"
32
+
33
+ describe "my app" do
34
+ it "should have a home page" do
35
+ page.open "/"
36
+ page.is_text_present("Welcome Aboard").should be_true
37
+ end
38
+ end
39
+
40
+ Here's how you run RSpec tests with Sauce OnDemand using rake:
41
+
42
+ `rake spec:selenium:sauce`
43
+
44
+ ### Example Test::Unit test for Rails
45
+
46
+ Here's an example test for Test::Unit. Drop something like this in test/selenium/example.rb:
47
+
48
+ require "test_helper"
49
+
50
+ class DemoTest < Sauce::RailsTestCase
51
+ test "my app", do
52
+ page.open "/"
53
+ page.is_text_present("Welcome Aboard").should be_true
54
+ end
55
+ end
56
+
57
+ Here's how you run Test::Unit tests with Sauce OnDemand using rake:
58
+
59
+ `rake test:selenium:sauce`
60
+
61
+ RSpec integration without Rails
62
+ -------------------------------
63
+
64
+ First, configure with your account info:
65
+
24
66
  `sauce config USERNAME ACCESS_KEY`
25
67
 
26
- Examples
27
- -------
28
- ### Selenium Client driver
29
- require 'rubygems'
30
- require 'sauce'
31
- selenium = Sauce::Selenium.new(:browser_url => "http://saucelabs.com",
32
- :browser => "firefox", :browser_version => "3.", :os => "Windows 2003",
33
- :job_name => "My first test!")
34
- selenium.start
35
- selenium.open "/"
36
- selenium.stop
68
+ And here's an example test:
37
69
 
38
- ### RSpec integration
39
70
  #!/usr/bin/env ruby
40
71
  #
41
72
  # Sample RSpec test case using the Sauce gem
@@ -70,7 +101,15 @@ Examples
70
101
  end
71
102
  end
72
103
 
73
- ### Test::Unit integration
104
+ Test::Unit integration without Rails
105
+ ------------------------------------
106
+
107
+ First, configure with your account info:
108
+
109
+ `sauce config USERNAME ACCESS_KEY`
110
+
111
+ And here's an example test:
112
+
74
113
  #!/usr/bin/env ruby
75
114
  #
76
115
  # Sample Test:Unit test case using the Sauce gem
@@ -98,51 +137,40 @@ Examples
98
137
  end
99
138
  end
100
139
 
101
- ### Rails integration
102
- You can use either RSpec or Test::Unit with Rails and Sauce OnDemand.
103
- The generator will take care of setting up your helpers with Sauce OnDemand
104
- configuration, which you can tweak inside the `Sauce.config` block.
105
-
106
- `gem install sauce`
107
-
108
- `script/generate sauce USERNAME ACCESS_KEY`
140
+ Direct use of the Selenium Client driver
141
+ ----------------------------------------
109
142
 
110
- For RSpec, drop something like this in spec/selenium:
143
+ First, configure with your account info:
111
144
 
112
- require "spec_helper"
113
-
114
- describe "my app" do
115
- it "should have a home page" do
116
- page.open "/"
117
- page.is_text_present("Welcome Aboard").should be_true
118
- end
119
- end
120
-
121
- For Test::Unit, drop something like this in test/selenium:
122
-
123
- require "test_helper"
124
-
125
- class DemoTest < Sauce::RailsTestCase
126
- test "my app", do
127
- page.open "/"
128
- page.is_text_present("Welcome Aboard").should be_true
129
- end
130
- end
131
-
132
- To run your tests, use rake:
145
+ `sauce config USERNAME ACCESS_KEY`
133
146
 
134
- `rake spec:selenium:sauce`
147
+ And here's an example test:
135
148
 
136
- `rake test:selenium:sauce`
149
+ require 'rubygems'
150
+ require 'sauce'
151
+ selenium = Sauce::Selenium.new(:browser_url => "http://saucelabs.com",
152
+ :browser => "firefox", :browser_version => "3.", :os => "Windows 2003",
153
+ :job_name => "My first test!")
154
+ selenium.start
155
+ selenium.open "/"
156
+ selenium.stop
137
157
 
138
158
  Note on Patches/Pull Requests
139
159
  -----------------------------
160
+
140
161
  * Fork the project.
141
162
  * Make your feature addition or bug fix.
142
163
  * Add tests for it. This is important so we don't break it in a future version unintentionally.
143
164
  * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
144
165
  * Send me a pull request. Bonus points for topic branches.
145
166
 
167
+ Plans
168
+ -----
169
+
170
+ * Webrat integration
171
+ * Extend to automatic retrieval of jobs logs, videos, reverse tunnels
172
+
146
173
  Copyright
147
174
  ---------
148
- Copyright (c) 2009-2010 Sauce Labs Inc. See LICENSE for details.
175
+
176
+ Copyright (c) 2009-2011 Sauce Labs Inc. See LICENSE for details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.6
1
+ 0.12.7
data/bin/sauce CHANGED
@@ -32,7 +32,7 @@ else
32
32
  configure = ConfigureCommand.new('configure', false)
33
33
  configure.short_desc = "Configure Sauce OnDemand credentials"
34
34
  configure.set_execution_block do |args|
35
- if args.length < 2:
35
+ if args.length < 2
36
36
  puts configure.usage
37
37
  exit 1
38
38
  end
@@ -24,7 +24,7 @@ class SauceGenerator < Rails::Generator::Base
24
24
  m.directory File.join('lib', 'tasks')
25
25
  m.directory File.join('test', 'selenium') if File.directory? 'test'
26
26
  m.file 'sauce.rake', File.join('lib', 'tasks', 'sauce.rake')
27
- m.setup_helper(File.join('test', 'test_helper.rb'))
27
+ m.setup_helper(File.join('test', 'test_helper.rb')) if File.directory? 'test'
28
28
  end
29
29
  end
30
30
 
@@ -8,6 +8,10 @@ class SauceGenerator < Rails::Generators::Base
8
8
  copy_file "sauce.rake", "lib/tasks/sauce.rake"
9
9
  end
10
10
 
11
+ def configure_credentials
12
+ system("sauce config #{username} #{api_key}")
13
+ end
14
+
11
15
  def setup_spec
12
16
  if File.directory? 'spec'
13
17
  empty_directory "spec/selenium"
@@ -16,8 +20,10 @@ class SauceGenerator < Rails::Generators::Base
16
20
  end
17
21
 
18
22
  def setup_test
19
- empty_directory "test/selenium"
20
- append_file "test/test_helper.rb", generate_config
23
+ if File.directory? 'test'
24
+ empty_directory "test/selenium"
25
+ append_file "test/test_helper.rb", generate_config
26
+ end
21
27
  end
22
28
 
23
29
  private
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauce
3
3
  version: !ruby/object:Gem::Version
4
- hash: 35
4
+ hash: 33
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 12
9
- - 6
10
- version: 0.12.6
9
+ - 7
10
+ version: 0.12.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Grove
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-01-15 00:00:00 -08:00
20
+ date: 2011-01-17 00:00:00 -08:00
21
21
  default_executable: sauce
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -151,6 +151,7 @@ extra_rdoc_files:
151
151
  - README.markdown
152
152
  files:
153
153
  - .document
154
+ - .gitignore
154
155
  - LICENSE
155
156
  - README.markdown
156
157
  - Rakefile
@@ -177,7 +178,6 @@ files:
177
178
  - lib/sauce/selenium.rb
178
179
  - lib/sauce/tunnel.rb
179
180
  - lib/sauce/utilities.rb
180
- - sauce.gemspec
181
181
  - support/sauce_connect
182
182
  - support/selenium-server.jar
183
183
  - support/simplejson/LICENSE.txt
@@ -198,8 +198,8 @@ homepage: http://github.com/saucelabs/sauce
198
198
  licenses: []
199
199
 
200
200
  post_install_message:
201
- rdoc_options: []
202
-
201
+ rdoc_options:
202
+ - --charset=UTF-8
203
203
  require_paths:
204
204
  - lib
205
205
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -228,14 +228,14 @@ signing_key:
228
228
  specification_version: 3
229
229
  summary: Ruby access to Sauce Labs' features
230
230
  test_files:
231
- - examples/helper.rb
232
- - examples/other_spec.rb
233
- - examples/saucelabs_spec.rb
234
- - examples/test_saucelabs.rb
235
- - examples/test_saucelabs2.rb
236
231
  - test/helper.rb
237
232
  - test/test_config.rb
238
233
  - test/test_connect.rb
239
234
  - test/test_jobs.rb
240
235
  - test/test_selenium.rb
241
236
  - test/test_tunnels.rb
237
+ - examples/helper.rb
238
+ - examples/other_spec.rb
239
+ - examples/saucelabs_spec.rb
240
+ - examples/test_saucelabs.rb
241
+ - examples/test_saucelabs2.rb
data/sauce.gemspec DELETED
@@ -1,118 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{sauce}
8
- s.version = "0.12.6"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Sean Grove", "Eric Allen", "Steven Hazel"]
12
- s.date = %q{2011-01-15}
13
- s.default_executable = %q{sauce}
14
- s.description = %q{A Ruby interface to Sauce Labs' services. Start/stop tunnels, retrieve Selenium logs, access video replays, etc.}
15
- s.email = %q{help@saucelabs.com}
16
- s.executables = ["sauce"]
17
- s.extra_rdoc_files = [
18
- "LICENSE",
19
- "README.markdown"
20
- ]
21
- s.files = [
22
- ".document",
23
- "LICENSE",
24
- "README.markdown",
25
- "Rakefile",
26
- "VERSION",
27
- "bin/sauce",
28
- "examples/helper.rb",
29
- "examples/other_spec.rb",
30
- "examples/saucelabs_spec.rb",
31
- "examples/test_saucelabs.rb",
32
- "examples/test_saucelabs2.rb",
33
- "generators/sauce/sauce_generator.rb",
34
- "generators/sauce/templates/sauce.rake",
35
- "lib/generators/sauce_generator.rb",
36
- "lib/generators/templates/sauce.rake",
37
- "lib/sauce.rb",
38
- "lib/sauce/client.rb",
39
- "lib/sauce/config.rb",
40
- "lib/sauce/connect.rb",
41
- "lib/sauce/gateway_ext.rb",
42
- "lib/sauce/heroku.rb",
43
- "lib/sauce/integrations.rb",
44
- "lib/sauce/job.rb",
45
- "lib/sauce/raketasks.rb",
46
- "lib/sauce/selenium.rb",
47
- "lib/sauce/tunnel.rb",
48
- "lib/sauce/utilities.rb",
49
- "sauce.gemspec",
50
- "support/sauce_connect",
51
- "support/selenium-server.jar",
52
- "support/simplejson/LICENSE.txt",
53
- "support/simplejson/__init__.py",
54
- "support/simplejson/decoder.py",
55
- "support/simplejson/encoder.py",
56
- "support/simplejson/ordered_dict.py",
57
- "support/simplejson/scanner.py",
58
- "support/simplejson/tool.py",
59
- "test/helper.rb",
60
- "test/test_config.rb",
61
- "test/test_connect.rb",
62
- "test/test_jobs.rb",
63
- "test/test_selenium.rb",
64
- "test/test_tunnels.rb"
65
- ]
66
- s.homepage = %q{http://github.com/saucelabs/sauce}
67
- s.require_paths = ["lib"]
68
- s.rubygems_version = %q{1.3.7}
69
- s.summary = %q{Ruby access to Sauce Labs' features}
70
- s.test_files = [
71
- "examples/helper.rb",
72
- "examples/other_spec.rb",
73
- "examples/saucelabs_spec.rb",
74
- "examples/test_saucelabs.rb",
75
- "examples/test_saucelabs2.rb",
76
- "test/helper.rb",
77
- "test/test_config.rb",
78
- "test/test_connect.rb",
79
- "test/test_jobs.rb",
80
- "test/test_selenium.rb",
81
- "test/test_tunnels.rb"
82
- ]
83
-
84
- if s.respond_to? :specification_version then
85
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
86
- s.specification_version = 3
87
-
88
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
89
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
90
- s.add_runtime_dependency(%q<rest-client>, [">= 0"])
91
- s.add_runtime_dependency(%q<net-ssh>, [">= 0"])
92
- s.add_runtime_dependency(%q<net-ssh-gateway>, [">= 0"])
93
- s.add_runtime_dependency(%q<selenium-client>, [">= 1.2.18"])
94
- s.add_runtime_dependency(%q<json>, [">= 1.4.6"])
95
- s.add_runtime_dependency(%q<cmdparse>, [">= 2.0.2"])
96
- s.add_runtime_dependency(%q<highline>, [">= 1.5.0"])
97
- else
98
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
99
- s.add_dependency(%q<rest-client>, [">= 0"])
100
- s.add_dependency(%q<net-ssh>, [">= 0"])
101
- s.add_dependency(%q<net-ssh-gateway>, [">= 0"])
102
- s.add_dependency(%q<selenium-client>, [">= 1.2.18"])
103
- s.add_dependency(%q<json>, [">= 1.4.6"])
104
- s.add_dependency(%q<cmdparse>, [">= 2.0.2"])
105
- s.add_dependency(%q<highline>, [">= 1.5.0"])
106
- end
107
- else
108
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
109
- s.add_dependency(%q<rest-client>, [">= 0"])
110
- s.add_dependency(%q<net-ssh>, [">= 0"])
111
- s.add_dependency(%q<net-ssh-gateway>, [">= 0"])
112
- s.add_dependency(%q<selenium-client>, [">= 1.2.18"])
113
- s.add_dependency(%q<json>, [">= 1.4.6"])
114
- s.add_dependency(%q<cmdparse>, [">= 2.0.2"])
115
- s.add_dependency(%q<highline>, [">= 1.5.0"])
116
- end
117
- end
118
-