live 0.17.0 → 0.18.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e821b6c491dfd6033b870fa426fd43b0e0e14c3bb19d9a77796d991f3263c84
4
- data.tar.gz: 529f78570c91e31ba58ad95651a534586c630e4f1cfd46fef05070bf544b161a
3
+ metadata.gz: e03f037493e99c9b309201c8f658f3f4bdd1dfc2516498a13202f157e7f73211
4
+ data.tar.gz: 37b81f8c41e3115724de8bb4e836ff4b8dcd26741920ec8cee4c0e7331781b8a
5
5
  SHA512:
6
- metadata.gz: 174e05351add100c37874f34e0527c331886c13a02144d98a558d51e48758f425403cd4855b43d0e801d006b8d27e9e73fa0df15bda1c2501cb500be013a87d1
7
- data.tar.gz: eff442c283edf136bb43ee8fa0b5ce398fbb608a5f28ccc16fc9fcbe15be5d9b4cb5349835e6897e6002d312b99a0f95bc3f5ec604d1e01a28fa965c3c9de3b6
6
+ metadata.gz: 356991404963632fb53677321ab6b3b89395891916cc6485106bc8f8c8de42fe1be56d2c69dddb441cb94943ac19b1fe3d3382ee8ebb0a5c50c9cc57a3778858
7
+ data.tar.gz: 7a04b36d8ef732f273b3f41e6df786a405697b9866a1e97ad2c28c2ac8f0f92fea807d12364d5a686bf0dfaaa0b9ee2d7036330a003bedd855b6033f60d0deef
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/live/element.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2024, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
5
 
6
6
  require "json"
7
7
  require "securerandom"
@@ -145,7 +145,7 @@ module Live
145
145
  end
146
146
 
147
147
  def dispatch_event(selector, type, **options)
148
- rpc(:dispatch_event, selector, event, options)
148
+ rpc(:dispatch_event, selector, type, options)
149
149
  end
150
150
 
151
151
  # Render the element.
data/lib/live/version.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2024, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
5
 
6
6
  module Live
7
- VERSION = "0.17.0"
7
+ VERSION = "0.18.1"
8
8
  end
data/lib/live/view.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2024, by Samuel Williams.
4
+ # Copyright, 2021-2026, by Samuel Williams.
5
5
 
6
6
  require_relative "element"
7
7
  require "xrb/builder"
@@ -9,9 +9,13 @@ require "xrb/builder"
9
9
  module Live
10
10
  # Represents a single division of content on the page an provides helpers for rendering the content.
11
11
  class View < Element
12
+ def tag_name
13
+ "live-view"
14
+ end
15
+
12
16
  # @returns [Object] The generated HTML.
13
17
  def build_markup(builder)
14
- builder.inline_tag :div, id: @id, class: "live", data: @data do
18
+ builder.inline_tag self.tag_name, id: @id, data: @data do
15
19
  render(builder)
16
20
  end
17
21
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2021-2024, by Samuel Williams.
3
+ Copyright, 2021-2026, by Samuel Williams.
4
4
  Copyright, 2023, by Olle Jonsson.
5
5
  Copyright, 2024, by Tatsuhiro Ujihisa.
6
6
 
data/readme.md CHANGED
@@ -28,6 +28,32 @@ We welcome contributions to this project.
28
28
  4. Push to the branch (`git push origin my-new-feature`).
29
29
  5. Create new Pull Request.
30
30
 
