lizarb 1.0.2 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +12 -13
  3. data/Rakefile +38 -0
  4. data/app/dev_box.rb +26 -4
  5. data/app/happy_box.rb +2 -2
  6. data/app/net/databases/sqlite_db_test.rb +5 -5
  7. data/app/net/records/app_record_test.rb +1 -1
  8. data/app/net/records/post_record_test.rb +1 -1
  9. data/app/net/records/user_record_test.rb +1 -1
  10. data/app/net_box.rb +9 -9
  11. data/app/web_box.rb +4 -4
  12. data/app.rb +6 -7
  13. data/{exe/Gemfile → app_global.gemfile.rb} +2 -0
  14. data/app_global.gemfile.rb.lock +19 -0
  15. data/app_global.rb +4 -0
  16. data/{app → app_new}/dev/benches/loops_bench.rb +3 -2
  17. data/{app/dev/generators/bench_generator_test.rb → app_new/dev/benches/loops_bench_test.rb} +2 -2
  18. data/app_new/dev/benches/objects_bench.rb +83 -0
  19. data/{app/dev/generators/record_generator_test.rb → app_new/dev/benches/objects_bench_test.rb} +2 -2
  20. data/app_new/dev/benches/sorted_bench.rb +54 -0
  21. data/app_new/dev/benches/sorted_bench_test.rb +12 -0
  22. data/app_new/dev/benches/variables_bench.rb +55 -0
  23. data/{app/dev/generators/command_generator_test.rb → app_new/dev/benches/variables_bench_test.rb} +2 -2
  24. data/{app → app_new}/dev/commands/calculator_command.rb +1 -1
  25. data/{app → app_new}/dev/commands/circle_command.rb +1 -1
  26. data/{app → app_new}/dev/commands/narrative_method_command.rb +5 -7
  27. data/{app → app_new}/dev/commands/quadratic_command.rb +1 -1
  28. data/app_new/dev_box.rb +14 -0
  29. data/app_new.rb +15 -0
  30. data/exe/lizarb +9 -1
  31. data/lib/app.rb +27 -95
  32. data/lib/dev_system/dev/controllers/bench/not_found_bench.rb +23 -18
  33. data/lib/dev_system/dev/controllers/bench/not_found_bench_test.rb +9 -11
  34. data/lib/dev_system/dev/controllers/bench.rb +1 -9
  35. data/lib/dev_system/dev/controllers/bench_test.rb +8 -10
  36. data/lib/dev_system/dev/controllers/command/bench_command.rb +19 -22
  37. data/lib/dev_system/dev/controllers/command/bench_command_test.rb +8 -10
  38. data/lib/dev_system/dev/controllers/command/generate_command.rb +5 -31
  39. data/lib/dev_system/dev/controllers/command/generate_command_test.rb +8 -10
  40. data/lib/dev_system/dev/controllers/command/new_command.rb +9 -0
  41. data/lib/dev_system/dev/controllers/command/new_command_test.rb +7 -0
  42. data/lib/dev_system/dev/controllers/command/not_found_command.rb +37 -18
  43. data/lib/dev_system/dev/controllers/command/not_found_command_test.rb +8 -10
  44. data/lib/dev_system/dev/controllers/command/terminal_command.rb +12 -14
  45. data/lib/dev_system/dev/controllers/command/terminal_command_test.rb +8 -10
  46. data/lib/dev_system/dev/controllers/command/test_command.rb +64 -53
  47. data/lib/dev_system/dev/controllers/command/test_command_test.rb +8 -10
  48. data/lib/dev_system/dev/controllers/command.rb +9 -15
  49. data/lib/dev_system/dev/controllers/command_test.rb +8 -10
  50. data/lib/dev_system/dev/controllers/generator.rb +5 -7
  51. data/lib/dev_system/dev/controllers/generator_dsl_main_part.rb +33 -37
  52. data/lib/dev_system/dev/controllers/generator_test.rb +8 -10
  53. data/{app/dev/generators/bench_generator/bench.rb.erb → lib/dev_system/dev/controllers/generators/bench_generator/controller.rb.erb} +1 -2
  54. data/{app/dev/generators/bench_generator/bench_test.rb.erb → lib/dev_system/dev/controllers/generators/bench_generator/controller_test.rb.erb} +2 -2
  55. data/lib/dev_system/dev/controllers/generators/bench_generator.rb +12 -0
  56. data/lib/dev_system/dev/controllers/generators/bench_generator_test.rb +12 -0
  57. data/lib/dev_system/dev/controllers/generators/command_generator/controller.rb.erb +41 -0
  58. data/{app/dev/generators/command_generator/command_test.rb.erb → lib/dev_system/dev/controllers/generators/command_generator/controller_test.rb.erb} +2 -2
  59. data/lib/dev_system/dev/controllers/generators/command_generator.rb +19 -0
  60. data/lib/dev_system/dev/controllers/generators/command_generator_test.rb +12 -0
  61. data/lib/dev_system/dev/controllers/generators/controller_generator.rb +97 -0
  62. data/lib/dev_system/dev/controllers/generators/controller_generator_test.rb +12 -0
  63. data/lib/dev_system/dev/controllers/generators/generator_generator/template.rb.erb +1 -1
  64. data/lib/dev_system/dev/controllers/generators/new_generator.rb +117 -0
  65. data/lib/dev_system/dev/controllers/generators/new_generator_test.rb +12 -0
  66. data/lib/dev_system/dev/controllers/generators/not_found_generator.rb +27 -17
  67. data/lib/dev_system/dev/controllers/generators/not_found_generator_test.rb +8 -10
  68. data/{app/dev → lib/dev_system/dev/controllers}/generators/record_generator.rb +1 -1
  69. data/lib/dev_system/dev/controllers/generators/record_generator_test.rb +12 -0
  70. data/{app/dev → lib/dev_system/dev/controllers}/generators/request_generator.rb +2 -2
  71. data/lib/dev_system/dev/controllers/generators/request_generator_test.rb +12 -0
  72. data/lib/dev_system/dev/controllers/log.rb +3 -0
  73. data/{app/dev/generators/request_generator_test.rb → lib/dev_system/dev/controllers/log_test.rb} +2 -2
  74. data/lib/dev_system/dev/controllers/shell.rb +22 -0
  75. data/lib/dev_system/dev/controllers/shell_test.rb +25 -0
  76. data/lib/dev_system/dev/controllers/terminal/irb_terminal.rb +15 -11
  77. data/lib/dev_system/dev/controllers/terminal/irb_terminal_test.rb +8 -10
  78. data/lib/dev_system/dev/controllers/terminal/pry_terminal.rb +6 -8
  79. data/lib/dev_system/dev/controllers/terminal/pry_terminal_test.rb +8 -10
  80. data/lib/dev_system/dev/controllers/terminal.rb +11 -13
  81. data/lib/dev_system/dev/controllers/terminal_test.rb +8 -10
  82. data/lib/dev_system/dev/dev_box.rb +27 -16
  83. data/lib/dev_system/dev/dev_box_test.rb +12 -14
  84. data/lib/dev_system/dev/panels/bench_panel.rb +3 -0
  85. data/lib/dev_system/dev/panels/bench_panel_test.rb +12 -0
  86. data/lib/dev_system/dev/panels/command_panel.rb +59 -18
  87. data/lib/dev_system/dev/panels/command_panel_test.rb +43 -20
  88. data/lib/dev_system/dev/panels/generator_panel.rb +73 -0
  89. data/lib/dev_system/dev/panels/generator_panel_test.rb +46 -0
  90. data/lib/dev_system/dev/panels/log_panel.rb +9 -6
  91. data/lib/dev_system/dev/panels/log_panel_test.rb +11 -13
  92. data/lib/dev_system/dev/panels/shell_panel.rb +3 -0
  93. data/lib/dev_system/dev/panels/shell_panel_test.rb +12 -0
  94. data/lib/dev_system/dev/panels/terminal_panel.rb +3 -0
  95. data/lib/dev_system/dev/panels/terminal_panel_test.rb +12 -0
  96. data/lib/happy_system/happy/controllers/axo.rb +4 -5
  97. data/lib/happy_system/happy/happy_box.rb +5 -9
  98. data/lib/happy_system/happy/happy_box_test.rb +11 -13
  99. data/lib/happy_system/happy/panels/axo_panel.rb +1 -3
  100. data/lib/lerb.rb +95 -49
  101. data/lib/liza/base/box.rb +76 -26
  102. data/lib/liza/base/box_test.rb +7 -9
  103. data/lib/liza/base/controller.rb +19 -21
  104. data/lib/liza/base/controller_test.rb +7 -9
  105. data/lib/liza/base/panel.rb +40 -27
  106. data/lib/liza/base/panel_test.rb +36 -12
  107. data/lib/liza/base_parts/controller_renderer_part.rb +1 -1
  108. data/lib/liza/meta/part.rb +12 -14
  109. data/lib/liza/meta/part_extension.rb +14 -16
  110. data/lib/liza/meta/part_test.rb +4 -6
  111. data/lib/liza/meta/system.rb +12 -14
  112. data/lib/liza/meta/system_test.rb +8 -10
  113. data/lib/liza/ruby_test.rb +4 -6
  114. data/lib/liza/ruby_tests/module_test.rb +3 -3
  115. data/lib/liza/test/test.rb +7 -10
  116. data/lib/liza/test/test_test.rb +160 -157
  117. data/lib/liza/test_parts/test_assertions_advanced_part.rb +102 -104
  118. data/lib/liza/test_parts/test_assertions_part.rb +81 -83
  119. data/lib/liza/test_parts/test_dsl_part.rb +47 -49
  120. data/lib/liza/test_parts/test_log_part.rb +88 -90
  121. data/lib/liza/test_parts/test_subject_part.rb +16 -18
  122. data/lib/liza/test_parts/test_tree_part.rb +73 -120
  123. data/lib/liza/unit.rb +105 -107
  124. data/lib/liza/unit_parts/unit_procedure_part_test.rb +9 -9
  125. data/lib/liza/unit_parts/unit_settings_part.rb +76 -0
  126. data/lib/liza/unit_parts/unit_settings_part_test.rb +3 -0
  127. data/lib/liza/unit_test.rb +80 -71
  128. data/lib/liza.rb +10 -1
  129. data/lib/lizarb/ruby/module.rb +1 -1
  130. data/lib/lizarb/version.rb +1 -1
  131. data/lib/lizarb.rb +247 -23
  132. data/lib/net_system/dev/net_command.rb +15 -17
  133. data/lib/net_system/net/controllers/client/redis_client.rb +19 -21
  134. data/lib/net_system/net/controllers/client/redis_client_test.rb +20 -22
  135. data/lib/net_system/net/controllers/client/sqlite_client.rb +19 -21
  136. data/lib/net_system/net/controllers/client/sqlite_client_test.rb +20 -22
  137. data/lib/net_system/net/controllers/client.rb +1 -3
  138. data/lib/net_system/net/controllers/client_test.rb +8 -10
  139. data/lib/net_system/net/controllers/database/redis_db.rb +6 -8
  140. data/lib/net_system/net/controllers/database/redis_db_test.rb +15 -17
  141. data/lib/net_system/net/controllers/database/sqlite_db.rb +6 -8
  142. data/lib/net_system/net/controllers/database/sqlite_db_test.rb +15 -17
  143. data/lib/net_system/net/controllers/database.rb +21 -23
  144. data/lib/net_system/net/controllers/database_test.rb +8 -10
  145. data/lib/net_system/net/controllers/record.rb +21 -23
  146. data/lib/net_system/net/controllers/record_test.rb +8 -10
  147. data/lib/net_system/net/net_box.rb +9 -16
  148. data/lib/net_system/net/net_box_test.rb +12 -14
  149. data/lib/net_system/net/panels/client_panel.rb +1 -3
  150. data/lib/net_system/net/panels/client_panel_test.rb +11 -13
  151. data/lib/net_system/net/panels/database_panel.rb +6 -8
  152. data/lib/net_system/net/panels/database_panel_test.rb +11 -13
  153. data/lib/web_system/dev/rack_command.rb +20 -18
  154. data/lib/web_system/dev/request_command.rb +8 -22
  155. data/lib/web_system/dev/web_command.rb +6 -8
  156. data/lib/web_system/web/controllers/rack.rb +4 -6
  157. data/lib/web_system/web/controllers/rack_test.rb +11 -13
  158. data/lib/web_system/web/controllers/request/client_error_request.rb +9 -11
  159. data/lib/web_system/web/controllers/request/not_found_request.rb +9 -11
  160. data/lib/web_system/web/controllers/request/server_error_request.rb +10 -12
  161. data/lib/web_system/web/controllers/request.rb +1 -3
  162. data/lib/web_system/web/controllers/request_test.rb +11 -13
  163. data/lib/web_system/web/panels/rack_panel.rb +37 -39
  164. data/lib/web_system/web/panels/rack_panel_test.rb +8 -10
  165. data/lib/web_system/web/panels/request_panel.rb +53 -57
  166. data/lib/web_system/web/panels/request_panel_test.rb +1 -1
  167. data/lib/web_system/web/web_box.rb +12 -18
  168. data/lib/web_system/web/web_box_test.rb +11 -13
  169. data/lizarb.gemspec +1 -1
  170. metadata +54 -44
  171. data/.ruby-version +0 -1
  172. data/app/dev/benches/app_bench.rb +0 -5
  173. data/app/dev/benches/app_bench_test.rb +0 -7
  174. data/app/dev/benches/loops_bench_test.rb +0 -11
  175. data/app/dev/commands/app_command.rb +0 -5
  176. data/app/dev/commands/app_command_test.rb +0 -7
  177. data/app/dev/commands/new_command.rb +0 -9
  178. data/app/dev/commands/new_command_test.rb +0 -7
  179. data/app/dev/generators/bench_generator.rb +0 -18
  180. data/app/dev/generators/command_generator/command.rb.erb +0 -26
  181. data/app/dev/generators/command_generator.rb +0 -18
  182. data/app_new/.gitignore +0 -4
  183. data/app_new/Gemfile +0 -31
  184. data/app_new/Procfile +0 -3
  185. data/exe/Gemfile.lock +0 -13
  186. data/lib/dev_system/dev/controllers/bench_dsl_main_part.rb +0 -60
  187. data/lib/dev_system/dev/controllers/command/echo_command.rb +0 -11
  188. data/lib/dev_system/dev/controllers/command/echo_command_test.rb +0 -14
  189. data/lib/dev_system/dev/controllers/command/version_command.rb +0 -9
  190. data/lib/dev_system/dev/controllers/command/version_command_test.rb +0 -14
  191. data/lib/dev_system/dev/controllers/generators/app_generator.rb +0 -96
  192. data/lib/dev_system/dev/controllers/generators/app_generator_test.rb +0 -14
  193. /data/{app → app_new}/dev/commands/calculator_command_test.rb +0 -0
  194. /data/{app → app_new}/dev/commands/circle_command_test.rb +0 -0
  195. /data/{app → app_new}/dev/commands/narrative_method_command_test.rb +0 -0
  196. /data/{app → app_new}/dev/commands/quadratic_command_test.rb +0 -0
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.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Pinto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-26 00:00:00.000000000 Z
11
+ date: 2023-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -76,7 +76,6 @@ executables:
76
76
  extensions: []
