lizarb 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +10 -2
  4. data/README.md +2 -2
  5. data/app/dev/benches/app_bench.rb +5 -0
  6. data/app/dev/benches/app_bench_test.rb +7 -0
  7. data/app/dev/benches/loops_bench.rb +148 -0
  8. data/app/dev/benches/loops_bench_test.rb +11 -0
  9. data/app/dev/commands/new_command.rb +1 -61
  10. data/app/dev/generators/bench_generator.rb +67 -0
  11. data/app/dev/generators/bench_generator_test.rb +12 -0
  12. data/app/dev/generators/command_generator.rb +51 -0
  13. data/app/dev/generators/command_generator_test.rb +12 -0
  14. data/app/dev/generators/model_generator.rb +46 -0
  15. data/app/dev/generators/model_generator_test.rb +12 -0
  16. data/app/dev/generators/request_generator.rb +63 -0
  17. data/app/dev/generators/request_generator_test.rb +12 -0
  18. data/app/net/databases/redis_db_test.rb +2 -2
  19. data/app/net/databases/sqlite_db_test.rb +2 -2
  20. data/app/net_box.rb +2 -2
  21. data/lib/app.rb +1 -1
  22. data/lib/dev_system/dev/controllers/bench.rb +11 -0
  23. data/lib/dev_system/dev/controllers/bench_dsl_main_part.rb +60 -0
  24. data/lib/dev_system/dev/controllers/bench_test.rb +14 -0
  25. data/lib/dev_system/dev/controllers/command/bench_command.rb +24 -0
  26. data/lib/dev_system/dev/controllers/command/bench_command_test.rb +14 -0
  27. data/lib/dev_system/dev/controllers/command/dev_command.rb +13 -8
  28. data/lib/dev_system/dev/controllers/command/generate_command.rb +23 -0
  29. data/lib/dev_system/dev/controllers/command/generate_command_test.rb +14 -0
  30. data/lib/dev_system/dev/controllers/generator.rb +11 -0
  31. data/lib/dev_system/dev/controllers/generator_dsl_main_part.rb +54 -0
  32. data/lib/dev_system/dev/controllers/generator_test.rb +14 -0
  33. data/lib/dev_system/dev/controllers/generators/app_generator.rb +71 -0
  34. data/lib/dev_system/dev/controllers/generators/app_generator_test.rb +14 -0
  35. data/lib/dev_system/dev/controllers/shell/file_shell.rb +29 -0
  36. data/lib/dev_system/dev/controllers/shell/file_shell_test.rb +14 -0
  37. data/lib/dev_system/dev/controllers/shell.rb +19 -0
  38. data/lib/dev_system/dev/controllers/shell_test.rb +13 -0
  39. data/lib/dev_system/dev/controllers/terminal/irb_terminal.rb +19 -0
  40. data/lib/dev_system/dev/controllers/terminal/irb_terminal_test.rb +14 -0
  41. data/lib/dev_system/dev/controllers/terminal/pry_terminal.rb +12 -0
  42. data/lib/dev_system/dev/controllers/terminal/pry_terminal_test.rb +14 -0
  43. data/lib/dev_system/dev/controllers/terminal.rb +19 -0
  44. data/lib/dev_system/dev/controllers/terminal_test.rb +14 -0
  45. data/lib/dev_system/dev/dev_box.rb +3 -0
  46. data/lib/liza/test_parts/test_subject_part.rb +6 -1
  47. data/lib/liza.rb +35 -7
  48. data/lib/lizarb/ruby/class.rb +2 -0
  49. data/lib/lizarb/ruby/proc.rb +12 -0
  50. data/lib/lizarb/ruby/string.rb +16 -0
  51. data/lib/lizarb/version.rb +1 -1
  52. data/lib/net_system/net/controllers/{adapter/redis_adapter.rb → client/redis_client.rb} +2 -2
  53. data/lib/net_system/net/controllers/{adapter/redis_adapter_test.rb → client/redis_client_test.rb} +2 -2
  54. data/lib/net_system/net/controllers/{adapter/sqlite_adapter.rb → client/sqlite_client.rb} +2 -2
  55. data/lib/net_system/net/controllers/{adapter/sqlite_adapter_test.rb → client/sqlite_client_test.rb} +2 -2
  56. data/lib/net_system/net/controllers/client.rb +5 -0
  57. data/lib/net_system/net/controllers/{adapter_test.rb → client_test.rb} +2 -2
  58. data/lib/net_system/net/controllers/database/redis_db.rb +2 -2
  59. data/lib/net_system/net/controllers/database/redis_db_test.rb +1 -1
  60. data/lib/net_system/net/controllers/database/sqlite_db.rb +2 -2
  61. data/lib/net_system/net/controllers/database/sqlite_db_test.rb +1 -1
  62. data/lib/net_system/net/controllers/database.rb +6 -6
  63. data/lib/net_system/net/net_box.rb +5 -5
  64. data/lib/net_system/net/net_box_test.rb +1 -1
  65. data/lib/net_system/net/panels/client_panel.rb +5 -0
  66. data/lib/net_system/net/panels/{adapter_panel_test.rb → client_panel_test.rb} +2 -2
  67. data/tmp/.gitkeep +0 -0
  68. metadata +46 -10
  69. data/lib/net_system/net/controllers/adapter.rb +0 -5
  70. data/lib/net_system/net/panels/adapter_panel.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c859781b1927e69f516b2b6d057b19a4e8d6603945636ce0ec7306640fbd1956
