lizarb 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.tool-versions +1 -0
  4. data/Gemfile +1 -0
  5. data/Gemfile.lock +7 -4
  6. data/README.md +23 -64
  7. data/README_SYSTEMS.md +80 -0
  8. data/Rakefile +3 -1
  9. data/app/dev/benches/loops_bench.rb +35 -0
  10. data/app/dev/commands/calculator_command.rb +69 -0
  11. data/app/dev/commands/calculator_command_test.rb +58 -0
  12. data/app/dev/commands/circle_command.rb +70 -0
  13. data/app/dev/commands/circle_command_test.rb +76 -0
  14. data/app/dev/commands/narrative_method_command.rb +60 -0
  15. data/app/dev/commands/narrative_method_command_test.rb +36 -0
  16. data/app/dev/commands/quadratic_command.rb +66 -0
  17. data/app/dev/commands/quadratic_command_test.rb +47 -0
  18. data/app/dev/generators/bench_generator/bench.rb.erb +24 -0
  19. data/app/dev/generators/bench_generator/bench_test.rb.erb +12 -0
  20. data/app/dev/generators/bench_generator.rb +2 -51
  21. data/app/dev/generators/command_generator/command.rb.erb +26 -0
  22. data/app/dev/generators/command_generator/command_test.rb.erb +12 -0
  23. data/app/dev/generators/command_generator.rb +2 -35
  24. data/app/dev/generators/record_generator.rb +46 -0
  25. data/app/dev/generators/{model_generator_test.rb → record_generator_test.rb} +2 -2
  26. data/app/dev_box.rb +24 -4
  27. data/app/happy_box.rb +1 -1
  28. data/app/net/databases/sqlite_db_test.rb +5 -5
  29. data/app/net/{models/app_model.rb → records/app_record.rb} +2 -1
  30. data/app/net/records/app_record_test.rb +8 -0
  31. data/app/net/records/post_record.rb +4 -0
  32. data/app/net/records/post_record_test.rb +8 -0
  33. data/app/net/records/user_record.rb +4 -0
  34. data/app/net/records/user_record_test.rb +8 -0
  35. data/app/net_box.rb +7 -7
  36. data/app/web/requests/api_request.rb +8 -7
  37. data/app/web/requests/assets_request.rb +12 -13
  38. data/app/web/requests/root_request.rb +6 -7
  39. data/app/web/requests/root_request_test.rb +1 -1
  40. data/app/web_box.rb +9 -1
  41. data/exe/lrb +3 -0
  42. data/lib/app.rb +19 -15
  43. data/lib/dev_system/dev/controllers/bench/not_found_bench.rb +27 -0
  44. data/lib/dev_system/dev/controllers/{command/dev_command_test.rb → bench/not_found_bench_test.rb} +3 -5
  45. data/lib/dev_system/dev/controllers/bench.rb +5 -7
  46. data/lib/dev_system/dev/controllers/bench_dsl_main_part.rb +37 -39
  47. data/lib/dev_system/dev/controllers/bench_test.rb +8 -10
  48. data/lib/dev_system/dev/controllers/command/bench_command.rb +20 -12
  49. data/lib/dev_system/dev/controllers/command/bench_command_test.rb +8 -10
  50. data/lib/dev_system/dev/controllers/command/echo_command.rb +5 -7
  51. data/lib/dev_system/dev/controllers/command/echo_command_test.rb +8 -10
  52. data/lib/dev_system/dev/controllers/command/generate_command.rb +22 -12
  53. data/lib/dev_system/dev/controllers/command/generate_command_test.rb +8 -10
  54. data/lib/dev_system/dev/controllers/command/not_found_command.rb +27 -0
  55. data/lib/dev_system/dev/controllers/command/not_found_command_test.rb +12 -0
  56. data/lib/dev_system/dev/controllers/command/terminal_command.rb +22 -0
  57. data/lib/dev_system/dev/controllers/command/terminal_command_test.rb +12 -0
  58. data/lib/dev_system/dev/controllers/command/test_command.rb +64 -49
  59. data/lib/dev_system/dev/controllers/command/test_command_test.rb +8 -10
  60. data/lib/dev_system/dev/controllers/command/version_command.rb +4 -6
  61. data/lib/dev_system/dev/controllers/command/version_command_test.rb +8 -10
  62. data/lib/dev_system/dev/controllers/command.rb +11 -13
  63. data/lib/dev_system/dev/controllers/command_test.rb +8 -10
  64. data/lib/dev_system/dev/controllers/generator.rb +5 -7
  65. data/lib/dev_system/dev/controllers/generator_dsl_main_part.rb +35 -37
  66. data/lib/dev_system/dev/controllers/generator_test.rb +8 -10
  67. data/lib/dev_system/dev/controllers/generators/app_generator.rb +122 -47
  68. data/lib/dev_system/dev/controllers/generators/app_generator_test.rb +8 -10
  69. data/lib/dev_system/dev/controllers/generators/generator_generator/generator.rb.erb +18 -0
  70. data/lib/dev_system/dev/controllers/generators/generator_generator/generator_test.rb.erb +12 -0
  71. data/lib/dev_system/dev/controllers/generators/generator_generator/template.rb.erb +9 -0
  72. data/lib/dev_system/dev/controllers/generators/generator_generator/template_test.rb.erb +12 -0
  73. data/lib/dev_system/dev/controllers/generators/generator_generator.rb +30 -0
  74. data/lib/dev_system/dev/controllers/generators/generator_generator_test.rb +12 -0
  75. data/lib/dev_system/dev/controllers/generators/not_found_generator.rb +27 -0
  76. data/lib/dev_system/dev/controllers/generators/not_found_generator_test.rb +12 -0
  77. data/lib/dev_system/dev/controllers/shell/bin_shell.rb +22 -0
  78. data/lib/dev_system/dev/controllers/shell/bin_shell_test.rb +87 -0
  79. data/lib/dev_system/dev/controllers/shell/dir_shell.rb +27 -0
  80. data/lib/dev_system/dev/controllers/shell/dir_shell_test.rb +73 -0
  81. data/lib/dev_system/dev/controllers/shell/file_shell.rb +56 -26
  82. data/lib/dev_system/dev/controllers/shell/file_shell_test.rb +143 -7
  83. data/lib/dev_system/dev/controllers/shell/text_shell.rb +23 -0
  84. data/lib/dev_system/dev/controllers/shell/text_shell_test.rb +84 -0
  85. data/lib/dev_system/dev/controllers/shell.rb +26 -14
  86. data/lib/dev_system/dev/controllers/shell_test.rb +42 -9
  87. data/lib/dev_system/dev/controllers/terminal/irb_terminal.rb +11 -13
  88. data/lib/dev_system/dev/controllers/terminal/irb_terminal_test.rb +8 -10
  89. data/lib/dev_system/dev/controllers/terminal/pry_terminal.rb +6 -8
  90. data/lib/dev_system/dev/controllers/terminal/pry_terminal_test.rb +8 -10
  91. data/lib/dev_system/dev/controllers/terminal.rb +11 -13
  92. data/lib/dev_system/dev/controllers/terminal_test.rb +8 -10
  93. data/lib/dev_system/dev/dev_box.rb +33 -16
  94. data/lib/dev_system/dev/dev_box_test.rb +12 -14
  95. data/lib/dev_system/dev/panels/bench_panel.rb +3 -0
  96. data/lib/dev_system/dev/panels/bench_panel_test.rb +12 -0
  97. data/lib/dev_system/dev/panels/command_panel.rb +24 -6
  98. data/lib/dev_system/dev/panels/command_panel_test.rb +15 -17
  99. data/lib/dev_system/dev/panels/generator_panel.rb +3 -0
  100. data/lib/dev_system/dev/panels/generator_panel_test.rb +12 -0
  101. data/lib/dev_system/dev/panels/log_panel.rb +9 -6
  102. data/lib/dev_system/dev/panels/log_panel_test.rb +11 -13
  103. data/lib/dev_system/dev/panels/shell_panel.rb +3 -0
  104. data/lib/dev_system/dev/panels/shell_panel_test.rb +12 -0
  105. data/lib/dev_system/dev/panels/terminal_panel.rb +3 -0
  106. data/lib/dev_system/dev/panels/terminal_panel_test.rb +12 -0
  107. data/lib/happy_system/happy/controllers/axo.rb +4 -5
  108. data/lib/happy_system/happy/happy_box.rb +6 -9
  109. data/lib/happy_system/happy/happy_box_test.rb +11 -13
  110. data/lib/happy_system/happy/panels/axo_panel.rb +1 -3
  111. data/lib/lerb.rb +106 -0
  112. data/lib/liza/base/box.rb +71 -26
  113. data/lib/liza/base/box_test.rb +7 -9
  114. data/lib/liza/base/controller.rb +19 -19
  115. data/lib/liza/base/controller_test.rb +7 -9
  116. data/lib/liza/base/panel.rb +40 -24
  117. data/lib/liza/base/panel_test.rb +10 -12
  118. data/lib/liza/base_parts/controller_renderer_part.rb +140 -0
  119. data/lib/liza/base_parts/controller_renderer_part_test.rb +16 -0
  120. data/lib/liza/meta/part.rb +12 -14
  121. data/lib/liza/meta/part_extension.rb +14 -11
  122. data/lib/liza/meta/part_test.rb +4 -6
  123. data/lib/liza/meta/system.rb +12 -14
  124. data/lib/liza/meta/system_test.rb +8 -10
  125. data/lib/liza/ruby_test.rb +7 -0
  126. data/lib/liza/ruby_tests/module_test.rb +21 -0
  127. data/lib/liza/ruby_tests/string_test.rb +59 -0
  128. data/lib/liza/test/test.rb +7 -8
  129. data/lib/liza/test/test_test.rb +168 -76
  130. data/lib/liza/test_parts/test_assertions_advanced_part.rb +125 -0
  131. data/lib/liza/test_parts/test_assertions_part.rb +81 -82
  132. data/lib/liza/test_parts/test_dsl_part.rb +44 -98
  133. data/lib/liza/test_parts/test_log_part.rb +122 -0
  134. data/lib/liza/test_parts/test_subject_part.rb +16 -18
  135. data/lib/liza/test_parts/test_tree_part.rb +137 -0
  136. data/lib/liza/unit.rb +108 -102
  137. data/lib/liza/unit_parts/unit_procedure_part.rb +17 -0
  138. data/lib/liza/unit_parts/unit_procedure_part_test.rb +65 -0
  139. data/lib/liza/unit_test.rb +69 -71
  140. data/lib/liza.rb +5 -0
  141. data/lib/lizarb/ruby/module.rb +17 -0
  142. data/lib/lizarb/ruby/string.rb +10 -2
  143. data/lib/lizarb/version.rb +1 -1
  144. data/lib/lizarb.rb +24 -2
  145. data/lib/net_system/dev/net_command.rb +10 -12
  146. data/lib/net_system/net/controllers/client/redis_client.rb +19 -21
  147. data/lib/net_system/net/controllers/client/redis_client_test.rb +20 -22
  148. data/lib/net_system/net/controllers/client/sqlite_client.rb +19 -21
  149. data/lib/net_system/net/controllers/client/sqlite_client_test.rb +20 -22
  150. data/lib/net_system/net/controllers/client.rb +1 -3
  151. data/lib/net_system/net/controllers/client_test.rb +8 -10
  152. data/lib/net_system/net/controllers/database/redis_db.rb +6 -8
  153. data/lib/net_system/net/controllers/database/redis_db_test.rb +15 -17
  154. data/lib/net_system/net/controllers/database/sqlite_db.rb +6 -8
  155. data/lib/net_system/net/controllers/database/sqlite_db_test.rb +15 -17
  156. data/lib/net_system/net/controllers/database.rb +21 -23
  157. data/lib/net_system/net/controllers/database_test.rb +8 -10
  158. data/lib/net_system/net/controllers/record.rb +29 -0
  159. data/lib/net_system/net/controllers/record_test.rb +12 -0
  160. data/lib/net_system/net/net_box.rb +11 -16
  161. data/lib/net_system/net/net_box_test.rb +12 -14
  162. data/lib/net_system/net/panels/client_panel.rb +1 -3
  163. data/lib/net_system/net/panels/client_panel_test.rb +11 -13
  164. data/lib/net_system/net/panels/database_panel.rb +6 -8
  165. data/lib/net_system/net/panels/database_panel_test.rb +11 -13
  166. data/lib/web_system/dev/rack_command.rb +35 -0
  167. data/lib/web_system/dev/request_command.rb +143 -0
  168. data/lib/web_system/dev/web_command.rb +6 -39
  169. data/lib/web_system/web/controllers/rack.rb +6 -0
  170. data/lib/web_system/web/controllers/rack_test.rb +16 -0
  171. data/lib/web_system/web/controllers/request/client_error_request.rb +9 -12
  172. data/lib/web_system/web/controllers/request/not_found_request.rb +9 -12
  173. data/lib/web_system/web/controllers/request/server_error_request.rb +10 -13
  174. data/lib/web_system/web/controllers/request.rb +1 -3
  175. data/lib/web_system/web/controllers/request_test.rb +11 -13
  176. data/lib/web_system/web/panels/rack_panel.rb +42 -0
  177. data/lib/web_system/web/panels/rack_panel_test.rb +12 -0
  178. data/lib/web_system/web/panels/request_panel.rb +54 -37
  179. data/lib/web_system/web/panels/request_panel_test.rb +28 -9
  180. data/lib/web_system/web/web_box.rb +16 -8
  181. data/lib/web_system/web/web_box_test.rb +11 -13
  182. data/lizarb.gemspec +2 -2
  183. metadata +76 -28
  184. data/app/dev/commands/example_command.rb +0 -57
  185. data/app/dev/commands/example_command_test.rb +0 -43
  186. data/app/dev/commands/macro_child_command.rb +0 -32
  187. data/app/dev/commands/macro_child_command_test.rb +0 -7
  188. data/app/dev/commands/macro_parent_command.rb +0 -70
  189. data/app/dev/commands/macro_parent_command_test.rb +0 -7
  190. data/app/dev/commands/my_command.rb +0 -7
  191. data/app/dev/commands/my_command_test.rb +0 -7
  192. data/app/dev/generators/model_generator.rb +0 -46
  193. data/app/net/models/app_model_test.rb +0 -8
  194. data/app/net/models/post_model.rb +0 -4
  195. data/app/net/models/post_model_test.rb +0 -8
  196. data/app/net/models/user_model.rb +0 -4
  197. data/app/net/models/user_model_test.rb +0 -8
  198. data/app_new/.gitignore +0 -4
  199. data/app_new/Gemfile +0 -31
  200. data/app_new/Procfile +0 -3
  201. data/lib/dev_system/dev/controllers/command/dev_command.rb +0 -24
  202. data/lib/liza/test_parts/test_context_part.rb +0 -81
  203. data/lib/net_system/net/controllers/model.rb +0 -31
  204. 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.1
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: 2022-10-28 00:00:00.000000000 Z
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/example_command.rb
96
- - app/dev/commands/example_command_test.rb
97
- - app/dev/commands/macro_child_command.rb
98
- - app/dev/commands/macro_child_command_test.rb
99
- - app/dev/commands/macro_parent_command.rb
100
- - app/dev/commands/macro_parent_command_test.rb
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/model_generator.rb
110
- - app/dev/generators/model_generator_test.rb
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/models/app_model.rb
121
- - app/net/models/app_model_test.rb
122
- - app/net/models/post_model.rb
123
- - app/net/models/post_model_test.rb
124
- - app/net/models/user_model.rb
125
- - app/net/models/user_model_test.rb
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/model.rb
230
- - lib/net_system/net/controllers/model_test.rb
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.1.0
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.3.7
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,7 +0,0 @@
1
- class MacroChildCommandTest < AppCommandTest
2
-
3
- test :subject_class do
4
- assert subject_class == MacroChildCommand
5
- end
6
-
7
- 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,7 +0,0 @@
1
- class MacroParentCommandTest < AppCommandTest
2
-
3
- test :subject_class do
4
- assert subject_class == MacroParentCommand
5
- end
6
-
7
- end
@@ -1,7 +0,0 @@
1
- class MyCommand < AppCommand
2
-
3
- def self.call args
4
- log :higher, "Called #{self}.#{__method__} with args #{args}"
5
- end
6
-
7
- end
@@ -1,7 +0,0 @@
1
- class MyCommandTest < AppCommandTest
2
-
3
- test :subject_class do
4
- assert subject_class == MyCommand
5
- end
6
-
7
- 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
@@ -1,8 +0,0 @@
1
- class AppModelTest < Liza::ModelTest
2
-
3
- test :subject_class do
4
- assert subject_class == AppModel
5
- assert subject_class.db == SqliteDb.current
6
- end
7
-
8
- end
@@ -1,4 +0,0 @@
1
- class PostModel < AppModel
2
- set :table, :posts
3
-
4
- end
@@ -1,8 +0,0 @@
1
- class PostModelTest < Liza::ModelTest
2
-
3
- test :subject_class do
4
- assert subject_class == PostModel
5
- assert subject_class.db == SqliteDb.current
6
- end
7
-
8
- end
@@ -1,4 +0,0 @@
1
- class UserModel < AppModel
2
- set :table, :users
3
-
4
- end
@@ -1,8 +0,0 @@
1
- class UserModelTest < Liza::ModelTest
2
-
3
- test :subject_class do
4
- assert subject_class == UserModel
5
- assert subject_class.db == SqliteDb.current
6
- end
7
-
8
- end
data/app_new/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- .gitignore/.bundle/
2
- /tmp/
3
- *.sqlite
4
- *.rdb
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,3 +0,0 @@
1
- # FOR HEROKU
2
-
3
- web: LIZA_MODE=demo bundle exec liza web h=0.0.0.0 p=$PORT
@@ -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