ruflet_cli 0.0.5 → 0.0.6
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
- data/lib/ruflet/cli/templates.rb +29 -45
- data/lib/ruflet/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 716c849e84715c603f30e6ad789cdf3d8d0dc3ef4be40a436af77546dde1d629
|
|
4
|
+
data.tar.gz: 765cf04a191c9e915b43ef525d1a21f6d42a7226a36db9d47b490117392a2a9d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 239d1dc8d36a8db268eaf17e0c6aed617ae786a59c09dc8c12f2b7d1c15ec3778d8bceff8f57fd51973f0da7be015013b8cb936d39ed566aed099c88739d18eb
|
|
7
|
+
data.tar.gz: 24be0703279d8cda99245929f7fdd4975e278a1d9768fd46785701c1aa5a478f8c7fd3b9f73b3ebf6be9f5b08cbadac582880213102709fb8c5d9b66ee91926d
|
data/lib/ruflet/cli/templates.rb
CHANGED
|
@@ -3,58 +3,42 @@
|
|
|
3
3
|
module Ruflet
|
|
4
4
|
module CLI
|
|
5
5
|
MAIN_TEMPLATE = <<~RUBY
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
padding: 24,
|
|
24
|
-
content: column(
|
|
25
|
-
expand: true,
|
|
26
|
-
alignment: Ruflet::MainAxisAlignment::CENTER,
|
|
27
|
-
horizontal_alignment: Ruflet::CrossAxisAlignment::CENTER,
|
|
28
|
-
spacing: 12,
|
|
29
|
-
controls: [
|
|
30
|
-
text(value: "You have pushed the button this many times:"),
|
|
31
|
-
count_text
|
|
32
|
-
]
|
|
33
|
-
)
|
|
34
|
-
),
|
|
35
|
-
appbar: app_bar(
|
|
36
|
-
title: text(value: "Counter Demo")
|
|
37
|
-
),
|
|
38
|
-
floating_action_button: fab(
|
|
39
|
-
icon(icon: Ruflet::MaterialIcons::ADD),
|
|
40
|
-
on_click: ->(_e) {
|
|
41
|
-
@count += 1
|
|
42
|
-
page.update(count_text, value: @count.to_s)
|
|
43
|
-
}
|
|
44
|
-
)
|
|
6
|
+
require "ruflet"
|
|
7
|
+
Ruflet.run do |page|
|
|
8
|
+
page.title = "Counter Demo"
|
|
9
|
+
count = 0
|
|
10
|
+
count_text = nil
|
|
11
|
+
count_text ||= text(value: count.to_s, size: 40)
|
|
12
|
+
page.add(
|
|
13
|
+
container(
|
|
14
|
+
expand: true,
|
|
15
|
+
alignment: Ruflet::MainAxisAlignment::CENTER,
|
|
16
|
+
content: column(
|
|
17
|
+
alignment: Ruflet::MainAxisAlignment::CENTER,
|
|
18
|
+
horizontal_alignment: Ruflet::CrossAxisAlignment::CENTER,
|
|
19
|
+
children: [
|
|
20
|
+
text(value: "You have pushed the button this many times:"),
|
|
21
|
+
count_text
|
|
22
|
+
]
|
|
45
23
|
)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
24
|
+
),
|
|
25
|
+
floating_action_button: fab(
|
|
26
|
+
icon(icon: Ruflet::MaterialIcons::ADD),
|
|
27
|
+
on_click: ->(_e) do
|
|
28
|
+
count += 1
|
|
29
|
+
page.update(count_text, value: count.to_s)
|
|
30
|
+
end
|
|
31
|
+
)
|
|
32
|
+
)
|
|
33
|
+
end
|
|
50
34
|
|
|
51
35
|
RUBY
|
|
52
36
|
|
|
53
37
|
GEMFILE_TEMPLATE = <<~GEMFILE
|
|
54
38
|
source "https://rubygems.org"
|
|
55
39
|
|
|
56
|
-
gem "ruflet", ">= 0.0.
|
|
57
|
-
gem "ruflet_server", ">= 0.0.
|
|
40
|
+
gem "ruflet", ">= 0.0.6"
|
|
41
|
+
gem "ruflet_server", ">= 0.0.6"
|
|
58
42
|
GEMFILE
|
|
59
43
|
|
|
60
44
|
README_TEMPLATE = <<~MD
|
data/lib/ruflet/version.rb
CHANGED