4
- data.tar.gz: d5849f4bcbf610ee5a94df16dbd92feab78a4f724e2ac77eeae05e93aebfbef5
3
+ metadata.gz: c4e73803f6fe207c86ff2e6799e3bdbe50979bbe9fb409750c067ef6ce299c5b
4
+ data.tar.gz: 46c590ae60a43c0fd0b901f800da5f8761cc70baae0ace96e64a772941c6512f
5
5
  SHA512:
6
- metadata.gz: 4e4ffd81acfddf2a8aadebc0fcc10911141b3a8fc55e164d050fc3c8156a7ee560a7a84133c12d19e1491ff9c720b8a6afd857b6c22bdf14844ac03550c2dc6e
7
- data.tar.gz: bd421065bc059d7ebeac4d3d805e2133a18d0bb31745bc95a4b62d785f2b2368fbd80482cd2a7cac2cec03a239dc58b988844c1a234f4a0aa9a84ef99fc77256
6
+ metadata.gz: 1c83f9babff78a0487784c8c62bf98cf3dd44e64a01267c57bcb1bd4938c980ec09759f4069ef6819088511e25ef6e29f6acc3920ae950c71d00e43d362970c9
7
+ data.tar.gz: 043bbe7ac4dc5102f3a2b8b261ff13e7a8784d6217a5474b40d8110005b4060d281cf73f938172e0487564c80427d7f63f3e2c1df6c9a3b252f6fd214052070a
data/Gemfile CHANGED
@@ -7,6 +7,7 @@ gemspec
7
7
 
8
8
  group :dev do
9
9
  # gems you only want to load if DevSystem is loaded
10
+ gem "pry", "~> 0.14.1"
10
11
  end
11
12
 
12
13
  group :happy do
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lizarb (1.0.0)
4
+ lizarb (1.0.1)
5
5
  colorize (~> 0.8)
6
6
  dotenv (~> 2.8)
7
7
  zeitwerk (~> 2.6)
@@ -9,10 +9,15 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
+ coderay (1.1.3)
12
13
  colorize (0.8.1)
13
14
  connection_pool (2.3.0)
14
15
  dotenv (2.8.1)
16
+ method_source (1.0.0)
15
17
  nio4r (2.5.8)
18
+ pry (0.14.1)
19
+ coderay (~> 1.1)
20
+ method_source (~> 1.0)
16
21
  puma (5.6.5)
17
22
  nio4r (~> 2.0)
18
23
  rack (3.0.0)
@@ -24,15 +29,18 @@ GEM
24
29
  redis-client (>= 0.9.0)
25
30
  redis-client (0.10.0)
26
31
  connection_pool
27
- sqlite3 (1.5.2-x86_64-linux)
32
+ sqlite3 (1.5.3-arm64-darwin)
33
+ sqlite3 (1.5.3-x86_64-linux)
28
34
  webrick (1.7.0)
29
35
  zeitwerk (2.6.1)
30
36
 
31
37
  PLATFORMS
38
+ arm64-darwin-21
32
39
  x86_64-linux
33
40
 
34
41
  DEPENDENCIES
35
42
  lizarb!
43
+ pry (~> 0.14.1)
36
44
  puma (~> 5.6)
