google_hangout 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95d5b7d01ff868312be223eb2ba210d6e00feb07
4
- data.tar.gz: 8f793861e6d55a104659fa1c52834f766f11ee30
3
+ metadata.gz: 95b453b6e8500ae312cc21dc28674f8232f2023e
4
+ data.tar.gz: 3c446e63036f1fe3d052e966b32f59b60ca844d0
5
5
  SHA512:
6
- metadata.gz: 8d0afa6735612597876b186ddfc1dcb37bb4de22d93f558c8a32186145fbe57462a2b9aab468f8990478c5bb932c86830f4c2f26f7ccacf02213744fd1e2460a
7
- data.tar.gz: 4cc50b6f2c0c9842c1acf7ab1f6faf521206df607a74a7228972d4a4d56e976781d1a2fdb9954a38b8a49129782cbd9899dafc6cd822ca2566b66b1b0972316b
6
+ metadata.gz: 4ad41192e450d71449ced66ac7a535533e6a826a6d2d5a2cb05774d716918ca554aaef606bccbddd6945638c240618c93b5d09a18c483632c5cf0c74f2a9fcf5
7
+ data.tar.gz: 94a95690f212d365bb18741fa3682d9a0125f73e9e995511366fb82b3a879aafc8bb671920a0e6cbbab89a4df89feee2da9d69bf191b016f048cd11061f07aa2
@@ -28,11 +28,33 @@ module GoogleHangout
28
28
  # Make it full screen
29
29
  `osascript -e 'tell application "System Events" to keystroke "f" using {command down, control down}'`
30
30
 
31
- # TODO: Fire off new thread to poll and check if we've gotten logged out?
31
+ # Check for various error conditions and get back into the chat if necessary
32
+ thread = Thread.new(page) do |main_page|
33
+ while true do
34
+ if main_page.body.match /Are you still there?/
35
+ main_page.find('div[role="button"]', :text => 'Yes').click
36
+ end
37
+
38
+ if main_page.body.match /The video call ended because of an error/
39
+ main_page.find('div[role="button"]', :text => 'Try Again').click
40
+ main_page.find('div[role="button"]', :text => 'Join').click
41
+ end
42
+
43
+ if main_page.body.match /You left the video call/
44
+ main_page.visit hangout_url
45
+ main_page.find('div[role="button"]', :text => 'Join').click
46
+ end
47
+
48
+ sleep 5
49
+ end
50
+ end
32
51
 
33
52
  # Wait for some input so script doesn't exit
34
53
  puts "Press Return to quit"
35
54
  STDIN.gets
55
+
56
+ # Clean up
57
+ thread.kill
36
58
  end
37
59
  end
38
60
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleHangout
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_hangout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon Miller-Out
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-03 00:00:00.000000000 Z
11
+ date: 2013-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler