lizarb 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (441) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +34 -7
  3. data/Gemfile.lock +176 -14
  4. data/README.md +53 -9
  5. data/app/dev/commands/color_command.rb +29 -0
  6. data/app/dev/commands/color_command_test.rb +10 -0
  7. data/app/dev/commands/stick_command.rb +102 -0
  8. data/app/dev/commands/stick_command_test.rb +19 -0
  9. data/app/dev_box.rb +49 -17
  10. data/app/happy_box.rb +3 -2
  11. data/app/net/databases/redis_db.rb +1 -1
  12. data/app/net/databases/redis_db_test.rb +5 -5
  13. data/app/net/databases/sqlite_db.rb +1 -1
  14. data/app/net/databases/sqlite_db_test.rb +5 -5
  15. data/app/net/records/app_record.rb +1 -1
  16. data/app/net/records/app_record_test.rb +1 -1
  17. data/app/net/records/post_record_test.rb +1 -1
  18. data/app/net/records/user_record_test.rb +1 -1
  19. data/app/net_box.rb +29 -6
  20. data/app/web/requests/app_request.rb +1 -1
  21. data/app/web/requests/app_request_test.rb +1 -1
  22. data/app/web/requests/foo_request.rb +26 -0
  23. data/app/web/requests/foo_request_test.rb +7 -0
  24. data/app/web_box.rb +16 -8
  25. data/app.rb +38 -6
  26. data/app_global.gemfile.rb +1 -1
  27. data/app_global.gemfile.rb.lock +25 -3
  28. data/app_global.rb +1 -0
  29. data/{app_new → examples/bench/app}/dev/benches/loops_bench.rb +10 -3
  30. data/{app_new → examples/bench/app}/dev/benches/loops_bench_test.rb +1 -2
  31. data/examples/bench/app/dev/benches/objects_bench.rb +48 -0
  32. data/{app_new → examples/bench/app}/dev/benches/objects_bench_test.rb +1 -2
  33. data/{app_new → examples/bench/app}/dev/benches/sorted_bench.rb +28 -8
  34. data/examples/bench/app/dev/benches/sorted_bench_test.rb +11 -0
  35. data/{app_new → examples/bench/app}/dev/benches/variables_bench.rb +8 -2
  36. data/{app_new → examples/bench/app}/dev/benches/variables_bench_test.rb +1 -2
  37. data/examples/client/app/net/clients/news_client.rb +42 -0
  38. data/examples/client/app/net/clients/news_client_test.rb +24 -0
  39. data/{app_new → examples/command/app}/dev/commands/calculator_command.rb +1 -1
  40. data/{app_new → examples/command/app}/dev/commands/calculator_command_test.rb +1 -2
  41. data/{app_new → examples/command/app}/dev/commands/circle_command.rb +1 -1
  42. data/{app_new → examples/command/app}/dev/commands/circle_command_test.rb +1 -2
  43. data/{app_new → examples/command/app}/dev/commands/narrative_method_command.rb +3 -3
  44. data/{app_new → examples/command/app}/dev/commands/narrative_method_command_test.rb +2 -3
  45. data/{app_new → examples/command/app}/dev/commands/quadratic_command.rb +1 -1
  46. data/{app_new → examples/command/app}/dev/commands/quadratic_command_test.rb +1 -2
  47. data/examples/command/app/dev_box.rb +3 -0
  48. data/examples/log/app/dev/logs/logger_log.rb +8 -0
  49. data/examples/log/app/dev/logs/logger_log_test.rb +16 -0
  50. data/examples/new/app/dev_box.rb +67 -0
  51. data/examples/new/app.rb +41 -0
  52. data/examples/shell/app/dev/shells/bash_adapter_shell.rb +25 -0
  53. data/examples/shell/app/dev/shells/bash_adapter_shell_test.rb +23 -0
  54. data/examples/shell/app/dev/shells/business_logic_shell.rb +42 -0
  55. data/examples/shell/app/dev/shells/business_logic_shell_test.rb +39 -0
  56. data/examples/shell/app/dev/shells/gem_adapter_shell.rb +33 -0
  57. data/examples/shell/app/dev/shells/gem_adapter_shell_test.rb +23 -0
  58. data/exe/liza +6 -1
  59. data/exe/lizarb +1 -1
  60. data/lib/app.rb +71 -74
  61. data/lib/art_system/art_box.rb +5 -0
  62. data/lib/art_system/art_box_test.rb +8 -0
  63. data/lib/art_system.rb +8 -0
  64. data/lib/crypto_system/crypto_box.rb +5 -0
  65. data/lib/crypto_system/crypto_box_test.rb +8 -0
  66. data/lib/crypto_system.rb +8 -0
  67. data/lib/deep_system/deep_box.rb +5 -0
  68. data/lib/deep_system/deep_box_test.rb +8 -0
  69. data/lib/deep_system.rb +8 -0
  70. data/lib/desk_system/commands/glimmer_command.rb +26 -0
  71. data/lib/desk_system/commands/glimmer_command_test.rb +10 -0
  72. data/lib/desk_system/desk_box.rb +5 -0
  73. data/lib/desk_system/desk_box_test.rb +8 -0
  74. data/lib/desk_system.rb +8 -0
  75. data/lib/dev_system/{dev/controllers/command → commands}/test_command.rb +32 -4
  76. data/lib/dev_system/{dev/controllers/command → commands}/test_command_test.rb +1 -2
  77. data/lib/dev_system/dev_box.rb +79 -0
  78. data/lib/dev_system/dev_box_test.rb +33 -0
  79. data/lib/dev_system/generators/env_generator.rb +87 -0
  80. data/lib/dev_system/generators/env_generator_test.rb +11 -0
  81. data/lib/dev_system/generators/gemfile_generator.rb +47 -0
  82. data/lib/dev_system/generators/gemfile_generator_test.rb +11 -0
  83. data/lib/dev_system/generators/system_generator.rb +70 -0
  84. data/lib/dev_system/generators/system_generator_test.rb +11 -0
  85. data/lib/dev_system/{dev/controllers → sub/bench}/bench.rb +4 -0
  86. data/lib/dev_system/{dev/panels → sub/bench}/bench_panel_test.rb +6 -2
  87. data/lib/dev_system/sub/bench/bench_test.rb +24 -0
  88. data/lib/dev_system/{dev/controllers/bench → sub/bench/benches}/not_found_bench.rb +1 -2
  89. data/lib/dev_system/{dev/controllers/bench → sub/bench/benches}/not_found_bench_test.rb +1 -2
  90. data/lib/dev_system/{dev/controllers/command → sub/bench/commands}/bench_command.rb +1 -5
  91. data/lib/dev_system/{dev/controllers/command → sub/bench/commands}/bench_command_test.rb +1 -2
  92. data/lib/dev_system/sub/bench/generators/bench_generator.rb +70 -0
  93. data/lib/dev_system/sub/bench/generators/bench_generator_test.rb +10 -0
  94. data/lib/dev_system/sub/command/command.rb +28 -0
  95. data/lib/dev_system/sub/command/command_panel.rb +151 -0
  96. data/lib/dev_system/sub/command/command_panel_test.rb +78 -0
  97. data/lib/dev_system/{dev/controllers → sub/command}/command_test.rb +6 -2
  98. data/lib/dev_system/sub/command/commands/base_command.rb +48 -0
  99. data/lib/dev_system/sub/command/commands/base_command_test.rb +11 -0
  100. data/lib/dev_system/{dev/controllers/terminal/irb_terminal.rb → sub/command/commands/irb_command.rb} +3 -7
  101. data/lib/dev_system/sub/command/commands/irb_command_test.rb +11 -0
  102. data/lib/dev_system/sub/command/commands/not_found_command.rb +156 -0
  103. data/lib/dev_system/sub/command/commands/not_found_command_test.rb +11 -0
  104. data/lib/dev_system/{dev/controllers/terminal/pry_terminal.rb → sub/command/commands/pry_command.rb} +2 -2
  105. data/lib/dev_system/sub/command/commands/pry_command_test.rb +11 -0
  106. data/lib/dev_system/sub/command/commands/simple_command.rb +143 -0
  107. data/lib/dev_system/sub/command/commands/simple_command_test.rb +11 -0
  108. data/lib/dev_system/sub/command/generators/command_generator.rb +90 -0
  109. data/lib/dev_system/sub/command/generators/command_generator_test.rb +11 -0
  110. data/lib/dev_system/sub/command/input_commands/highline_input_command.rb +17 -0
  111. data/lib/dev_system/sub/command/input_commands/highline_input_command_test.rb +19 -0
  112. data/lib/dev_system/sub/command/input_commands/input_command.rb +20 -0
  113. data/lib/dev_system/sub/command/input_commands/input_command_test.rb +19 -0
  114. data/lib/dev_system/sub/command/input_commands/tty_input_command.rb +55 -0
  115. data/lib/dev_system/sub/command/input_commands/tty_input_command_test.rb +19 -0
  116. data/lib/dev_system/sub/generator/commands/generate_command.rb +9 -0
  117. data/lib/dev_system/sub/generator/commands/generate_command_test.rb +11 -0
  118. data/lib/dev_system/sub/generator/commands/new_command.rb +10 -0
  119. data/lib/dev_system/{dev/controllers/command → sub/generator/commands}/new_command_test.rb +1 -1
  120. data/lib/dev_system/sub/generator/generator.rb +19 -0
  121. data/lib/dev_system/sub/generator/generator_panel.rb +98 -0
  122. data/lib/dev_system/sub/generator/generator_panel_test.rb +79 -0
  123. data/lib/dev_system/{dev/controllers → sub/generator}/generator_test.rb +6 -2
  124. data/lib/dev_system/sub/generator/generators/base_generator.rb +64 -0
  125. data/lib/dev_system/sub/generator/generators/base_generator_test.rb +11 -0
  126. data/lib/dev_system/sub/generator/generators/generator_generator.rb +71 -0
  127. data/lib/dev_system/sub/generator/generators/generator_generator_test.rb +11 -0
  128. data/lib/dev_system/sub/generator/generators/new_generator.rb +74 -0
  129. data/lib/dev_system/sub/generator/generators/new_generator_test.rb +11 -0
  130. data/lib/dev_system/sub/generator/generators/not_found_generator.rb +155 -0
  131. data/lib/dev_system/sub/generator/generators/not_found_generator_test.rb +11 -0
  132. data/lib/dev_system/sub/generator/generators/simple_generator.rb +257 -0
  133. data/lib/dev_system/sub/generator/generators/simple_generator_test.rb +38 -0
  134. data/lib/dev_system/sub/log/commands/log_command.rb +11 -0
  135. data/lib/dev_system/sub/log/commands/log_command_test.rb +11 -0
  136. data/lib/dev_system/sub/log/generators/log_generator.rb +54 -0
  137. data/lib/dev_system/sub/log/generators/log_generator_test.rb +10 -0
  138. data/lib/dev_system/sub/log/log_panel.rb +47 -0
  139. data/lib/dev_system/sub/log/log_panel_test.rb +50 -0
  140. data/lib/dev_system/{dev/controllers → sub/log}/log_test.rb +6 -2
  141. data/lib/dev_system/sub/log/logs/output_log.rb +74 -0
  142. data/lib/dev_system/sub/log/logs/output_log_test.rb +47 -0
  143. data/lib/dev_system/sub/log/logs/stick_log.rb +79 -0
  144. data/lib/dev_system/sub/log/logs/stick_log_test.rb +88 -0
  145. data/lib/dev_system/sub/shell/commands/convert_command.rb +27 -0
  146. data/lib/dev_system/sub/shell/commands/convert_command_test.rb +10 -0
  147. data/lib/dev_system/sub/shell/commands/format_command.rb +25 -0
  148. data/lib/dev_system/sub/shell/commands/format_command_test.rb +10 -0
  149. data/lib/dev_system/sub/shell/commands/loc_command.rb +211 -0
  150. data/lib/dev_system/sub/shell/commands/loc_command_test.rb +10 -0
  151. data/lib/dev_system/sub/shell/commands/shell_command.rb +45 -0
  152. data/lib/dev_system/sub/shell/commands/shell_command_test.rb +11 -0
  153. data/lib/dev_system/sub/shell/converter_shells/coffee_converter_shell.rb +21 -0
  154. data/lib/dev_system/sub/shell/converter_shells/coffee_converter_shell_test.rb +41 -0
  155. data/lib/dev_system/sub/shell/converter_shells/converter_shell.rb +13 -0
  156. data/lib/dev_system/sub/shell/converter_shells/converter_shell_test.rb +19 -0
  157. data/lib/dev_system/sub/shell/converter_shells/haml_converter_shell.rb +30 -0
  158. data/lib/dev_system/sub/shell/converter_shells/haml_converter_shell_test.rb +34 -0
  159. data/lib/dev_system/sub/shell/converter_shells/md_converter_shell.rb +21 -0
  160. data/lib/dev_system/sub/shell/converter_shells/md_converter_shell_test.rb +38 -0
  161. data/lib/dev_system/sub/shell/converter_shells/scss_converter_shell.rb +59 -0
  162. data/lib/dev_system/sub/shell/converter_shells/scss_converter_shell_test.rb +59 -0
  163. data/lib/dev_system/sub/shell/formatter_shells/formatter_shell.rb +13 -0
  164. data/lib/dev_system/sub/shell/formatter_shells/formatter_shell_test.rb +19 -0
  165. data/lib/dev_system/sub/shell/formatter_shells/html_formatter_shell.rb +20 -0
  166. data/lib/dev_system/sub/shell/formatter_shells/html_formatter_shell_test.rb +51 -0
  167. data/lib/dev_system/sub/shell/generators/shell_generator.rb +68 -0
  168. data/lib/dev_system/sub/shell/generators/shell_generator_test.rb +10 -0
  169. data/lib/dev_system/{dev/controllers → sub/shell}/shell.rb +2 -2
  170. data/lib/dev_system/sub/shell/shell_panel.rb +98 -0
  171. data/lib/dev_system/sub/shell/shell_panel_test.rb +18 -0
  172. data/lib/dev_system/{dev/controllers → sub/shell}/shell_test.rb +9 -5
  173. data/lib/dev_system/sub/shell/shells/app_shell.rb +185 -0
  174. data/lib/dev_system/sub/shell/shells/app_shell_test.rb +26 -0
  175. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/bin_shell_test.rb +1 -2
  176. data/lib/dev_system/sub/shell/shells/color_shell.rb +389 -0
  177. data/lib/dev_system/sub/shell/shells/color_shell_test.rb +27 -0
  178. data/lib/dev_system/sub/shell/shells/controller_shell.rb +20 -0
  179. data/lib/dev_system/sub/shell/shells/controller_shell_test.rb +16 -0
  180. data/lib/dev_system/sub/shell/shells/dir_shell.rb +27 -0
  181. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/dir_shell_test.rb +1 -5
  182. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/file_shell.rb +4 -4
  183. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/file_shell_test.rb +1 -2
  184. data/lib/dev_system/sub/shell/shells/gem_shell.rb +21 -0
  185. data/lib/dev_system/sub/shell/shells/gem_shell_test.rb +28 -0
  186. data/lib/dev_system/sub/shell/shells/kernel_shell.rb +22 -0
  187. data/lib/dev_system/sub/shell/shells/kernel_shell_test.rb +10 -0
  188. data/lib/dev_system/sub/shell/shells/line_diff_shell.rb +26 -0
  189. data/lib/dev_system/sub/shell/shells/line_diff_shell_test.rb +11 -0
  190. data/lib/dev_system/sub/shell/shells/line_shell.rb +56 -0
  191. data/lib/dev_system/sub/shell/shells/line_shell_test.rb +70 -0
  192. data/lib/dev_system/sub/shell/shells/method_shell.rb +52 -0
  193. data/lib/dev_system/sub/shell/shells/method_shell_test.rb +34 -0
  194. data/lib/dev_system/sub/shell/shells/text_file_shell.rb +14 -0
  195. data/lib/dev_system/sub/shell/shells/text_file_shell_test.rb +11 -0
  196. data/lib/dev_system/sub/shell/shells/text_shell.rb +65 -0
  197. data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/text_shell_test.rb +1 -2
  198. data/lib/dev_system.rb +8 -2
  199. data/lib/happy_system/happy_box.rb +9 -0
  200. data/lib/happy_system/happy_box_test.rb +24 -0
  201. data/lib/happy_system/sub/axo/axo.rb +10 -0
  202. data/lib/happy_system/sub/axo/axo_panel.rb +9 -0
  203. data/lib/happy_system/sub/axo/axo_panel_test.rb +16 -0
  204. data/lib/happy_system/sub/axo/axo_test.rb +16 -0
  205. data/lib/happy_system/sub/axo/commands/axo_command.rb +40 -0
  206. data/lib/happy_system/sub/axo/commands/axo_command_test.rb +8 -0
  207. data/lib/happy_system/sub/axo/generators/axo_generator.rb +79 -0
  208. data/lib/happy_system/sub/axo/generators/axo_generator_test.rb +11 -0
  209. data/lib/happy_system.rb +4 -2
  210. data/lib/lab_system/clients/kroki_client.rb +134 -0
  211. data/lib/lab_system/clients/kroki_client_test.rb +32 -0
  212. data/lib/lab_system/clients/liza_kroki_client.rb +176 -0
  213. data/lib/lab_system/clients/liza_kroki_client_test.rb +32 -0
  214. data/lib/lab_system/commands/docker_command.rb +61 -0
  215. data/lib/lab_system/commands/docker_command_test.rb +11 -0
  216. data/lib/lab_system/lab_box.rb +5 -0
  217. data/lib/lab_system/lab_box_test.rb +8 -0
  218. data/lib/lab_system/requests/kroki_request.rb +182 -0
  219. data/lib/lab_system/requests/kroki_request_test.rb +11 -0
  220. data/lib/lab_system/shells/docker_shell.rb +60 -0
  221. data/lib/lab_system/shells/docker_shell_test.rb +61 -0
  222. data/lib/lab_system/shells/kroki_docker_shell.rb +20 -0
  223. data/lib/lab_system/shells/kroki_docker_shell_test.rb +11 -0
  224. data/lib/lab_system.rb +8 -0
  225. data/lib/liza/base/controller.rb +14 -15
  226. data/lib/liza/base/controller_test.rb +28 -2
  227. data/lib/liza/base/panel.rb +48 -6
  228. data/lib/liza/base/panel_test.rb +141 -2
  229. data/lib/liza/base_parts/controller_subsystem_part.rb +93 -0
  230. data/lib/liza/base_parts/panel_rescuer_part.rb +129 -0
  231. data/lib/liza/meta/box.rb +24 -0
  232. data/lib/liza/meta/box_test.rb +20 -0
  233. data/lib/liza/meta/part_test.rb +6 -1
  234. data/lib/liza/meta/system.rb +50 -7
  235. data/lib/liza/meta/system_test.rb +6 -2
  236. data/lib/liza/ruby_tests/app_test.rb +39 -0
  237. data/lib/liza/ruby_tests/class_test.rb +20 -0
  238. data/lib/liza/ruby_tests/module_test.rb +4 -4
  239. data/lib/liza/{ruby_test.rb → ruby_tests/object_test.rb} +1 -1
  240. data/lib/liza/ruby_tests/string_test.rb +3 -1
  241. data/lib/liza/{test → safety}/test.rb +9 -0
  242. data/lib/liza/{test → safety}/test_test.rb +40 -7
  243. data/lib/liza/{test_parts → safety_parts}/test_assertions_advanced_part.rb +1 -1
  244. data/lib/liza/{test_parts → safety_parts}/test_log_part.rb +20 -0
  245. data/lib/liza/{test_parts → safety_parts}/test_subject_part.rb +10 -0
  246. data/lib/liza/safety_parts/test_tree_part.rb +87 -0
  247. data/lib/liza/unit.rb +50 -100
  248. data/lib/liza/unit_parts/unit_classes_part.rb +37 -0
  249. data/lib/liza/unit_parts/unit_classes_part_test.rb +3 -0
  250. data/lib/liza/unit_parts/unit_logging_part.rb +139 -0
  251. data/lib/liza/unit_parts/unit_logging_part_test.rb +3 -0
  252. data/lib/liza/unit_parts/unit_methods_part.rb +35 -0
  253. data/lib/liza/unit_parts/unit_methods_part_test.rb +3 -0
  254. data/lib/liza/unit_parts/unit_procedure_part.rb +2 -2
  255. data/lib/liza/unit_parts/unit_renderer_part.rb +171 -0
  256. data/lib/liza/unit_parts/unit_renderer_part_test.rb +15 -0
  257. data/lib/liza/unit_parts/unit_settings_part.rb +8 -0
  258. data/lib/liza/unit_test.rb +114 -16
  259. data/lib/liza.rb +2 -2
  260. data/lib/lizarb/ruby/class.rb +9 -1
  261. data/lib/lizarb/ruby/string.rb +3 -1
  262. data/lib/lizarb/version.rb +1 -1
  263. data/lib/lizarb.rb +215 -64
  264. data/lib/micro_system/micro_box.rb +5 -0
  265. data/lib/micro_system/micro_box_test.rb +8 -0
  266. data/lib/micro_system.rb +8 -0
  267. data/lib/net_system/net_box.rb +21 -0
  268. data/lib/net_system/{net/net_box_test.rb → net_box_test.rb} +1 -2
  269. data/lib/net_system/{net/panels → sub/client}/client_panel_test.rb +1 -2
  270. data/lib/net_system/{net/controllers → sub/client}/client_test.rb +1 -2
  271. data/lib/net_system/sub/client/generators/client_generator.rb +88 -0
  272. data/lib/net_system/sub/client/generators/client_generator_test.rb +10 -0
  273. data/lib/net_system/sub/database/clients/mongo_client.rb +33 -0
  274. data/lib/net_system/sub/database/clients/mongo_client_test.rb +20 -0
  275. data/lib/net_system/sub/database/clients/mysql_client.rb +29 -0
  276. data/lib/net_system/sub/database/clients/mysql_client_test.rb +23 -0
  277. data/lib/net_system/sub/database/clients/pgsql_client.rb +29 -0
  278. data/lib/net_system/sub/database/clients/pgsql_client_test.rb +25 -0
  279. data/lib/net_system/{net/controllers/client → sub/database/clients}/redis_client.rb +4 -1
  280. data/lib/net_system/{net/controllers/client → sub/database/clients}/redis_client_test.rb +2 -2
  281. data/lib/net_system/{net/controllers/client → sub/database/clients}/sqlite_client.rb +4 -1
  282. data/lib/net_system/{net/controllers/client → sub/database/clients}/sqlite_client_test.rb +2 -2
  283. data/lib/net_system/sub/database/commands/database_command.rb +32 -0
  284. data/lib/net_system/sub/database/commands/database_command_test.rb +11 -0
  285. data/lib/net_system/{net/panels → sub/database}/database_panel_test.rb +1 -2
  286. data/lib/net_system/{net/controllers → sub/database}/database_test.rb +1 -2
  287. data/lib/net_system/sub/database/databases/mongo_db.rb +8 -0
  288. data/lib/net_system/sub/database/databases/mongo_db_test.rb +21 -0
  289. data/lib/net_system/sub/database/databases/mysql_db.rb +8 -0
  290. data/lib/net_system/sub/database/databases/mysql_db_test.rb +21 -0
  291. data/lib/net_system/sub/database/databases/pgsql_db.rb +8 -0
  292. data/lib/net_system/sub/database/databases/pgsql_db_test.rb +21 -0
  293. data/lib/net_system/{net/controllers/database → sub/database/databases}/redis_db_test.rb +1 -1
  294. data/lib/net_system/{net/controllers/database → sub/database/databases}/sqlite_db_test.rb +1 -1
  295. data/lib/net_system/sub/record/generators/record_generator.rb +33 -0
  296. data/lib/net_system/sub/record/generators/record_generator_test.rb +11 -0
  297. data/lib/net_system/sub/record/record_panel.rb +3 -0
  298. data/lib/net_system/sub/record/record_panel_test.rb +11 -0
  299. data/lib/net_system/{net/controllers → sub/record}/record_test.rb +1 -2
  300. data/lib/net_system.rb +8 -1
  301. data/lib/web_system/{dev → sub/rack/commands}/rack_command.rb +7 -5
  302. data/lib/web_system/sub/rack/commands/rack_command_test.rb +11 -0
  303. data/lib/web_system/sub/rack/middle_racks/first_middle_rack.rb +8 -0
  304. data/lib/web_system/sub/rack/middle_racks/first_middle_rack_test.rb +11 -0
  305. data/lib/web_system/sub/rack/middle_racks/last_middle_rack.rb +3 -0
  306. data/lib/web_system/sub/rack/middle_racks/last_middle_rack_test.rb +11 -0
  307. data/lib/web_system/sub/rack/middle_racks/middle_rack.rb +18 -0
  308. data/lib/web_system/sub/rack/middle_racks/middle_rack_test.rb +11 -0
  309. data/lib/web_system/sub/rack/middle_racks/zeitwerk_middle_rack.rb +11 -0
  310. data/lib/web_system/sub/rack/middle_racks/zeitwerk_middle_rack_test.rb +11 -0
  311. data/lib/web_system/sub/rack/rack_panel.rb +52 -0
  312. data/lib/web_system/{web/panels → sub/rack}/rack_panel_test.rb +1 -2
  313. data/lib/web_system/{web/controllers → sub/rack}/rack_test.rb +1 -2
  314. data/lib/web_system/sub/rack/server_racks/agoo_server_rack.rb +53 -0
  315. data/lib/web_system/sub/rack/server_racks/agoo_server_rack_test.rb +11 -0
  316. data/lib/web_system/sub/rack/server_racks/falcon_server_rack.rb +46 -0
  317. data/lib/web_system/sub/rack/server_racks/falcon_server_rack_test.rb +11 -0
  318. data/lib/web_system/sub/rack/server_racks/iodine_server_rack.rb +47 -0
  319. data/lib/web_system/sub/rack/server_racks/iodine_server_rack_test.rb +11 -0
  320. data/lib/web_system/sub/rack/server_racks/puma_server_rack.rb +48 -0
  321. data/lib/web_system/sub/rack/server_racks/puma_server_rack_test.rb +11 -0
  322. data/lib/web_system/sub/rack/server_racks/server_rack.rb +12 -0
  323. data/lib/web_system/sub/rack/server_racks/server_rack_test.rb +11 -0
  324. data/lib/web_system/sub/rack/server_racks/thin_server_rack.rb +85 -0
  325. data/lib/web_system/sub/rack/server_racks/thin_server_rack_test.rb +11 -0
  326. data/lib/web_system/sub/request/commands/request_command.rb +125 -0
  327. data/lib/web_system/sub/request/commands/request_command_test.rb +11 -0
  328. data/lib/web_system/sub/request/generators/request_generator.rb +96 -0
  329. data/lib/web_system/sub/request/generators/request_generator_test.rb +11 -0
  330. data/lib/web_system/sub/request/request_panel.rb +69 -0
  331. data/lib/web_system/sub/request/request_panel_test.rb +54 -0
  332. data/lib/web_system/{web/controllers → sub/request}/request_test.rb +1 -2
  333. data/lib/web_system/sub/request/requests/simple_request.rb +95 -0
  334. data/lib/web_system/sub/request/requests/simple_request_test.rb +11 -0
  335. data/lib/web_system/sub/request/router_requests/router_request.rb +7 -0
  336. data/lib/web_system/sub/request/router_requests/router_request_test.rb +11 -0
  337. data/lib/web_system/sub/request/router_requests/simple_router_request.rb +24 -0
  338. data/lib/web_system/sub/request/router_requests/simple_router_request_test.rb +11 -0
  339. data/lib/web_system/web_box.rb +17 -0
  340. data/lib/web_system/{web/web_box_test.rb → web_box_test.rb} +1 -2
  341. data/lib/web_system.rb +9 -3
  342. data/lib/work_system/work_box.rb +5 -0
  343. data/lib/work_system/work_box_test.rb +8 -0
  344. data/lib/work_system.rb +8 -0
  345. data/lizarb.gemspec +13 -7
  346. metadata +369 -167
  347. data/app/happy/axos/axo.rb +0 -50
  348. data/app_new/dev/benches/objects_bench.rb +0 -83
  349. data/app_new/dev/benches/sorted_bench_test.rb +0 -12
  350. data/app_new/dev_box.rb +0 -14
  351. data/app_new.rb +0 -15
  352. data/exe/lrb +0 -3
  353. data/lib/dev_system/dev/controllers/bench_test.rb +0 -12
  354. data/lib/dev_system/dev/controllers/command/generate_command.rb +0 -9
  355. data/lib/dev_system/dev/controllers/command/generate_command_test.rb +0 -12
  356. data/lib/dev_system/dev/controllers/command/new_command.rb +0 -9
  357. data/lib/dev_system/dev/controllers/command/not_found_command.rb +0 -48
  358. data/lib/dev_system/dev/controllers/command/not_found_command_test.rb +0 -12
  359. data/lib/dev_system/dev/controllers/command/terminal_command.rb +0 -22
  360. data/lib/dev_system/dev/controllers/command/terminal_command_test.rb +0 -12
  361. data/lib/dev_system/dev/controllers/command.rb +0 -13
  362. data/lib/dev_system/dev/controllers/generator.rb +0 -9
  363. data/lib/dev_system/dev/controllers/generator_dsl_main_part.rb +0 -50
  364. data/lib/dev_system/dev/controllers/generators/bench_generator/controller.rb.erb +0 -23
  365. data/lib/dev_system/dev/controllers/generators/bench_generator/controller_test.rb.erb +0 -12
  366. data/lib/dev_system/dev/controllers/generators/bench_generator.rb +0 -12
  367. data/lib/dev_system/dev/controllers/generators/bench_generator_test.rb +0 -12
  368. data/lib/dev_system/dev/controllers/generators/command_generator/controller.rb.erb +0 -41
  369. data/lib/dev_system/dev/controllers/generators/command_generator/controller_test.rb.erb +0 -12
  370. data/lib/dev_system/dev/controllers/generators/command_generator.rb +0 -19
  371. data/lib/dev_system/dev/controllers/generators/command_generator_test.rb +0 -12
  372. data/lib/dev_system/dev/controllers/generators/controller_generator.rb +0 -97
  373. data/lib/dev_system/dev/controllers/generators/controller_generator_test.rb +0 -12
  374. data/lib/dev_system/dev/controllers/generators/generator_generator/generator.rb.erb +0 -18
  375. data/lib/dev_system/dev/controllers/generators/generator_generator/generator_test.rb.erb +0 -12
  376. data/lib/dev_system/dev/controllers/generators/generator_generator/template.rb.erb +0 -9
  377. data/lib/dev_system/dev/controllers/generators/generator_generator/template_test.rb.erb +0 -12
  378. data/lib/dev_system/dev/controllers/generators/generator_generator.rb +0 -30
  379. data/lib/dev_system/dev/controllers/generators/generator_generator_test.rb +0 -12
  380. data/lib/dev_system/dev/controllers/generators/new_generator.rb +0 -117
  381. data/lib/dev_system/dev/controllers/generators/new_generator_test.rb +0 -12
  382. data/lib/dev_system/dev/controllers/generators/not_found_generator.rb +0 -39
  383. data/lib/dev_system/dev/controllers/generators/not_found_generator_test.rb +0 -12
  384. data/lib/dev_system/dev/controllers/generators/record_generator.rb +0 -46
  385. data/lib/dev_system/dev/controllers/generators/record_generator_test.rb +0 -12
  386. data/lib/dev_system/dev/controllers/generators/request_generator.rb +0 -63
  387. data/lib/dev_system/dev/controllers/generators/request_generator_test.rb +0 -12
  388. data/lib/dev_system/dev/controllers/shell/dir_shell.rb +0 -27
  389. data/lib/dev_system/dev/controllers/shell/text_shell.rb +0 -23
  390. data/lib/dev_system/dev/controllers/terminal/irb_terminal_test.rb +0 -12
  391. data/lib/dev_system/dev/controllers/terminal/pry_terminal_test.rb +0 -12
  392. data/lib/dev_system/dev/controllers/terminal.rb +0 -17
  393. data/lib/dev_system/dev/controllers/terminal_test.rb +0 -12
  394. data/lib/dev_system/dev/dev_box.rb +0 -33
  395. data/lib/dev_system/dev/dev_box_test.rb +0 -17
  396. data/lib/dev_system/dev/panels/command_panel.rb +0 -71
  397. data/lib/dev_system/dev/panels/command_panel_test.rb +0 -46
  398. data/lib/dev_system/dev/panels/generator_panel.rb +0 -73
  399. data/lib/dev_system/dev/panels/generator_panel_test.rb +0 -46
  400. data/lib/dev_system/dev/panels/log_panel.rb +0 -13
  401. data/lib/dev_system/dev/panels/log_panel_test.rb +0 -16
  402. data/lib/dev_system/dev/panels/shell_panel.rb +0 -3
  403. data/lib/dev_system/dev/panels/shell_panel_test.rb +0 -12
  404. data/lib/dev_system/dev/panels/terminal_panel.rb +0 -3
  405. data/lib/dev_system/dev/panels/terminal_panel_test.rb +0 -12
  406. data/lib/happy_system/dev/happy_command.rb +0 -11
  407. data/lib/happy_system/happy/controllers/axo.rb +0 -7
  408. data/lib/happy_system/happy/happy_box.rb +0 -8
  409. data/lib/happy_system/happy/happy_box_test.rb +0 -16
  410. data/lib/happy_system/happy/panels/axo_panel.rb +0 -3
  411. data/lib/liza/base/box.rb +0 -90
  412. data/lib/liza/base/box_test.rb +0 -10
  413. data/lib/liza/base_parts/controller_renderer_part.rb +0 -140
  414. data/lib/liza/base_parts/controller_renderer_part_test.rb +0 -16
  415. data/lib/liza/meta/part_extension.rb +0 -16
  416. data/lib/liza/test_parts/test_tree_part.rb +0 -92
  417. data/lib/net_system/dev/net_command.rb +0 -22
  418. data/lib/net_system/net/net_box.rb +0 -13
  419. data/lib/web_system/dev/request_command.rb +0 -129
  420. data/lib/web_system/dev/web_command.rb +0 -9
  421. data/lib/web_system/web/panels/rack_panel.rb +0 -42
  422. data/lib/web_system/web/panels/request_panel.rb +0 -70
  423. data/lib/web_system/web/panels/request_panel_test.rb +0 -33
  424. data/lib/web_system/web/web_box.rb +0 -18
  425. /data/lib/dev_system/{dev/panels → sub/bench}/bench_panel.rb +0 -0
  426. /data/lib/dev_system/{dev/controllers → sub/log}/log.rb +0 -0
  427. /data/lib/dev_system/{dev/controllers/shell → sub/shell/shells}/bin_shell.rb +0 -0
  428. /data/lib/liza/{test_parts → safety_parts}/test_assertions_part.rb +0 -0
  429. /data/lib/liza/{test_parts → safety_parts}/test_dsl_part.rb +0 -0
  430. /data/lib/net_system/{net/controllers → sub/client}/client.rb +0 -0
  431. /data/lib/net_system/{net/panels → sub/client}/client_panel.rb +0 -0
  432. /data/lib/net_system/{net/controllers → sub/database}/database.rb +0 -0
  433. /data/lib/net_system/{net/panels → sub/database}/database_panel.rb +0 -0
  434. /data/lib/net_system/{net/controllers/database → sub/database/databases}/redis_db.rb +0 -0
  435. /data/lib/net_system/{net/controllers/database → sub/database/databases}/sqlite_db.rb +0 -0
  436. /data/lib/net_system/{net/controllers → sub/record}/record.rb +0 -0
  437. /data/lib/web_system/{web/controllers → sub/rack}/rack.rb +0 -0
  438. /data/lib/web_system/{web/controllers → sub/request}/request.rb +0 -0
  439. /data/lib/web_system/{web/controllers/request → sub/request/requests}/client_error_request.rb +0 -0
  440. /data/lib/web_system/{web/controllers/request → sub/request/requests}/not_found_request.rb +0 -0
  441. /data/lib/web_system/{web/controllers/request → sub/request/requests}/server_error_request.rb +0 -0
@@ -4,9 +4,13 @@ class DevSystem::ShellTest < Liza::ControllerTest
4
4
  assert subject_class == DevSystem::Shell
5
5
  end
6
6
 
7
+ test_methods_defined do
8
+ on_self :cruby?, :engine, :jruby?, :linux?, :mac?, :os, :ruby_version, :unix?, :windows?
9
+ on_instance
10
+ end
11
+
7
12
  test :settings do
8
- assert subject_class.log_level == :normal
9
- assert subject_class.log_color == :green
13
+ assert_equality subject_class.log_level, 0
10
14
  end
11
15
 
12
16
  #
@@ -45,10 +49,10 @@ class DevSystem::ShellTest < Liza::ControllerTest
45
49
 
46
50
  #
47
51
 
48
- test :subject_class, :ruby? do
49
- original = subject_class.ruby?
52
+ test :subject_class, :cruby? do
53
+ original = subject_class.cruby?
50
54
  subject_class.instance_variable_set(:@ruby, true)
51
- assert subject_class.ruby?
55
+ assert subject_class.cruby?
52
56
  ensure
53
57
  subject_class.instance_variable_set(:@ruby, original)
54
58
  end
@@ -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