77
77
  extra_rdoc_files: []
78
78
  files:
79
- - ".ruby-version"
80
79
  - ".tool-versions"
81
80
  - CHANGELOG.md
82
81
  - CODE_OF_CONDUCT.md
@@ -89,34 +88,6 @@ files:
89
88
  - app.code.env
90
89
  - app.env
91
90
  - app.rb
92
- - app/dev/benches/app_bench.rb
93
- - app/dev/benches/app_bench_test.rb
94
- - app/dev/benches/loops_bench.rb
95
- - app/dev/benches/loops_bench_test.rb
96
- - app/dev/commands/app_command.rb
97
- - app/dev/commands/app_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
104
- - app/dev/commands/new_command.rb
105
- - app/dev/commands/new_command_test.rb
106
- - app/dev/commands/quadratic_command.rb
107
- - app/dev/commands/quadratic_command_test.rb
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
111
- - app/dev/generators/bench_generator_test.rb
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
115
- - app/dev/generators/command_generator_test.rb
116
- - app/dev/generators/record_generator.rb
117
- - app/dev/generators/record_generator_test.rb
118
- - app/dev/generators/request_generator.rb
119
- - app/dev/generators/request_generator_test.rb
120
91
  - app/dev_box.rb
121
92
  - app/happy/axos/axo.rb
