flammarion_rails 0.2.6 → 0.2.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.
- checksums.yaml +4 -4
- data/lib/flammarion/engraving.rb +2 -7
- data/lib/flammarion/revelator.rb +2 -2
- data/lib/flammarion_rails/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: 3aa363f05db0c6968af7ac03b5f15da22460ba1b
|
4
|
+
data.tar.gz: 751151fe862bf39fcc73c23d6c8e713ff7e8bd0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3689e410958d20f7f4eaeed8778d60e90ef21c90e46b0d494c91ede89c933e1327b394ec8a62e5587aeb5fc866dff41ab1369c974eedd9b86c54a6b5edd05720
|
7
|
+
data.tar.gz: 5db0e01f807778c4b4253210a83a69461fcf112d5c8d6556108dc62aca219c4a9ca51b0886efaaea99d9a5e3983ae4415dc4a0e4a6b91150a513387578fb1bd0
|
data/lib/flammarion/engraving.rb
CHANGED
@@ -22,8 +22,8 @@ module Flammarion
|
|
22
22
|
|
23
23
|
start_server
|
24
24
|
@window_id = @@server.register_window(self)
|
25
|
-
open_a_window(options)
|
26
|
-
wait_for_a_connection
|
25
|
+
open_a_window(options)
|
26
|
+
wait_for_a_connection(options)
|
27
27
|
end
|
28
28
|
|
29
29
|
# Blocks the current thread until the window has been closed. All user
|
@@ -112,10 +112,6 @@ module Flammarion
|
|
112
112
|
end
|
113
113
|
|
114
114
|
def render(body)
|
115
|
-
if @sockets.empty?
|
116
|
-
open_a_window
|
117
|
-
wait_for_a_connection
|
118
|
-
end
|
119
115
|
if body.is_a? Hash
|
120
116
|
body = body.to_json
|
121
117
|
else
|
@@ -124,7 +120,6 @@ module Flammarion
|
|
124
120
|
@sockets.each do |ws|
|
125
121
|
ws.send_data(body, binary)
|
126
122
|
end
|
127
|
-
nil
|
128
123
|
end
|
129
124
|
|
130
125
|
def parse_nested_query(query)
|
data/lib/flammarion/revelator.rb
CHANGED
@@ -20,8 +20,8 @@ module Flammarion
|
|
20
20
|
raise SetupError.new("You must have google-chrome installed and accesible via your path.") unless @browser
|
21
21
|
end
|
22
22
|
|
23
|
-
def wait_for_a_connection
|
24
|
-
Timeout.timeout(
|
23
|
+
def wait_for_a_connection(options)
|
24
|
+
Timeout.timeout(options[:wait] || 20) { sleep 0.5 while @sockets.empty? }
|
25
25
|
rescue Timeout::Error
|
26
26
|
raise SetupError.new("Timed out while waiting for a connecting using #{@browser.name}.")
|
27
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flammarion_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrice Lebel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|