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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83772c8986411d4680455374f1f350c015183318e3c090426ea53edfb4ed2a89
4
- data.tar.gz: 45f42f969bc487714f24c0833ca8fdbf2236e789622deb604a231d1a254ea483
3
+ metadata.gz: 716c849e84715c603f30e6ad789cdf3d8d0dc3ef4be40a436af77546dde1d629
4
+ data.tar.gz: 765cf04a191c9e915b43ef525d1a21f6d42a7226a36db9d47b490117392a2a9d
5
5
  SHA512:
6
- metadata.gz: 412a6524bff1cdf335256193390aca08c71b299f517da00af1da6efada84c7fc0ebd0d399be9e92235d6713ebcfbd8c8f9695695b68e3465242ed998deecf1bb
7
- data.tar.gz: 0f77d2ee780f5d443e58d356ac02382ae0e5a53144ac64d9df5bf8d4e9bec2fcf51646f8d92fdc69e527259a7100e772fafcd26861c2d63ba829606531b03824
6
+ metadata.gz: 239d1dc8d36a8db268eaf17e0c6aed617ae786a59c09dc8c12f2b7d1c15ec3778d8bceff8f57fd51973f0da7be015013b8cb936d39ed566aed099c88739d18eb
7
+ data.tar.gz: 24be0703279d8cda99245929f7fdd4975e278a1d9768fd46785701c1aa5a478f8c7fd3b9f73b3ebf6be9f5b08cbadac582880213102709fb8c5d9b66ee91926d
@@ -3,58 +3,42 @@
3
3
  module Ruflet
4
4
  module CLI
5
5
  MAIN_TEMPLATE = <<~RUBY
6
- require "ruflet"
7
-
8
- class MainApp < Ruflet::App
9
- def initialize
10
- super
11
- @count = 0
12
- end
13
-
14
- def view(page)
15
- page.title = "Counter Demo"
16
- page.vertical_alignment = Ruflet::MainAxisAlignment::CENTER
17
- page.horizontal_alignment = Ruflet::CrossAxisAlignment::CENTER
18
- count_text = text(value: @count.to_s, size: 40)
19
-
20
- page.add(
21
- container(
22
- expand: true,
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
- end
47
- end
48
-
49
- MainApp.new.run
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.3"
57
- gem "ruflet_server", ">= 0.0.3"
40
+ gem "ruflet", ">= 0.0.6"
41
+ gem "ruflet_server", ">= 0.0.6"
58
42
  GEMFILE
59
43
 
60
44
  README_TEMPLATE = <<~MD
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ruflet
4
- VERSION = "0.0.5" unless const_defined?(:VERSION)
4
+ VERSION = "0.0.6" unless const_defined?(:VERSION)
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruflet_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - AdamMusa