lizarb 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (457) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +34 -7
  3. data/Gemfile.lock +179 -18
  4. data/README.md +53 -9
  5. data/Rakefile +38 -0
  6. data/app/dev/commands/color_command.rb +29 -0
  7. data/app/dev/commands/color_command_test.rb +10 -0
  8. data/app/dev/commands/stick_command.rb +102 -0
  9. data/app/dev/commands/stick_command_test.rb +19 -0
  10. data/app/dev_box.rb +54 -20
  11. data/app/happy_box.rb +4 -3
  12. data/app/net/databases/redis_db.rb +1 -1
  13. data/app/net/databases/redis_db_test.rb +5 -5
  14. data/app/net/databases/sqlite_db.rb +1 -1
  15. data/app/net/databases/sqlite_db_test.rb +5 -5
  16. data/app/net/records/app_record.rb +1 -1
  17. data/app/net/records/app_record_test.rb +1 -1
  18. data/app/net/records/post_record_test.rb +1 -1
  19. data/app/net/records/user_record_test.rb +1 -1
  20. data/app/net_box.rb +29 -6
  21. data/app/web/requests/app_request.rb +1 -1
  22. data/app/web/requests/app_request_test.rb +1 -1
  23. data/app/web/requests/foo_request.rb +26 -0
  24. data/app/web/requests/foo_request_test.rb +7 -0
  25. data/app/web_box.rb +17 -9
  26. data/app.rb +41 -10
  27. data/{exe/Gemfile → app_global.gemfile.rb} +2 -0
  28. data/app_global.gemfile.rb.lock +41 -0
  29. data/app_global.rb +5 -0
  30. data/{app → examples/bench/app}/dev/benches/loops_bench.rb +11 -3
  31. data/examples/bench/app/dev/benches/loops_bench_test.rb +11 -0
  32. data/examples/bench/app/dev/benches/objects_bench.rb +48 -0
  33. data/examples/bench/app/dev/benches/objects_bench_test.rb +11 -0
  34. data/examples/bench/app/dev/benches/sorted_bench.rb +74 -0
  35. data/examples/bench/app/dev/benches/sorted_bench_test.rb +11 -0
  36. data/examples/bench/app/dev/benches/variables_bench.rb +61 -0
  37. data/examples/bench/app/dev/benches/variables_bench_test.rb +11 -0
  38. data/examples/client/app/net/clients/news_client.rb +42 -0
  39. data/examples/client/app/net/clients/news_client_test.rb +24 -0
  40. data/{app → examples/command/app}/dev/commands/calculator_command.rb +2 -2
  41. data/{app → examples/command/app}/dev/commands/calculator_command_test.rb +1 -2
  42. data/{app → examples/command/app}/dev/commands/circle_command.rb +2 -2
  43. data/{app → examples/command/app}/dev/commands/circle_command_test.rb +1 -2
  44. data/{app → examples/command/app}/dev/commands/narrative_method_command.rb +8 -10
  45. data/{app → examples/command/app}/dev/commands/narrative_method_command_test.rb +2 -3
  46. data/{app → examples/command/app}/dev/commands/quadratic_command.rb +2 -2
  47. data/{app → examples/command/app}/dev/commands/quadratic_command_test.rb +1 -2
  48. data/examples/command/app/dev_box.rb +3 -0
  49. data/examples/log/app/dev/logs/logger_log.rb +8 -0
  50. data/examples/log/app/dev/logs/logger_log_test.rb +16 -0
  51. data/examples/new/app/dev_box.rb +67 -0
  52. data/examples/new/app.rb +41 -0
  53. data/examples/shell/app/dev/shells/bash_adapter_shell.rb +25 -0
  54. data/examples/shell/app/dev/shells/bash_adapter_shell_test.rb +23 -0
  55. data/examples/shell/app/dev/shells/business_logic_shell.rb +42 -0
  56. data/examples/shell/app/dev/shells/business_logic_shell_test.rb +39 -0
  57. data/examples/shell/app/dev/shells/gem_adapter_shell.rb +33 -0
  58. data/examples/shell/app/dev/shells/gem_adapter_shell_test.rb +23 -0
  59. data/exe/liza +6 -1
  60. data/exe/lizarb +9 -1
  61. data/lib/app.rb +74 -145
  62. data/lib/art_system/art_box.rb +5 -0
  63. data/lib/art_system/art_box_test.rb +8 -0
  64. data/lib/art_system.rb +8 -0
  65. data/lib/crypto_system/crypto_box.rb +5 -0
  66. data/lib/crypto_system/crypto_box_test.rb +8 -0
  67. data/lib/crypto_system.rb +8 -0
  68. data/lib/deep_system/deep_box.rb +5 -0
  69. data/lib/deep_system/deep_box_test.rb +8 -0
  70. data/lib/deep_system.rb +8 -0
  71. data/lib/desk_system/commands/glimmer_command.rb +26 -0
  72. data/lib/desk_system/commands/glimmer_command_test.rb +10 -0
  73. data/lib/desk_system/desk_box.rb +5 -0
  74. data/lib/desk_system/desk_box_test.rb +8 -0
  75. data/lib/desk_system.rb +8 -0
  76. data/lib/dev_system/{dev/controllers/command → commands}/test_command.rb +37 -9
  77. data/lib/dev_system/{dev/controllers/command → commands}/test_command_test.rb +1 -2
  78. data/lib/dev_system/dev_box.rb +79 -0
  79. data/lib/dev_system/dev_box_test.rb +33 -0
  80. data/lib/dev_system/generators/env_generator.rb +87 -0
  81. data/lib/dev_system/generators/env_generator_test.rb +11 -0
  82. data/lib/dev_system/generators/gemfile_generator.rb +47 -0
  83. data/lib/dev_system/generators/gemfile_generator_test.rb +11 -0
  84. data/lib/dev_system/generators/system_generator.rb +70 -0
  85. data/lib/dev_system/generators/system_generator_test.rb +11 -0
  86. data/lib/dev_system/sub/bench/bench.rb +7 -0
  87. data/lib/dev_system/{dev/panels → sub/bench}/bench_panel_test.rb +6 -2
  88. data/lib/dev_system/sub/bench/bench_test.rb +24 -0
  89. data/lib/dev_system/sub/bench/benches/not_found_bench.rb +33 -0
  90. data/lib/dev_system/{dev/controllers/bench → sub/bench/benches}/not_found_bench_test.rb +1 -2
  91. data/lib/dev_system/{dev/controllers/command → sub/bench/commands}/bench_command.rb +2 -7
  92. data/lib/dev_system/{dev/controllers/command → sub/bench/commands}/bench_command_test.rb +1 -2
  93. data/lib/dev_system/sub/bench/generators/bench_generator.rb +70 -0
  94. data/lib/dev_system/sub/bench/generators/bench_generator_test.rb +10 -0
  95. data/lib/dev_system/sub/command/command.rb +28 -0
  96. data/lib/dev_system/sub/command/command_panel.rb +151 -0
  97. data/lib/dev_system/sub/command/command_panel_test.rb +78 -0
  98. data/lib/dev_system/{dev/controllers → sub/command}/command_test.rb +6 -2
  99. data/lib/dev_system/sub/command/commands/base_command.rb +48 -0
  100. data/lib/dev_system/sub/command/commands/base_command_test.rb +11 -0
  101. data/lib/dev_system/{dev/controllers/terminal/irb_terminal.rb → sub/command/commands/irb_command.rb} +4 -2
  102. data/lib/dev_system/sub/command/commands/irb_command_test.rb +11 -0
  103. data/lib/dev_system/sub/command/commands/not_found_command.rb +156 -0
  104. data/lib/dev_system/sub/command/commands/not_found_command_test.rb +11 -0
  105. data/lib/dev_system/sub/command/commands/pry_command.rb +10 -0
  106. data/lib/dev_system/sub/command/commands/pry_command_test.rb +11 -0
  107. data/lib/dev_system/sub/command/commands/simple_command.rb +143 -0
  108. data/lib/dev_system/sub/command/commands/simple_command_test.rb +11 -0
  109. data/lib/dev_system/sub/command/generators/command_generator.rb +90 -0
  110. data/lib/dev_system/sub/command/generators/command_generator_test.rb +11 -0
  111. data/lib/dev_system/sub/command/input_commands/highline_input_command.rb +17 -0
  112. data/lib/dev_system/sub/command/input_commands/highline_input_command_test.rb +19 -0
  113. data/lib/dev_system/sub/command/input_commands/input_command.rb +20 -0
  114. data/lib/dev_system/sub/command/input_commands/input_command_test.rb +19 -0
  115. data/lib/dev_system/sub/command/input_commands/tty_input_command.rb +55 -0
  116. data/lib/dev_system/sub/command/input_commands/tty_input_command_test.rb +19 -0
  117. data/lib/dev_system/sub/generator/commands/generate_command.rb +9 -0
  118. data/lib/dev_system/sub/generator/commands/generate_command_test.rb +11 -0
  119. data/lib/dev_system/sub/generator/commands/new_command.rb +10 -0
  120. data/lib/dev_system/sub/generator/commands/new_command_test.rb +7 -0
  121. data/lib/dev_system/sub/generator/generator.rb +19 -0
  122. data/lib/dev_system/sub/generator/generator_panel.rb +98 -0
  123. data/lib/dev_system/sub/generator/generator_panel_test.rb +79 -0
  124. data/lib/dev_system/{dev/controllers → sub/generator}/generator_test.rb +6 -2
  125. data/lib/dev_system/sub/generator/generators/base_generator.rb +64 -0
  126. data/lib/dev_system/sub/generator/generators/base_generator_test.rb +11 -0
  127. data/lib/dev_system/sub/generator/generators/generator_generator.rb +71 -0
  128. data/lib/dev_system/sub/generator/generators/generator_generator_test.rb +11 -0
  129. data/lib/dev_system/sub/generator/generators/new_generator.rb +74 -0
  130. data/lib/dev_system/sub/generator/generators/new_generator_test.rb +11 -0
  131. data/lib/dev_system/sub/generator/generators/not_found_generator.rb +155 -0
  132. data/lib/dev_system/sub/generator/generators/not_found_generator_test.rb +11 -0
  133. data/lib/dev_system/sub/generator/generators/simple_generator.rb +257 -0
  134. data/lib/dev_system/sub/generator/generators/simple_generator_test.rb +38 -0
  135. data/lib/dev_system/sub/log/commands/log_command.rb +11 -0
  136. data/lib/dev_system/sub/log/commands/log_command_test.rb +11 -0
  137. data/lib/dev_system/sub/log/generators/log_generator.rb +54 -0
  138. data/lib/dev_system/sub/log/generators/log_generator_test.rb +10 -0
  139. data/lib/dev_system/sub/log/log.rb +3 -0
  140. data/lib/dev_system/sub/log/log_panel.rb +47 -0
  141. data/lib/dev_system/sub/log/log_panel_test.rb +50 -0
  142. data/lib/dev_system/sub/log/log_test.rb +16 -0
  143. data/lib/dev_system/sub/log/logs/output_log.rb +74 -0
  144. data/lib/dev_system/sub/log/logs/output_log_test.rb +47 -0
  145. data/lib/dev_system/sub/log/logs/stick_log.rb +79 -0
  146. data/lib/dev_system/sub/log/logs/stick_log_test.rb +88 -0
  147. data/lib/dev_system/sub/shell/commands/convert_command.rb +27 -0
  148. data/lib/dev_system/sub/shell/commands/convert_command_test.rb +10 -0
  149. data/lib/dev_system/sub/shell/commands/format_command.rb +25 -0
  150. data/lib/dev_system/sub/shell/commands/format_command_test.rb +10 -0
  151. data/lib/dev_system/sub/shell/commands/loc_command.rb +211 -0
  152. data/lib/dev_system/sub/shell/commands/loc_command_test.rb +10 -0
  153. data/lib/dev_system/sub/shell/commands/shell_command.rb +45 -0
  154. data/lib/dev_system/sub/shell/commands/shell_command_test.rb +11 -0
  155. data/lib/dev_system/sub/shell/converter_shells/coffee_converter_shell.rb +21 -0
  156. data/lib/dev_system/sub/shell/converter_shells/coffee_converter_shell_test.rb +41 -0
  157. data/lib/dev_system/sub/shell/converter_shells/converter_shell.rb +13 -0
  158. data/lib/dev_system/sub/shell/converter_shells/converter_shell_test.rb +19 -0
  159. data/lib/dev_system/sub/shell/converter_shells/haml_converter_shell.rb +30 -0
  160. data/lib/dev_system/sub/shell/converter_shells/haml_converter_shell_test.rb +34 -0
  161. data/lib/dev_system/sub/shell/converter_shells/md_converter_shell.rb +21 -0
  162. data/lib/dev_system/sub/shell/converter_shells/md_converter_shell_test.rb +38 -0
  163. data/lib/dev_system/sub/shell/converter_shells/scss_converter_shell.rb +59 -0
  164. data/lib/dev_system/sub/shell/converter_shells/scss_converter_shell_test.rb +59 -0
  165. data/lib/dev_system/sub/shell/formatter_shells/formatter_shell.rb +13 -0
  166. data/lib/dev_system/sub/shell/formatter_shells/formatter_shell_test.rb +19 -0
  167. data/lib/dev_system/sub/shell/formatter_shells/html_formatter_shell.rb +20 -0
  168. data/lib/dev_system/sub/shell/formatter_shells/html_formatter_shell_test.rb +51 -0
  169. data/lib/dev_system/sub/shell/generators/shell_generator.rb +68 -0
  170. data/lib/dev_system/sub/shell/generators/shell_generator_test.rb +10 -0
  171. data/lib/dev_system/{dev/controllers → sub/shell}/shell.rb +22 -0
  172. data/lib/dev_system/sub/shell/shell_panel.rb +98 -0
  173. data/lib/dev_system/sub/shell/shell_panel_test.rb +18 -0
  174. data/lib/dev_system/{dev/controllers → sub/shell}/shell_test.rb +31 -2
  175. data/lib/dev_system/sub/shell/shells/app_shell.rb +185 -0
  176. data/lib/dev_system/sub/shell/shells/app_shell_test.rb +26 -0
  177. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/bin_shell_test.rb +1 -2
  178. data/lib/dev_system/sub/shell/shells/color_shell.rb +389 -0
  179. data/lib/dev_system/sub/shell/shells/color_shell_test.rb +27 -0
  180. data/lib/dev_system/sub/shell/shells/controller_shell.rb +20 -0
  181. data/lib/dev_system/sub/shell/shells/controller_shell_test.rb +16 -0
  182. data/lib/dev_system/sub/shell/shells/dir_shell.rb +27 -0
  183. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/dir_shell_test.rb +1 -5
  184. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/file_shell.rb +4 -4
  185. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/file_shell_test.rb +1 -2
  186. data/lib/dev_system/sub/shell/shells/gem_shell.rb +21 -0
  187. data/lib/dev_system/sub/shell/shells/gem_shell_test.rb +28 -0
  188. data/lib/dev_system/sub/shell/shells/kernel_shell.rb +22 -0
  189. data/lib/dev_system/sub/shell/shells/kernel_shell_test.rb +10 -0
  190. data/lib/dev_system/sub/shell/shells/line_diff_shell.rb +26 -0
  191. data/lib/dev_system/sub/shell/shells/line_diff_shell_test.rb +11 -0
  192. data/lib/dev_system/sub/shell/shells/line_shell.rb +56 -0
  193. data/lib/dev_system/sub/shell/shells/line_shell_test.rb +70 -0
  194. data/lib/dev_system/sub/shell/shells/method_shell.rb +52 -0
  195. data/lib/dev_system/sub/shell/shells/method_shell_test.rb +34 -0
  196. data/lib/dev_system/sub/shell/shells/text_file_shell.rb +14 -0
  197. data/lib/dev_system/sub/shell/shells/text_file_shell_test.rb +11 -0
  198. data/lib/dev_system/sub/shell/shells/text_shell.rb +65 -0
  199. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/text_shell_test.rb +1 -2
  200. data/lib/dev_system.rb +8 -2
  201. data/lib/happy_system/happy_box.rb +9 -0
  202. data/lib/happy_system/happy_box_test.rb +24 -0
  203. data/lib/happy_system/sub/axo/axo.rb +10 -0
  204. data/lib/happy_system/sub/axo/axo_panel.rb +9 -0
  205. data/lib/happy_system/sub/axo/axo_panel_test.rb +16 -0
  206. data/lib/happy_system/sub/axo/axo_test.rb +16 -0
  207. data/lib/happy_system/sub/axo/commands/axo_command.rb +40 -0
  208. data/lib/happy_system/sub/axo/commands/axo_command_test.rb +8 -0
  209. data/lib/happy_system/sub/axo/generators/axo_generator.rb +79 -0
  210. data/lib/happy_system/sub/axo/generators/axo_generator_test.rb +11 -0
  211. data/lib/happy_system.rb +4 -2
  212. data/lib/lab_system/clients/kroki_client.rb +134 -0
  213. data/lib/lab_system/clients/kroki_client_test.rb +32 -0
  214. data/lib/lab_system/clients/liza_kroki_client.rb +176 -0
  215. data/lib/lab_system/clients/liza_kroki_client_test.rb +32 -0
  216. data/lib/lab_system/commands/docker_command.rb +61 -0
  217. data/lib/lab_system/commands/docker_command_test.rb +11 -0
  218. data/lib/lab_system/lab_box.rb +5 -0
  219. data/lib/lab_system/lab_box_test.rb +8 -0
  220. data/lib/lab_system/requests/kroki_request.rb +182 -0
  221. data/lib/lab_system/requests/kroki_request_test.rb +11 -0
  222. data/lib/lab_system/shells/docker_shell.rb +60 -0
  223. data/lib/lab_system/shells/docker_shell_test.rb +61 -0
  224. data/lib/lab_system/shells/kroki_docker_shell.rb +20 -0
  225. data/lib/lab_system/shells/kroki_docker_shell_test.rb +11 -0
  226. data/lib/lab_system.rb +8 -0
  227. data/lib/lerb.rb +95 -49
  228. data/lib/liza/base/controller.rb +14 -15
  229. data/lib/liza/base/controller_test.rb +28 -2
  230. data/lib/liza/base/panel.rb +64 -24
  231. data/lib/liza/base/panel_test.rb +168 -3
  232. data/lib/liza/base_parts/controller_subsystem_part.rb +93 -0
  233. data/lib/liza/base_parts/panel_rescuer_part.rb +129 -0
  234. data/lib/liza/meta/box.rb +24 -0
  235. data/lib/liza/meta/box_test.rb +20 -0
  236. data/lib/liza/meta/part_test.rb +6 -1
  237. data/lib/liza/meta/system.rb +50 -7
  238. data/lib/liza/meta/system_test.rb +6 -2
  239. data/lib/liza/ruby_tests/app_test.rb +39 -0
  240. data/lib/liza/ruby_tests/class_test.rb +20 -0
  241. data/lib/liza/ruby_tests/module_test.rb +4 -4
  242. data/lib/liza/{ruby_test.rb → ruby_tests/object_test.rb} +1 -1
  243. data/lib/liza/ruby_tests/string_test.rb +3 -1
  244. data/lib/liza/{test → safety}/test.rb +9 -0
  245. data/lib/liza/{test → safety}/test_test.rb +44 -7
  246. data/lib/liza/{test_parts → safety_parts}/test_assertions_advanced_part.rb +1 -1
  247. data/lib/liza/{test_parts → safety_parts}/test_assertions_part.rb +1 -1
  248. data/lib/liza/{test_parts → safety_parts}/test_dsl_part.rb +3 -3
  249. data/lib/liza/{test_parts → safety_parts}/test_log_part.rb +20 -0
  250. data/lib/liza/{test_parts → safety_parts}/test_subject_part.rb +10 -0
  251. data/lib/liza/safety_parts/test_tree_part.rb +87 -0
  252. data/lib/liza/unit.rb +64 -120
  253. data/lib/liza/unit_parts/unit_classes_part.rb +37 -0
  254. data/lib/liza/unit_parts/unit_classes_part_test.rb +3 -0
  255. data/lib/liza/unit_parts/unit_logging_part.rb +139 -0
  256. data/lib/liza/unit_parts/unit_logging_part_test.rb +3 -0
  257. data/lib/liza/unit_parts/unit_methods_part.rb +35 -0
  258. data/lib/liza/unit_parts/unit_methods_part_test.rb +3 -0
  259. data/lib/liza/unit_parts/unit_procedure_part.rb +2 -2
  260. data/lib/liza/unit_parts/unit_procedure_part_test.rb +9 -9
  261. data/lib/liza/unit_parts/unit_renderer_part.rb +171 -0
  262. data/lib/liza/unit_parts/unit_renderer_part_test.rb +15 -0
  263. data/lib/liza/unit_parts/unit_settings_part.rb +84 -0
  264. data/lib/liza/unit_parts/unit_settings_part_test.rb +3 -0
  265. data/lib/liza/unit_test.rb +114 -5
  266. data/lib/liza.rb +11 -2
  267. data/lib/lizarb/ruby/class.rb +9 -1
  268. data/lib/lizarb/ruby/module.rb +1 -1
  269. data/lib/lizarb/ruby/string.rb +3 -1
  270. data/lib/lizarb/version.rb +1 -1
  271. data/lib/lizarb.rb +404 -29
  272. data/lib/micro_system/micro_box.rb +5 -0
  273. data/lib/micro_system/micro_box_test.rb +8 -0
  274. data/lib/micro_system.rb +8 -0
  275. data/lib/net_system/net_box.rb +21 -0
  276. data/lib/net_system/{net/net_box_test.rb → net_box_test.rb} +1 -2
  277. data/lib/net_system/{net/panels → sub/client}/client_panel_test.rb +1 -2
  278. data/lib/net_system/{net/controllers → sub/client}/client_test.rb +1 -2
  279. data/lib/net_system/sub/client/generators/client_generator.rb +88 -0
  280. data/lib/net_system/sub/client/generators/client_generator_test.rb +10 -0
  281. data/lib/net_system/sub/database/clients/mongo_client.rb +33 -0
  282. data/lib/net_system/sub/database/clients/mongo_client_test.rb +20 -0
  283. data/lib/net_system/sub/database/clients/mysql_client.rb +29 -0
  284. data/lib/net_system/sub/database/clients/mysql_client_test.rb +23 -0
  285. data/lib/net_system/sub/database/clients/pgsql_client.rb +29 -0
  286. data/lib/net_system/sub/database/clients/pgsql_client_test.rb +25 -0
  287. data/lib/net_system/{net/controllers/client → sub/database/clients}/redis_client.rb +5 -2
  288. data/lib/net_system/{net/controllers/client → sub/database/clients}/redis_client_test.rb +2 -2
  289. data/lib/net_system/{net/controllers/client → sub/database/clients}/sqlite_client.rb +5 -2
  290. data/lib/net_system/{net/controllers/client → sub/database/clients}/sqlite_client_test.rb +2 -2
  291. data/lib/net_system/sub/database/commands/database_command.rb +32 -0
  292. data/lib/net_system/sub/database/commands/database_command_test.rb +11 -0
  293. data/lib/net_system/{net/panels → sub/database}/database_panel_test.rb +1 -2
  294. data/lib/net_system/{net/controllers → sub/database}/database_test.rb +1 -2
  295. data/lib/net_system/sub/database/databases/mongo_db.rb +8 -0
  296. data/lib/net_system/sub/database/databases/mongo_db_test.rb +21 -0
  297. data/lib/net_system/sub/database/databases/mysql_db.rb +8 -0
  298. data/lib/net_system/sub/database/databases/mysql_db_test.rb +21 -0
  299. data/lib/net_system/sub/database/databases/pgsql_db.rb +8 -0
  300. data/lib/net_system/sub/database/databases/pgsql_db_test.rb +21 -0
  301. data/lib/net_system/{net/controllers/database → sub/database/databases}/redis_db_test.rb +1 -1
  302. data/lib/net_system/{net/controllers/database → sub/database/databases}/sqlite_db_test.rb +1 -1
  303. data/lib/net_system/sub/record/generators/record_generator.rb +33 -0
  304. data/lib/net_system/sub/record/generators/record_generator_test.rb +11 -0
  305. data/lib/net_system/sub/record/record_panel.rb +3 -0
  306. data/lib/net_system/sub/record/record_panel_test.rb +11 -0
  307. data/lib/net_system/{net/controllers → sub/record}/record_test.rb +1 -2
  308. data/lib/net_system.rb +8 -1
  309. data/lib/web_system/sub/rack/commands/rack_command.rb +30 -0
  310. data/lib/web_system/sub/rack/commands/rack_command_test.rb +11 -0
  311. data/lib/web_system/sub/rack/middle_racks/first_middle_rack.rb +8 -0
  312. data/lib/web_system/sub/rack/middle_racks/first_middle_rack_test.rb +11 -0
  313. data/lib/web_system/sub/rack/middle_racks/last_middle_rack.rb +3 -0
  314. data/lib/web_system/sub/rack/middle_racks/last_middle_rack_test.rb +11 -0
  315. data/lib/web_system/sub/rack/middle_racks/middle_rack.rb +18 -0
  316. data/lib/web_system/sub/rack/middle_racks/middle_rack_test.rb +11 -0
  317. data/lib/web_system/sub/rack/middle_racks/zeitwerk_middle_rack.rb +11 -0
  318. data/lib/web_system/sub/rack/middle_racks/zeitwerk_middle_rack_test.rb +11 -0
  319. data/lib/web_system/sub/rack/rack_panel.rb +52 -0
  320. data/lib/web_system/{web/panels → sub/rack}/rack_panel_test.rb +1 -2
  321. data/lib/web_system/{web/controllers → sub/rack}/rack_test.rb +1 -2
  322. data/lib/web_system/sub/rack/server_racks/agoo_server_rack.rb +53 -0
  323. data/lib/web_system/sub/rack/server_racks/agoo_server_rack_test.rb +11 -0
  324. data/lib/web_system/sub/rack/server_racks/falcon_server_rack.rb +46 -0
  325. data/lib/web_system/sub/rack/server_racks/falcon_server_rack_test.rb +11 -0
  326. data/lib/web_system/sub/rack/server_racks/iodine_server_rack.rb +47 -0
  327. data/lib/web_system/sub/rack/server_racks/iodine_server_rack_test.rb +11 -0
  328. data/lib/web_system/sub/rack/server_racks/puma_server_rack.rb +48 -0
  329. data/lib/web_system/sub/rack/server_racks/puma_server_rack_test.rb +11 -0
  330. data/lib/web_system/sub/rack/server_racks/server_rack.rb +12 -0
  331. data/lib/web_system/sub/rack/server_racks/server_rack_test.rb +11 -0
  332. data/lib/web_system/sub/rack/server_racks/thin_server_rack.rb +85 -0
  333. data/lib/web_system/sub/rack/server_racks/thin_server_rack_test.rb +11 -0
  334. data/lib/web_system/sub/request/commands/request_command.rb +125 -0
  335. data/lib/web_system/sub/request/commands/request_command_test.rb +11 -0
  336. data/lib/web_system/sub/request/generators/request_generator.rb +96 -0
  337. data/lib/web_system/sub/request/generators/request_generator_test.rb +11 -0
  338. data/lib/web_system/sub/request/request_panel.rb +69 -0
  339. data/lib/web_system/sub/request/request_panel_test.rb +54 -0
  340. data/lib/web_system/{web/controllers → sub/request}/request_test.rb +1 -2
  341. data/lib/web_system/sub/request/requests/simple_request.rb +95 -0
  342. data/lib/web_system/sub/request/requests/simple_request_test.rb +11 -0
  343. data/lib/web_system/sub/request/router_requests/router_request.rb +7 -0
  344. data/lib/web_system/sub/request/router_requests/router_request_test.rb +11 -0
  345. data/lib/web_system/sub/request/router_requests/simple_router_request.rb +24 -0
  346. data/lib/web_system/sub/request/router_requests/simple_router_request_test.rb +11 -0
  347. data/lib/web_system/web_box.rb +17 -0
  348. data/lib/web_system/{web/web_box_test.rb → web_box_test.rb} +1 -2
  349. data/lib/web_system.rb +9 -3
  350. data/lib/work_system/work_box.rb +5 -0
  351. data/lib/work_system/work_box_test.rb +8 -0
  352. data/lib/work_system.rb +8 -0
  353. data/lizarb.gemspec +14 -8
  354. metadata +375 -168
  355. data/.ruby-version +0 -1
  356. data/app/dev/benches/app_bench.rb +0 -5
  357. data/app/dev/benches/app_bench_test.rb +0 -7
  358. data/app/dev/benches/loops_bench_test.rb +0 -11
  359. data/app/dev/commands/app_command.rb +0 -5
  360. data/app/dev/commands/app_command_test.rb +0 -7
  361. data/app/dev/commands/new_command.rb +0 -9
  362. data/app/dev/commands/new_command_test.rb +0 -7
  363. data/app/dev/generators/bench_generator/bench.rb.erb +0 -24
  364. data/app/dev/generators/bench_generator/bench_test.rb.erb +0 -12
  365. data/app/dev/generators/bench_generator.rb +0 -18
  366. data/app/dev/generators/bench_generator_test.rb +0 -12
  367. data/app/dev/generators/command_generator/command.rb.erb +0 -26
  368. data/app/dev/generators/command_generator/command_test.rb.erb +0 -12
  369. data/app/dev/generators/command_generator.rb +0 -18
  370. data/app/dev/generators/command_generator_test.rb +0 -12
  371. data/app/dev/generators/record_generator.rb +0 -46
  372. data/app/dev/generators/record_generator_test.rb +0 -12
  373. data/app/dev/generators/request_generator.rb +0 -63
  374. data/app/dev/generators/request_generator_test.rb +0 -12
  375. data/app/happy/axos/axo.rb +0 -50
  376. data/exe/Gemfile.lock +0 -13
  377. data/exe/lrb +0 -3
  378. data/lib/dev_system/dev/controllers/bench/not_found_bench.rb +0 -27
  379. data/lib/dev_system/dev/controllers/bench.rb +0 -9
  380. data/lib/dev_system/dev/controllers/bench_dsl_main_part.rb +0 -58
  381. data/lib/dev_system/dev/controllers/bench_test.rb +0 -12
  382. data/lib/dev_system/dev/controllers/command/echo_command.rb +0 -9
  383. data/lib/dev_system/dev/controllers/command/echo_command_test.rb +0 -12
  384. data/lib/dev_system/dev/controllers/command/generate_command.rb +0 -33
  385. data/lib/dev_system/dev/controllers/command/generate_command_test.rb +0 -12
  386. data/lib/dev_system/dev/controllers/command/not_found_command.rb +0 -27
  387. data/lib/dev_system/dev/controllers/command/not_found_command_test.rb +0 -12
  388. data/lib/dev_system/dev/controllers/command/terminal_command.rb +0 -22
  389. data/lib/dev_system/dev/controllers/command/terminal_command_test.rb +0 -12
  390. data/lib/dev_system/dev/controllers/command/version_command.rb +0 -7
  391. data/lib/dev_system/dev/controllers/command/version_command_test.rb +0 -12
  392. data/lib/dev_system/dev/controllers/command.rb +0 -17
  393. data/lib/dev_system/dev/controllers/generator.rb +0 -9
  394. data/lib/dev_system/dev/controllers/generator_dsl_main_part.rb +0 -52
  395. data/lib/dev_system/dev/controllers/generators/app_generator.rb +0 -146
  396. data/lib/dev_system/dev/controllers/generators/app_generator_test.rb +0 -12
  397. data/lib/dev_system/dev/controllers/generators/generator_generator/generator.rb.erb +0 -18
  398. data/lib/dev_system/dev/controllers/generators/generator_generator/generator_test.rb.erb +0 -12
  399. data/lib/dev_system/dev/controllers/generators/generator_generator/template.rb.erb +0 -9
  400. data/lib/dev_system/dev/controllers/generators/generator_generator/template_test.rb.erb +0 -12
  401. data/lib/dev_system/dev/controllers/generators/generator_generator.rb +0 -30
  402. data/lib/dev_system/dev/controllers/generators/generator_generator_test.rb +0 -12
  403. data/lib/dev_system/dev/controllers/generators/not_found_generator.rb +0 -27
  404. data/lib/dev_system/dev/controllers/generators/not_found_generator_test.rb +0 -12
  405. data/lib/dev_system/dev/controllers/shell/dir_shell.rb +0 -27
  406. data/lib/dev_system/dev/controllers/shell/text_shell.rb +0 -23
  407. data/lib/dev_system/dev/controllers/terminal/irb_terminal_test.rb +0 -12
  408. data/lib/dev_system/dev/controllers/terminal/pry_terminal.rb +0 -10
  409. data/lib/dev_system/dev/controllers/terminal/pry_terminal_test.rb +0 -12
  410. data/lib/dev_system/dev/controllers/terminal.rb +0 -17
  411. data/lib/dev_system/dev/controllers/terminal_test.rb +0 -12
  412. data/lib/dev_system/dev/dev_box.rb +0 -39
  413. data/lib/dev_system/dev/dev_box_test.rb +0 -17
  414. data/lib/dev_system/dev/panels/command_panel.rb +0 -28
  415. data/lib/dev_system/dev/panels/command_panel_test.rb +0 -21
  416. data/lib/dev_system/dev/panels/generator_panel.rb +0 -3
  417. data/lib/dev_system/dev/panels/generator_panel_test.rb +0 -12
  418. data/lib/dev_system/dev/panels/log_panel.rb +0 -13
  419. data/lib/dev_system/dev/panels/log_panel_test.rb +0 -16
  420. data/lib/dev_system/dev/panels/shell_panel.rb +0 -3
  421. data/lib/dev_system/dev/panels/shell_panel_test.rb +0 -12
  422. data/lib/dev_system/dev/panels/terminal_panel.rb +0 -3
  423. data/lib/dev_system/dev/panels/terminal_panel_test.rb +0 -12
  424. data/lib/happy_system/dev/happy_command.rb +0 -11
  425. data/lib/happy_system/happy/controllers/axo.rb +0 -7
  426. data/lib/happy_system/happy/happy_box.rb +0 -9
  427. data/lib/happy_system/happy/happy_box_test.rb +0 -16
  428. data/lib/happy_system/happy/panels/axo_panel.rb +0 -3
  429. data/lib/liza/base/box.rb +0 -85
  430. data/lib/liza/base/box_test.rb +0 -10
  431. data/lib/liza/base_parts/controller_renderer_part.rb +0 -140
  432. data/lib/liza/base_parts/controller_renderer_part_test.rb +0 -16
  433. data/lib/liza/meta/part_extension.rb +0 -16
  434. data/lib/liza/test_parts/test_tree_part.rb +0 -137
  435. data/lib/net_system/dev/net_command.rb +0 -22
  436. data/lib/net_system/net/net_box.rb +0 -15
  437. data/lib/web_system/dev/rack_command.rb +0 -35
  438. data/lib/web_system/dev/request_command.rb +0 -143
  439. data/lib/web_system/dev/web_command.rb +0 -9
  440. data/lib/web_system/web/panels/rack_panel.rb +0 -42
  441. data/lib/web_system/web/panels/request_panel.rb +0 -72
  442. data/lib/web_system/web/panels/request_panel_test.rb +0 -33
  443. data/lib/web_system/web/web_box.rb +0 -20
  444. /data/lib/dev_system/{dev/panels → sub/bench}/bench_panel.rb +0 -0
  445. /data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/bin_shell.rb +0 -0
  446. /data/lib/net_system/{net/controllers → sub/client}/client.rb +0 -0
  447. /data/lib/net_system/{net/panels → sub/client}/client_panel.rb +0 -0
  448. /data/lib/net_system/{net/controllers → sub/database}/database.rb +0 -0
  449. /data/lib/net_system/{net/panels → sub/database}/database_panel.rb +0 -0
  450. /data/lib/net_system/{net/controllers/database → sub/database/databases}/redis_db.rb +0 -0
  451. /data/lib/net_system/{net/controllers/database → sub/database/databases}/sqlite_db.rb +0 -0
  452. /data/lib/net_system/{net/controllers → sub/record}/record.rb +0 -0
  453. /data/lib/web_system/{web/controllers → sub/rack}/rack.rb +0 -0
  454. /data/lib/web_system/{web/controllers → sub/request}/request.rb +0 -0
  455. /data/lib/web_system/{web/controllers/request → sub/request/requests}/client_error_request.rb +0 -0
  456. /data/lib/web_system/{web/controllers/request → sub/request/requests}/not_found_request.rb +0 -0
  457. /data/lib/web_system/{web/controllers/request → sub/request/requests}/server_error_request.rb +0 -0