37
45
  rack (~> 3.0)
38
46
  rackup (~> 0.2.2)
data/README.md CHANGED
@@ -39,8 +39,8 @@ Try Liza to connect with Sqlite and Redis
39
39
 
40
40
  ```ruby
41
41
 
42
- NetBox.adapters.get :sqlite
43
- NetBox.adapters.get :redis_url
42
+ NetBox.clients.get :sqlite
43
+ NetBox.clients.get :redis_url
44
44
 
45
45
  NetBox.databases.sql
46
46
  NetBox.databases.sqlite
@@ -0,0 +1,5 @@
1
+ class AppBench < Liza::Bench
2
+
3
+ # Set up your bench controllers per the DSL in http://guides.lizarb.org/controllers/bench.html
4
+
5
+ end
@@ -0,0 +1,7 @@
1
+ class AppBenchTest < Liza::BenchTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == AppBench
5
+ end
6
+
7
+ end
@@ -0,0 +1,148 @@
1
+ class LoopsBench < AppBench
2
+ main_dsl
3
+
4
+ setup do
5
+ N = 1_000_000
6
+ RANGE = 1..N
7
+ ARRAY = Array RANGE
8
+ HASH_INT = RANGE.map { |i| [i, i] }.to_h
9
+ HASH_STR = RANGE.map { |i| ["a#{i}", i] }.to_h
10
+ HASH_SYM = RANGE.map { |i| [:"a#{i}", i] }.to_h
11
+ end
12
+
13
+ mark "for i in RANGE" do
14
+ for i in RANGE
15
+ a = "1"
16
+ end
17
+ end
18
+
19
+ mark "for i in ARRAY" do
20
+ for i in ARRAY
21
+ a = "1"
22
+ end
23
+ end
24
+
25
+ mark "for i, iv in HASH_INT" do
26
+ for i, iv in HASH_INT
27
+ a = "1"
28
+ end
29
+ end
30
+
31
+ mark "for i, iv in HASH_STR" do
32
+ for i, iv in HASH_STR
33
+ a = "1"
34
+ end
35
+ end
36
+
37
+ mark "for i, iv in HASH_SYM" do
38
+ for i, iv in HASH_SYM
39
+ a = "1"
40
+ end
41
+ end
42
+
43
+ mark "RANGE.each do |i|" do
44
+ RANGE.each do |i|
45
+ a = "1"
46
+ end
47
+ end
48
+
49
+ mark "ARRAY.each do |i|" do
50
+ ARRAY.each do |i|
51
+ a = "1"
52
+ end
53
+ end
54
+
55
+ mark "HASH_INT.each do |i, iv|" do
56
+ HASH_INT.each do |i, iv|
57
+ a = "1"
58
+ end
59
+ end
60
+
61
+ mark "HASH_STR.each do |i, iv|" do
62
+ HASH_STR.each do |i, iv|
63
+ a = "1"
64
+ end
65
+ end
66
+
67
+ mark "HASH_SYM.each do |i, iv|" do
68
+ HASH_SYM.each do |i, iv|
69
+ a = "1"
70
+ end
71
+ end
72
+
73
+ mark "RANGE.map do |i|" do
74
+ RANGE.map do |i|
75
+ a = "1"
76
+ end
77
+ end
78
+
79
+ mark "ARRAY.map do |i|" do
80
+ ARRAY.map do |i|
81
+ a = "1"
82
+ end
83
+ end
84
+
85
+ mark "HASH_INT.map do |i, iv|" do
86
+ HASH_INT.map do |i, iv|
87
+ a = "1"
88
+ end
89
+ end
90
+
91
+ mark "HASH_STR.map do |i, iv|" do
92
+ HASH_STR.map do |i, iv|
93
+ a = "1"
94
+ end
95
+ end
96
+
97
+ mark "HASH_SYM.map do |i, iv|" do
98
+ HASH_SYM.map do |i, iv|
99
+ a = "1"
100
+ end
101
+ end
102
+
103
+ mark "N.times do |i|" do
104
+ N.times do |i|
105
+ a = "1"
106
+ end
107
+ end
108
+
109
+ mark "1.upto N do |i|" do
110
+ 1.upto N do |i|
111
+ a = "1"
112
+ end
113
+ end
114
+
115
+ mark "loop break" do
116
+ i = 0
117
+
118
+ loop do
119
+ a = "1"
120
+ break unless (i += 1) <= N
121
+ end
122
+ end
123
+
124
+ mark "while" do
125
+ i = 0
126
+
127
+ while (i += 1) <= N
128
+ a = "1"
129
+ end
130
+ end
131
+
132
+ mark "begin end while" do
133
+ i = 0
134
+
135
+ begin
136
+ a = "1"
137
+ end while (i += 1) <= N
138
+ end
139
+
140
+ mark "begin end until" do
141
+ i = 0
142
+
143
+ begin
144
+ a = "1"
145
+ end until (i += 1) == N
146
+ end
147
+
148
+ end
@@ -0,0 +1,11 @@
1
+ class LoopsBenchTest < AppBenchTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == LoopsBench
5
+ end
6
+
7
+ test :marks do
8
+ assert subject_class.marks.keys.count.positive?
9
+ end
10
+
11
+ end
@@ -3,67 +3,7 @@ class NewCommand < AppCommand
3
3
  def self.call args
4
4
  log :higher, "Called #{self}.#{__method__} with args #{args}"
5
5
 
6
- # setup
7
-
8
- name = args.shift || "app_1"
9
-
10
- from = "#{Lizarb::APP_DIR}/app_new"
11
- to = name
12
-
13
- return log "Directory #{to.light_green} already exists." if Dir.exist? to
14
-
15
- log "Liza Application initializing at `#{to}`"
16
-
17
- # init
18
-
19
- require "fileutils"
20
- FileUtils.cp_r from, to, verbose: true
21
-
22
- `cd #{to}; git init .`
23
-
24
- # extra
25
-
26
- puts
27
- FileUtils.mkdir_p "#{to}/app", verbose: true
28
-
29
- FileUtils.mkdir_p "#{to}/lib", verbose: true
30
- FileUtils.touch "#{to}/lib/.gitkeep", verbose: true
31
- FileUtils.mkdir_p "#{to}/tmp", verbose: true
32
- FileUtils.touch "#{to}/tmp/.gitkeep", verbose: true
33
-
34
- # systems
35
-
36
- App.systems.keys.each { |system_name| copy name, system_name }
37
-
38
- FileUtils.rm "#{to}/app/dev/commands/new_command.rb"
39
- FileUtils.rm "#{to}/app/dev/commands/new_command_test.rb"
40
-
41
- FileUtils.cp_r "#{Lizarb::APP_DIR}/.ruby-version", "#{to}/.ruby-version", verbose: true
42
- FileUtils.cp_r "#{Lizarb::APP_DIR}/README.md", "#{to}/README.md", verbose: true
43
- FileUtils.cp_r "#{Lizarb::APP_DIR}/app.rb", "#{to}/app.rb", verbose: true
44
- FileUtils.cp_r "#{Lizarb::APP_DIR}/app.env", "#{to}/app.env", verbose: true
45
- FileUtils.cp_r "#{Lizarb::APP_DIR}/app.code.env", "#{to}/app.code.env", verbose: true
46
- puts
47
-
48
- log "Liza Application initialized at `#{to}`"
49
- end
50
-
51
- def self.copy name, system_name
52
- from = "#{Lizarb::APP_DIR}/app/#{system_name}_box.rb"
53
- to = "#{name}/app"
54
- if File.exist? from
55
- FileUtils.cp_r from, to, verbose: true
56
- else
57
- puts "file not found #{from}"
58
- end
59
-
60
- from = "#{Lizarb::APP_DIR}/app/#{system_name}"
61
- to = "#{name}/app"
62
- if File.exist? from
63
- FileUtils.cp_r from, to, verbose: true
64
- else
65
- puts "file not found #{from}"
66
- end
6
+ Liza::GenerateCommand.call ["app", *args]
67
7
  end
