crimson 0.1.1 → 0.1.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
  SHA256:
3
- metadata.gz: d0089dfdf0858ceff35c98db0799998355463be523a13420425294bee18c4a46
4
- data.tar.gz: 681a505d387641e482379284548cd6a5055017347792112f179a4c28a0637b8f
3
+ metadata.gz: 35177a021a41b1584fc359b754c07859c02ae15aa62c35444aed3d7a409dbf32
4
+ data.tar.gz: 8225513ef25eff279c047f5b04ce1be7aa5e6978389dcdb4f0fe16f4f64bafb9
5
5
  SHA512:
6
- metadata.gz: 40046a67b7b174c74d585715271278dae16ce786e3ed92c8458cb60ea4c05012cca716f18acf7998ced6a6b1d09ab25810e5747b5f6f95e495f371eb5cbbc8b6
7
- data.tar.gz: '0253249eeb2d990a0d88d154647566e4b69b480a8ca77bc37701f889ab9b7edf1b6be5f9c6a363ea64e6d034cae12ff4a587b4bbdef55f3fc21214dce7216e3d'
6
+ metadata.gz: ece0df90c676a10a6c927adae1cd62efa52013876f34655613687f67bb74ca908a47fd7bd69f3a77bdce88a2744a122d603dbf705d8f0bc575a5e990c89480bd
7
+ data.tar.gz: 748a7a5f94f2621f94f5811445d9003a7e306221ea3b8d7dbac7116dff943c988637de9dbd5c9ac6ac28532ef4ca0d71f85353a0f11e5e342589671913003946
@@ -28,6 +28,7 @@ module Crimson
28
28
 
29
29
  def write(message = {})
30
30
  connection.write(message)
31
+ connection.flush
31
32
  end
32
33
 
33
34
  def on_commit(object, changes)
@@ -25,10 +25,6 @@ module Crimson
25
25
  File.expand_path("#{__dir__}/../html/template.html")
26
26
  end
27
27
 
28
- def self.static
29
- { :urls => [File.expand_path("#{__dir__}/.."), File.expand_path("#{__dir__}/../javascript")] }
30
- end
31
-
32
28
  def content(port, path = Server.template_html_path)
33
29
  template = File.read(path)
34
30
  template.sub!("{PORT}", port)
@@ -55,10 +51,11 @@ module Crimson
55
51
  rescue Protocol::WebSocket::ClosedError
56
52
 
57
53
  end
54
+
55
+ connection.close
58
56
  ensure
59
57
  @on_disconnect&.call(client)
60
58
  clients.delete(connection)
61
- connection.close
62
59
  end
63
60
  end
64
61
 
@@ -1,3 +1,3 @@
1
1
  module Crimson
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crimson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rizwan Qureshi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-05 00:00:00.000000000 Z
11
+ date: 2020-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler