live 0.3.0 → 0.4.0

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: a836ae392c3fb38c18c6317e94786d0ad943d01afe1486026333148531bb681b
4
- data.tar.gz: e5f9ecb4911b74fbecad809d068d8a076d8cd4d93c8d015f9d709ccb737c5b76
3
+ metadata.gz: 53a3a21f8a7de949ee8da7c7a0fe6dce23d96312a067319ffcabba644265353b
4
+ data.tar.gz: 178c8cc94c77b80f030367995fdc409e583bdff9687c0bbb1355c70548f86e7e
5
5
  SHA512:
6
- metadata.gz: b896681bad42c651744baaef703204ef112e226446ce3ca530453f4247053f0dde771897d898a45b0a2c5ff64e3291e0e1a856d8e05041dcc5424d28e093aed1
7
- data.tar.gz: bb53aa53e263bcbc03ae22dc8280c21cdc388e261430ac9e70533f6a551a360341bbffa255a0271cc1e88cd4d7c1d2757b185fd057b75d0e224920d2205d74ff
6
+ metadata.gz: 70a8976aac2a661c412f98a08aa7b310faf56438053ae2661739d90c241a989b4fbfd7ed01d03c4d8e1df390cb8e4243e7c3beeff5ba8edf0d7a59c4b1007da3
7
+ data.tar.gz: e502e8cd52a9dc0509746e877ba3810d9544e514e9b83819870d12417311b7b114be15be845ea2fb169cc4b11cf144a68274e017009bf4af628cf575f5349b17
data/lib/live/element.rb CHANGED
@@ -60,8 +60,7 @@ module Live
60
60
 
61
61
  # Handle a client event, typically as triggered by {#forward}.
62
62
  # @parameter event [String] The type of the event.
63
- # @parameter details [Hash] The associated details if any.
64
- def handle(event, details = nil)
63
+ def handle(event)
65
64
  end
66
65
 
67
66
  # Enqueue a remote procedure call to the currently bound page.
data/lib/live/page.rb CHANGED
@@ -61,9 +61,9 @@ module Live
61
61
  # @parameter details [Hash] The associated details if any.
62
62
  # @returns [Object] The result of the element handler, if the element was found.
63
63
  # @returns [Nil] If the element could not be found.
64
- def handle(id, event, details)
64
+ def handle(id, event)
65
65
  if element = @elements[id]
66
- return element.handle(event, details)
66
+ return element.handle(event)
67
67
  else
68
68
  Console.logger.warn(self, "Could not handle event:", event, details)
69
69
  end
@@ -99,7 +99,7 @@ module Live
99
99
  Console.logger.warn(self, "Could not resolve element:", message)
100
100
  end
101
101
  elsif id = message[:id]
102
- self.handle(id, message[:event], message[:details])
102
+ self.handle(id, message[:event])
103
103
  else
104
104
  Console.logger.warn(self, "Unhandled message:", message)
105
105
  end
data/lib/live/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Live
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: live
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-13 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trenni
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.2.3
128
+ rubygems_version: 3.2.15
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Live HTML tags updated via a WebSocket.