122
93
  - app/happy_box.rb
@@ -140,11 +111,27 @@ files:
140
111
  - app/web/requests/root_request.rb
141
112
  - app/web/requests/root_request_test.rb
142
113
  - app/web_box.rb
143
- - app_new/.gitignore
144
- - app_new/Gemfile
145
- - app_new/Procfile
146
- - exe/Gemfile
147
- - exe/Gemfile.lock
114
+ - app_global.gemfile.rb
115
+ - app_global.gemfile.rb.lock
116
+ - app_global.rb
117
+ - app_new.rb
118
+ - app_new/dev/benches/loops_bench.rb
119
+ - app_new/dev/benches/loops_bench_test.rb
120
+ - app_new/dev/benches/objects_bench.rb
121
+ - app_new/dev/benches/objects_bench_test.rb
122
+ - app_new/dev/benches/sorted_bench.rb
123
+ - app_new/dev/benches/sorted_bench_test.rb
124
+ - app_new/dev/benches/variables_bench.rb
125
+ - app_new/dev/benches/variables_bench_test.rb
126
+ - app_new/dev/commands/calculator_command.rb
127
+ - app_new/dev/commands/calculator_command_test.rb
128
+ - app_new/dev/commands/circle_command.rb
129
+ - app_new/dev/commands/circle_command_test.rb
130
+ - app_new/dev/commands/narrative_method_command.rb
131
+ - app_new/dev/commands/narrative_method_command_test.rb
132
+ - app_new/dev/commands/quadratic_command.rb
133
+ - app_new/dev/commands/quadratic_command_test.rb
134
+ - app_new/dev_box.rb
148
135
  - exe/liza
