sauce 0.12.4 → 0.12.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,10 +6,10 @@ begin
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "sauce"
8
8
  gem.summary = "Ruby access to Sauce Labs' features"
9
- gem.description = "A ruby interface to Sauce Labs' services. Start/stop tunnels, retrieve Selenium logs, access video replays, etc."
9
+ gem.description = "A Ruby interface to Sauce Labs' services. Start/stop tunnels, retrieve Selenium logs, access video replays, etc."
10
10
  gem.email = "help@saucelabs.com"
11
11
  gem.homepage = "http://github.com/saucelabs/sauce"
12
- gem.authors = ["Sean Grove", "Eric Allen"]
12
+ gem.authors = ["Sean Grove", "Eric Allen", "Steven Hazel"]
13
13
  gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
14
14
  gem.add_runtime_dependency "rest-client", ">= 0"
15
15
  gem.add_runtime_dependency "net-ssh", ">= 0"
@@ -17,6 +17,7 @@ begin
17
17
  gem.add_runtime_dependency "selenium-client", ">= 1.2.18"
18
18
  gem.add_runtime_dependency "json", ">= 1.4.6"
19
19
  gem.add_runtime_dependency "cmdparse", ">= 2.0.2"
20
+ gem.add_runtime_dependency "highline", ">= 1.5.0"
20
21
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
21
22
  end
22
23
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.4
1
+ 0.12.5
data/bin/sauce CHANGED
@@ -4,6 +4,8 @@ require 'rubygems'
4
4
  require 'cmdparse'
5
5
  require 'yaml'
6
6
  require 'fileutils'
7
+ require 'json'
8
+ require 'highline/import'
7
9
 
8
10
  sauce_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
9
11
  $LOAD_PATH.unshift(sauce_dir) unless $LOAD_PATH.include?(sauce_dir)
@@ -25,7 +27,7 @@ else
25
27
  configure = CmdParse::Command.new('configure', false)
26
28
  configure.short_desc = "Configure Sauce OnDemand credentials"
27
29
  configure.set_execution_block do |args|
28
- if args.length < 2
30
+ if args.length < 2:
29
31
  puts "Usage: sauce configure USERNAME ACCESS_KEY"
30
32
  exit 1
31
33
  end
@@ -45,30 +47,34 @@ else
45
47
  create.short_desc = "Create a new Sauce OnDemand account"
46
48
  create.set_execution_block do |args|
47
49
  puts "Let's create a new account!"
48
- print "Username: "
49
- username = $stdin.gets.chomp
50
- print "password: "
51
- password = $stdin.gets.chomp
52
- print "password confirmation: "
53
- password_confirmation = $stdin.gets.chomp
54
- print "email: "
55
- email = $stdin.gets.chomp
56
- print "Full name: "
57
- name = $stdin.gets.chomp
50
+ username = ask("Username: ")
51
+ password = ask("Password: ") { |q| q.echo = "*" }
52
+ email = ask("Email: ")
53
+ name = ask("Full name: ")
58
54
 
59
- # TODO: Add error handling, of course
60
- result = RestClient.post "http://saucelabs.com/rest/v1/users",
61
- {
55
+ body = {
62
56
  :username => username,
63
57
  :password => password,
64
- :password_confirmation => password_confirmation,
65
58
  :email => email,
66
- :token => "c8eb3e2645005bcbbce7e2c208c6b7a71555d908",
67
- :name => name
68
- }.to_json,
69
- :content_type => :json, :accept => :json
59
+ :name => name,
60
+ :token => "c8eb3e2645005bcbbce7e2c208c6b7a71555d908"
61
+ }.to_json
70
62
 
71
- puts result.inspect
63
+ begin
64
+ result = RestClient.post("http://saucelabs.com/rest/v1/users",
65
+ body, :content_type => :json, :accept => :json)
66
+ rescue => e
67
+ begin
68
+ puts "ERROR: #{JSON.load(e.response)['errors']}"
69
+ rescue
70
+ puts "ERROR: #{e.response}"
71
+ end
72
+ else
73
+ result = JSON.load(result)
74
+
75
+ puts "Account #{username} created successfully."
76
+ puts "Your access key is: #{result['access_key']}"
77
+ end
72
78
  end
73
79
 
74
80
  cmd.add_command(create)
@@ -8,10 +8,6 @@ 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
-
15
11
  def setup_spec
16
12
  if File.directory? 'spec'
17
13
  empty_directory "spec/selenium"
data/sauce.gemspec ADDED
@@ -0,0 +1,118 @@
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.5"
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
+
metadata CHANGED
@@ -1,22 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauce
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 37
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 12
9
- - 4
10
- version: 0.12.4
9
+ - 5
10
+ version: 0.12.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Grove
14
14
  - Eric Allen
15
+ - Steven Hazel
15
16
  autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
19
 
19
- date: 2010-12-17 00:00:00 -08:00
20
+ date: 2011-01-15 00:00:00 -08:00
20
21
  default_executable: sauce
21
22
  dependencies:
22
23
  - !ruby/object:Gem::Dependency
@@ -123,7 +124,23 @@ dependencies:
123
124
  version: 2.0.2
124
125
  type: :runtime
125
126
  version_requirements: *id007
126
- description: A ruby interface to Sauce Labs' services. Start/stop tunnels, retrieve Selenium logs, access video replays, etc.
127
+ - !ruby/object:Gem::Dependency
128
+ name: highline
129
+ prerelease: false
130
+ requirement: &id008 !ruby/object:Gem::Requirement
131
+ none: false
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ hash: 3
136
+ segments:
137
+ - 1
138
+ - 5
139
+ - 0
140
+ version: 1.5.0
141
+ type: :runtime
142
+ version_requirements: *id008
143
+ description: A Ruby interface to Sauce Labs' services. Start/stop tunnels, retrieve Selenium logs, access video replays, etc.
127
144
  email: help@saucelabs.com
128
145
  executables:
129
146
  - sauce
@@ -134,7 +151,6 @@ extra_rdoc_files:
134
151
  - README.markdown
135
152
  files:
136
153
  - .document
137
- - .gitignore
138
154
  - LICENSE
139
155
  - README.markdown
140
156
  - Rakefile
@@ -161,6 +177,7 @@ files:
161
177
  - lib/sauce/selenium.rb
162
178
  - lib/sauce/tunnel.rb
163
179
  - lib/sauce/utilities.rb
180
+ - sauce.gemspec
164
181
  - support/sauce_connect
165
182
  - support/selenium-server.jar
166
183
  - support/simplejson/LICENSE.txt
@@ -181,8 +198,8 @@ homepage: http://github.com/saucelabs/sauce
181
198
  licenses: []
182
199
 
183
200
  post_install_message:
184
- rdoc_options:
185
- - --charset=UTF-8
201
+ rdoc_options: []
202
+
186
203
  require_paths:
187
204
  - lib
188
205
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -211,14 +228,14 @@ signing_key:
211
228
  specification_version: 3
212
229
  summary: Ruby access to Sauce Labs' features
213
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
214
236
  - test/helper.rb
215
237
  - test/test_config.rb
216
238
  - test/test_connect.rb
217
239
  - test/test_jobs.rb
218
240
  - test/test_selenium.rb
219
241
  - test/test_tunnels.rb
220
- - examples/helper.rb
221
- - examples/other_spec.rb
222
- - examples/saucelabs_spec.rb
223
- - examples/test_saucelabs.rb
224
- - examples/test_saucelabs2.rb
data/.gitignore DELETED
@@ -1,21 +0,0 @@
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