lizarb 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/dev_box.rb +24 -4
  4. data/app/happy_box.rb +1 -1
  5. data/app/net/databases/sqlite_db_test.rb +5 -5
  6. data/app/net/records/app_record_test.rb +1 -1
  7. data/app/net/records/post_record_test.rb +1 -1
  8. data/app/net/records/user_record_test.rb +1 -1
  9. data/app/net_box.rb +7 -7
  10. data/app/web_box.rb +2 -2
  11. data/lib/app.rb +1 -1
  12. data/lib/dev_system/dev/controllers/bench/not_found_bench.rb +17 -19
  13. data/lib/dev_system/dev/controllers/bench/not_found_bench_test.rb +9 -11
  14. data/lib/dev_system/dev/controllers/bench.rb +5 -7
  15. data/lib/dev_system/dev/controllers/bench_dsl_main_part.rb +37 -39
  16. data/lib/dev_system/dev/controllers/bench_test.rb +8 -10
  17. data/lib/dev_system/dev/controllers/command/bench_command.rb +20 -22
  18. data/lib/dev_system/dev/controllers/command/bench_command_test.rb +8 -10
  19. data/lib/dev_system/dev/controllers/command/echo_command.rb +5 -7
  20. data/lib/dev_system/dev/controllers/command/echo_command_test.rb +8 -10
  21. data/lib/dev_system/dev/controllers/command/generate_command.rb +20 -22
  22. data/lib/dev_system/dev/controllers/command/generate_command_test.rb +8 -10
  23. data/lib/dev_system/dev/controllers/command/not_found_command.rb +17 -19
  24. data/lib/dev_system/dev/controllers/command/not_found_command_test.rb +8 -10
  25. data/lib/dev_system/dev/controllers/command/terminal_command.rb +12 -14
  26. data/lib/dev_system/dev/controllers/command/terminal_command_test.rb +8 -10
  27. data/lib/dev_system/dev/controllers/command/test_command.rb +64 -53
  28. data/lib/dev_system/dev/controllers/command/test_command_test.rb +8 -10
  29. data/lib/dev_system/dev/controllers/command/version_command.rb +4 -6
  30. data/lib/dev_system/dev/controllers/command/version_command_test.rb +8 -10
  31. data/lib/dev_system/dev/controllers/command.rb +11 -13
  32. data/lib/dev_system/dev/controllers/command_test.rb +8 -10
  33. data/lib/dev_system/dev/controllers/generator.rb +5 -7
  34. data/lib/dev_system/dev/controllers/generator_dsl_main_part.rb +35 -37
  35. data/lib/dev_system/dev/controllers/generator_test.rb +8 -10
  36. data/lib/dev_system/dev/controllers/generators/app_generator.rb +103 -53
  37. data/lib/dev_system/dev/controllers/generators/app_generator_test.rb +8 -10
  38. data/lib/dev_system/dev/controllers/generators/not_found_generator.rb +17 -19
  39. data/lib/dev_system/dev/controllers/generators/not_found_generator_test.rb +8 -10
  40. data/lib/dev_system/dev/controllers/terminal/irb_terminal.rb +11 -13
  41. data/lib/dev_system/dev/controllers/terminal/irb_terminal_test.rb +8 -10
  42. data/lib/dev_system/dev/controllers/terminal/pry_terminal.rb +6 -8
  43. data/lib/dev_system/dev/controllers/terminal/pry_terminal_test.rb +8 -10
  44. data/lib/dev_system/dev/controllers/terminal.rb +11 -13
  45. data/lib/dev_system/dev/controllers/terminal_test.rb +8 -10
  46. data/lib/dev_system/dev/dev_box.rb +33 -16
  47. data/lib/dev_system/dev/dev_box_test.rb +12 -14
  48. data/lib/dev_system/dev/panels/bench_panel.rb +3 -0
  49. data/lib/dev_system/dev/panels/bench_panel_test.rb +12 -0
  50. data/lib/dev_system/dev/panels/command_panel.rb +16 -18
  51. data/lib/dev_system/dev/panels/command_panel_test.rb +15 -17
  52. data/lib/dev_system/dev/panels/generator_panel.rb +3 -0
  53. data/lib/dev_system/dev/panels/generator_panel_test.rb +12 -0
  54. data/lib/dev_system/dev/panels/log_panel.rb +9 -6
  55. data/lib/dev_system/dev/panels/log_panel_test.rb +11 -13
  56. data/lib/dev_system/dev/panels/shell_panel.rb +3 -0
  57. data/lib/dev_system/dev/panels/shell_panel_test.rb +12 -0
  58. data/lib/dev_system/dev/panels/terminal_panel.rb +3 -0
  59. data/lib/dev_system/dev/panels/terminal_panel_test.rb +12 -0
  60. data/lib/happy_system/happy/controllers/axo.rb +4 -5
  61. data/lib/happy_system/happy/happy_box.rb +6 -9
  62. data/lib/happy_system/happy/happy_box_test.rb +11 -13
  63. data/lib/happy_system/happy/panels/axo_panel.rb +1 -3
  64. data/lib/liza/base/box.rb +71 -26
  65. data/lib/liza/base/box_test.rb +7 -9
  66. data/lib/liza/base/controller.rb +19 -21
  67. data/lib/liza/base/controller_test.rb +7 -9
  68. data/lib/liza/base/panel.rb +42 -27
  69. data/lib/liza/base/panel_test.rb +10 -12
  70. data/lib/liza/meta/part.rb +12 -14
  71. data/lib/liza/meta/part_extension.rb +14 -16
  72. data/lib/liza/meta/part_test.rb +4 -6
  73. data/lib/liza/meta/system.rb +12 -14
  74. data/lib/liza/meta/system_test.rb +8 -10
  75. data/lib/liza/ruby_test.rb +4 -6
  76. data/lib/liza/ruby_tests/module_test.rb +1 -1
  77. data/lib/liza/test/test.rb +7 -10
  78. data/lib/liza/test/test_test.rb +158 -159
  79. data/lib/liza/test_parts/test_assertions_advanced_part.rb +102 -104
  80. data/lib/liza/test_parts/test_assertions_part.rb +81 -83
  81. data/lib/liza/test_parts/test_dsl_part.rb +47 -49
  82. data/lib/liza/test_parts/test_log_part.rb +88 -90
  83. data/lib/liza/test_parts/test_subject_part.rb +16 -18
  84. data/lib/liza/test_parts/test_tree_part.rb +105 -107
  85. data/lib/liza/unit.rb +108 -104
  86. data/lib/liza/unit_test.rb +69 -71
  87. data/lib/lizarb/version.rb +1 -1
  88. data/lib/net_system/dev/net_command.rb +10 -12
  89. data/lib/net_system/net/controllers/client/redis_client.rb +19 -21
  90. data/lib/net_system/net/controllers/client/redis_client_test.rb +20 -22
  91. data/lib/net_system/net/controllers/client/sqlite_client.rb +19 -21
  92. data/lib/net_system/net/controllers/client/sqlite_client_test.rb +20 -22
  93. data/lib/net_system/net/controllers/client.rb +1 -3
  94. data/lib/net_system/net/controllers/client_test.rb +8 -10
  95. data/lib/net_system/net/controllers/database/redis_db.rb +6 -8
  96. data/lib/net_system/net/controllers/database/redis_db_test.rb +15 -17
  97. data/lib/net_system/net/controllers/database/sqlite_db.rb +6 -8
  98. data/lib/net_system/net/controllers/database/sqlite_db_test.rb +15 -17
  99. data/lib/net_system/net/controllers/database.rb +21 -23
  100. data/lib/net_system/net/controllers/database_test.rb +8 -10
  101. data/lib/net_system/net/controllers/record.rb +21 -23
  102. data/lib/net_system/net/controllers/record_test.rb +8 -10
  103. data/lib/net_system/net/net_box.rb +11 -16
  104. data/lib/net_system/net/net_box_test.rb +12 -14
  105. data/lib/net_system/net/panels/client_panel.rb +1 -3
  106. data/lib/net_system/net/panels/client_panel_test.rb +11 -13
  107. data/lib/net_system/net/panels/database_panel.rb +6 -8
  108. data/lib/net_system/net/panels/database_panel_test.rb +11 -13
  109. data/lib/web_system/dev/rack_command.rb +26 -17
  110. data/lib/web_system/dev/request_command.rb +2 -2
  111. data/lib/web_system/dev/web_command.rb +6 -8
  112. data/lib/web_system/web/controllers/rack.rb +4 -6
  113. data/lib/web_system/web/controllers/rack_test.rb +11 -13
  114. data/lib/web_system/web/controllers/request/client_error_request.rb +9 -11
  115. data/lib/web_system/web/controllers/request/not_found_request.rb +9 -11
  116. data/lib/web_system/web/controllers/request/server_error_request.rb +10 -12
  117. data/lib/web_system/web/controllers/request.rb +1 -3
  118. data/lib/web_system/web/controllers/request_test.rb +11 -13
  119. data/lib/web_system/web/panels/rack_panel.rb +37 -39
  120. data/lib/web_system/web/panels/rack_panel_test.rb +8 -10
  121. data/lib/web_system/web/panels/request_panel.rb +54 -56
  122. data/lib/web_system/web/panels/request_panel_test.rb +1 -1
  123. data/lib/web_system/web/web_box.rb +14 -18
  124. data/lib/web_system/web/web_box_test.rb +11 -13
  125. metadata +10 -5
  126. data/app_new/.gitignore +0 -4
  127. data/app_new/Gemfile +0 -31
  128. data/app_new/Procfile +0 -3