@@ -0,0 +1,185 @@
1
+ class DevSystem::AppShell < DevSystem::Shell
2
+
3
+ #
4
+
5
+ def self.writable_systems
6
+ root = App.root.to_s
7
+ App.systems.select { _2.source_location_radical.start_with? root }
8
+ end
9
+
10
+ #
11
+
12
+ def self.consts
13
+ @instance ||= new
14
+ @instance.consts
15
+ end
16
+
17
+ attr_reader :consts
18
+
19
+ def initialize
20
+ liza_classes = self.class.liza_classes
21
+ liza_categories = self.class.liza_categories
22
+ h = @consts = {}
23
+ h[:top_level] = [Lizarb, App, Liza]
24
+ h[:liza] = self.class.liza_classes_structured
25
+ h[:systems] = self.class.system_classes_structured
26
+ h[:app] = self.class.object_classes_structured
27
+ end
28
+
29
+ #
30
+
31
+ def self.liza_classes
32
+ Lizarb.loaders[0].__to_unload.keys.map { Object.const_get _1 }
33
+ end
34
+
35
+ def self.implementation_classes
36
+ Lizarb.loaders[1].__to_unload.keys.map { Object.const_get _1 }
37
+ end
38
+
39
+ #
40
+
41
+ def self.system_classes
42
+ implementation_classes.reject { _1.namespace == Object }
43
+ end
44
+
45
+ def self.object_classes
46
+ implementation_classes.select { _1.namespace == Object }
47
+ end
48
+
49
+ #
50
+
51
+ def self.liza_categories
52
+ ["unit", "base", "safety", "meta", "ruby_tests"]
53
+ end
54
+
55
+ #
56
+
57
+ def self.liza_classes_structured
58
+ ret = {}
59
+ liza_classes = self.liza_classes
60
+
61
+ ret["unit"] =
62
+ liza_classes
63
+ .select { _1.source_location_radical.include? "/liza/unit" }
64
+ .sort_by { _1.to_s }
65
+
66
+ ret["base"] =
67
+ liza_classes
68
+ .select { _1.source_location_radical.include? "/liza/base" }
69
+ .sort_by { _1.to_s }
70
+
71
+ ret["safety"] =
72
+ liza_classes
73
+ .select { _1.source_location_radical.include? "/liza/safety" }
74
+ .sort_by { _1.to_s }
75
+
76
+ ret["meta"] =
77
+ liza_classes
78
+ .select { _1.source_location_radical.include? "/liza/meta" }
79
+ .sort_by { _1.to_s }
80
+
81
+ ret["ruby_tests"] =
82
+ liza_classes
83
+ .select { _1.source_location_radical.include? "/liza/ruby_tests" }
84
+ .sort_by { _1.to_s }
85
+
86
+ raise "not all categories are filled" if liza_categories != ret.select { _2.any? }.keys
87
+
88
+ ret
89
+ end
90
+
91
+ def self.system_classes_structured
92
+ ret = {}
93
+ system_classes = self.system_classes
94
+
95
+ App.systems.each do |system_name, system|
96
+ tree = ret[system_name.to_s] = {}
97
+
98
+ array = system_classes.select { _1.system == system }
99
+
100
+ tree["system"] = [system]
101
+ tree["box"] = [system.box, system.box.test_class]
102
+ tree["controllers"] = {}
103
+ tree["subsystems"] = {}
104
+
105
+ array.delete system
106
+ array.delete system.box
107
+ array.delete system.box.test_class
108
+
109
+ system.subsystems.each do |subsystem|
110
+ tree["subsystems"][subsystem] = {}
111
+ tree["subsystems"][subsystem]["panel"] = [subsystem.panel.class, subsystem.panel.class.test_class]
112
+ tree["subsystems"][subsystem]["controller"] = [subsystem, subsystem.test_class]
113
+ tree["subsystems"][subsystem]["controllers"] = {}
114
+
115
+ array.delete subsystem.panel.class
116
+ array.delete subsystem.panel.class.test_class
117
+ array.delete subsystem
118
+ array.delete subsystem.test_class
119
+ end
120
+
121
+ array.each do |klass|
122
+ radical = klass.source_location_radical
123
+
124
+ if radical.include? "/#{system_name}_system/sub"
125
+ name = radical.split("_system/sub/").last.split("/").first
126
+ subsystem = system.const name
127
+ klasses = tree["subsystems"][subsystem]["controllers"][klass.division] ||= []
128
+ else
129
+ klasses = tree["controllers"][klass.division] ||= []
130
+ end
131
+
132
+ klasses << klass
133
+ end
134
+
135
+ end
136
+
137
+ ret.each do |system_name, tree|
138
+ tree["subsystems"].each do |subsystem_name, subsystem_tree|
139
+ subsystem_tree["controllers"].each do |division, controllers|
140
+ controllers.sort_by! &:to_s
141
+ end
142
+ end
143
+ tree["controllers"].each do |division, controllers|
144
+ controllers.sort_by! &:to_s
145
+ end
146
+ end
147
+
148
+ ret
149
+ end
150
+
151
+ def self.object_classes_structured
152
+ ret = {}
153
+ object_classes = self.object_classes.sort_by { _1.source_location_radical }
154
+
155
+ App.systems.each do |system_name, system|
156
+ tree = ret[system_name.to_s] = {}
157
+
158
+ a = object_classes.select { _1.system == system }
159
+
160
+ tree["box"] = []
161
+ box = Liza.const "#{system_name}_box"
162
+ if box.namespace == Object
163
+ tree["box"] << box
164
+ a.delete box
165
+ end
166
+
167
+ tree["controllers"] = {}
168
+
169
+ a.each do |klass|
170
+ tree["controllers"][klass.subsystem] ||= {}
171
+ tree["controllers"][klass.subsystem][klass.division] ||= []
172
+ tree["controllers"][klass.subsystem][klass.division] << klass
173
+ end
174
+
175
+ system.subsystems.each do |subsystem|
176
+ tree["controllers"][subsystem]&.each do |division, klasses|
177
+ klasses.sort_by! &:to_s
178
+ end
179
+ end
180
+ end
181
+
182
+ ret
183
+ end
184
+
185
+ end
@@ -0,0 +1,26 @@
1
+ class DevSystem::AppShellTest < DevSystem::ShellTest
2
+
3
+ test :subject_class do
4
+ assert_equality subject_class, DevSystem::AppShell
5
+ end
6
+
7
+ test :settings do
8
+ assert_equality subject_class.log_level, 0
9
+ end
10
+
11
+ test :writable_systems do
12
+ a = subject_class.writable_systems.keys
13
+ b = [:dev, :happy, :net, :web, :work, :micro, :desk, :crypto, :art, :deep, :lab]
14
+ assert_equality a, b
15
+ end
16
+
17
+ test :subject do
18
+ system_keys = ["dev", "happy", "net", "web", "work", "micro", "desk", "crypto", "art", "deep", "lab"]
19
+ assert_equality subject.consts.keys, [:top_level, :liza, :systems, :app]
20
+ assert_equality subject.consts[:top_level], [Lizarb, App, Liza]
21
+ assert_equality subject.consts[:liza].keys, ["unit", "base", "safety", "meta", "ruby_tests"]
22
+ assert_equality subject.consts[:systems].keys, system_keys
23
+ assert_equality subject.consts[:app].keys, system_keys
24
+ end
25
+
26
+ end
@@ -5,8 +5,7 @@ class DevSystem::BinShellTest < DevSystem::FileShellTest
5
5
  end
