lively 0.11.0 → 0.13.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/context/getting-started.md +77 -0
- data/context/index.yaml +16 -0
- data/context/worms-tutorial.md +842 -0
- data/lib/lively/application.rb +38 -0
- data/lib/lively/assets.rb +66 -14
- data/lib/lively/environment/application.rb +20 -5
- data/lib/lively/hello_world.rb +16 -0
- data/lib/lively/pages/index.rb +19 -1
- data/lib/lively/pages/index.xrb +2 -4
- data/lib/lively/version.rb +3 -2
- data/public/_components/@socketry/live/Live.js +42 -48
- data/public/_components/@socketry/live/package.json +4 -1
- data/public/_components/@socketry/live/readme.md +147 -31
- data/public/_components/@socketry/live-audio/Live/Audio/Controller.js +168 -0
- data/public/_components/@socketry/live-audio/Live/Audio/Library.js +748 -0
- data/public/_components/@socketry/live-audio/Live/Audio/Output.js +87 -0
- data/public/_components/@socketry/live-audio/Live/Audio/Sound.js +34 -0
- data/public/_components/@socketry/live-audio/Live/Audio/Visualizer.js +265 -0
- data/public/_components/@socketry/live-audio/Live/Audio.js +24 -0
- data/public/_components/@socketry/live-audio/package.json +35 -0
- data/public/_components/@socketry/live-audio/readme.md +250 -0
- data/public/application.js +4 -0
- data/readme.md +3 -7
- data.tar.gz.sig +0 -0
- metadata +15 -4
- metadata.gz.sig +0 -0
- data/public/_components/@socketry/live/test/Live.js +0 -357
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de5825bdffb0c6db7ba03f20137602787e927eada6835b2391baa6618be733ae
|
|
4
|
+
data.tar.gz: b26947450326f69eeb142d4088feedabf56328420df485d758ebeac8bc98f814
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 055545fee2f0b6843be7ba956af7b142db8ab06e12012f30a358a16ee919c71ac91362450cb0a92475a7359b00218c025a2f7f63c78ec4a44256a91be28ecf75
|
|
7
|
+
data.tar.gz: e367a553e43123cb86d726a2223a58abed8db9de9f8c0db5dcd09c3b8f6e1ad850f747f2d200bc504fe3417efa66ed12d8fec542878a7af9db778d2980d2cff0
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Getting Started
|
|
2
|
+
|
|
3
|
+
This guide will help you get started with Lively, a framework for building real-time applications in Ruby.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
To install Lively, you can use the following command:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
$ gem install lively
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
Create a new directory for your Lively application:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
$ mkdir my_lively_app
|
|
19
|
+
$ cd my_lively_app
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then create a `gems.rb` file in your project directory:
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
source "https://rubygems.org"
|
|
26
|
+
gem "lively"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Next, run `bundle install` to install the Lively gem:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
$ bundle install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Create an `application.rb` file in your project directory:
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
#!/usr/bin/env lively
|
|
39
|
+
|
|
40
|
+
class HelloWorldView < Live::View
|
|
41
|
+
def bind(page)
|
|
42
|
+
super
|
|
43
|
+
self.update!
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def render(builder)
|
|
47
|
+
builder.tag(:p) do
|
|
48
|
+
builder.text("Hello World!")
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
Application = Lively::Application[HelloWorldView]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Now you can run your Lively application:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
$ chmod +x application.rb
|
|
60
|
+
$ ./application.rb
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
You should see "Hello World!" displayed in your browser.
|
|
64
|
+
|
|
65
|
+
## Live Reloading
|
|
66
|
+
|
|
67
|
+
To enable live reloading, add the `io-watch` gem to your `gems.rb` file:
|
|
68
|
+
|
|
69
|
+
```ruby
|
|
70
|
+
gem "io-watch"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Then run:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
$ io-watch . -- ./application.rb
|
|
77
|
+
```
|
data/context/index.yaml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Automatically generated context index for Utopia::Project guides.
|
|
2
|
+
# Do not edit then files in this directory directly, instead edit the guides and then run `bake utopia:project:agent:context:update`.
|
|
3
|
+
---
|
|
4
|
+
description: A simple client-server SPA framework.
|
|
5
|
+
metadata:
|
|
6
|
+
documentation_uri: https://socketry.github.io/lively/
|
|
7
|
+
source_code_uri: https://github.com/socketry/lively.git
|
|
8
|
+
files:
|
|
9
|
+
- path: getting-started.md
|
|
10
|
+
title: Getting Started
|
|
11
|
+
description: This guide will help you get started with Lively, a framework for building
|
|
12
|
+
real-time applications in Ruby.
|
|
13
|
+
- path: worms-tutorial.md
|
|
14
|
+
title: Building a Worms Game with Lively
|
|
15
|
+
description: This tutorial will guide you through creating a Worms-style game using
|
|
16
|
+
Lively, a Ruby framework for building real-time applications.
|