31
+ ### Running Tests
32
+
33
+ To run the test suite:
34
+
35
+ ``` shell
36
+ bundle exec sus
37
+ ```
38
+
39
+ ### Making Releases
40
+
41
+ Please see the [project releases](https://socketry.github.io/live/releases/index) for all releases.
42
+
43
+ ### v0.18.0
44
+
45
+ - **Breaking Change**: Live now uses Web Components for managing life-cycle events instead of observers. You will need to use `live-js` v0.16.0 or later with this version of `live`, which emits `<live-view>` elements (instead of `<div>` elements).
46
+ - Using older versions of `live-js` with this version of `live` may result in unexpected behavior or errors.
47
+ - Using older versions of `live` with `live-js` v0.16.0 or later may also result in unexpected behavior or errors.
48
+ - Updating both `live` and `live-js` to their latest versions is recommended to ensure compatibility, and requires no changes to application code.
49
+
50
+ ### v0.18.0
51
+
52
+ - **Breaking Change**: Live now uses Web Components for managing life-cycle events instead of observers. You will need to use `live-js` v0.16.0 or later with this version of `live`, which emits `<live-view>` elements (instead of `<div>` elements).
53
+ - Using older versions of `live-js` with this version of `live` may result in unexpected behavior or errors.
54
+ - Using older versions of `live` with `live-js` v0.16.0 or later may also result in unexpected behavior or errors.
55
+ - Updating both `live` and `live-js` to their latest versions is recommended to ensure compatibility, and requires no changes to application code.
56
+
31
57
  ### Developer Certificate of Origin
32
58
 
33
59
  In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
@@ -36,6 +62,17 @@ In order to protect users of this project, we require all contributors to comply
36
62
 
37
63
  This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
38
64
 
65
+ ## Releases
66
+
67
+ Please see the [project releases](https://socketry.github.io/live/releases/index) for all releases.
68
+
69
+ ### v0.18.0
70
+
71
+ - **Breaking Change**: Live now uses Web Components for managing life-cycle events instead of observers. You will need to use `live-js` v0.16.0 or later with this version of `live`, which emits `<live-view>` elements (instead of `<div>` elements).
72
+ - Using older versions of `live-js` with this version of `live` may result in unexpected behavior or errors.
73
+ - Using older versions of `live` with `live-js` v0.16.0 or later may also result in unexpected behavior or errors.
74
+ - Updating both `live` and `live-js` to their latest versions is recommended to ensure compatibility, and requires no changes to application code.
75
+
39
76
  ## See Also
40
77
 
41
78
  - [live-js](https://github.com/socketry/live-js) – The client-side JavaScript library.
data/releases.md ADDED
@@ -0,0 +1,8 @@
1
+ # Releases
2
+
3
+ ## v0.18.0
4
+
5
+ - **Breaking Change**: Live now uses Web Components for managing life-cycle events instead of observers. You will need to use `live-js` v0.16.0 or later with this version of `live`, which emits `<live-view>` elements (instead of `<div>` elements).
6
+ - Using older versions of `live-js` with this version of `live` may result in unexpected behavior or errors.
7
+ - Using older versions of `live` with `live-js` v0.16.0 or later may also result in unexpected behavior or errors.
8
+ - Updating both `live` and `live-js` to their latest versions is recommended to ensure compatibility, and requires no changes to application code.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: live
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  - Olle Jonsson
9
9
  - Tatsuhiro Ujihisa
10
- autorequire:
11
10
  bindir: bin
12
11
  cert_chain:
13
12
  - |
@@ -39,7 +38,7 @@ cert_chain:
39
38
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
40
39
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
41
40
  -----END CERTIFICATE-----
42
- date: 2024-11-24 00:00:00.000000000 Z
41
+ date: 1980-01-02 00:00:00.000000000 Z
43
42
  dependencies:
44
43
  - !ruby/object:Gem::Dependency
45
44
  name: async-websocket
@@ -83,8 +82,6 @@ dependencies:
83
82
  - - "~>"
84
83
  - !ruby/object:Gem::Version
85
84
  version: '0.10'
86
- description:
87
- email:
88
85
  executables: []
89
86
  extensions: []
90
87
  extra_rdoc_files: []
@@ -97,13 +94,13 @@ files:
97
94
  - lib/live/view.rb
98
95
  - license.md
99
96
  - readme.md
97
+ - releases.md
100
98
  homepage: https://github.com/socketry/live
101
99
  licenses:
102
100
  - MIT
103
101
  metadata:
104
102
  documentation_uri: https://socketry.github.io/live/
105
103
  source_code_uri: https://github.com/socketry/live.git
106
- post_install_message:
107
104
  rdoc_options: []
108
105
  require_paths:
109
106
  - lib
@@ -111,15 +108,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
108
  requirements:
112
109
  - - ">="
113
110
  - !ruby/object:Gem::Version
114
- version: '3.1'
111
+ version: '3.3'
115
112
  required_rubygems_version: !ruby/object:Gem::Requirement
116
113
  requirements:
117
114
  - - ">="
118
115
  - !ruby/object:Gem::Version
119
116
  version: '0'
120
117
  requirements: []
121
- rubygems_version: 3.5.22
122
- signing_key:
118
+ rubygems_version: 4.0.6
123
119
  specification_version: 4
124
120
  summary: Live HTML tags updated via a WebSocket.
125
121
  test_files: []
metadata.gz.sig CHANGED
Binary file