6
6
 
7
7
  test :settings do
8
- assert subject_class.log_level == :normal
9
- assert subject_class.log_color == :green
8
+ assert_equality subject_class.log_level, 0
10
9
  end
11
10
 
12
11
  #
@@ -0,0 +1,389 @@
1
+ class DevSystem::ColorShell < DevSystem::Shell
2
+
3
+ #
4
+
5
+ def self.parse color
6
+ return colors[color] if colors.has_key? color
7
+
8
+ return rgb_from_int(color) if color.is_a? Integer
9
+ return rgb_from_str(color) if color.is_a? String
10
+
11
+ color
12
+ end
13
+
14
+ # Colors
15
+
16
+ @@colors = {}
17
+
18
+ def self.colors
19
+ @@colors
20
+ end
21
+
22
+ def self.add k, v
23
+ v = @@colors[v] if v.is_a? Symbol
24
+ v = rgb_from_int v if v.is_a? Integer
25
+ v = rgb_from_str v if v.is_a? String
26
+ @@colors[k] = v
27
+ end
28
+
29
+ #
30
+
31
+ def self.rgb_from_int hex
32
+ raise "Invalid type: #{hex.class}" unless hex.is_a? Integer
33
+ raise "Invalid hex color: #{hex}" unless 0 <= hex && hex <= 0xffffff
34
+
35
+ r = (hex >> 16) & 0xff
36
+ g = (hex >> 8) & 0xff
37
+ b = hex & 0xff
38
+ [r, g, b]
39
+ end
40
+
41
+ def self.rgb_from_str hex
42
+ raise "Invalid type: #{hex.class}" unless hex.is_a? String
43
+ raise "Invalid hex color: #{hex}" unless hex =~ /^#?[0-9a-fA-F]{6}$/
44
+
45
+ hex = hex[1..-1] if hex[0] == "#"
46
+ rgb_from_int hex.to_i(16)
47
+ end
48
+
49
+ def self.rgb_to_str rgb
50
+ raise "Invalid type: #{rgb.class}" unless rgb.is_a? Array
51
+ raise "Invalid rgb color: #{rgb}" unless rgb.length == 3 && rgb.all? {|x| 0 <= x && x <= 0xff}
52
+
53
+ r, g, b = rgb
54
+ "##{"%02x" % r}#{"%02x" % g}#{"%02x" % b}"
55
+ end
56
+
57
+ # Standard ANSI Colors:
58
+
59
+ # red
60
+ add :darkest_red, 0x330000
61
+ add :darker_red, 0x660000
62
+ add :dark_red, 0x990000
63
+ add :red, 0xcc0000
64
+ add :light_red, 0xff0000
65
+ add :lighter_red, 0xff3333
66
+ add :lightest_red, 0xff6666
67
+
68
+ # green
69
+ add :darkest_green, 0x003300
70
+ add :darker_green, 0x006600
71
+ add :dark_green, 0x009900
72
+ add :green, 0x00cc00
73
+ add :light_green, 0x00ff00
74
+ add :lighter_green, 0x33ff33
75
+ add :lightest_green, 0x66ff66
76
+
77
+ # blue
78
+ add :darkest_blue, 0x000033
79
+ add :darker_blue, 0x000066
80
+ add :dark_blue, 0x000099
81
+ add :blue, 0x0000cc
82
+ add :light_blue, 0x0000ff
83
+ add :lighter_blue, 0x3333ff
84
+ add :lightest_blue, 0x6666ff
85
+
86
+ # yellow
87
+ add :darkest_yellow, 0x333300
88
+ add :darker_yellow, 0x666600
89
+ add :dark_yellow, 0x999900
90
+ add :yellow, 0xcccc00
91
+ add :light_yellow, 0xffff00
92
+ add :lighter_yellow, 0xffff33
93
+ add :lightest_yellow, 0xffff66
94
+
95
+ # magenta
96
+ add :darkest_magenta, 0x330033
97
+ add :darker_magenta, 0x660066
98
+ add :dark_magenta, 0x990099
99
+ add :magenta, 0xcc00cc
100
+ add :light_magenta, 0xff00ff
101
+ add :lighter_magenta, 0xff33ff
102
+ add :lightest_magenta, 0xff66ff
103
+
104
+ # cyan
105
+ add :darkest_cyan, 0x003333
106
+ add :darker_cyan, 0x006666
107
+ add :dark_cyan, 0x009999
108
+ add :cyan, 0x00cccc
109
+ add :light_cyan, 0x00ffff
110
+ add :lighter_cyan, 0x33ffff
111
+ add :lightest_cyan, 0x66ffff
112
+
113
+ # Black to White Transition:
114
+
115
+ # black
116
+ add :darkest_black, 0x000000
117
+ add :darker_black, 0x080808
118
+ add :dark_black, 0x101010
119
+ add :black, 0x181818
120
+ add :light_black, 0x202020
121
+ add :lighter_black, 0x282828
122
+ add :lightest_black, 0x303030
123
+
124
+ # onyx
125
+ add :darkest_onyx, 0x383838
126
+ add :darker_onyx, 0x404040
127
+ add :dark_onyx, 0x484848
128
+ add :onyx, 0x505050
129
+ add :light_onyx, 0x585858
130
+ add :lighter_onyx, 0x606060
131
+ add :lightest_onyx, 0x686868
132
+
133
+ # gray
134
+ add :darkest_gray, 0x707070
135
+ add :darker_gray, 0x787878
136
+ add :dark_gray, 0x808080
137
+ add :gray, 0x888888
138
+ add :light_gray, 0x909090
139
+ add :lighter_gray, 0x989898
140
+ add :lightest_gray, 0xa0a0a0
141
+
142
+ # silver
143
+ add :darkest_silver, 0xa8a8a8
144
+ add :darker_silver, 0xb0b0b0
145
+ add :dark_silver, 0xb8b8b8
146
+ add :silver, 0xc0c0c0
147
+ add :light_silver, 0xc8c8c8
148
+ add :lighter_silver, 0xd0d0d0
149
+ add :lightest_silver, 0xd8d8d8
150
+
151
+ # white
152
+ add :darkest_white, 0xe0e0e0
153
+ add :darker_white, 0xe8e8e8
154
+ add :dark_white, 0xf0f0f0
155
+ add :white, 0xf8f8f8
156
+ add :light_white, 0xffffff
157
+ add :lighter_white, 0xffffff
158
+ add :lightest_white, 0xffffff
159
+
160
+ # Red to Orange Transition:
161
+
162
+ # ruby
163
+ add :darkest_ruby, 0x330000
164
+ add :darker_ruby, 0x660000
165
+ add :dark_ruby, 0x990000
166
+ add :ruby, 0xcc0000
167
+ add :light_ruby, 0xff3333
168
+ add :lighter_ruby, 0xff6666
169
+ add :lightest_ruby, 0xff9999
170
+
171
+ # ember
172
+ add :darkest_ember, 0x4B0000
173
+ add :darker_ember, 0x8F1B1B
174
+ add :dark_ember, 0xD23535
175
+ add :ember, 0xFF4A4A
176
+ add :light_ember, 0xFF6E6E
177
+ add :lighter_ember, 0xFF9292
178
+ add :lightest_ember, 0xFFB6B6
179
+
180
+ # vermilion
181
+ add :darkest_vermilion, 0x661919
182
+ add :darker_vermilion, 0x993333
183
+ add :dark_vermilion, 0xcc4c4c
184
+ add :vermilion, 0xff6666
185
+ add :light_vermilion, 0xff9999
186
+ add :lighter_vermilion, 0xffcccc
187
+ add :lightest_vermilion, 0xffffe6
188
+
189
+ # coral
190
+ add :darkest_coral, 0x801b1b
191
+ add :darker_coral, 0xff4040
192
+ add :dark_coral, 0xff6b6b
193
+ add :coral, 0xff9595
194
+ add :light_coral, 0xffbfbf
195
+ add :lighter_coral, 0xffdfdf
196
+ add :lightest_coral, 0xffefef
197
+
198
+ # Orange to Yellow Transition:
199
+
200
+ # saffron
201
+ add :darkest_saffron, 0x993300
202
+ add :darker_saffron, 0xff6600
203
+ add :dark_saffron, 0xff9900
204
+ add :saffron, 0xffcc00
205
+ add :light_saffron, 0xffe066
206
+ add :lighter_saffron, 0xfff299
207
+ add :lightest_saffron, 0xffffcc
208
+
209
+ # orange
210
+ add :darkest_orange, 0x331900
211
+ add :darker_orange, 0x663300
212
+ add :dark_orange, 0x994c00
213
+ add :orange, 0xcc6600
214
+ add :light_orange, 0xff8000
215
+ add :lighter_orange, 0xff9933
216
+ add :lightest_orange, 0xffb266
217
+
218
+ # umber
219
+ add :darkest_umber, 0x3d1f00
220
+ add :darker_umber, 0x7a3f00
221
+ add :dark_umber, 0xb85f00
222
+ add :umber, 0xf57f00
223
+ add :light_umber, 0xff9f40
224
+ add :lighter_umber, 0xffbf80
225
+ add :lightest_umber, 0xffdfbf
226
+
227
+ # beige
228
+ add :darkest_beige, 0x664c33
229
+ add :darker_beige, 0x998066
230
+ add :dark_beige, 0xccb499
231
+ add :beige, 0xffe8cc
232
+ add :light_beige, 0xfff4e6
233
+ add :lighter_beige, 0xfff9f2
234
+ add :lightest_beige, 0xfffcf8
235
+
236
+ # Yellow to Green Transition:
237
+
238
+ # topaz
239
+ add :darkest_topaz, 0x665c33
240
+ add :darker_topaz, 0x997f33
241
+ add :dark_topaz, 0xcca233
242
+ add :topaz, 0xffc533
243
+ add :light_topaz, 0xffd966
244
+ add :lighter_topaz, 0xffec99
245
+ add :lightest_topaz, 0xffffcc
246
+
247
+ # olive
248
+ add :darkest_olive, 0x333300
249
+ add :darker_olive, 0x666600
250
+ add :dark_olive, 0x999900
251
+ add :olive, 0xcccc00
252
+ add :light_olive, 0xe6e600
253
+ add :lighter_olive, 0xf2f233
254
+ add :lightest_olive, 0xffff66
255
+
256
+ # chartreuse
257
+ add :darkest_chartreuse, 0x336600
258
+ add :darker_chartreuse, 0x66cc00
259
+ add :dark_chartreuse, 0x99ff00
260
+ add :chartreuse, 0xccff33
261
+ add :light_chartreuse, 0xe6ff66
262
+ add :lighter_chartreuse, 0xf2ff99
263
+ add :lightest_chartreuse, 0xffffcc
264
+
265
+ # jade
266
+ add :darkest_jade, 0x003320
267
+ add :darker_jade, 0x006640
268
+ add :dark_jade, 0x009960
269
+ add :jade, 0x00cc80
270
+ add :light_jade, 0x33ffa0
271
+ add :lighter_jade, 0x66ffc0
272
+ add :lightest_jade, 0x99ffe0
273
+
274
+ # Green to Blue Transition:
275
+
276
+ # turquoise
277
+ add :darkest_turquoise, 0x004545
278
+ add :darker_turquoise, 0x008080
279
+ add :dark_turquoise, 0x00bfbf
280
+ add :turquoise, 0x00efef
281
+ add :light_turquoise, 0x33ffff
282
+ add :lighter_turquoise, 0x66ffff
283
+ add :lightest_turquoise, 0x99ffff
284
+
285
+ # cerulean
286
+ add :darkest_cerulean, 0x003366
287
+ add :darker_cerulean, 0x006699
288
+ add :dark_cerulean, 0x0099cc
289
+ add :cerulean, 0x00ccff
290
+ add :light_cerulean, 0x33e6ff
291
+ add :lighter_cerulean, 0x66ffff
292
+ add :lightest_cerulean, 0x99ffff
293
+
294
+ # azure
295
+ add :darkest_azure, 0x003366
296
+ add :darker_azure, 0x0066cc
297
+ add :dark_azure, 0x0099ff
298
+ add :azure, 0x00ccff
299
+ add :light_azure, 0x33daff
300
+ add :lighter_azure, 0x66e6ff
301
+ add :lightest_azure, 0x99f2ff
302
+
303
+ # cobalt
304
+ add :darkest_cobalt, 0x001933
305
+ add :darker_cobalt, 0x003366
306
+ add :dark_cobalt, 0x004c99
307
+ add :cobalt, 0x0066cc
308
+ add :light_cobalt, 0x3380ff
309
+ add :lighter_cobalt, 0x6699ff
310
+ add :lightest_cobalt, 0x99b3ff
311
+
312
+ # Blue to Purple Transition:
313
+
314
+ # periwinkle
315
+ add :darkest_periwinkle, 0x666699
316
+ add :darker_periwinkle, 0x9999cc
317
+ add :dark_periwinkle, 0xccccff
318
+ add :periwinkle, 0xe6e6ff
319
+ add :light_periwinkle, 0xf2f2ff
320
+ add :lighter_periwinkle, 0xf8f8ff
321
+ add :lightest_periwinkle, 0xfcfcff
322
+
323
+ # amethyst
324
+ add :darkest_amethyst, 0x330066
325
+ add :darker_amethyst, 0x660099
326
+ add :dark_amethyst, 0x9933cc
327
+ add :amethyst, 0xcc66ff
328
+ add :light_amethyst, 0xe699ff
329
+ add :lighter_amethyst, 0xf2ccff
330
+ add :lightest_amethyst, 0xfae6ff
331
+
332
+ # indigo
333
+ add :darkest_indigo, 0x1c0033
334
+ add :darker_indigo, 0x3d0066
335
+ add :dark_indigo, 0x5f0099
336
+ add :indigo, 0x8000cc
337
+ add :light_indigo, 0xa133ff
338
+ add :lighter_indigo, 0xc266ff
339
+ add :lightest_indigo, 0xe399ff
340
+
341
+ # lavender
342
+ add :darkest_lavender, 0x4c3366
343
+ add :darker_lavender, 0x9966cc
344
+ add :dark_lavender, 0xcc99ff
345
+ add :lavender, 0xe6ccff
346
+ add :light_lavender, 0xf2e6ff
347
+ add :lighter_lavender, 0xf8f2ff
348
+ add :lightest_lavender, 0xfcfaff
349
+
350
+ # Purple to Red Transition:
351
+
352
+ # mauve
353
+ add :darkest_mauve, 0x663366
354
+ add :darker_mauve, 0x996699
355
+ add :dark_mauve, 0xcc99cc
356
+ add :mauve, 0xffccff
357
+ add :light_mauve, 0xffe6ff
358
+ add :lighter_mauve, 0xfff2ff
359
+ add :lightest_mauve, 0xfff8ff
360
+
361
+ # mulberry
362
+ add :darkest_mulberry, 0x660033
363
+ add :darker_mulberry, 0x990066
364
+ add :dark_mulberry, 0xcc0099
365
+ add :mulberry, 0xff00cc
366
+ add :light_mulberry, 0xff33e6
367
+ add :lighter_mulberry, 0xff66f2
368
+ add :lightest_mulberry, 0xff99fa
369
+
370
+ # fuchsia
371
+ add :darkest_fuchsia, 0x660066
372
+ add :darker_fuchsia, 0x990099
373
+ add :dark_fuchsia, 0xcc00cc
374
+ add :fuchsia, 0xff00ff
375
+ add :light_fuchsia, 0xff33ff
376
+ add :lighter_fuchsia, 0xff66ff
377
+ add :lightest_fuchsia, 0xff99ff
378
+
379
+ # pink
380
+ add :darkest_pink, 0x330019
381
+ add :darker_pink, 0x660033
382
+ add :dark_pink, 0x99004c
383
+ add :pink, 0xcc0066
384
+ add :light_pink, 0xff007f
385
+ add :lighter_pink, 0xff3399
386
+ add :lightest_pink, 0xff66b2
387
+
388
+
389
+ end
@@ -0,0 +1,27 @@
1
+ class DevSystem::ColorShellTest < DevSystem::ShellTest
2
+
3
+ #
4
+
5
+ test :subject_class, :subject do
6
+ assert_equality DevSystem::ColorShell, subject_class
7
+ assert_equality DevSystem::ColorShell, subject.class
8
+ end
9
+
10
+ test :subject_class, :rgb_from_int do
11
+ assert_equality [255, 255, 255], subject_class.rgb_from_int(0xffffff)
12
+ assert_equality [0, 0, 0], subject_class.rgb_from_int(0x000000)
13
+ assert_equality [255, 0, 0], subject_class.rgb_from_int(0xff0000)
14
+ end
15
+
16
+ test :subject_class, :rgb_from_str do
17
+ assert_equality [255, 255, 255], subject_class.rgb_from_str("#ffffff")
18
+ assert_equality [0, 0, 0], subject_class.rgb_from_str("#000000")
19
+ assert_equality [255, 0, 0], subject_class.rgb_from_str("#ff0000")
20
+ end
21
+
22
+ test :subject_class, :colors do
23
+ assert_equality 245, subject_class.colors.count
24
+ assert_equality [Array], subject_class.colors.map(&:class).uniq
25
+ end
26
+
27
+ end
@@ -0,0 +1,20 @@
1
+ class DevSystem::ControllerShell < DevSystem::Shell
2
+
3
+ #
4
+
5
+ def self.places_for(controller)
6
+ ret = {
7
+ "app" => "#{App.relative_path}/#{controller.system.token}/#{controller.plural}",
8
+ }
9
+
10
+ AppShell.writable_systems.each do |system_key, system|
11
+ ret[system_key.to_s] = "lib/#{system_key}_system/#{controller.plural}"
12
+ system.subs.each do |sub|
13
+ ret["#{system_key}/#{sub}"] = "lib/#{system_key}_system/sub/#{sub}/#{controller.plural}"
14
+ end
15
+ end
16
+
17
+ ret
18
+ end
19
+
20
+ end
@@ -0,0 +1,16 @@
1
+ class DevSystem::ControllerShellTest < DevSystem::ShellTest
2
+
3
+ test :subject_class do
4
+ assert_equality subject_class, DevSystem::ControllerShell
5
+ end
6
+
7
+ test :settings do
8
+ assert_equality subject_class.log_level, 0
9
+ end
10
+
11
+ test :places_for do
12
+ places = subject_class.places_for(Shell)
13
+ assert_equality places.class, Hash
14
+ end
15
+
16
+ end
@@ -0,0 +1,27 @@
1
+ class DevSystem::DirShell < DevSystem::FileShell
2
+
3
+ # OVERRIDES
4
+
5
+ def self.exist? path, log_level: self.log_level
6
+ log log_level, "Checking if directory exists at '#{path}'"
7
+
8
+ directory? path
9
+ end
10
+
11
+ def self.size path, log_level: self.log_level
12
+ log log_level, "Getting size of directory at '#{path}'"
13
+ _raise_if_not_exists path
14
+
15
+ Pathname.new(path).children.inject(0) { |sum, f| sum + f.size }
16
+ end
17
+
18
+ # CUSTOM
19
+
20
+ def self.create path, log_level: self.log_level
21
+ log log_level, "Creating directory at '#{path}'"
22
+ _raise_if_blank path
23
+
24
+ Pathname.new(path).mkpath
25
+ end
26
+
27
+ end