AmazonEchoJS 0.0.04 → 0.0.05
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.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/AmazonEchoJS/echo.rb +3 -3
- data/lib/AmazonEchoJS/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 724ee0447da402b9ce055d8e4c76b983baedeb3d
|
4
|
+
data.tar.gz: 0eb9f098c7a5f0e67b808ee16739772a4c0205bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6840063125e380858ffe66fee8d73add579c65ba215a61c9e7ee8fa0ac9e6b4096aff0d4807832ceb4c7fa5fd9519b3d78afd7a8c001bd0a4fdf264932efbccc
|
7
|
+
data.tar.gz: 4202a05ce4cbc5335ac824bdaaa5adb13ea33e247a981982b98177a4d11cf85b2fea5b4f5523ee7ddabc2b2708759df0e71a84e25748dbe9b43c8e173d64034a
|
data/README.md
CHANGED
@@ -26,7 +26,8 @@ to run echo_monitor you must provide the username, password, and callback url
|
|
26
26
|
|
27
27
|
## Thanks
|
28
28
|
|
29
|
-
Thanks to Zach
|
29
|
+
Thanks to Zach Feldman @zachfeldman for his original work with https://github.com/zachfeldman/alexa-home
|
30
|
+
Portions of code written by @zachfeldman
|
30
31
|
|
31
32
|
## Contributing
|
32
33
|
|
data/lib/AmazonEchoJS/echo.rb
CHANGED
@@ -30,7 +30,7 @@ module AmazonEchoJS
|
|
30
30
|
def keep_alive
|
31
31
|
while @running
|
32
32
|
begin
|
33
|
-
kill
|
33
|
+
#kill no need to kill browser, just refresh the page.
|
34
34
|
sleep(1)
|
35
35
|
open_browser
|
36
36
|
start_watcher
|
@@ -40,7 +40,7 @@ module AmazonEchoJS
|
|
40
40
|
ensure
|
41
41
|
kill
|
42
42
|
puts "Killed browser."
|
43
|
-
|
43
|
+
#@running = false #keep running even if error encountered.
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -52,7 +52,7 @@ module AmazonEchoJS
|
|
52
52
|
# capabilities = Selenium::WebDriver::Remote::Capabilities.phantomjs("phantomjs.page.settings.userAgent" => "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36")
|
53
53
|
# driver = Selenium::WebDriver.for :phantomjs, :desired_capabilities => capabilities
|
54
54
|
# @browser = Watir::Browser.new driver
|
55
|
-
@browser
|
55
|
+
@browser ||= Watir::Browser.new
|
56
56
|
@browser.goto ECHO_URL
|
57
57
|
Watir::Wait.until { waiting_to_load }
|
58
58
|
if @browser.url.match(/www\.amazon\.com\/ap\/signin/)
|
data/lib/AmazonEchoJS/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: AmazonEchoJS
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.05
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelly Mahan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|