149
136
  - exe/lizarb
150
137
  - exe/lrb
@@ -153,37 +140,50 @@ files:
153
140
  - lib/dev_system/dev/controllers/bench.rb
154
141
  - lib/dev_system/dev/controllers/bench/not_found_bench.rb
155
142
  - lib/dev_system/dev/controllers/bench/not_found_bench_test.rb
156
- - lib/dev_system/dev/controllers/bench_dsl_main_part.rb
157
143
  - lib/dev_system/dev/controllers/bench_test.rb
158
144
  - lib/dev_system/dev/controllers/command.rb
159
145
  - lib/dev_system/dev/controllers/command/bench_command.rb
160
146
  - lib/dev_system/dev/controllers/command/bench_command_test.rb
161
- - lib/dev_system/dev/controllers/command/echo_command.rb
162
- - lib/dev_system/dev/controllers/command/echo_command_test.rb
163
147
  - lib/dev_system/dev/controllers/command/generate_command.rb
164
148
  - lib/dev_system/dev/controllers/command/generate_command_test.rb
149
+ - lib/dev_system/dev/controllers/command/new_command.rb
150
+ - lib/dev_system/dev/controllers/command/new_command_test.rb
165
151
  - lib/dev_system/dev/controllers/command/not_found_command.rb
166
152
  - lib/dev_system/dev/controllers/command/not_found_command_test.rb
