jefferies_tube 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98a84da7445ab8dcfa7a80d75bc98b560f2c3dbacf7037d464affde09488c9d3
|
4
|
+
data.tar.gz: b5b52b16be524ee723ce3e8cbb6d629f86395dc1533f54729cc09f4b4b5e2ddc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59f3e12508024e6e900f5c553347e01d11d992849a5ae42cceb13c1629be4df39351ba0a0022fd37d10b5ce04a60b5d2debec8801bf9daab28cf63dbf4707937
|
7
|
+
data.tar.gz: e07c40dca2d827ef57d21819cf40cc1b31cb6431e8563807cf931946576cae57d5e18c9d4fd1e7f7ccd54be674e0c42217f7e85ae5536a5fc789231316814fbc
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@ namespace :rails do
|
|
3
3
|
task :console do
|
4
4
|
console_roles = [roles(:worker), roles(:app)].find(&:any?)
|
5
5
|
on console_roles, primary: true do |host, user|
|
6
|
-
run_interactively "RAILS_ENV=#{rails_env} bundle exec rails console"
|
6
|
+
run_interactively "RAILS_ENV=#{rails_env} JEFFERIES_TUBE_IRB=1 bundle exec rails console"
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
@@ -1,26 +1,23 @@
|
|
1
1
|
class JefferiesTube::Console
|
2
|
-
def self.
|
2
|
+
def self.prompt_base
|
3
3
|
rails_env = JefferiesTube.configuration.environment
|
4
4
|
if rails_env
|
5
5
|
color = "\e[0m" #Default to white text on no background
|
6
6
|
current_app = JefferiesTube.configuration.prompt_name
|
7
7
|
|
8
|
-
# shorten some common long environment names
|
9
8
|
if rails_env == "development"
|
10
9
|
elsif rails_env == "dev"
|
11
|
-
rails_env = "dev"
|
12
10
|
color = "\e[0;37m\e[1;44m" #White on blue
|
13
11
|
elsif ["test", "qa", "staging"].include? rails_env
|
14
12
|
color = "\e[0;37m\e[1;43m" #White on yellow
|
15
13
|
elsif rails_env == "production"
|
16
|
-
rails_env = "prod"
|
17
14
|
color = "\e[0;37m\e[1;41m" #White on red
|
18
15
|
end
|
19
16
|
|
20
17
|
base = "#{color}#{current_app}(#{rails_env})\e[0m"
|
21
|
-
return "#{base}
|
18
|
+
return "#{base}"
|
22
19
|
else
|
23
|
-
return "#{current_app}
|
20
|
+
return "#{current_app}"
|
24
21
|
end
|
25
22
|
end
|
26
23
|
end
|
@@ -1,11 +1,15 @@
|
|
1
|
-
prompt = JefferiesTube::Console.
|
1
|
+
prompt = JefferiesTube::Console.prompt_base
|
2
2
|
|
3
|
-
IRB.conf[:PROMPT][:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
IRB.conf[:PROMPT][:JEFFERIES_TUBE] = {
|
4
|
+
:PROMPT_I => "#{prompt} > ",
|
5
|
+
:PROMPT_N => "#{prompt}%l> ",
|
6
|
+
:PROMPT_S => "#{prompt}%l> ",
|
7
|
+
:PROMPT_C => "#{prompt}*> ",
|
8
|
+
:RETURN => " => %s\n"
|
9
9
|
}
|
10
10
|
|
11
|
-
|
11
|
+
if ENV["JEFFERIES_TUBE_IRB"]
|
12
|
+
IRB.conf[:USE_MULTILINE] = false
|
13
|
+
IRB.conf[:USE_AUTOCOMPLETE] = false
|
14
|
+
IRB.conf[:PROMPT_MODE] = :JEFFERIES_TUBE
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jefferies_tube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Samson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|