@@ -1,29 +1,27 @@
1
- class DevSystem
2
- class NotFoundGenerator < Generator
1
+ class DevSystem::NotFoundGenerator < DevSystem::Generator
3
2
 
4
- def self.call args
5
- # 1. LOG
3
+ def self.call args
4
+ # 1. LOG
6
5
 
7
- log :higher, "Called #{self}.#{__method__} with args #{args}"
8
- puts
6
+ log :higher, "Called #{self}.#{__method__} with args #{args}"
7
+ puts
9
8
 
10
- # 2. FIND generators
9
+ # 2. FIND generators
11
10
 
12
- App.eager_load_all
13
- generators = Liza::Generator.descendants
11
+ App.eager_load_all
12
+ generators = Liza::Generator.descendants
14
13
 
15
- log "Liza comes with #{generators.count} generators you can use."
16
- puts
14
+ log "Liza comes with #{generators.count} generators you can use."
15
+ puts
17
16
 
18
- log "Here they are:"
19
- puts
17
+ log "Here they are:"
18
+ puts
20
19
 
21
- # 3. LIST generators
22
-
23
- keys = generators.map { |k| k.last_namespace.snakecase[0..-11] }.sort
24
- keys.reject! { |s| s == "not_found" }
25
- keys.each { |s| log "liza generate #{s}" }
26
- end
20
+ # 3. LIST generators
27
21
 
