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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39c0cab1f012ef1adc64dcdb197017f93fe45eed7f81a32b57ce102fc537ee75
4
- data.tar.gz: d5309edbd47e795ecbde9cd34c1d23d8826a6f5ccba4bc79a8b3661077e8ef97
3
+ metadata.gz: de5825bdffb0c6db7ba03f20137602787e927eada6835b2391baa6618be733ae
4
+ data.tar.gz: b26947450326f69eeb142d4088feedabf56328420df485d758ebeac8bc98f814
5
5
  SHA512:
6
- metadata.gz: 6b672c594ae520e4a44985350ec393fca0074d581e7d2160c2ee03b12265b1aee1d59be3c26ce82038cd64c517673fe094844fd24a74922ecf26af380762c93b
7
- data.tar.gz: '0483d26396b0062b3c40fd141e2827d089f805bc600fc1357f777ecaf220a4c7358dc8dd664dd7f6dcf6bd6c50107f16673bfd2f84564aeaf99214781d4a972e'
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
+ ```
@@ -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.