68
8
 
69
9
  end
@@ -0,0 +1,67 @@
1
+ class BenchGenerator < Liza::Generator
2
+ main_dsl
3
+
4
+ FOLDER = "app/dev/benches"
5
+
6
+ generate :controller do
7
+ folder FOLDER
8
+ filename "#{name}_bench.rb"
9
+ content bench_content
10
+ end
11
+
12
+ generate :controller_test do
13
+ folder FOLDER
14
+ filename "#{name}_bench_test.rb"
15
+ content bench_test_content
16
+ end
17
+
18
+ # helper methods
19
+
20
+ def bench_content
21
+ <<~CODE
22
+ class #{name.camelize}Bench < AppBench
23
+
24
+ main_dsl
25
+
26
+ setup do
27
+ N = 1_000_000
28
+ end
29
+
30
+ mark "alternative 1" do
31
+ i = 0
32
+
33
+ while (i += 1) <= N
34
+ a = "1".to_sym
35
+ end
36
+ end
37
+
38
+ mark "alternative 2" do
39
+ i = 0
40
+
41
+ while (i += 1) <= N
42
+ a = :"1"
43
+ end
44
+ end
45
+
46
+ end
47
+ CODE
48
+ end
49
+
50
+ def bench_test_content
51
+ <<~CODE
52
+ class #{name.camelize}BenchTest < Liza::BenchTest
53
+
54
+ test :subject_class do
55
+ assert subject_class == #{name.camelize}Bench
56
+ end
57
+
58
+ test :settings do
59
+ assert subject_class.log_level == :normal
60
+ assert subject_class.log_color == :green
61
+ end
62
+
63
+ end
64
+ CODE
65
+ end
66
+
67
+ end
@@ -0,0 +1,12 @@
1
+ class BenchGeneratorTest < Liza::GeneratorTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == BenchGenerator
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,51 @@
1
+ class CommandGenerator < Liza::Generator
2
+ main_dsl
3
+
4
+ FOLDER = "app/dev/commands"
5
+
6
+ generate :controller do
7
+ folder FOLDER
8
+ filename "#{name}_command.rb"
9
+ content command_content
10
+ end
11
+
12
+ generate :controller_test do
13
+ folder FOLDER
14
+ filename "#{name}_command_test.rb"
15
+ content command_test_content
16
+ end
17
+
18
+ # helper methods
19
+
20
+ def command_content
21
+ <<~CODE
22
+ class #{name.camelize}Command < Liza::Command
23
+
24
+ def self.call args
25
+ log :higher, "Called \#{self}.\#{__method__} with args \#{args}"
26
+
27
+ #
28
+ end
29
+
30
+ end
31
+ CODE
32
+ end
33
+
34
+ def command_test_content
35
+ <<~CODE
36
+ class #{name.camelize}CommandTest < Liza::CommandTest
37
+
38
+ test :subject_class do
39
+ assert subject_class == #{name.camelize}Command
40
+ end
41
+
42
+ test :settings do
43
+ assert subject_class.log_level == :normal
44
+ assert subject_class.log_color == :green
45
+ end
46
+
47
+ end
48
+ CODE
49
+ end
50
+
51
+ end
@@ -0,0 +1,12 @@
1
+ class CommandGeneratorTest < Liza::GeneratorTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == CommandGenerator
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,46 @@
1
+ class ModelGenerator < Liza::Generator
2
+ main_dsl
3
+
4
+ FOLDER = "app/net/models"
5
+
6
+ generate :controller do
7
+ folder FOLDER
8
+ filename "#{name}_model.rb"
9
+ content model_content name
10
+ end
11
+
12
+ generate :controller_test do
13
+ folder FOLDER
14
+ filename "#{name}_model_test.rb"
15
+ content model_test_content name
16
+ end
17
+
18
+ # helper methods
19
+
20
+ def model_content name
21
+ <<~CODE
22
+ class #{name.camelize}Model < AppModel
23
+ set :table, :#{name}s
24
+
25
+ end
26
+ CODE
27
+ end
28
+
29
+ def model_test_content name
30
+ <<~CODE
31
+ class #{name.camelize}ModelTest < Liza::ModelTest
32
+
33
+ test :subject_class do
34
+ assert subject_class == #{name.camelize}Model
35
+ end
36
+
37
+ test :settings do
38
+ assert subject_class.log_level == :normal
39
+ assert subject_class.log_color == :red
40
+ end
41
+
42
+ end
43
+ CODE
44
+ end
45
+
46
+ end
@@ -0,0 +1,12 @@
1
+ class ModelGeneratorTest < Liza::GeneratorTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == ModelGenerator
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,63 @@
1
+ class RequestGenerator < Liza::Generator
2
+ main_dsl
3
+
4
+ FOLDER = "app/web/requests"
5
+
6
+ generate :controller do
7
+ folder "app/web/requests"
8
+ filename "#{name}_request.rb"
9
+ content request_content name
10
+ end
11
+
12
+ generate :controller_test do
13
+ folder "app/web/requests"
14
+ filename "#{name}_request_test.rb"
15
+ content request_test_content name
16
+ end
17
+
18
+ # helper methods
19
+
20
+ def request_content name
21
+ <<~CODE
22
+ class #{name.camelize}Request < Liza::Request
23
+
24
+ def self.call env
25
+ path = env["REQUEST_PATH"]
26
+ log :higher, "Called \#{self}.\#{__method__} with path \#{path}"
27
+
28
+ #
29
+
30
+ status = 200
31
+ headers = {
32
+ "Framework" => "Liza \#{Lizarb::VERSION}"
33
+ }
34
+ body = "It works!"
35
+
36
+ #
37
+
38
+ log status
39
+ [status, headers, [body]]
40
+ end
41
+
42
+ end
43
+ CODE
44
+ end
45
+
46
+ def request_test_content name
47
+ <<~CODE
48
+ class #{name.camelize}RequestTest < Liza::RequestTest
49
+
50
+ test :subject_class do
51
+ assert subject_class == #{name.camelize}Request
52
+ end
53
+
54
+ test :settings do
55
+ assert subject_class.log_level == :normal
56
+ assert subject_class.log_color == :blue
57
+ end
58
+
59
+ end
60
+ CODE
61
+ end
62
+
63
+ end
@@ -0,0 +1,12 @@
1
+ class RequestGeneratorTest < Liza::GeneratorTest
2
+
3
+ test :subject_class do
4
+ assert subject_class == RequestGenerator
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
@@ -5,8 +5,8 @@ class RedisDbTest < Liza::RedisDbTest
5
5
  assert RedisDb.current.class == RedisDb
