lively 0.10.1 → 0.11.0

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: 4c0e1519f98d19b80aa4383838e4677cc6bddb2130e500f90d79c2f29fea933c
4
- data.tar.gz: cf844eb1aea21773e6f3bc0d596e4bdb859fcff790a79ebab1e7576bee3c9794
3
+ metadata.gz: 39c0cab1f012ef1adc64dcdb197017f93fe45eed7f81a32b57ce102fc537ee75
4
+ data.tar.gz: d5309edbd47e795ecbde9cd34c1d23d8826a6f5ccba4bc79a8b3661077e8ef97
5
5
  SHA512:
6
- metadata.gz: 347987c6c18cc948b26fe54455d2b545dfc6ca96d7750c03e601903b56c26ecbbd2019442f0ec964bd6b0aa1a99946f82c4219b281103badb7709f879c65322e
7
- data.tar.gz: b306bf1721b8526dc55229c82fa2cc49b9c884d87e62cde51c2eeeafca8bd65d6fca9e4935c19e7d969ba2899f3b8a1674169ac6127674b945becba1d25be45a
6
+ metadata.gz: 6b672c594ae520e4a44985350ec393fca0074d581e7d2160c2ee03b12265b1aee1d59be3c26ce82038cd64c517673fe094844fd24a74922ecf26af380762c93b
7
+ data.tar.gz: '0483d26396b0062b3c40fd141e2827d089f805bc600fc1357f777ecaf220a4c7358dc8dd664dd7f6dcf6bd6c50107f16673bfd2f84564aeaf99214781d4a972e'
checksums.yaml.gz.sig CHANGED
Binary file
data/bin/lively CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require 'async/service'
4
- require_relative '../lib/lively/environment/application'
4
+ require "async/service"
5
+ require_relative "../lib/lively/environment/application"
5
6
 
6
7
  ARGV.each do |path|
7
8
  require(path)
@@ -3,12 +3,12 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
- require 'live'
7
- require 'protocol/http/middleware'
8
- require 'async/websocket/adapters/http'
6
+ require "live"
7
+ require "protocol/http/middleware"
8
+ require "async/websocket/adapters/http"
9
9
 
10
- require_relative 'pages/index'
11
- require_relative 'hello_world'
10
+ require_relative "pages/index"
11
+ require_relative "hello_world"
12
12
 
13
13
  module Lively
14
14
  class Application < Protocol::HTTP::Middleware
@@ -57,7 +57,7 @@ module Lively
57
57
  end
58
58
 
59
59
  def call(request)
60
- if request.path == '/live'
60
+ if request.path == "/live"
61
61
  return Async::WebSocket::Adapters::HTTP.open(request, &self.method(:live)) || Protocol::HTTP::Response[400]
62
62
  else
63
63
  return handle(request)
data/lib/lively/assets.rb CHANGED
@@ -1,14 +1,14 @@
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-2025, by Samuel Williams.
5
5
 
6
- require 'protocol/http/middleware'
7
- require 'protocol/http/body/file'
6
+ require "protocol/http/middleware"
7
+ require "protocol/http/body/file"
8
8
 
9
9
  module Lively
10
10
  class Assets < Protocol::HTTP::Middleware
11
- DEFAULT_CACHE_CONTROL = 'no-store, no-cache, must-revalidate, max-age=0'
11
+ DEFAULT_CACHE_CONTROL = "no-store, no-cache, must-revalidate, max-age=0"
12
12
 
13
13
  DEFAULT_CONTENT_TYPES = {
14
14
  ".html" => "text/html",
@@ -18,9 +18,10 @@ module Lively
18
18
  ".jpeg" => "image/jpeg",
19
19
  ".gif" => "image/gif",
20
20
  ".mp3" => "audio/mpeg",
21
+ ".wav" => "audio/wav",
21
22
  }
22
23
 
23
- PUBLIC_ROOT = File.expand_path('../../public', __dir__)
24
+ PUBLIC_ROOT = File.expand_path("../../public", __dir__)
24
25
 
25
26
  def initialize(delegate, root: PUBLIC_ROOT, content_types: DEFAULT_CONTENT_TYPES, cache_control: DEFAULT_CACHE_CONTROL)
26
27
  super(delegate)
@@ -43,8 +44,8 @@ module Lively
43
44
 
44
45
  def response_for(path, content_type)
45
46
  headers = [
46
- ['content-type', content_type],
47
- ['cache-control', @cache_control],
47
+ ["content-type", content_type],
48
+ ["cache-control", @cache_control],
48
49
  ]
49
50
 