167
153
  - lib/dev_system/dev/controllers/command/terminal_command.rb
168
154
  - lib/dev_system/dev/controllers/command/terminal_command_test.rb
169
155
  - lib/dev_system/dev/controllers/command/test_command.rb
170
156
  - lib/dev_system/dev/controllers/command/test_command_test.rb
171
- - lib/dev_system/dev/controllers/command/version_command.rb
172
- - lib/dev_system/dev/controllers/command/version_command_test.rb
173
157
  - lib/dev_system/dev/controllers/command_test.rb
174
158
  - lib/dev_system/dev/controllers/generator.rb
175
159
  - lib/dev_system/dev/controllers/generator_dsl_main_part.rb
176
160
  - lib/dev_system/dev/controllers/generator_test.rb
177
- - lib/dev_system/dev/controllers/generators/app_generator.rb
178
- - lib/dev_system/dev/controllers/generators/app_generator_test.rb
161
+ - lib/dev_system/dev/controllers/generators/bench_generator.rb
162
+ - lib/dev_system/dev/controllers/generators/bench_generator/controller.rb.erb
163
+ - lib/dev_system/dev/controllers/generators/bench_generator/controller_test.rb.erb
164
+ - lib/dev_system/dev/controllers/generators/bench_generator_test.rb
165
+ - lib/dev_system/dev/controllers/generators/command_generator.rb
166
+ - lib/dev_system/dev/controllers/generators/command_generator/controller.rb.erb
167
+ - lib/dev_system/dev/controllers/generators/command_generator/controller_test.rb.erb
168
+ - lib/dev_system/dev/controllers/generators/command_generator_test.rb
169
+ - lib/dev_system/dev/controllers/generators/controller_generator.rb
170
+ - lib/dev_system/dev/controllers/generators/controller_generator_test.rb
179
171
  - lib/dev_system/dev/controllers/generators/generator_generator.rb
180
172
  - lib/dev_system/dev/controllers/generators/generator_generator/generator.rb.erb
181
173
  - lib/dev_system/dev/controllers/generators/generator_generator/generator_test.rb.erb
182
174
  - lib/dev_system/dev/controllers/generators/generator_generator/template.rb.erb
183
175
  - lib/dev_system/dev/controllers/generators/generator_generator/template_test.rb.erb
184
176
  - lib/dev_system/dev/controllers/generators/generator_generator_test.rb
