lizarb 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.tool-versions +1 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +7 -4
- data/README.md +23 -64
- data/README_SYSTEMS.md +80 -0
- data/Rakefile +3 -1
- data/app/dev/benches/loops_bench.rb +35 -0
- data/app/dev/commands/calculator_command.rb +69 -0
- data/app/dev/commands/calculator_command_test.rb +58 -0
- data/app/dev/commands/circle_command.rb +70 -0
- data/app/dev/commands/circle_command_test.rb +76 -0
- data/app/dev/commands/narrative_method_command.rb +60 -0
- data/app/dev/commands/narrative_method_command_test.rb +36 -0
- data/app/dev/commands/quadratic_command.rb +66 -0
- data/app/dev/commands/quadratic_command_test.rb +47 -0
- data/app/dev/generators/bench_generator/bench.rb.erb +24 -0
- data/app/dev/generators/bench_generator/bench_test.rb.erb +12 -0
- data/app/dev/generators/bench_generator.rb +2 -51
- data/app/dev/generators/command_generator/command.rb.erb +26 -0
- data/app/dev/generators/command_generator/command_test.rb.erb +12 -0
- data/app/dev/generators/command_generator.rb +2 -35
- data/app/dev/generators/record_generator.rb +46 -0
- data/app/dev/generators/{model_generator_test.rb → record_generator_test.rb} +2 -2
- data/app/dev_box.rb +24 -4
- data/app/happy_box.rb +1 -1
- data/app/net/databases/sqlite_db_test.rb +5 -5
- data/app/net/{models/app_model.rb → records/app_record.rb} +2 -1
- data/app/net/records/app_record_test.rb +8 -0
- data/app/net/records/post_record.rb +4 -0
- data/app/net/records/post_record_test.rb +8 -0
- data/app/net/records/user_record.rb +4 -0
- data/app/net/records/user_record_test.rb +8 -0
- data/app/net_box.rb +7 -7
- data/app/web/requests/api_request.rb +8 -7
- data/app/web/requests/assets_request.rb +12 -13
- data/app/web/requests/root_request.rb +6 -7
- data/app/web/requests/root_request_test.rb +1 -1
- data/app/web_box.rb +9 -1
- data/exe/lrb +3 -0
- data/lib/app.rb +19 -15
- data/lib/dev_system/dev/controllers/bench/not_found_bench.rb +27 -0
- data/lib/dev_system/dev/controllers/{command/dev_command_test.rb → bench/not_found_bench_test.rb} +3 -5
- data/lib/dev_system/dev/controllers/bench.rb +5 -7
- data/lib/dev_system/dev/controllers/bench_dsl_main_part.rb +37 -39
- data/lib/dev_system/dev/controllers/bench_test.rb +8 -10
- data/lib/dev_system/dev/controllers/command/bench_command.rb +20 -12
- data/lib/dev_system/dev/controllers/command/bench_command_test.rb +8 -10
- data/lib/dev_system/dev/controllers/command/echo_command.rb +5 -7
- data/lib/dev_system/dev/controllers/command/echo_command_test.rb +8 -10
- data/lib/dev_system/dev/controllers/command/generate_command.rb +22 -12
- data/lib/dev_system/dev/controllers/command/generate_command_test.rb +8 -10
- data/lib/dev_system/dev/controllers/command/not_found_command.rb +27 -0
- data/lib/dev_system/dev/controllers/command/not_found_command_test.rb +12 -0
- data/lib/dev_system/dev/controllers/command/terminal_command.rb +22 -0
- data/lib/dev_system/dev/controllers/command/terminal_command_test.rb +12 -0
- data/lib/dev_system/dev/controllers/command/test_command.rb +64 -49
- data/lib/dev_system/dev/controllers/command/test_command_test.rb +8 -10
- data/lib/dev_system/dev/controllers/command/version_command.rb +4 -6
- data/lib/dev_system/dev/controllers/command/version_command_test.rb +8 -10
- data/lib/dev_system/dev/controllers/command.rb +11 -13
- data/lib/dev_system/dev/controllers/command_test.rb +8 -10
- data/lib/dev_system/dev/controllers/generator.rb +5 -7
- data/lib/dev_system/dev/controllers/generator_dsl_main_part.rb +35 -37
- data/lib/dev_system/dev/controllers/generator_test.rb +8 -10
- data/lib/dev_system/dev/controllers/generators/app_generator.rb +122 -47
- data/lib/dev_system/dev/controllers/generators/app_generator_test.rb +8 -10
- data/lib/dev_system/dev/controllers/generators/generator_generator/generator.rb.erb +18 -0
- data/lib/dev_system/dev/controllers/generators/generator_generator/generator_test.rb.erb +12 -0
- data/lib/dev_system/dev/controllers/generators/generator_generator/template.rb.erb +9 -0
- data/lib/dev_system/dev/controllers/generators/generator_generator/template_test.rb.erb +12 -0
- data/lib/dev_system/dev/controllers/generators/generator_generator.rb +30 -0
- data/lib/dev_system/dev/controllers/generators/generator_generator_test.rb +12 -0
- data/lib/dev_system/dev/controllers/generators/not_found_generator.rb +27 -0
- data/lib/dev_system/dev/controllers/generators/not_found_generator_test.rb +12 -0
- data/lib/dev_system/dev/controllers/shell/bin_shell.rb +22 -0
- data/lib/dev_system/dev/controllers/shell/bin_shell_test.rb +87 -0
- data/lib/dev_system/dev/controllers/shell/dir_shell.rb +27 -0
- data/lib/dev_system/dev/controllers/shell/dir_shell_test.rb +73 -0
- data/lib/dev_system/dev/controllers/shell/file_shell.rb +56 -26
- data/lib/dev_system/dev/controllers/shell/file_shell_test.rb +143 -7
- data/lib/dev_system/dev/controllers/shell/text_shell.rb +23 -0
- data/lib/dev_system/dev/controllers/shell/text_shell_test.rb +84 -0
- data/lib/dev_system/dev/controllers/shell.rb +26 -14
- data/lib/dev_system/dev/controllers/shell_test.rb +42 -9
- data/lib/dev_system/dev/controllers/terminal/irb_terminal.rb +11 -13
- data/lib/dev_system/dev/controllers/terminal/irb_terminal_test.rb +8 -10
- data/lib/dev_system/dev/controllers/terminal/pry_terminal.rb +6 -8
- data/lib/dev_system/dev/controllers/terminal/pry_terminal_test.rb +8 -10
- data/lib/dev_system/dev/controllers/terminal.rb +11 -13
- data/lib/dev_system/dev/controllers/terminal_test.rb +8 -10
- data/lib/dev_system/dev/dev_box.rb +33 -16
- data/lib/dev_system/dev/dev_box_test.rb +12 -14
- data/lib/dev_system/dev/panels/bench_panel.rb +3 -0
- data/lib/dev_system/dev/panels/bench_panel_test.rb +12 -0
- data/lib/dev_system/dev/panels/command_panel.rb +24 -6
- data/lib/dev_system/dev/panels/command_panel_test.rb +15 -17
- data/lib/dev_system/dev/panels/generator_panel.rb +3 -0
- data/lib/dev_system/dev/panels/generator_panel_test.rb +12 -0
- data/lib/dev_system/dev/panels/log_panel.rb +9 -6
- data/lib/dev_system/dev/panels/log_panel_test.rb +11 -13
- data/lib/dev_system/dev/panels/shell_panel.rb +3 -0
- data/lib/dev_system/dev/panels/shell_panel_test.rb +12 -0
- data/lib/dev_system/dev/panels/terminal_panel.rb +3 -0
- data/lib/dev_system/dev/panels/terminal_panel_test.rb +12 -0
- data/lib/happy_system/happy/controllers/axo.rb +4 -5
- data/lib/happy_system/happy/happy_box.rb +6 -9
- data/lib/happy_system/happy/happy_box_test.rb +11 -13
- data/lib/happy_system/happy/panels/axo_panel.rb +1 -3
- data/lib/lerb.rb +106 -0
- data/lib/liza/base/box.rb +71 -26
- data/lib/liza/base/box_test.rb +7 -9
- data/lib/liza/base/controller.rb +19 -19
- data/lib/liza/base/controller_test.rb +7 -9
- data/lib/liza/base/panel.rb +40 -24
- data/lib/liza/base/panel_test.rb +10 -12
- data/lib/liza/base_parts/controller_renderer_part.rb +140 -0
- data/lib/liza/base_parts/controller_renderer_part_test.rb +16 -0
- data/lib/liza/meta/part.rb +12 -14
- data/lib/liza/meta/part_extension.rb +14 -11
- data/lib/liza/meta/part_test.rb +4 -6
- data/lib/liza/meta/system.rb +12 -14
- data/lib/liza/meta/system_test.rb +8 -10
- data/lib/liza/ruby_test.rb +7 -0
- data/lib/liza/ruby_tests/module_test.rb +21 -0
- data/lib/liza/ruby_tests/string_test.rb +59 -0
- data/lib/liza/test/test.rb +7 -8
- data/lib/liza/test/test_test.rb +168 -76
- data/lib/liza/test_parts/test_assertions_advanced_part.rb +125 -0
- data/lib/liza/test_parts/test_assertions_part.rb +81 -82
- data/lib/liza/test_parts/test_dsl_part.rb +44 -98
- data/lib/liza/test_parts/test_log_part.rb +122 -0
- data/lib/liza/test_parts/test_subject_part.rb +16 -18
- data/lib/liza/test_parts/test_tree_part.rb +137 -0
- data/lib/liza/unit.rb +108 -102
- data/lib/liza/unit_parts/unit_procedure_part.rb +17 -0
- data/lib/liza/unit_parts/unit_procedure_part_test.rb +65 -0
- data/lib/liza/unit_test.rb +69 -71
- data/lib/liza.rb +5 -0
- data/lib/lizarb/ruby/module.rb +17 -0
- data/lib/lizarb/ruby/string.rb +10 -2
- data/lib/lizarb/version.rb +1 -1
- data/lib/lizarb.rb +24 -2
- data/lib/net_system/dev/net_command.rb +10 -12
- data/lib/net_system/net/controllers/client/redis_client.rb +19 -21
- data/lib/net_system/net/controllers/client/redis_client_test.rb +20 -22
- data/lib/net_system/net/controllers/client/sqlite_client.rb +19 -21
- data/lib/net_system/net/controllers/client/sqlite_client_test.rb +20 -22
- data/lib/net_system/net/controllers/client.rb +1 -3
- data/lib/net_system/net/controllers/client_test.rb +8 -10
- data/lib/net_system/net/controllers/database/redis_db.rb +6 -8
- data/lib/net_system/net/controllers/database/redis_db_test.rb +15 -17
- data/lib/net_system/net/controllers/database/sqlite_db.rb +6 -8
- data/lib/net_system/net/controllers/database/sqlite_db_test.rb +15 -17
- data/lib/net_system/net/controllers/database.rb +21 -23
- data/lib/net_system/net/controllers/database_test.rb +8 -10
- data/lib/net_system/net/controllers/record.rb +29 -0
- data/lib/net_system/net/controllers/record_test.rb +12 -0
- data/lib/net_system/net/net_box.rb +11 -16
- data/lib/net_system/net/net_box_test.rb +12 -14
- data/lib/net_system/net/panels/client_panel.rb +1 -3
- data/lib/net_system/net/panels/client_panel_test.rb +11 -13
- data/lib/net_system/net/panels/database_panel.rb +6 -8
- data/lib/net_system/net/panels/database_panel_test.rb +11 -13
- data/lib/web_system/dev/rack_command.rb +35 -0
- data/lib/web_system/dev/request_command.rb +143 -0
- data/lib/web_system/dev/web_command.rb +6 -39
- data/lib/web_system/web/controllers/rack.rb +6 -0
- data/lib/web_system/web/controllers/rack_test.rb +16 -0
- data/lib/web_system/web/controllers/request/client_error_request.rb +9 -12
- data/lib/web_system/web/controllers/request/not_found_request.rb +9 -12
- data/lib/web_system/web/controllers/request/server_error_request.rb +10 -13
- data/lib/web_system/web/controllers/request.rb +1 -3
- data/lib/web_system/web/controllers/request_test.rb +11 -13
- data/lib/web_system/web/panels/rack_panel.rb +42 -0
- data/lib/web_system/web/panels/rack_panel_test.rb +12 -0
- data/lib/web_system/web/panels/request_panel.rb +54 -37
- data/lib/web_system/web/panels/request_panel_test.rb +28 -9
- data/lib/web_system/web/web_box.rb +16 -8
- data/lib/web_system/web/web_box_test.rb +11 -13
- data/lizarb.gemspec +2 -2
- metadata +76 -28
- data/app/dev/commands/example_command.rb +0 -57
- data/app/dev/commands/example_command_test.rb +0 -43
- data/app/dev/commands/macro_child_command.rb +0 -32
- data/app/dev/commands/macro_child_command_test.rb +0 -7
- data/app/dev/commands/macro_parent_command.rb +0 -70
- data/app/dev/commands/macro_parent_command_test.rb +0 -7
- data/app/dev/commands/my_command.rb +0 -7
- data/app/dev/commands/my_command_test.rb +0 -7
- data/app/dev/generators/model_generator.rb +0 -46
- data/app/net/models/app_model_test.rb +0 -8
- data/app/net/models/post_model.rb +0 -4
- data/app/net/models/post_model_test.rb +0 -8
- data/app/net/models/user_model.rb +0 -4
- data/app/net/models/user_model_test.rb +0 -8
- data/app_new/.gitignore +0 -4
- data/app_new/Gemfile +0 -31
- data/app_new/Procfile +0 -3
- data/lib/dev_system/dev/controllers/command/dev_command.rb +0 -24
- data/lib/liza/test_parts/test_context_part.rb +0 -81
- data/lib/net_system/net/controllers/model.rb +0 -31
- data/lib/net_system/net/controllers/model_test.rb +0 -14
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lizarb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thiago Pinto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -70,18 +70,21 @@ description: Liza is a light, experimental framework primarily developed to help
|
|
70
70
|
the Ruby language and the Ruby ecosystem.
|
71
71
|
email: thiagopintodev@gmail.com
|
72
72
|
executables:
|
73
|
+
- lrb
|
73
74
|
- liza
|
74
75
|
- lizarb
|
75
76
|
extensions: []
|
76
77
|
extra_rdoc_files: []
|
77
78
|
files:
|
78
79
|
- ".ruby-version"
|
80
|
+
- ".tool-versions"
|
79
81
|
- CHANGELOG.md
|
80
82
|
- CODE_OF_CONDUCT.md
|
81
83
|
- Gemfile
|
82
84
|
- Gemfile.lock
|
83
85
|
- LICENSE.txt
|
84
86
|
- README.md
|
87
|
+
- README_SYSTEMS.md
|
85
88
|
- Rakefile
|
86
89
|
- app.code.env
|
87
90
|
- app.env
|
@@ -92,22 +95,26 @@ files:
|
|
92
95
|
- app/dev/benches/loops_bench_test.rb
|
93
96
|
- app/dev/commands/app_command.rb
|
94
97
|
- app/dev/commands/app_command_test.rb
|
95
|
-
- app/dev/commands/
|
96
|
-
- app/dev/commands/
|
97
|
-
- app/dev/commands/
|
98
|
-
- app/dev/commands/
|
99
|
-
- app/dev/commands/
|
100
|
-
- app/dev/commands/
|
101
|
-
- app/dev/commands/my_command.rb
|
102
|
-
- app/dev/commands/my_command_test.rb
|
98
|
+
- app/dev/commands/calculator_command.rb
|
99
|
+
- app/dev/commands/calculator_command_test.rb
|
100
|
+
- app/dev/commands/circle_command.rb
|
101
|
+
- app/dev/commands/circle_command_test.rb
|
102
|
+
- app/dev/commands/narrative_method_command.rb
|
103
|
+
- app/dev/commands/narrative_method_command_test.rb
|
103
104
|
- app/dev/commands/new_command.rb
|
104
105
|
- app/dev/commands/new_command_test.rb
|
106
|
+
- app/dev/commands/quadratic_command.rb
|
107
|
+
- app/dev/commands/quadratic_command_test.rb
|
105
108
|
- app/dev/generators/bench_generator.rb
|
109
|
+
- app/dev/generators/bench_generator/bench.rb.erb
|
110
|
+
- app/dev/generators/bench_generator/bench_test.rb.erb
|
106
111
|
- app/dev/generators/bench_generator_test.rb
|
107
112
|
- app/dev/generators/command_generator.rb
|
113
|
+
- app/dev/generators/command_generator/command.rb.erb
|
114
|
+
- app/dev/generators/command_generator/command_test.rb.erb
|
108
115
|
- app/dev/generators/command_generator_test.rb
|
109
|
-
- app/dev/generators/
|
110
|
-
- app/dev/generators/
|
116
|
+
- app/dev/generators/record_generator.rb
|
117
|
+
- app/dev/generators/record_generator_test.rb
|
111
118
|
- app/dev/generators/request_generator.rb
|
112
119
|
- app/dev/generators/request_generator_test.rb
|
113
120
|
- app/dev_box.rb
|
@@ -117,12 +124,12 @@ files:
|
|
117
124
|
- app/net/databases/redis_db_test.rb
|
118
125
|
- app/net/databases/sqlite_db.rb
|
119
126
|
- app/net/databases/sqlite_db_test.rb
|
120
|
-
- app/net/
|
121
|
-
- app/net/
|
122
|
-
- app/net/
|
123
|
-
- app/net/
|
124
|
-
- app/net/
|
125
|
-
- app/net/
|
127
|
+
- app/net/records/app_record.rb
|
128
|
+
- app/net/records/app_record_test.rb
|
129
|
+
- app/net/records/post_record.rb
|
130
|
+
- app/net/records/post_record_test.rb
|
131
|
+
- app/net/records/user_record.rb
|
132
|
+
- app/net/records/user_record_test.rb
|
126
133
|
- app/net_box.rb
|
127
134
|
- app/web/requests/api_request.rb
|
128
135
|
- app/web/requests/api_request_test.rb
|
@@ -133,27 +140,29 @@ files:
|
|
133
140
|
- app/web/requests/root_request.rb
|
134
141
|
- app/web/requests/root_request_test.rb
|
135
142
|
- app/web_box.rb
|
136
|
-
- app_new/.gitignore
|
137
|
-
- app_new/Gemfile
|
138
|
-
- app_new/Procfile
|
139
143
|
- exe/Gemfile
|
140
144
|
- exe/Gemfile.lock
|
141
145
|
- exe/liza
|
142
146
|
- exe/lizarb
|
147
|
+
- exe/lrb
|
143
148
|
- lib/app.rb
|
144
149
|
- lib/dev_system.rb
|
145
150
|
- lib/dev_system/dev/controllers/bench.rb
|
151
|
+
- lib/dev_system/dev/controllers/bench/not_found_bench.rb
|
152
|
+
- lib/dev_system/dev/controllers/bench/not_found_bench_test.rb
|
146
153
|
- lib/dev_system/dev/controllers/bench_dsl_main_part.rb
|
147
154
|
- lib/dev_system/dev/controllers/bench_test.rb
|
148
155
|
- lib/dev_system/dev/controllers/command.rb
|
149
156
|
- lib/dev_system/dev/controllers/command/bench_command.rb
|
150
157
|
- lib/dev_system/dev/controllers/command/bench_command_test.rb
|
151
|
-
- lib/dev_system/dev/controllers/command/dev_command.rb
|
152
|
-
- lib/dev_system/dev/controllers/command/dev_command_test.rb
|
153
158
|
- lib/dev_system/dev/controllers/command/echo_command.rb
|
154
159
|
- lib/dev_system/dev/controllers/command/echo_command_test.rb
|
155
160
|
- lib/dev_system/dev/controllers/command/generate_command.rb
|
156
161
|
- lib/dev_system/dev/controllers/command/generate_command_test.rb
|
162
|
+
- lib/dev_system/dev/controllers/command/not_found_command.rb
|
163
|
+
- lib/dev_system/dev/controllers/command/not_found_command_test.rb
|
164
|
+
- lib/dev_system/dev/controllers/command/terminal_command.rb
|
165
|
+
- lib/dev_system/dev/controllers/command/terminal_command_test.rb
|
157
166
|
- lib/dev_system/dev/controllers/command/test_command.rb
|
158
167
|
- lib/dev_system/dev/controllers/command/test_command_test.rb
|
159
168
|
- lib/dev_system/dev/controllers/command/version_command.rb
|
@@ -164,9 +173,23 @@ files:
|
|
164
173
|
- lib/dev_system/dev/controllers/generator_test.rb
|
165
174
|
- lib/dev_system/dev/controllers/generators/app_generator.rb
|
166
175
|
- lib/dev_system/dev/controllers/generators/app_generator_test.rb
|
176
|
+
- lib/dev_system/dev/controllers/generators/generator_generator.rb
|
177
|
+
- lib/dev_system/dev/controllers/generators/generator_generator/generator.rb.erb
|
178
|
+
- lib/dev_system/dev/controllers/generators/generator_generator/generator_test.rb.erb
|
179
|
+
- lib/dev_system/dev/controllers/generators/generator_generator/template.rb.erb
|
180
|
+
- lib/dev_system/dev/controllers/generators/generator_generator/template_test.rb.erb
|
181
|
+
- lib/dev_system/dev/controllers/generators/generator_generator_test.rb
|
182
|
+
- lib/dev_system/dev/controllers/generators/not_found_generator.rb
|
183
|
+
- lib/dev_system/dev/controllers/generators/not_found_generator_test.rb
|
167
184
|
- lib/dev_system/dev/controllers/shell.rb
|
185
|
+
- lib/dev_system/dev/controllers/shell/bin_shell.rb
|
186
|
+
- lib/dev_system/dev/controllers/shell/bin_shell_test.rb
|
187
|
+
- lib/dev_system/dev/controllers/shell/dir_shell.rb
|
188
|
+
- lib/dev_system/dev/controllers/shell/dir_shell_test.rb
|
168
189
|
- lib/dev_system/dev/controllers/shell/file_shell.rb
|
169
190
|
- lib/dev_system/dev/controllers/shell/file_shell_test.rb
|
191
|
+
- lib/dev_system/dev/controllers/shell/text_shell.rb
|
192
|
+
- lib/dev_system/dev/controllers/shell/text_shell_test.rb
|
170
193
|
- lib/dev_system/dev/controllers/shell_test.rb
|
171
194
|
- lib/dev_system/dev/controllers/terminal.rb
|
172
195
|
- lib/dev_system/dev/controllers/terminal/irb_terminal.rb
|
@@ -176,16 +199,25 @@ files:
|
|
176
199
|
- lib/dev_system/dev/controllers/terminal_test.rb
|
177
200
|
- lib/dev_system/dev/dev_box.rb
|
178
201
|
- lib/dev_system/dev/dev_box_test.rb
|
202
|
+
- lib/dev_system/dev/panels/bench_panel.rb
|
203
|
+
- lib/dev_system/dev/panels/bench_panel_test.rb
|
179
204
|
- lib/dev_system/dev/panels/command_panel.rb
|
180
205
|
- lib/dev_system/dev/panels/command_panel_test.rb
|
206
|
+
- lib/dev_system/dev/panels/generator_panel.rb
|
207
|
+
- lib/dev_system/dev/panels/generator_panel_test.rb
|
181
208
|
- lib/dev_system/dev/panels/log_panel.rb
|
182
209
|
- lib/dev_system/dev/panels/log_panel_test.rb
|
210
|
+
- lib/dev_system/dev/panels/shell_panel.rb
|
211
|
+
- lib/dev_system/dev/panels/shell_panel_test.rb
|
212
|
+
- lib/dev_system/dev/panels/terminal_panel.rb
|
213
|
+
- lib/dev_system/dev/panels/terminal_panel_test.rb
|
183
214
|
- lib/happy_system.rb
|
184
215
|
- lib/happy_system/dev/happy_command.rb
|
185
216
|
- lib/happy_system/happy/controllers/axo.rb
|
186
217
|
- lib/happy_system/happy/happy_box.rb
|
187
218
|
- lib/happy_system/happy/happy_box_test.rb
|
188
219
|
- lib/happy_system/happy/panels/axo_panel.rb
|
220
|
+
- lib/lerb.rb
|
189
221
|
- lib/liza.rb
|
190
222
|
- lib/liza/base/box.rb
|
191
223
|
- lib/liza/base/box_test.rb
|
@@ -193,21 +225,31 @@ files:
|
|
193
225
|
- lib/liza/base/controller_test.rb
|
194
226
|
- lib/liza/base/panel.rb
|
195
227
|
- lib/liza/base/panel_test.rb
|
228
|
+
- lib/liza/base_parts/controller_renderer_part.rb
|
229
|
+
- lib/liza/base_parts/controller_renderer_part_test.rb
|
196
230
|
- lib/liza/meta/part.rb
|
197
231
|
- lib/liza/meta/part_extension.rb
|
198
232
|
- lib/liza/meta/part_test.rb
|
199
233
|
- lib/liza/meta/system.rb
|
200
234
|
- lib/liza/meta/system_test.rb
|
235
|
+
- lib/liza/ruby_test.rb
|
236
|
+
- lib/liza/ruby_tests/module_test.rb
|
237
|
+
- lib/liza/ruby_tests/string_test.rb
|
201
238
|
- lib/liza/test/test.rb
|
202
239
|
- lib/liza/test/test_test.rb
|
240
|
+
- lib/liza/test_parts/test_assertions_advanced_part.rb
|
203
241
|
- lib/liza/test_parts/test_assertions_part.rb
|
204
|
-
- lib/liza/test_parts/test_context_part.rb
|
205
242
|
- lib/liza/test_parts/test_dsl_part.rb
|
243
|
+
- lib/liza/test_parts/test_log_part.rb
|
206
244
|
- lib/liza/test_parts/test_subject_part.rb
|
245
|
+
- lib/liza/test_parts/test_tree_part.rb
|
207
246
|
- lib/liza/unit.rb
|
247
|
+
- lib/liza/unit_parts/unit_procedure_part.rb
|
248
|
+
- lib/liza/unit_parts/unit_procedure_part_test.rb
|
208
249
|
- lib/liza/unit_test.rb
|
209
250
|
- lib/lizarb.rb
|
210
251
|
- lib/lizarb/ruby/class.rb
|
252
|
+
- lib/lizarb/ruby/module.rb
|
211
253
|
- lib/lizarb/ruby/proc.rb
|
212
254
|
- lib/lizarb/ruby/string.rb
|
213
255
|
- lib/lizarb/ruby/time.rb
|
@@ -226,8 +268,8 @@ files:
|
|
226
268
|
- lib/net_system/net/controllers/database/sqlite_db.rb
|
227
269
|
- lib/net_system/net/controllers/database/sqlite_db_test.rb
|
228
270
|
- lib/net_system/net/controllers/database_test.rb
|
229
|
-
- lib/net_system/net/controllers/
|
230
|
-
- lib/net_system/net/controllers/
|
271
|
+
- lib/net_system/net/controllers/record.rb
|
272
|
+
- lib/net_system/net/controllers/record_test.rb
|
231
273
|
- lib/net_system/net/net_box.rb
|
232
274
|
- lib/net_system/net/net_box_test.rb
|
233
275
|
- lib/net_system/net/panels/client_panel.rb
|
@@ -235,12 +277,18 @@ files:
|
|
235
277
|
- lib/net_system/net/panels/database_panel.rb
|
236
278
|
- lib/net_system/net/panels/database_panel_test.rb
|
237
279
|
- lib/web_system.rb
|
280
|
+
- lib/web_system/dev/rack_command.rb
|
281
|
+
- lib/web_system/dev/request_command.rb
|
238
282
|
- lib/web_system/dev/web_command.rb
|
283
|
+
- lib/web_system/web/controllers/rack.rb
|
284
|
+
- lib/web_system/web/controllers/rack_test.rb
|
239
285
|
- lib/web_system/web/controllers/request.rb
|
240
286
|
- lib/web_system/web/controllers/request/client_error_request.rb
|
241
287
|
- lib/web_system/web/controllers/request/not_found_request.rb
|
242
288
|
- lib/web_system/web/controllers/request/server_error_request.rb
|
243
289
|
- lib/web_system/web/controllers/request_test.rb
|
290
|
+
- lib/web_system/web/panels/rack_panel.rb
|
291
|
+
- lib/web_system/web/panels/rack_panel_test.rb
|
244
292
|
- lib/web_system/web/panels/request_panel.rb
|
245
293
|
- lib/web_system/web/panels/request_panel_test.rb
|
246
294
|
- lib/web_system/web/web_box.rb
|
@@ -266,14 +314,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
266
314
|
requirements:
|
267
315
|
- - ">="
|
268
316
|
- !ruby/object:Gem::Version
|
269
|
-
version: 3.
|
317
|
+
version: 3.2.0
|
270
318
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
319
|
requirements:
|
272
320
|
- - ">="
|
273
321
|
- !ruby/object:Gem::Version
|
274
322
|
version: '0'
|
275
323
|
requirements: []
|
276
|
-
rubygems_version: 3.
|
324
|
+
rubygems_version: 3.4.1
|
277
325
|
signing_key:
|
278
326
|
specification_version: 4
|
279
327
|
summary: Application Framework
|
@@ -1,57 +0,0 @@
|
|
1
|
-
class ExampleCommand < AppCommand
|
2
|
-
|
3
|
-
def self.call(args)
|
4
|
-
log :higher, "Called #{self}.#{__method__} with args #{args}"
|
5
|
-
|
6
|
-
class_helper_method_1(args)
|
7
|
-
class_helper_method_2(args)
|
8
|
-
class_helper_method_3(args)
|
9
|
-
|
10
|
-
command = new(args)
|
11
|
-
command.helper_method_1(args)
|
12
|
-
command.helper_method_2(args)
|
13
|
-
command.helper_method_3(args)
|
14
|
-
end
|
15
|
-
|
16
|
-
#
|
17
|
-
|
18
|
-
def self.class_helper_method_1(args)
|
19
|
-
log :higher, "Called #{self}.#{__method__} with args #{args}"
|
20
|
-
1
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.class_helper_method_2(args)
|
24
|
-
log :higher, "Called #{self}.#{__method__} with args #{args}"
|
25
|
-
2
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.class_helper_method_3(args)
|
29
|
-
log :higher, "Called #{self}.#{__method__} with args #{args}"
|
30
|
-
3
|
31
|
-
end
|
32
|
-
|
33
|
-
#
|
34
|
-
|
35
|
-
def initialize(args)
|
36
|
-
log :higher, "Called #{self}.#{__method__} with args #{args}"
|
37
|
-
@init_args = args
|
38
|
-
end
|
39
|
-
|
40
|
-
#
|
41
|
-
|
42
|
-
def helper_method_1(args)
|
43
|
-
log :higher, "Called #{self}.#{__method__} (which has @init_args #{@init_args}) with args #{args}"
|
44
|
-
@init_args[0]
|
45
|
-
end
|
46
|
-
|
47
|
-
def helper_method_2(args)
|
48
|
-
log :higher, "Called #{self}.#{__method__} (which has @init_args #{@init_args}) with args #{args}"
|
49
|
-
@init_args[1]
|
50
|
-
end
|
51
|
-
|
52
|
-
def helper_method_3(args)
|
53
|
-
log :higher, "Called #{self}.#{__method__} (which has @init_args #{@init_args}) with args #{args}"
|
54
|
-
@init_args[2]
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
class ExampleCommandTest < AppCommandTest
|
2
|
-
|
3
|
-
test :subject_class do
|
4
|
-
assert subject_class == ExampleCommand
|
5
|
-
end
|
6
|
-
|
7
|
-
group "class methods" do
|
8
|
-
|
9
|
-
test :class_helper_method_1 do
|
10
|
-
assert subject_class.class_helper_method_1([]) == 1
|
11
|
-
end
|
12
|
-
|
13
|
-
test :class_helper_method_2 do
|
14
|
-
assert subject_class.class_helper_method_2([]) == 2
|
15
|
-
end
|
16
|
-
|
17
|
-
test :class_helper_method_3 do
|
18
|
-
assert subject_class.class_helper_method_3([]) == 3
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
group "instance methods" do
|
24
|
-
|
25
|
-
before do
|
26
|
-
@subject = subject_class.new([1, 2, 3])
|
27
|
-
end
|
28
|
-
|
29
|
-
test :helper_method_1 do
|
30
|
-
assert @subject.helper_method_1([]) == 1
|
31
|
-
end
|
32
|
-
|
33
|
-
test :helper_method_2 do
|
34
|
-
assert @subject.helper_method_2([]) == 2
|
35
|
-
end
|
36
|
-
|
37
|
-
test :helper_method_3 do
|
38
|
-
assert @subject.helper_method_3([]) == 3
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
class MacroChildCommand < MacroParentCommand
|
2
|
-
|
3
|
-
class_macro_method_1 :important_thing
|
4
|
-
class_macro_method_2 :other_thing
|
5
|
-
class_macro_method_3 :other_important_thing
|
6
|
-
class_macro_method_4 :ruby_is_awesome
|
7
|
-
|
8
|
-
#
|
9
|
-
|
10
|
-
def call(args)
|
11
|
-
log :higher, "Called #{self}.#{__method__} (which has @init_args #{@init_args}) with args #{args}"
|
12
|
-
|
13
|
-
if @@class_macro_3
|
14
|
-
@result << :YES_from_instance_call
|
15
|
-
else
|
16
|
-
@result << :NO_from_instance_call
|
17
|
-
end
|
18
|
-
|
19
|
-
@result << helper_method(args)
|
20
|
-
end
|
21
|
-
|
22
|
-
def helper_method(args)
|
23
|
-
log :higher, "Called #{self}.#{__method__} (which has @init_args #{@init_args}) with args #{args}"
|
24
|
-
|
25
|
-
if @@class_macro_4
|
26
|
-
:Yes_from_helper_method
|
27
|
-
else
|
28
|
-
:No_from_helper_method
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
@@ -1,70 +0,0 @@
|
|
1
|
-
class MacroParentCommand < AppCommand
|
2
|
-
|
3
|
-
def self.class_macro_method_1(arg)
|
4
|
-
log :higher, "Called #{self}.#{__method__} with arg #{arg}"
|
5
|
-
@@class_macro_1 = arg
|
6
|
-
end
|
7
|
-
|
8
|
-
def self.class_macro_method_2(arg)
|
9
|
-
log :higher, "Called #{self}.#{__method__} with arg #{arg}"
|
10
|
-
@@class_macro_2 = arg
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.class_macro_method_3(arg)
|
14
|
-
log :higher, "Called #{self}.#{__method__} with arg #{arg}"
|
15
|
-
@@class_macro_3 = arg
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.class_macro_method_4(arg)
|
19
|
-
log :higher, "Called #{self}.#{__method__} with arg #{arg}"
|
20
|
-
@@class_macro_4 = arg
|
21
|
-
end
|
22
|
-
|
23
|
-
#
|
24
|
-
|
25
|
-
def self.call(args)
|
26
|
-
log :higher, "Called #{self}.#{__method__} with args #{args}"
|
27
|
-
|
28
|
-
if @@class_macro_1
|
29
|
-
args << :yes_from_class_call
|
30
|
-
else
|
31
|
-
args << :no_from_class_call
|
32
|
-
end
|
33
|
-
|
34
|
-
command = new(args)
|
35
|
-
result = command.call(args)
|
36
|
-
|
37
|
-
puts <<-OUTPUT
|
38
|
-
|
39
|
-
self: #{self}
|
40
|
-
args: #{args}
|
41
|
-
command: #{command}
|
42
|
-
result: #{result}
|
43
|
-
|
44
|
-
OUTPUT
|
45
|
-
end
|
46
|
-
|
47
|
-
#
|
48
|
-
|
49
|
-
attr_reader :result
|
50
|
-
|
51
|
-
def initialize(args)
|
52
|
-
log :higher, "Called #{self}.#{__method__} with args #{args}"
|
53
|
-
@init_args = args
|
54
|
-
|
55
|
-
@result = [args]
|
56
|
-
|
57
|
-
if @@class_macro_2
|
58
|
-
@result << :yes_from_initialize
|
59
|
-
else
|
60
|
-
@result << :no_from_initialize
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
#
|
65
|
-
|
66
|
-
def call(args)
|
67
|
-
raise NotImplementedError, "implement this on MacroChildCommand"
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
class ModelGenerator < Liza::Generator
|
2
|
-
main_dsl
|
3
|
-
|
4
|
-
FOLDER = "app/net/models"
|
5
|
-
|
6
|
-
generate :controller do
|
7
|
-
folder FOLDER
|
8
|
-
filename "#{name}_model.rb"
|
9
|
-
content model_content name
|
10
|
-
end
|
11
|
-
|
12
|
-
generate :controller_test do
|
13
|
-
folder FOLDER
|
14
|
-
filename "#{name}_model_test.rb"
|
15
|
-
content model_test_content name
|
16
|
-
end
|
17
|
-
|
18
|
-
# helper methods
|
19
|
-
|
20
|
-
def model_content name
|
21
|
-
<<~CODE
|
22
|
-
class #{name.camelize}Model < AppModel
|
23
|
-
set :table, :#{name}s
|
24
|
-
|
25
|
-
end
|
26
|
-
CODE
|
27
|
-
end
|
28
|
-
|
29
|
-
def model_test_content name
|
30
|
-
<<~CODE
|
31
|
-
class #{name.camelize}ModelTest < Liza::ModelTest
|
32
|
-
|
33
|
-
test :subject_class do
|
34
|
-
assert subject_class == #{name.camelize}Model
|
35
|
-
end
|
36
|
-
|
37
|
-
test :settings do
|
38
|
-
assert subject_class.log_level == :normal
|
39
|
-
assert subject_class.log_color == :red
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
43
|
-
CODE
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|
data/app_new/.gitignore
DELETED
data/app_new/Gemfile
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
ruby File.read(".ruby-version").strip
|
6
|
-
|
7
|
-
group :default do
|
8
|
-
gem "lizarb", "~> 1.0"
|
9
|
-
# gem "lizarb", github: "rubyonrails-brasil/lizarb"
|
10
|
-
end
|
11
|
-
|
12
|
-
group :dev do
|
13
|
-
# gems you only want to load if DevSystem is loaded
|
14
|
-
end
|
15
|
-
|
16
|
-
group :happy do
|
17
|
-
# gems you only want to load if HappySystem is loaded
|
18
|
-
end
|
19
|
-
|
20
|
-
group :net do
|
21
|
-
# gems you only want to load if NetSystem is loaded
|
22
|
-
gem "redis", "~> 5.0"
|
23
|
-
gem "sqlite3", "~> 1.5"
|
24
|
-
end
|
25
|
-
|
26
|
-
group :web do
|
27
|
-
# gems you only want to load if WebSystem is loaded
|
28
|
-
gem "rack", "~> 3.0"
|
29
|
-
gem "rackup", "~> 0.2.2"
|
30
|
-
gem "puma", "~> 5.6"
|
31
|
-
end
|
data/app_new/Procfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
class DevSystem
|
2
|
-
class DevCommand < Command
|
3
|
-
|
4
|
-
def self.call args
|
5
|
-
# 1. LOG
|
6
|
-
|
7
|
-
log :higher, "args: #{args}"
|
8
|
-
puts
|
9
|
-
|
10
|
-
# 2. FIND terminal
|
11
|
-
|
12
|
-
terminal = args[0] || "irb"
|
13
|
-
|
14
|
-
log({terminal:})
|
15
|
-
|
16
|
-
terminal_klass = Liza.const "#{terminal}_terminal"
|
17
|
-
|
18
|
-
# 3. CALL
|
19
|
-
|
20
|
-
terminal_klass.call Array(args[1..-1])
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
end
|