22
+ keys = generators.map { |k| k.last_namespace.snakecase[0..-11] }.sort
23
+ keys.reject! { |s| s == "not_found" }
24
+ keys.each { |s| log "liza generate #{s}" }
28
25
  end
26
+
29
27
  end
@@ -1,14 +1,12 @@
1
- class DevSystem
2
- class NotFoundGeneratorTest < GeneratorTest
1
+ class DevSystem::NotFoundGeneratorTest < DevSystem::GeneratorTest
3
2
 
4
- test :subject_class do
5
- assert subject_class == DevSystem::NotFoundGenerator
6
- end
7
-
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::NotFoundGenerator
5
+ end
12
6
 
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
13
10
  end
11
+
14
12
  end
@@ -1,19 +1,17 @@
1
- class DevSystem
2
- class IrbTerminal < Terminal
1
+ class DevSystem::IrbTerminal < DevSystem::Terminal
3
2
 
4
- def self.call args
5
- log :higher, "Called #{self}.#{__method__} with args #{args}"
3
+ def self.call args
4
+ log :higher, "Called #{self}.#{__method__} with args #{args}"
6
5
 
7
- # https://github.com/ruby/ruby/blob/master/lib/irb.rb
8
- require "irb"
6
+ # https://github.com/ruby/ruby/blob/master/lib/irb.rb
7
+ require "irb"
9
8
 
10
- IRB.setup(nil)
11
- workspace = IRB::WorkSpace.new(binding)
12
- irb = IRB::Irb.new(workspace)
13
- IRB.conf[:MAIN_CONTEXT] = irb.context
14
-
15
- irb.eval_input
16
- end
9
+ IRB.setup(nil)
10
+ workspace = IRB::WorkSpace.new(binding)
11
+ irb = IRB::Irb.new(workspace)
12
+ IRB.conf[:MAIN_CONTEXT] = irb.context
17
13
 