177
+ - lib/dev_system/dev/controllers/generators/new_generator.rb
178
+ - lib/dev_system/dev/controllers/generators/new_generator_test.rb
185
179
  - lib/dev_system/dev/controllers/generators/not_found_generator.rb
186
180
  - lib/dev_system/dev/controllers/generators/not_found_generator_test.rb
181
+ - lib/dev_system/dev/controllers/generators/record_generator.rb
182
+ - lib/dev_system/dev/controllers/generators/record_generator_test.rb
183
+ - lib/dev_system/dev/controllers/generators/request_generator.rb
184
+ - lib/dev_system/dev/controllers/generators/request_generator_test.rb
185
+ - lib/dev_system/dev/controllers/log.rb
186
+ - lib/dev_system/dev/controllers/log_test.rb
187
187
  - lib/dev_system/dev/controllers/shell.rb
188
188
  - lib/dev_system/dev/controllers/shell/bin_shell.rb
189
189
  - lib/dev_system/dev/controllers/shell/bin_shell_test.rb
@@ -202,10 +202,18 @@ files:
202
202
  - lib/dev_system/dev/controllers/terminal_test.rb
203
203
  - lib/dev_system/dev/dev_box.rb
204
204
  - lib/dev_system/dev/dev_box_test.rb
205
+ - lib/dev_system/dev/panels/bench_panel.rb
206
+ - lib/dev_system/dev/panels/bench_panel_test.rb
205
207
  - lib/dev_system/dev/panels/command_panel.rb
206
208
  - lib/dev_system/dev/panels/command_panel_test.rb
209
+ - lib/dev_system/dev/panels/generator_panel.rb
210
+ - lib/dev_system/dev/panels/generator_panel_test.rb
207
211
  - lib/dev_system/dev/panels/log_panel.rb
208
212
  - lib/dev_system/dev/panels/log_panel_test.rb
213
+ - lib/dev_system/dev/panels/shell_panel.rb
214
+ - lib/dev_system/dev/panels/shell_panel_test.rb
215
+ - lib/dev_system/dev/panels/terminal_panel.rb
216
+ - lib/dev_system/dev/panels/terminal_panel_test.rb
209
217
  - lib/happy_system.rb
210
218
  - lib/happy_system/dev/happy_command.rb
211
219
  - lib/happy_system/happy/controllers/axo.rb
@@ -241,6 +249,8 @@ files:
241
249
  - lib/liza/unit.rb
242
250
  - lib/liza/unit_parts/unit_procedure_part.rb
243
251
  - lib/liza/unit_parts/unit_procedure_part_test.rb
252
+ - lib/liza/unit_parts/unit_settings_part.rb
253
+ - lib/liza/unit_parts/unit_settings_part_test.rb
244
254
  - lib/liza/unit_test.rb
245
255
  - lib/lizarb.rb
246
256
  - lib/lizarb/ruby/class.rb
@@ -309,7 +319,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
309
319
  requirements:
310
320
  - - ">="
311
321
  - !ruby/object:Gem::Version
312
- version: 3.2.0
322
+ version: 3.1.0
313
323
  required_rubygems_version: !ruby/object:Gem::Requirement
314
324
  requirements:
