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: b198777c05f8317a5e390997d5591bff0364660bf109cd8eeff3f0f21bdd8da4
4
- data.tar.gz: 12cde353d7a77b39f2b6625a90b156dbe2af4e74737365923838f313cc47ff35
3
+ metadata.gz: 98a84da7445ab8dcfa7a80d75bc98b560f2c3dbacf7037d464affde09488c9d3
4
+ data.tar.gz: b5b52b16be524ee723ce3e8cbb6d629f86395dc1533f54729cc09f4b4b5e2ddc
5
5
  SHA512:
6
- metadata.gz: 5a20b3231274286cf315f85defcaa66e0ba1ad8f3be0cd87dc981d3b1fc1f4ee3abe5346b026bbe63b53afdc7fcd809e2a028a46b58ea9b9898ee23aa3de3764
7
- data.tar.gz: '084c3100acaa3a1b8d331b2facd9627ed165a674251a3109a63cad3c54b78899b21981f5321397c5ba00e3a42ff124373723bdeed90598b7268461633a79f0b0'
6
+ metadata.gz: 59f3e12508024e6e900f5c553347e01d11d992849a5ae42cceb13c1629be4df39351ba0a0022fd37d10b5ce04a60b5d2debec8801bf9daab28cf63dbf4707937
7
+ data.tar.gz: e07c40dca2d827ef57d21819cf40cc1b31cb6431e8563807cf931946576cae57d5e18c9d4fd1e7f7ccd54be674e0c42217f7e85ae5536a5fc789231316814fbc
data/CHANGELOG.md CHANGED
@@ -6,6 +6,8 @@ This project attempts to follow [semantic versioning](https://semver.org/)
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.5.3
10
+ * Minor tweaks to the IRB console when sshing. Don't use JT IRB locally
9
11
  ## 1.5
10
12
 
11
13
  * enhancements
@@ -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.prompt
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.prompt
1
+ prompt = JefferiesTube::Console.prompt_base
2
2
 
3
- IRB.conf[:PROMPT][:RAILS_ENV] = {
4
- :PROMPT_I => prompt,
5
- :PROMPT_N => prompt,
6
- :PROMPT_S => nil,
7
- :PROMPT_C => prompt.sub('> ', '>* '),
8
- :RETURN => "=> %s\n"
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
- IRB.conf[:PROMPT_MODE] = :RAILS_ENV
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
@@ -1,7 +1,7 @@
1
1
  require 'open-uri'
2
2
 
3
3
  module JefferiesTube
4
- VERSION = "1.5.2"
4
+ VERSION = "1.5.3"
5
5
 
6
6
  def self.latest_rubygems_version
7
7
  JSON.parse(URI.parse("https://rubygems.org/api/v1/versions/jefferies_tube/latest.json").read)["version"]
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.2
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-02-22 00:00:00.000000000 Z
11
+ date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print