6
6
  assert Liza::RedisDb.current.class == RedisDb
7
7
  assert RedisDb.current == Liza::RedisDb.current
8
- assert RedisDb.current.adapter == Liza::RedisDb.current.adapter
9
- assert RedisDb.current.adapter.conn == Liza::RedisDb.current.adapter.conn
8
+ assert RedisDb.current.client == Liza::RedisDb.current.client
9
+ assert RedisDb.current.client.conn == Liza::RedisDb.current.client.conn
10
10
  end
11
11
 
12
12
  end
@@ -5,8 +5,8 @@ class SqliteDbTest < Liza::SqliteDbTest
5
5
  assert SqliteDb.current.class == SqliteDb
6
6
  assert Liza::SqliteDb.current.class == SqliteDb
7
7
  assert SqliteDb.current == Liza::SqliteDb.current
8
- assert SqliteDb.current.adapter == Liza::SqliteDb.current.adapter
9
- assert SqliteDb.current.adapter.conn == Liza::SqliteDb.current.adapter.conn
8
+ assert SqliteDb.current.client == Liza::SqliteDb.current.client
9
+ assert SqliteDb.current.client.conn == Liza::SqliteDb.current.client.conn
10
10
  end
11
11
 
12
12
  end
data/app/net_box.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  class NetBox < Liza::NetBox
2
2
 
3
- adapters do
4
- # Set up your adapter panel per the DSL in http://guides.lizarb.org/panels/adapter.html
3
+ clients do
4
+ # Set up your client panel per the DSL in http://guides.lizarb.org/panels/client.html
5
5
 
6
6
  set :redis_url, "redis://localhost:6379/15"
7
7
  set :sqlite, "tmp/app.#{Time.now.to_i}.sqlite" if App.mode == :code
data/lib/app.rb CHANGED
@@ -149,7 +149,7 @@ module App
149
149
  .const "#{key}_part"
150
150
  end
151
151
 
152
- log "CONNECTING PART #{part_klass.to_s.rjust 25}.part :#{key}"
152
+ log "CONNECTING PART #{part_klass.to_s.rjust 25}.part :#{key}" if $VERBOSE
153
153
 
154
154
  if klass.insertion
155
155
  part_klass.class_exec &klass.insertion
@@ -0,0 +1,11 @@
1
+ class DevSystem
2
+ class Bench < Liza::Controller
3
+
4
+ # DSLS
5
+
6
+ def self.main_dsl
7
+ part :"bench_dsl_main", system: :dev
8
+ end
9
+
10
+ end
11
+ end