bstack_wrapper 0.0.2 → 0.0.3
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/lib/user_account.rb +7 -4
- metadata +7 -21
data/lib/user_account.rb
CHANGED
@@ -45,7 +45,13 @@ class UserAccount
|
|
45
45
|
optional_params = []
|
46
46
|
options.reject! { |o| !required_params.include?(o) && !optional_params.include?(o) }
|
47
47
|
required_params.each { |param| raise Exception, "Parameter #{param} is required." if !options.include?(param) }
|
48
|
-
uri = "http://api.browserstack.com/3/worker
|
48
|
+
uri = "http://api.browserstack.com/3/worker/#{options["worker_id"]}"
|
49
|
+
response = get_from_browser_stack uri
|
50
|
+
return JSON.parse(response.body)
|
51
|
+
end
|
52
|
+
|
53
|
+
def get_api_status
|
54
|
+
uri = "http://api.browserstack.com/3/status"
|
49
55
|
response = get_from_browser_stack uri
|
50
56
|
return JSON.parse(response.body)
|
51
57
|
end
|
@@ -53,9 +59,6 @@ class UserAccount
|
|
53
59
|
|
54
60
|
private
|
55
61
|
def post_at_browser_stack uri, options
|
56
|
-
# puts options
|
57
|
-
# options = {"timeout"=>300, "name"=>"ship", "url"=>"shipdroid.com", "os"=>"OS X", "device"=>nil, "browser"=>"safari", "browser_version"=>"7.0", "os_version"=>"Mavericks"}
|
58
|
-
# uri = "http://api.browserstack.com/3/worker"
|
59
62
|
uri = URI.parse(uri)
|
60
63
|
http = Net::HTTP.new(uri.host, uri.port)
|
61
64
|
request = Net::HTTP::Post.new(uri.request_uri)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bstack_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 25
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mandy
|
@@ -17,22 +17,8 @@ cert_chain: []
|
|
17
17
|
|
18
18
|
date: 2014-08-14 00:00:00 +05:30
|
19
19
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
|
22
|
-
name:
|
23
|
-
- json
|
24
|
-
prerelease: false
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ">="
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
hash: 3
|
31
|
-
segments:
|
32
|
-
- 0
|
33
|
-
version: "0"
|
34
|
-
type: :runtime
|
35
|
-
version_requirements: *id001
|
20
|
+
dependencies: []
|
21
|
+
|
36
22
|
description: Browser stack wrapper!
|
37
23
|
email:
|
38
24
|
executables: []
|
@@ -74,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
60
|
requirements: []
|
75
61
|
|
76
62
|
rubyforge_project:
|
77
|
-
rubygems_version: 1.
|
63
|
+
rubygems_version: 1.3.7
|
78
64
|
signing_key:
|
79
65
|
specification_version: 3
|
80
66
|
summary: Browser stack wrapper!
|