14
+ irb.eval_input
18
15
  end
16
+
19
17
  end
@@ -1,14 +1,12 @@
1
- class DevSystem
2
- class IrbTerminalTest < TerminalTest
1
+ class DevSystem::IrbTerminalTest < DevSystem::TerminalTest
3
2
 
4
- test :subject_class do
5
- assert subject_class == DevSystem::IrbTerminal
6
- end
7
-
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::IrbTerminal
5
+ end
12
6
 
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
13
10
  end
11
+
14
12
  end
@@ -1,12 +1,10 @@
1
- class DevSystem
2
- class PryTerminal < Terminal
1
+ class DevSystem::PryTerminal < DevSystem::Terminal
3
2
 
4
- def self.call args
5
- log :higher, "Called #{self}.#{__method__} with args #{args}"
6
-
7
- require "pry"
8
- Pry.start
9
- end
3
+ def self.call args
4
+ log :higher, "Called #{self}.#{__method__} with args #{args}"
10
5
 
6
+ require "pry"
7
+ Pry.start
11
8
  end
9
+
12
10
  end
@@ -1,14 +1,12 @@
1
- class DevSystem
2
- class PryTerminalTest < TerminalTest
1
+ class DevSystem::PryTerminalTest < DevSystem::TerminalTest
3
2
 
4
- test :subject_class do
5
- assert subject_class == DevSystem::PryTerminal
6
- end
7
-
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::PryTerminal
5
+ end
12
6
 
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
13
10
  end
11
+
14
12
  end
@@ -1,19 +1,17 @@
1
- class DevSystem
2
- class Terminal < Liza::Controller
1
+ class DevSystem::Terminal < Liza::Controller
3
2
 
4
- # def self.call args
5
- # new.call args
6
- # end
3
+ # def self.call args
4
+ # new.call args
5
+ # end
7
6
 
8
- # def initialize args
9
- # @args = args
10
- # end
7
+ # def initialize args
8
+ # @args = args
9
+ # end
11
10
 
12
- # attr_reader :args
11
+ # attr_reader :args
13
12
 
14
- # def call args
15
- #
16
- # end
13
+ # def call args
14
+ #
15
+ # end
17
16
 
18
- end
19
17
  end
@@ -1,14 +1,12 @@
1
- class DevSystem
2
- class TerminalTest < Liza::ControllerTest
1
+ class DevSystem::TerminalTest < Liza::ControllerTest
3
2
 
4
- test :subject_class do
5
- assert subject_class == DevSystem::Terminal
6
- end
7
-
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::Terminal
5
+ end
12
6
 
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
13
10
  end
11
+
14
12
  end
@@ -1,22 +1,39 @@
1
- class DevSystem
2
- class DevBox < Liza::Box
3
- has_panel :command, :commands
4
- has_controller :command, :commands
5
- has_controller :shell, :commands
6
- has_controller :bench, :commands
7
- has_controller :terminal, :commands
1
+ class DevSystem::DevBox < Liza::Box
8
2
 
9
- has_panel :log, :logs
3
+ # Set up your bench panel per the DSL in http://guides.lizarb.org/panels/bench.html
4
+ panel :bench do
5
+ # set :log_level, ENV["dev.bench.log_level"]
6
+ end
7
+
8
+ # Set up your command panel per the DSL in http://guides.lizarb.org/panels/command.html
9
+ panel :command do
10
+ # set :log_level, ENV["dev.command.log_level"]
11
+ end
12
+
13
+ # Set up your generator panel per the DSL in http://guides.lizarb.org/panels/generator.html
14
+ panel :generator do
15
+ # set :log_level, ENV["dev.generator.log_level"]
16
+ end
10
17
 
11
- # Set up your command panel per the DSL in http://guides.lizarb.org/panels/command.html
12
- commands do
13
- # set :log_level, ENV["dev.command.log_level"]
14
- end
18
+ # Set up your command panel per the DSL in http://guides.lizarb.org/panels/log.html
19
+ panel :log do
20
+ # set :log_level, ENV["dev.log.log_level"]
21
+ end
15
22
 
16
- # Set up your command panel per the DSL in http://guides.lizarb.org/panels/log.html
17
- logs do
18
- # set :log_level, ENV["dev.log.log_level"]
19
- end
23
+ # Set up your shell panel per the DSL in http://guides.lizarb.org/panels/shell.html
24
+ panel :shell do
25
+ # set :log_level, ENV["dev.shell.log_level"]
26
+ end
20
27
 