315
325
  - - ">="
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.2.0
@@ -1,5 +0,0 @@
1
- class AppBench < Liza::Bench
2
-
3
- # Set up your bench controllers per the DSL in http://guides.lizarb.org/controllers/bench.html
4
-
5
- end
@@ -1,7 +0,0 @@
1
- class AppBenchTest < Liza::BenchTest
2
-
3
- test :subject_class do
4
- assert subject_class == AppBench
5
- end
6
-
7
- end
@@ -1,11 +0,0 @@
1
- class LoopsBenchTest < AppBenchTest
2
-
3
- test :subject_class do
4
- assert subject_class == LoopsBench
5
- end
6
-
7
- test :marks do
8
- assert subject_class.marks.keys.count.positive?
9
- end
10
-
11
- end
@@ -1,5 +0,0 @@
1
- class AppCommand < Liza::Command
2
-
3
- # Set up your command controllers per the DSL in http://guides.lizarb.org/controllers/command.html
4
-
5
- end
@@ -1,7 +0,0 @@
1
- class AppCommandTest < Liza::CommandTest
2
-
3
- test :subject_class do
4
- assert subject_class == AppCommand
5
- end
6
-
7
- end
@@ -1,9 +0,0 @@
1
- class NewCommand < AppCommand
2
-
3
- def self.call args
4
- log :higher, "Called #{self}.#{__method__} with args #{args}"
5
-
6
- Liza::GenerateCommand.call ["app", *args]
7
- end
8
-
9
- end
@@ -1,7 +0,0 @@
1
- class NewCommandTest < AppCommandTest
2
-
3
- test :subject_class do
4
- assert subject_class == NewCommand
5
- end
6
-
7
- end
@@ -1,18 +0,0 @@
1
- class BenchGenerator < Liza::Generator
2
- main_dsl
3
-
4
- FOLDER = "app/dev/benches"
5
-
6
- generate :controller do
7
- folder FOLDER
8
- filename "#{name}_bench.rb"
9
- content render "bench.rb"
10
- end
11
-
12
- generate :controller_test do
13
- folder FOLDER
14
- filename "#{name}_bench_test.rb"
15
- content render "bench_test.rb"
16
- end
17
-
18
- end
@@ -1,26 +0,0 @@
1
- class <%= name.camelize %>Command < AppCommand
2
-
3
- def self.call args
4
- log :higher, "Called #{self}.#{__method__} with args #{args}"
5
- new(args).call
6
- end
7
-
8
- def initialize args
9
- @args = args
10
- end
11
-
12
- def call
13
- log :higher, "Called #{self}.#{__method__}"
14
-
15
- text = render "text.txt"
16
-
17
- log :higher, "text: #{text}"
18
- end
19
-
20
- end
21
-
22
- __END__
23
-
24
- # text.txt.erb
25
- Called <%%= self %>.<%%= __method__ %>
26
- @args: <%%= @args %>
@@ -1,18 +0,0 @@
1
- class CommandGenerator < Liza::Generator
2
- main_dsl
3
-
4
- FOLDER = "app/dev/commands"
5
-
6
- generate :controller do
7
- folder FOLDER
8
- filename "#{name}_command.rb"
9
- content render "command.rb"
10
- end
11
-
12
- generate :controller_test do
13
- folder FOLDER
14
- filename "#{name}_command_test.rb"
15
- content render "command_test.rb"
16
- end
17
-
18
- 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 rack h=0.0.0.0 p=$PORT
data/exe/Gemfile.lock DELETED
@@ -1,13 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- colorize (0.8.1)
5
-
6
- PLATFORMS
7
- x86_64-linux
8
-
9
- DEPENDENCIES
10
- colorize (~> 0.8.1)
11
-
12
- BUNDLED WITH
13
- 2.3.9
@@ -1,60 +0,0 @@
1
- class DevSystem
2
- class BenchDslMainPart < Liza::Part
3
-
4
- insertion do
5
-
6
- def self.call args
7
- log :higher, "Called #{self}.#{__method__} with args #{args}"
8
-
9
- # https://rubyapi.org/3.1/o/benchmark
10
- require "benchmark"
11
-
12
- if @setup_bl
13
- log "Setting up..."
14
- instance_exec &@setup_bl
15
- log "Set up"
16
- end
17
-
18
- log "Benchmarking #{marks.count} Ruby Blocks"
19
- puts
20
-
21
- length = marks.keys.map(&:length).max
22
-
23
- marks.each do |label, bl|
24
- log "Benchmarking #{label}"
25
- marks[label] = Benchmark.measure label, &bl
26
- end
27
-
28
- puts
29
-
30
- log "#{"Reporting".ljust_blanks(length + 17)} App CPU Time Kernel CPU Time Total CPU Time"
31
- puts
32
-
33
- sorted = marks.sort_by { |_k, tms| tms.total }.to_h
34
-
35
- sorted.each.with_index do |(label, tms), i|
36
- tms = tms.format "%10.6u %10.6y %10.6t"
37
- s = "[#{i.next.to_s.rjust_zeroes 2}/#{marks.count.to_s.rjust_zeroes 2}] #{label.rjust_blanks length} #{tms}"
38
-
39
- s = s.green if i == 0
40
- s = s.red if i == marks.count-1
41
- log s
42
- end
43
- puts
44
- log "Done"
45
- end
46
-
47
- #
48
-
49
- def self.marks()= @marks ||= {}
50
-
51
- def self.mark(label, &block)= marks[label] = block
52
-
53
- def self.setup &block
54
- @setup_bl = block if block_given?
55
- end
56
-
57
- end
58
-
59
- end
60
- end
@@ -1,11 +0,0 @@
1
- class DevSystem
2
- class EchoCommand < Command
3
-
4
- def self.call args
5
- log :higher, "Called #{self} with args #{args}"
6
-
7
- raise RuntimeError, args.to_s
8
- end
9
-
10
- end
11
- end
@@ -1,14 +0,0 @@
1
- class DevSystem
2
- class EchoCommandTest < CommandTest
3
-
4
- test :subject_class do
5
- assert subject_class == DevSystem::EchoCommand
6
- end
7
-
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
12
-
13
- end
14
- end
@@ -1,9 +0,0 @@
1
- class DevSystem
2
- class VersionCommand < Command
3
-
4
- def self.call args
5
- puts Lizarb::VERSION
6
- end
7
-
8
- end
9
- end
@@ -1,14 +0,0 @@
1
- class DevSystem
2
- class VersionCommandTest < CommandTest
3
-
4
- test :subject_class do
5
- assert subject_class == DevSystem::VersionCommand
6
- end
7
-
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
12
-
13
- end
14
- end
@@ -1,96 +0,0 @@
1
- class DevSystem
2
- class AppGenerator < Generator
3
-
4
- def self.call args
5
- log :higher, "Called #{self}.#{__method__} with args #{args}"
6
- new.call args
7
- end
8
-
9
- def call args
10
- # setup
11
-
12
- name = args.shift || "app_1"
13
-
14
- from = "#{Lizarb::APP_DIR}/app_new"
15
- to = name
16
-
17
- return log "Directory #{to.light_green} already exists." if Dir.exist? to
18
-
19
- log "Liza Application initializing at `#{to}`"
20
-
21
- # init
22
-
23
- require "fileutils"
24
- FileUtils.cp_r from, to, verbose: true
25
-
26
- `cd #{to}; git init -b main`
27
-
28
- # extra
29
-
30
- puts
31
-
32
- FileShell.gitkeep "#{to}/lib"
33
- FileShell.gitkeep "#{to}/tmp"
34
-
35
- DirShell.create "#{to}/app"
36
-
37
- # systems
38
-
39
- # App.systems.keys.each { |system_name| copy to, system_name }
40
- copy to, :dev
41
-
42
- FileUtils.rm "#{to}/app/dev/commands/new_command.rb"
43
- FileUtils.rm "#{to}/app/dev/commands/new_command_test.rb"
44
-
45
- `rm -rf #{to}/app/dev/generators/record_generator*`
46
- `rm -rf #{to}/app/dev/generators/request_generator*`
47
-
48
- FileUtils.cp_r "#{Lizarb::APP_DIR}/.ruby-version", "#{to}/.ruby-version", verbose: true
49
- FileUtils.cp_r "#{Lizarb::APP_DIR}/README.md", "#{to}/README.md", verbose: true
50
- TextShell.write "#{to}/app.rb", render("app.rb")
51
- FileUtils.cp_r "#{Lizarb::APP_DIR}/app.env", "#{to}/app.env", verbose: true
52
- FileUtils.cp_r "#{Lizarb::APP_DIR}/app.code.env", "#{to}/app.code.env", verbose: true
53
-
54
- puts
55
-
56
- log "Liza Application initialized at `#{to}`"
57
- end
58
-
59
- def copy name, system_name
60
- from = "#{Lizarb::APP_DIR}/app/#{system_name}_box.rb"
61
- to = "#{name}/app"
62
- if File.exist? from
63
- FileUtils.cp_r from, to, verbose: true
64
- else
65
- puts "file not found #{from}"
66
- end
67
-
68
- from = "#{Lizarb::APP_DIR}/app/#{system_name}"
69
- to = "#{name}/app"
70
- if File.exist? from
71
- FileUtils.cp_r from, to, verbose: true
72
- else
73
- puts "file not found #{from}"
74
- end
75
- end
76
-
77
- end
78
- end
79
-
80
- __END__
81
-
82
- # app.rb.erb
83
- App.call ARGV do
84
-
85
- # Systems help you organize your application's dependencies and RAM memory usage.
86
- # Learn more: http://guides.lizarb.org/systems.html
87
-
88
- system :dev
89
-
90
- # Modes help you organize your application's behavior and settings.
91
- # Learn more: http://guides.lizarb.org/modes.html
92
-
93
- mode :code
94
- mode :demo
95
-
96
- end
@@ -1,14 +0,0 @@
1
- class DevSystem
2
- class AppGeneratorTest < GeneratorTest
3
-
4
- test :subject_class do
5
- assert subject_class == DevSystem::AppGenerator
6
- end
7
-
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
12
-
13
- end
14
- end