arql 0.1.30 → 0.1.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8fb2d02931fdd0af7a9eec6b20db222f6f2fff93e0c506186316157987a443f
4
- data.tar.gz: ae61f43b49612c316a82aac8e0c63dfc70c34527026c62201397f267ace5c188
3
+ metadata.gz: 720e28d1a714ac8e3d116c6f63ef734476895b28502df43a486a9f7f4348430f
4
+ data.tar.gz: 654c7011a05dc8631c418504953def7870d33d2fa22922fb3292992e8dbe6ff4
5
5
  SHA512:
6
- metadata.gz: 8deb0c597de52fe5d1dd24f7eaa60c07133d7c0d583eb93f746b416d660a5911f556820b1937cb5f0d2d9667de3a53a1b8057e7bc6ad36321eb96b0e93f454e2
7
- data.tar.gz: 77ba16537c3fa67c65518db3e5fbca9fa012452c2135a0d26ffabbb47ec9c65f6a3de1c052a98553b65640d9c534467a77ef5993013cb9f3d265c830db70e613
6
+ metadata.gz: a5f9271ae382fa37b7ec06907d17a17b47129390f4f0f144aff1b0cf4bbb8ee9bad7fda54cf5afb8d4029d3b02f92725de51968a345367c06c2298eef54c91a6
7
+ data.tar.gz: 72cbb2b5895da48dcb93b252d43882b6f6005cbe1638d284135e61404fee9a0e96f0ce0db3d585a3b23b2fa256381b37ee05f5abec4072e8af4c452f61608747
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- arql (0.1.30)
4
+ arql (0.1.31)
5
5
  activerecord (~> 6.0.3)
6
6
  activesupport (~> 6.0.3)
7
7
  mysql2 (~> 0.5.3)
@@ -4,11 +4,19 @@ module Arql
4
4
  class App
5
5
 
6
6
  class << self
7
- attr_accessor :log_io, :env
7
+ attr_accessor :log_io, :env, :prompt
8
8
 
9
9
  def config
10
10
  @@effective_config
11
11
  end
12
+
13
+ def prompt
14
+ if env
15
+ env
16
+ else
17
+ File.basename(@@effective_config[:database])
18
+ end
19
+ end
12
20
  end
13
21
 
14
22
  def initialize(options)
@@ -31,7 +31,7 @@ module Arql
31
31
  else
32
32
  nest_level_prompt = "(#{obj}:#{nest_level})"
33
33
  end
34
- "%s#{Rainbow('@').green}%s#{nest_level_prompt} %s " % [Rainbow('ARQL').red, Rainbow(App.env).yellow, Rainbow('❯').green]
34
+ "%s#{Rainbow('@').green}%s#{nest_level_prompt} %s " % [Rainbow('ARQL').red, Rainbow(App.prompt).yellow, Rainbow('❯').green]
35
35
  end]
36
36
  end
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module Arql
2
- VERSION = "0.1.30"
2
+ VERSION = "0.1.31"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liu Xiang