28
+ # Set up your terminal panel per the DSL in http://guides.lizarb.org/panels/terminal.html
29
+ panel :terminal do
30
+ # set :log_level, ENV["dev.terminal.log_level"]
21
31
  end
32
+
33
+ has_controller :bench, :bench
34
+ has_controller :command, :command
35
+ has_controller :generator, :generator
36
+ # has_controller :log, :log
37
+ has_controller :shell, :shell
38
+ has_controller :terminal, :terminal
22
39
  end
@@ -1,19 +1,17 @@
1
- class DevSystem
2
- class DevBoxTest < Liza::BoxTest
1
+ class DevSystem::DevBoxTest < Liza::BoxTest
3
2
 
4
- test :subject_class do
5
- assert subject_class == DevSystem::DevBox
6
- end
7
-
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::DevBox
5
+ end
12
6
 
13
- test :panels do
14
- assert subject_class.commands.is_a? CommandPanel
15
- assert subject_class.logs.is_a? LogPanel
16
- end
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
10
+ end
17
11
 
12
+ test :panels do
13
+ assert subject_class[:command].is_a? DevSystem::CommandPanel
14
+ assert subject_class[:log].is_a? DevSystem::LogPanel
18
15
  end
16
+
19
17
  end
@@ -0,0 +1,3 @@
1
+ class DevSystem::BenchPanel < Liza::Panel
2
+
3
+ end
@@ -0,0 +1,12 @@
1
+ class DevSystem::BenchPanelTest < Liza::PanelTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::BenchPanel
5
+ end
6
+
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
10
+ end
11
+
12
+ end
@@ -1,30 +1,28 @@
1
- class DevSystem
2
- class CommandPanel < Liza::Panel
1
+ class DevSystem::CommandPanel < Liza::Panel
3
2
 
4
- def call args
5
- # 1. LOG
3
+ def call args
4
+ # 1. LOG
6
5
 
7
- log "call #{args}"
6
+ log "call #{args}"
8
7
 
9
- # 2. FIND command
8
+ # 2. FIND command
10
9
 
11
- return call_not_found args if args.none?
10
+ return call_not_found args if args.none?
12
11
 
13
- command = args[0]
12
+ command = args[0]
14
13
 
15
- log({command:})
14
+ log({command:})
16
15
 
17
- command_klass = Liza.const "#{command}_command"
16
+ command_klass = Liza.const "#{command}_command"
18
17
 
19
- # 3. CALL
18
+ # 3. CALL
20
19
 
21
- command_klass.call args[1..-1]
22
- rescue Liza::ConstNotFound
23
- call_not_found args
24
- end
20
+ command_klass.call args[1..-1]
21
+ rescue Liza::ConstNotFound
22
+ call_not_found args
23
+ end
25
24
 
26
- def call_not_found args
27
- Liza::NotFoundCommand.call args
28
- end
25
+ def call_not_found args
26
+ Liza::NotFoundCommand.call args
29
27
  end
30
28
  end
@@ -1,23 +1,21 @@
1
- class DevSystem
2
- class CommandPanelTest < Liza::PanelTest
1
+ class DevSystem::CommandPanelTest < Liza::PanelTest
3
2
 
4
- test :subject_class do
5
- assert subject_class == DevSystem::CommandPanel
6
- end
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::CommandPanel
5
+ end
7
6
 
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
10
+ end
12
11
 
13
- test :call do
14
- begin
15
- subject.call ["echo", 1, 2, 3]
16
- assert false
17
- rescue RuntimeError => e
18
- assert e.message == "[1, 2, 3]"
19
- end
12
+ test :call do
13
+ begin
14
+ subject.call ["echo", 1, 2, 3]
15
+ assert false
16
+ rescue RuntimeError => e
17
+ assert e.message == "[1, 2, 3]"
20
18
  end
21
-
22
19
  end
20
+
23
21
  end
@@ -0,0 +1,3 @@
1
+ class DevSystem::GeneratorPanel < Liza::Panel
2
+
3
+ end
@@ -0,0 +1,12 @@
1
+ class DevSystem::GeneratorPanelTest < Liza::PanelTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::GeneratorPanel
5
+ end
6
+
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
10
+ end
11
+
12
+ end
@@ -1,10 +1,13 @@
1
- class DevSystem
2
- class LogPanel < Liza::Panel
1
+ class DevSystem::LogPanel < Liza::Panel
3
2
 