50
51
  return Protocol::HTTP::Response[200, headers, Protocol::HTTP::Body::File.open(path)]
@@ -3,10 +3,10 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
- require_relative '../application'
7
- require_relative '../assets'
6
+ require_relative "../application"
7
+ require_relative "../assets"
8
8
 
9
- require 'falcon/environment/server'
9
+ require "falcon/environment/server"
10
10
 
11
11
  module Lively
12
12
  module Environment
@@ -32,8 +32,8 @@ module Lively
32
32
 
33
33
  def middleware
34
34
  ::Protocol::HTTP::Middleware.build do |builder|
35
- builder.use Lively::Assets, root: File.expand_path('public', self.root)
36
- builder.use Lively::Assets, root: File.expand_path('../../../public', __dir__)
35
+ builder.use Lively::Assets, root: File.expand_path("public", self.root)
36
+ builder.use Lively::Assets, root: File.expand_path("../../../public", __dir__)
37
37
  builder.use self.application
38
38
  end
39
39
  end
@@ -1,3 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2024-2025, by Samuel Williams.
5
+
1
6
  module Lively
2
7
  class HelloWorld < Live::View
3
8
  def initialize(...)
@@ -3,7 +3,7 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
- require 'xrb/template'
6
+ require "xrb/template"
7
7
 
8
8
  module Lively
9
9
  module Pages
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
6
  module Lively
7
- VERSION = "0.10.1"
7
+ VERSION = "0.11.0"
8
8
  end
data/lib/lively.rb CHANGED
@@ -3,9 +3,9 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
- require_relative 'lively/version'
6
+ require_relative "lively/version"
7
7
 
8
- require_relative 'lively/assets'
9
- require_relative 'lively/application'
8
+ require_relative "lively/assets"
9
+ require_relative "lively/application"
10
10
 
11
- require_relative 'lively/environment/application'
11
+ require_relative "lively/environment/application"
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2021-2024, by Samuel Williams.
3
+ Copyright, 2021-2025, by Samuel Williams.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -28,11 +28,11 @@ We welcome contributions to this project.
28
28
 
29
29
  ### Developer Certificate of Origin
30
30
 
31
- This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
31
+ 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.
32
32
 
33
- ### Contributor Covenant
33
+ ### Community Guidelines
34
34
 
35
- This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
35
+ 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.
36
36
 
37
37
  ## See Also
38
38
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lively
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain:
11
10
  - |
@@ -37,7 +36,7 @@ cert_chain:
37
36
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
37
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
38
  -----END CERTIFICATE-----
40
- date: 2024-07-14 00:00:00.000000000 Z
39
+ date: 2025-05-08 00:00:00.000000000 Z
41
40
  dependencies:
42
41
  - !ruby/object:Gem::Dependency
43
42
  name: falcon
@@ -59,14 +58,14 @@ dependencies:
59
58
  requirements:
60
59
  - - "~>"
61
60
  - !ruby/object:Gem::Version
62
- version: '0.9'
61
+ version: '0.17'
63
62
  type: :runtime
64
63
  prerelease: false
65
64
  version_requirements: !ruby/object:Gem::Requirement
66
65
  requirements:
67
66
  - - "~>"
68
67
  - !ruby/object:Gem::Version
69
- version: '0.9'
68
+ version: '0.17'
70
69
  - !ruby/object:Gem::Dependency
71
70
  name: xrb
72
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,8 +80,6 @@ dependencies:
81
80
  - - ">="
82
81
  - !ruby/object:Gem::Version
83
82
  version: '0'
84
- description:
85
- email:
86
83
  executables:
87
84
  - lively
88
85
  extensions: []
@@ -118,7 +115,6 @@ licenses:
118
115
  metadata:
119
116
  documentation_uri: https://socketry.github.io/lively/
120
117
  source_code_uri: https://github.com/socketry/lively.git
121
- post_install_message:
122
118
  rdoc_options: []
123
119
  require_paths:
124
120
  - lib
@@ -126,15 +122,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
122
  requirements:
127
123
  - - ">="
128
124
  - !ruby/object:Gem::Version
129
- version: '3.1'
125
+ version: '3.2'
130
126
  required_rubygems_version: !ruby/object:Gem::Requirement
131
127
  requirements:
132
128
  - - ">="
133
129
  - !ruby/object:Gem::Version
134
130
  version: '0'
135
131
  requirements: []
136
- rubygems_version: 3.5.11
137
- signing_key:
132
+ rubygems_version: 3.6.2
138
133
  specification_version: 4
139
134
  summary: A simple client-server SPA framework.
140
135
  test_files: []
metadata.gz.sig CHANGED
Binary file