ruby_wasm_ui 0.8.2 → 0.9.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
- data/.github/workflows/rspec.yml +0 -2
- data/Makefile +53 -0
- data/README.md +22 -4
- data/examples/.gitignore +3 -0
- data/examples/Gemfile.lock +15 -17
- data/examples/src/index.html +21 -0
- data/examples/src/index.rb +26 -0
- data/exe/ruby-wasm-ui +6 -0
- data/lib/ruby_wasm_ui/cli/command/base.rb +174 -0
- data/lib/ruby_wasm_ui/cli/command/dev.rb +206 -0
- data/lib/ruby_wasm_ui/cli/command/pack.rb +36 -0
- data/lib/ruby_wasm_ui/cli/command/rebuild.rb +38 -0
- data/lib/ruby_wasm_ui/cli/command/setup.rb +130 -0
- data/lib/ruby_wasm_ui/cli/command.rb +48 -0
- data/lib/ruby_wasm_ui/version.rb +1 -1
- data/lib/ruby_wasm_ui.rb +8 -8
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/packages/npm-packages/runtime/package-lock.json +2 -2
- data/packages/npm-packages/runtime/package.json +3 -3
- data/packages/npm-packages/runtime/rollup.config.mjs +68 -10
- data/spec/ruby_wasm_ui/cli/command/base_spec.rb +358 -0
- data/spec/ruby_wasm_ui/cli/command/dev_spec.rb +412 -0
- data/spec/ruby_wasm_ui/cli/command/pack_spec.rb +127 -0
- data/spec/ruby_wasm_ui/cli/command/rebuild_spec.rb +95 -0
- data/spec/ruby_wasm_ui/cli/command/setup_spec.rb +186 -0
- data/spec/ruby_wasm_ui/cli/command_spec.rb +118 -0
- data/{packages/npm-packages/runtime/spec → spec}/spec_helper.rb +1 -1
- metadata +96 -38
- data/packages/npm-packages/runtime/Gemfile +0 -3
- data/packages/npm-packages/runtime/Gemfile.lock +0 -26
- /data/lib/ruby_wasm_ui/{app.rb → runtime/app.rb} +0 -0
- /data/lib/ruby_wasm_ui/{component.rb → runtime/component.rb} +0 -0
- /data/lib/ruby_wasm_ui/{dispatcher.rb → runtime/dispatcher.rb} +0 -0
- /data/lib/ruby_wasm_ui/{dom → runtime/dom}/attributes.rb +0 -0
- /data/lib/ruby_wasm_ui/{dom → runtime/dom}/destroy_dom.rb +0 -0
- /data/lib/ruby_wasm_ui/{dom → runtime/dom}/events.rb +0 -0
- /data/lib/ruby_wasm_ui/{dom → runtime/dom}/mount_dom.rb +0 -0
- /data/lib/ruby_wasm_ui/{dom → runtime/dom}/patch_dom.rb +0 -0
- /data/lib/ruby_wasm_ui/{dom → runtime/dom}/scheduler.rb +0 -0
- /data/lib/ruby_wasm_ui/{dom.rb → runtime/dom.rb} +0 -0
- /data/lib/ruby_wasm_ui/{nodes_equal.rb → runtime/nodes_equal.rb} +0 -0
- /data/lib/ruby_wasm_ui/{template → runtime/template}/build_conditional_group.rb +0 -0
- /data/lib/ruby_wasm_ui/{template → runtime/template}/build_for_group.rb +0 -0
- /data/lib/ruby_wasm_ui/{template → runtime/template}/build_vdom.rb +0 -0
- /data/lib/ruby_wasm_ui/{template → runtime/template}/parser.rb +0 -0
- /data/lib/ruby_wasm_ui/{template.rb → runtime/template.rb} +0 -0
- /data/lib/ruby_wasm_ui/{utils → runtime/utils}/arrays.rb +0 -0
- /data/lib/ruby_wasm_ui/{utils → runtime/utils}/objects.rb +0 -0
- /data/lib/ruby_wasm_ui/{utils → runtime/utils}/props.rb +0 -0
- /data/lib/ruby_wasm_ui/{utils → runtime/utils}/strings.rb +0 -0
- /data/lib/ruby_wasm_ui/{utils.rb → runtime/utils.rb} +0 -0
- /data/lib/ruby_wasm_ui/{vdom.rb → runtime/vdom.rb} +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/component_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/dom/scheduler_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/nodes_equal_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/template/build_conditional_group_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/template/build_for_group_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/template/build_vdom_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/template/parser_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/utils/arrays_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/utils/objects_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/utils/props_spec.rb +0 -0
- /data/{packages/npm-packages/runtime/spec/ruby_wasm_ui → spec/ruby_wasm_ui/runtime}/utils/strings_spec.rb +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
require 'tmpdir'
|
|
5
|
+
|
|
6
|
+
RSpec.describe RubyWasmUi::Cli::Command::Setup do
|
|
7
|
+
let(:setup_instance) { described_class.new }
|
|
8
|
+
|
|
9
|
+
describe '.description' do
|
|
10
|
+
it 'returns the description' do
|
|
11
|
+
expect(described_class.description).to eq('Set up the project for ruby-wasm-ui')
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
describe '#run' do
|
|
16
|
+
before do
|
|
17
|
+
allow(setup_instance).to receive(:check_ruby_version).and_return(RUBY_VERSION.split('.')[0..1].join('.'))
|
|
18
|
+
allow(setup_instance).to receive(:configure_excluded_gems)
|
|
19
|
+
allow(setup_instance).to receive(:build_ruby_wasm)
|
|
20
|
+
allow(setup_instance).to receive(:update_gitignore)
|
|
21
|
+
allow(setup_instance).to receive(:create_initial_files)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it 'outputs setup message' do
|
|
25
|
+
expect { setup_instance.run([]) }.to output(
|
|
26
|
+
/Setting up ruby-wasm-ui project/
|
|
27
|
+
).to_stdout
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it 'checks Ruby version' do
|
|
31
|
+
expect(setup_instance).to receive(:check_ruby_version)
|
|
32
|
+
setup_instance.run([])
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it 'configures excluded gems' do
|
|
36
|
+
expect(setup_instance).to receive(:configure_excluded_gems)
|
|
37
|
+
setup_instance.run([])
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it 'executes rbwasm build command' do
|
|
41
|
+
ruby_version = RUBY_VERSION.split('.')[0..1].join('.')
|
|
42
|
+
expect(setup_instance).to receive(:build_ruby_wasm).with(ruby_version)
|
|
43
|
+
setup_instance.run([])
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
it 'updates .gitignore with required entries' do
|
|
47
|
+
expect(setup_instance).to receive(:update_gitignore).with(
|
|
48
|
+
['*.wasm', '/rubies', '/build']
|
|
49
|
+
)
|
|
50
|
+
setup_instance.run([])
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
it 'outputs completion message' do
|
|
54
|
+
expect { setup_instance.run([]) }.to output(
|
|
55
|
+
/Setup completed successfully!/
|
|
56
|
+
).to_stdout
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
it 'outputs progress messages' do
|
|
60
|
+
expect { setup_instance.run([]) }.to output(
|
|
61
|
+
/Configuring excluded gems/
|
|
62
|
+
).to_stdout
|
|
63
|
+
expect { setup_instance.run([]) }.to output(
|
|
64
|
+
/Building Ruby WASM/
|
|
65
|
+
).to_stdout
|
|
66
|
+
expect { setup_instance.run([]) }.to output(
|
|
67
|
+
/Updating .gitignore/
|
|
68
|
+
).to_stdout
|
|
69
|
+
expect { setup_instance.run([]) }.to output(
|
|
70
|
+
/Creating initial files/
|
|
71
|
+
).to_stdout
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
it 'creates initial files' do
|
|
75
|
+
expect(setup_instance).to receive(:create_initial_files)
|
|
76
|
+
setup_instance.run([])
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
context 'when Ruby version check fails' do
|
|
80
|
+
before do
|
|
81
|
+
allow(setup_instance).to receive(:check_ruby_version).and_raise(SystemExit.new(1))
|
|
82
|
+
allow(Kernel).to receive(:exit)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
it 'does not execute subsequent steps' do
|
|
86
|
+
expect(setup_instance).not_to receive(:configure_excluded_gems)
|
|
87
|
+
expect(setup_instance).not_to receive(:build_ruby_wasm)
|
|
88
|
+
expect(setup_instance).not_to receive(:update_gitignore)
|
|
89
|
+
expect(setup_instance).not_to receive(:create_initial_files)
|
|
90
|
+
expect { setup_instance.run([]) }.to raise_error(SystemExit)
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
context 'when Ruby version is 3.2' do
|
|
95
|
+
before do
|
|
96
|
+
stub_const('RUBY_VERSION', '3.2.0')
|
|
97
|
+
allow(setup_instance).to receive(:check_ruby_version).and_return('3.2')
|
|
98
|
+
allow(setup_instance).to receive(:configure_excluded_gems)
|
|
99
|
+
allow(setup_instance).to receive(:build_ruby_wasm)
|
|
100
|
+
allow(setup_instance).to receive(:update_gitignore)
|
|
101
|
+
allow(setup_instance).to receive(:create_initial_files)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
it 'executes rbwasm build command with correct version' do
|
|
105
|
+
expect(setup_instance).to receive(:build_ruby_wasm).with('3.2')
|
|
106
|
+
setup_instance.run([])
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
describe '#create_initial_files' do
|
|
112
|
+
let(:temp_dir) { Dir.mktmpdir }
|
|
113
|
+
let(:src_dir) { File.join(temp_dir, 'src') }
|
|
114
|
+
|
|
115
|
+
before do
|
|
116
|
+
allow(Dir).to receive(:pwd).and_return(temp_dir)
|
|
117
|
+
allow(Dir).to receive(:exist?).and_call_original
|
|
118
|
+
allow(File).to receive(:exist?).and_call_original
|
|
119
|
+
allow(File).to receive(:write).and_call_original
|
|
120
|
+
allow(Dir).to receive(:mkdir).and_call_original
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
after do
|
|
124
|
+
FileUtils.rm_rf(temp_dir) if Dir.exist?(temp_dir)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
context 'when src directory does not exist' do
|
|
128
|
+
before do
|
|
129
|
+
# Ensure the directory doesn't exist before the test
|
|
130
|
+
FileUtils.rm_rf('src') if Dir.exist?('src')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
after do
|
|
134
|
+
# Clean up after test
|
|
135
|
+
FileUtils.rm_rf('src') if Dir.exist?('src')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
it 'creates src directory and initial files' do
|
|
139
|
+
expect(Dir).to receive(:exist?).with('src').and_return(false)
|
|
140
|
+
expect(File).to receive(:exist?).with('src/index.html').and_return(false)
|
|
141
|
+
expect(File).to receive(:exist?).with('src/index.rb').and_return(false)
|
|
142
|
+
expect(Dir).to receive(:mkdir).with('src').and_call_original
|
|
143
|
+
expect(File).to receive(:write).with('src/index.html', anything).and_call_original
|
|
144
|
+
expect(File).to receive(:write).with('src/index.rb', anything).and_call_original
|
|
145
|
+
|
|
146
|
+
setup_instance.send(:create_initial_files)
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
context 'when src directory already exists' do
|
|
151
|
+
it 'skips file creation' do
|
|
152
|
+
expect(Dir).to receive(:exist?).with('src').and_return(true)
|
|
153
|
+
expect(File).not_to receive(:write)
|
|
154
|
+
|
|
155
|
+
expect { setup_instance.send(:create_initial_files) }.to output(
|
|
156
|
+
/src directory already exists, skipping initial file creation/
|
|
157
|
+
).to_stdout
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
context 'when src/index.html already exists' do
|
|
162
|
+
it 'skips file creation' do
|
|
163
|
+
expect(Dir).to receive(:exist?).with('src').and_return(false)
|
|
164
|
+
expect(File).to receive(:exist?).with('src/index.html').and_return(true)
|
|
165
|
+
expect(File).not_to receive(:write)
|
|
166
|
+
|
|
167
|
+
expect { setup_instance.send(:create_initial_files) }.to output(
|
|
168
|
+
/src\/index.html already exists, skipping initial file creation/
|
|
169
|
+
).to_stdout
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
context 'when src/index.rb already exists' do
|
|
174
|
+
it 'skips file creation' do
|
|
175
|
+
expect(Dir).to receive(:exist?).with('src').and_return(false)
|
|
176
|
+
expect(File).to receive(:exist?).with('src/index.html').and_return(false)
|
|
177
|
+
expect(File).to receive(:exist?).with('src/index.rb').and_return(true)
|
|
178
|
+
expect(File).not_to receive(:write)
|
|
179
|
+
|
|
180
|
+
expect { setup_instance.send(:create_initial_files) }.to output(
|
|
181
|
+
/src\/index.rb already exists, skipping initial file creation/
|
|
182
|
+
).to_stdout
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
RSpec.describe RubyWasmUi::Cli::Command do
|
|
6
|
+
describe '.run' do
|
|
7
|
+
context 'when command is provided' do
|
|
8
|
+
context 'with valid command' do
|
|
9
|
+
context 'setup command' do
|
|
10
|
+
let(:setup_instance) { instance_double(RubyWasmUi::Cli::Command::Setup) }
|
|
11
|
+
|
|
12
|
+
before do
|
|
13
|
+
allow(RubyWasmUi::Cli::Command::Setup).to receive(:new).and_return(setup_instance)
|
|
14
|
+
allow(setup_instance).to receive(:run)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'executes the setup command' do
|
|
18
|
+
expect(setup_instance).to receive(:run).with([])
|
|
19
|
+
described_class.run(['setup'])
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'passes remaining arguments to the command' do
|
|
23
|
+
expect(setup_instance).to receive(:run).with(['arg1', 'arg2'])
|
|
24
|
+
described_class.run(['setup', 'arg1', 'arg2'])
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
context 'dev command' do
|
|
29
|
+
let(:dev_instance) { instance_double(RubyWasmUi::Cli::Command::Dev) }
|
|
30
|
+
|
|
31
|
+
before do
|
|
32
|
+
allow(RubyWasmUi::Cli::Command::Dev).to receive(:new).and_return(dev_instance)
|
|
33
|
+
allow(dev_instance).to receive(:run)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it 'executes the dev command' do
|
|
37
|
+
expect(dev_instance).to receive(:run).with([])
|
|
38
|
+
described_class.run(['dev'])
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it 'passes remaining arguments to the command' do
|
|
42
|
+
expect(dev_instance).to receive(:run).with(['arg1', 'arg2'])
|
|
43
|
+
described_class.run(['dev', 'arg1', 'arg2'])
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
context 'rebuild command' do
|
|
48
|
+
let(:rebuild_instance) { instance_double(RubyWasmUi::Cli::Command::Rebuild) }
|
|
49
|
+
|
|
50
|
+
before do
|
|
51
|
+
allow(RubyWasmUi::Cli::Command::Rebuild).to receive(:new).and_return(rebuild_instance)
|
|
52
|
+
allow(rebuild_instance).to receive(:run)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it 'executes the rebuild command' do
|
|
56
|
+
expect(rebuild_instance).to receive(:run).with([])
|
|
57
|
+
described_class.run(['rebuild'])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
it 'passes remaining arguments to the command' do
|
|
61
|
+
expect(rebuild_instance).to receive(:run).with(['arg1', 'arg2'])
|
|
62
|
+
described_class.run(['rebuild', 'arg1', 'arg2'])
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
context 'with invalid command' do
|
|
68
|
+
it 'prints error message and shows usage' do
|
|
69
|
+
expect { described_class.run(['unknown']) }.to output(
|
|
70
|
+
/Unknown command: unknown/
|
|
71
|
+
).to_stdout.and raise_error(SystemExit)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
context 'when no command is provided' do
|
|
77
|
+
it 'shows usage and exits' do
|
|
78
|
+
expect { described_class.run([]) }.to output(
|
|
79
|
+
/Usage: ruby-wasm-ui <command>/
|
|
80
|
+
).to_stdout.and raise_error(SystemExit)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
describe '.show_usage' do
|
|
86
|
+
it 'displays usage information' do
|
|
87
|
+
expect { described_class.show_usage }.to output(
|
|
88
|
+
/Usage: ruby-wasm-ui <command>/
|
|
89
|
+
).to_stdout
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
it 'lists available commands' do
|
|
93
|
+
expect { described_class.show_usage }.to output(
|
|
94
|
+
/setup.*Set up the project for ruby-wasm-ui/
|
|
95
|
+
).to_stdout
|
|
96
|
+
expect { described_class.show_usage }.to output(
|
|
97
|
+
/dev.*Start development server with file watching and auto-build/
|
|
98
|
+
).to_stdout
|
|
99
|
+
expect { described_class.show_usage }.to output(
|
|
100
|
+
/rebuild.*Rebuild Ruby WASM file/
|
|
101
|
+
).to_stdout
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
describe 'COMMANDS' do
|
|
106
|
+
it 'contains setup command' do
|
|
107
|
+
expect(described_class::COMMANDS).to include('setup' => RubyWasmUi::Cli::Command::Setup)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
it 'contains dev command' do
|
|
111
|
+
expect(described_class::COMMANDS).to include('dev' => RubyWasmUi::Cli::Command::Dev)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
it 'contains rebuild command' do
|
|
115
|
+
expect(described_class::COMMANDS).to include('rebuild' => RubyWasmUi::Cli::Command::Rebuild)
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'bundler/setup'
|
|
4
|
-
Dir[File.expand_path('../../
|
|
4
|
+
Dir[File.expand_path('../../lib/**/*.rb', __FILE__)].sort.each { |f| require f }
|
|
5
5
|
|
|
6
6
|
RSpec.configure do |config|
|
|
7
7
|
config.expect_with :rspec do |expectations|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_wasm_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- t0yohei
|
|
@@ -37,10 +37,53 @@ dependencies:
|
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '2.7'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: listen
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '3.8'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '3.8'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: rack
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '3.0'
|
|
61
|
+
type: :runtime
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '3.0'
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: puma
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - "~>"
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '6.0'
|
|
75
|
+
type: :runtime
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - "~>"
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '6.0'
|
|
40
82
|
description: Write reactive web applications using familiar Ruby syntax and patterns
|
|
41
83
|
email:
|
|
42
84
|
- k.t0yohei@gmail.com
|
|
43
|
-
executables:
|
|
85
|
+
executables:
|
|
86
|
+
- ruby-wasm-ui
|
|
44
87
|
extensions: []
|
|
45
88
|
extra_rdoc_files: []
|
|
46
89
|
files:
|
|
@@ -50,11 +93,13 @@ files:
|
|
|
50
93
|
- ".node-version"
|
|
51
94
|
- CODE_OF_CONDUCT.md
|
|
52
95
|
- LICENSE.txt
|
|
96
|
+
- Makefile
|
|
53
97
|
- README.md
|
|
54
98
|
- Rakefile
|
|
55
99
|
- docs/conditional-rendering.md
|
|
56
100
|
- docs/lifecycle-hooks.md
|
|
57
101
|
- docs/list-rendering.md
|
|
102
|
+
- examples/.gitignore
|
|
58
103
|
- examples/Gemfile
|
|
59
104
|
- examples/Gemfile.lock
|
|
60
105
|
- examples/Makefile
|
|
@@ -89,54 +134,49 @@ files:
|
|
|
89
134
|
- examples/package.json
|
|
90
135
|
- examples/src/counter/index.html
|
|
91
136
|
- examples/src/counter/index.rb
|
|
137
|
+
- examples/src/index.html
|
|
138
|
+
- examples/src/index.rb
|
|
92
139
|
- examples/src/todos/index.html
|
|
93
140
|
- examples/src/todos/index.rb
|
|
94
141
|
- examples/src/todos/todos_repository.rb
|
|
142
|
+
- exe/ruby-wasm-ui
|
|
95
143
|
- lib/ruby_wasm_ui.rb
|
|
96
|
-
- lib/ruby_wasm_ui/
|
|
97
|
-
- lib/ruby_wasm_ui/
|
|
98
|
-
- lib/ruby_wasm_ui/
|
|
99
|
-
- lib/ruby_wasm_ui/
|
|
100
|
-
- lib/ruby_wasm_ui/
|
|
101
|
-
- lib/ruby_wasm_ui/
|
|
102
|
-
- lib/ruby_wasm_ui/
|
|
103
|
-
- lib/ruby_wasm_ui/
|
|
104
|
-
- lib/ruby_wasm_ui/
|
|
105
|
-
- lib/ruby_wasm_ui/dom
|
|
106
|
-
- lib/ruby_wasm_ui/
|
|
107
|
-
- lib/ruby_wasm_ui/
|
|
108
|
-
- lib/ruby_wasm_ui/
|
|
109
|
-
- lib/ruby_wasm_ui/
|
|
110
|
-
- lib/ruby_wasm_ui/
|
|
111
|
-
- lib/ruby_wasm_ui/
|
|
112
|
-
- lib/ruby_wasm_ui/
|
|
113
|
-
- lib/ruby_wasm_ui/
|
|
114
|
-
- lib/ruby_wasm_ui/
|
|
115
|
-
- lib/ruby_wasm_ui/
|
|
116
|
-
- lib/ruby_wasm_ui/
|
|
117
|
-
- lib/ruby_wasm_ui/
|
|
144
|
+
- lib/ruby_wasm_ui/cli/command.rb
|
|
145
|
+
- lib/ruby_wasm_ui/cli/command/base.rb
|
|
146
|
+
- lib/ruby_wasm_ui/cli/command/dev.rb
|
|
147
|
+
- lib/ruby_wasm_ui/cli/command/pack.rb
|
|
148
|
+
- lib/ruby_wasm_ui/cli/command/rebuild.rb
|
|
149
|
+
- lib/ruby_wasm_ui/cli/command/setup.rb
|
|
150
|
+
- lib/ruby_wasm_ui/runtime/app.rb
|
|
151
|
+
- lib/ruby_wasm_ui/runtime/component.rb
|
|
152
|
+
- lib/ruby_wasm_ui/runtime/dispatcher.rb
|
|
153
|
+
- lib/ruby_wasm_ui/runtime/dom.rb
|
|
154
|
+
- lib/ruby_wasm_ui/runtime/dom/attributes.rb
|
|
155
|
+
- lib/ruby_wasm_ui/runtime/dom/destroy_dom.rb
|
|
156
|
+
- lib/ruby_wasm_ui/runtime/dom/events.rb
|
|
157
|
+
- lib/ruby_wasm_ui/runtime/dom/mount_dom.rb
|
|
158
|
+
- lib/ruby_wasm_ui/runtime/dom/patch_dom.rb
|
|
159
|
+
- lib/ruby_wasm_ui/runtime/dom/scheduler.rb
|
|
160
|
+
- lib/ruby_wasm_ui/runtime/nodes_equal.rb
|
|
161
|
+
- lib/ruby_wasm_ui/runtime/template.rb
|
|
162
|
+
- lib/ruby_wasm_ui/runtime/template/build_conditional_group.rb
|
|
163
|
+
- lib/ruby_wasm_ui/runtime/template/build_for_group.rb
|
|
164
|
+
- lib/ruby_wasm_ui/runtime/template/build_vdom.rb
|
|
165
|
+
- lib/ruby_wasm_ui/runtime/template/parser.rb
|
|
166
|
+
- lib/ruby_wasm_ui/runtime/utils.rb
|
|
167
|
+
- lib/ruby_wasm_ui/runtime/utils/arrays.rb
|
|
168
|
+
- lib/ruby_wasm_ui/runtime/utils/objects.rb
|
|
169
|
+
- lib/ruby_wasm_ui/runtime/utils/props.rb
|
|
170
|
+
- lib/ruby_wasm_ui/runtime/utils/strings.rb
|
|
171
|
+
- lib/ruby_wasm_ui/runtime/vdom.rb
|
|
118
172
|
- lib/ruby_wasm_ui/version.rb
|
|
119
173
|
- package-lock.json
|
|
120
174
|
- package.json
|
|
121
|
-
- packages/npm-packages/runtime/Gemfile
|
|
122
|
-
- packages/npm-packages/runtime/Gemfile.lock
|
|
123
175
|
- packages/npm-packages/runtime/README.md
|
|
124
176
|
- packages/npm-packages/runtime/eslint.config.mjs
|
|
125
177
|
- packages/npm-packages/runtime/package-lock.json
|
|
126
178
|
- packages/npm-packages/runtime/package.json
|
|
127
179
|
- packages/npm-packages/runtime/rollup.config.mjs
|
|
128
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/component_spec.rb
|
|
129
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/dom/scheduler_spec.rb
|
|
130
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/nodes_equal_spec.rb
|
|
131
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/template/build_conditional_group_spec.rb
|
|
132
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/template/build_for_group_spec.rb
|
|
133
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/template/build_vdom_spec.rb
|
|
134
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/template/parser_spec.rb
|
|
135
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/utils/arrays_spec.rb
|
|
136
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/utils/objects_spec.rb
|
|
137
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/utils/props_spec.rb
|
|
138
|
-
- packages/npm-packages/runtime/spec/ruby_wasm_ui/utils/strings_spec.rb
|
|
139
|
-
- packages/npm-packages/runtime/spec/spec_helper.rb
|
|
140
180
|
- packages/npm-packages/runtime/src/__tests__/sample.test.js
|
|
141
181
|
- packages/npm-packages/runtime/src/index.js
|
|
142
182
|
- packages/npm-packages/runtime/src/ruby_wasm_ui
|
|
@@ -144,6 +184,24 @@ files:
|
|
|
144
184
|
- packages/npm-packages/runtime/vitest.config.js
|
|
145
185
|
- playwright.config.js
|
|
146
186
|
- sig/ruby_wasm_ui.rbs
|
|
187
|
+
- spec/ruby_wasm_ui/cli/command/base_spec.rb
|
|
188
|
+
- spec/ruby_wasm_ui/cli/command/dev_spec.rb
|
|
189
|
+
- spec/ruby_wasm_ui/cli/command/pack_spec.rb
|
|
190
|
+
- spec/ruby_wasm_ui/cli/command/rebuild_spec.rb
|
|
191
|
+
- spec/ruby_wasm_ui/cli/command/setup_spec.rb
|
|
192
|
+
- spec/ruby_wasm_ui/cli/command_spec.rb
|
|
193
|
+
- spec/ruby_wasm_ui/runtime/component_spec.rb
|
|
194
|
+
- spec/ruby_wasm_ui/runtime/dom/scheduler_spec.rb
|
|
195
|
+
- spec/ruby_wasm_ui/runtime/nodes_equal_spec.rb
|
|
196
|
+
- spec/ruby_wasm_ui/runtime/template/build_conditional_group_spec.rb
|
|
197
|
+
- spec/ruby_wasm_ui/runtime/template/build_for_group_spec.rb
|
|
198
|
+
- spec/ruby_wasm_ui/runtime/template/build_vdom_spec.rb
|
|
199
|
+
- spec/ruby_wasm_ui/runtime/template/parser_spec.rb
|
|
200
|
+
- spec/ruby_wasm_ui/runtime/utils/arrays_spec.rb
|
|
201
|
+
- spec/ruby_wasm_ui/runtime/utils/objects_spec.rb
|
|
202
|
+
- spec/ruby_wasm_ui/runtime/utils/props_spec.rb
|
|
203
|
+
- spec/ruby_wasm_ui/runtime/utils/strings_spec.rb
|
|
204
|
+
- spec/spec_helper.rb
|
|
147
205
|
homepage: https://github.com/t0yohei/ruby-wasm-ui
|
|
148
206
|
licenses:
|
|
149
207
|
- MIT
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
GEM
|
|
2
|
-
remote: https://rubygems.org/
|
|
3
|
-
specs:
|
|
4
|
-
diff-lcs (1.6.2)
|
|
5
|
-
rspec (3.13.1)
|
|
6
|
-
rspec-core (~> 3.13.0)
|
|
7
|
-
rspec-expectations (~> 3.13.0)
|
|
8
|
-
rspec-mocks (~> 3.13.0)
|
|
9
|
-
rspec-core (3.13.4)
|
|
10
|
-
rspec-support (~> 3.13.0)
|
|
11
|
-
rspec-expectations (3.13.5)
|
|
12
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
13
|
-
rspec-support (~> 3.13.0)
|
|
14
|
-
rspec-mocks (3.13.5)
|
|
15
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
16
|
-
rspec-support (~> 3.13.0)
|
|
17
|
-
rspec-support (3.13.4)
|
|
18
|
-
|
|
19
|
-
PLATFORMS
|
|
20
|
-
arm64-darwin-21
|
|
21
|
-
|
|
22
|
-
DEPENDENCIES
|
|
23
|
-
rspec
|
|
24
|
-
|
|
25
|
-
BUNDLED WITH
|
|
26
|
-
2.4.22
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|