4
- # https://rubyapi.org/3.1/o/logger
5
- def call string
6
- puts "lizarb #{Lizarb.thread_id.to_s.rjust_zeroes 3} #{string}"
3
+ # https://rubyapi.org/3.1/o/logger
4
+ def call string
5
+ unless App.mode == :code
6
+ pid = Process.pid
7
+ tid = Lizarb.thread_id.to_s.rjust_zeroes 3
8
+ string = "#{pid} #{tid} #{string}"
7
9
  end
8
-
10
+ puts string
9
11
  end
12
+
10
13
  end
@@ -1,18 +1,16 @@
1
- class DevSystem
2
- class LogPanelTest < Liza::PanelTest
1
+ class DevSystem::LogPanelTest < Liza::PanelTest
3
2
 
4
- test :subject_class do
5
- assert subject_class == DevSystem::LogPanel
6
- end
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::LogPanel
5
+ end
7
6
 
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :green
11
- end
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
10
+ end
12
11
 
13
- # test :call do
14
- # todo "write this"
15
- # end
12
+ # test :call do
13
+ # todo "write this"
14
+ # end
16
15
 
17
- end
18
16
  end
@@ -0,0 +1,3 @@
1
+ class DevSystem::ShellPanel < Liza::Panel
2
+
3
+ end
@@ -0,0 +1,12 @@
1
+ class DevSystem::ShellPanelTest < Liza::PanelTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::ShellPanel
5
+ end
6
+
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
10
+ end
11
+
12
+ end
@@ -0,0 +1,3 @@
1
+ class DevSystem::TerminalPanel < Liza::Panel
2
+
3
+ end
@@ -0,0 +1,12 @@
1
+ class DevSystem::TerminalPanelTest < Liza::PanelTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == DevSystem::TerminalPanel
5
+ end
6
+
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :green
10
+ end
11
+
12
+ end
@@ -1,8 +1,7 @@
1
- class HappySystem
2
- class Axo < Liza::Controller
1
+ class HappySystem::Axo < Liza::Controller
3
2
 
4
- def self.call args
5
- #
6
- end
3
+ def self.call args
4
+ #
7
5
  end
6
+
8
7
  end
@@ -1,12 +1,9 @@
1
- class HappySystem
2
- class HappyBox < Liza::Box
3
- has_panel :axo
4
- has_controller :axo
5
-
6
- # Set up your axo panel per the DSL in http://guides.lizarb.org/panels/axo.html
7
- axo do
8
- # set :log_level, ENV["happy.axo.log_level"]
9
- end
1
+ class HappySystem::HappyBox < Liza::Box
10
2
 
3
+ # Set up your axo panel per the DSL in http://guides.lizarb.org/panels/axo.html
4
+ panel :axo do
5
+ # set :log_level, ENV["happy.axo.log_level"]
11
6
  end
7
+
8
+ has_controller :axo
12
9
  end
@@ -1,18 +1,16 @@
1
- class HappySystem
2
- class HappyBoxTest < Liza::BoxTest
1
+ class HappySystem::HappyBoxTest < Liza::BoxTest
3
2
 
4
- test :subject_class do
5
- assert subject_class == HappySystem::HappyBox
6
- end
7
-
8
- test :settings do
9
- assert subject_class.log_level == :normal
10
- assert subject_class.log_color == :magenta
11
- end
3
+ test :subject_class do
4
+ assert subject_class == HappySystem::HappyBox
5
+ end
12
6
 
13
- test :panels do
14
- assert subject_class.axo.is_a? AxoPanel
15
- end
7
+ test :settings do
8
+ assert subject_class.log_level == :normal
9
+ assert subject_class.log_color == :magenta
10
+ end
16
11
 
12
+ test :panels do
13
+ assert subject_class[:axo].is_a? HappySystem::AxoPanel
17
14
  end
15
+
18
16
  end
@@ -1,5 +1,3 @@
1
- class HappySystem
2
- class AxoPanel < Liza::Panel
1
+ class HappySystem::AxoPanel < Liza::Panel
3
2
 
4
- end
5
3
  end