lively 0.6.0 → 0.8.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: 5792cd3cb017762c79c0c8efcf99724db21dd444aa0e6e1f0c7f4f8e0e61774a
4
- data.tar.gz: 0275c27630c5e0af1408771737e9fa87276ce3b6e2f06de788eaa9e45d60a6a5
3
+ metadata.gz: 99d4fb34300531488905ed63ee31b0403581f2aac642f1fa668f54a62356ec86
4
+ data.tar.gz: ca21cf5420d9c54d9a0028c3eec47f3d368c8e29f7cfe94b45db385ac92072c5
5
5
  SHA512:
6
- metadata.gz: 3c0f91c91d6d25d138aa78332cfb9c51d4f5793f5134c059bed8d1b6d1dd4b327a70f3d8e47106a49965534157d58913952b60f7508e903b461d3e15d48381bb
7
- data.tar.gz: c4b7817e61109d157bb68c157e8c50590776db6c1eca1c4d7f65936339ba2d02da62f07dfc903cd939d8807231dc382e6b7f18702ef0096266b3bd458b25f4cd
6
+ metadata.gz: 1858b7db84ca777e8f5a760cf0388627e5af02a5d614243c92156446127f9977ac853341776f39a14bd7663416d84875c63431fbb1099fbbb387cd9898bc4652
7
+ data.tar.gz: 57483483bdb7ad81ff1cb210038700918de51254aa55f69af586195cd13d9a3f7cb0c00ef5bd05f3af6180ebc14632533a4fb148b3c53990d493b3277ed45ae7
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/lively/assets.rb CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  module Lively
7
7
  class Assets < Protocol::HTTP::Middleware
8
- DEFAULT_CACHE_CONTROL = 'public, max-age=3600'
8
+ DEFAULT_CACHE_CONTROL = 'no-store, no-cache, must-revalidate, max-age=0'
9
9
 
10
10
  DEFAULT_CONTENT_TYPES = {
11
11
  ".html" => "text/html",
@@ -13,6 +13,10 @@ module Lively
13
13
  module Application
14
14
  include Falcon::Environment::Server
15
15
 
16
+ def url
17
+ "http://localhost:9292"
18
+ end
19
+
16
20
  def application
17
21
  if Object.const_defined?(:Application)
18
22
  ::Application
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
6
  module Lively
7
- VERSION = "0.6.0"
7
+ VERSION = "0.8.0"
8
8
  end
@@ -108,7 +108,7 @@ export class Live {
108
108
  // Explicit disconnect will clear `this.#server`:
109
109
  if (this.#server && !this.#reconnectTimer) {
110
110
  // We need a minimum delay otherwise this can end up immediately invoking the callback:
111
- const delay = Math.max(100 * (this.#failures + 1) ** 2, 60000);
111
+ const delay = Math.min(100 * (this.#failures ** 2), 60000);
112
112
  this.#reconnectTimer = setTimeout(() => {
113
113
  this.#reconnectTimer = null;
114
114
  this.connect();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@socketry/live",
3
3
  "type": "module",
4
- "version": "0.13.0",
4
+ "version": "0.14.0",
5
5
  "description": "Live HTML tags for Ruby.",
6
6
  "main": "Live.js",
7
7
  "repository": {
data/readme.md CHANGED
@@ -1,16 +1,20 @@
1
1
  # Lively
2
2
 
3
- A high level framework for building live HTML applications with Ruby.
3
+ A Ruby framework for building interactive web applications for creative coding.
4
4
 
5
5
  [![Development Status](https://github.com/socketry/lively/workflows/Test/badge.svg)](https://github.com/socketry/lively/actions?workflow=Test)
6
6
 
7
- ## Features
7
+ ## Usage
8
8
 
9
- - Simple high level interface for server-side SPAs.
9
+ See the various examples in the `examples/` directory.
10
10
 
11
- ## Usage
11
+ ### Live Coding
12
+
13
+ You can use `entr` to reload the server when files change:
12
14
 
13
- See the example app in `app/`.
15
+ ``` bash
16
+ $ ls **/*.rb | entr -r bundle exec ./application.rb
17
+ ```
14
18
 
15
19
  ## Contributing
16
20
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lively
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -37,7 +37,7 @@ cert_chain:
37
37
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
38
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
39
  -----END CERTIFICATE-----
40
- date: 2024-05-06 00:00:00.000000000 Z
40
+ date: 2024-05-15 00:00:00.000000000 Z
41
41
  dependencies:
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: falcon
metadata.gz.sig CHANGED
Binary file