jefferies_tube 1.5 → 1.5.4
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 +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +4 -0
- data/README.md +16 -12
- data/jefferies_tube.gemspec +1 -1
- data/lib/jefferies_tube/capistrano/deploy.rb +3 -3
- data/lib/jefferies_tube/capistrano/rails.rb +1 -1
- data/lib/jefferies_tube/console.rb +12 -6
- data/lib/jefferies_tube/custom_prompts.irbrc.rb +12 -8
- data/lib/jefferies_tube/railtie.rb +2 -1
- data/lib/jefferies_tube/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ddb970be7c5d3d44e2df2171455ce27685435dd61330cb692002097271496d1
|
4
|
+
data.tar.gz: 6b8a796088c566761a11a8b1f2ec5214884eed1d9c51159d0aca7f11a55b872d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa431cb07c4d1abf50390ac2e65879c1e6a8cb57dfa711bc02f46ba389d7e7d58631faebb217c5ca919db5136d63e0ba0ae0ff115f90760ae46cc4f0c0243fb4
|
7
|
+
data.tar.gz: 313293998aaaecaf4e0d94f0c1437ae50f3369ee8a3db6d2220a8cc7c0aeb80040bf38bf5aeb055e5530ea5fa2ba2b40443b399138671238f5161da6d039cd20
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.0
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ This project attempts to follow [semantic versioning](https://semver.org/)
|
|
6
6
|
|
7
7
|
## Unreleased
|
8
8
|
|
9
|
+
## 1.5.4
|
10
|
+
Fix a bug in the prompt if Pry is present.
|
11
|
+
## 1.5.3
|
12
|
+
* Minor tweaks to the IRB console when sshing. Don't use JT IRB locally
|
9
13
|
## 1.5
|
10
14
|
|
11
15
|
* enhancements
|
data/README.md
CHANGED
@@ -51,43 +51,47 @@ require 'jefferies_tube/capistrano'
|
|
51
51
|
|
52
52
|
#### Tasks
|
53
53
|
|
54
|
-
* `cap
|
54
|
+
* `cap dev ssh`
|
55
55
|
|
56
56
|
Open ssh session in `current` directory.
|
57
57
|
|
58
|
-
* `cap
|
58
|
+
* `cap dev rails:console`
|
59
59
|
|
60
60
|
Open rails console.
|
61
61
|
|
62
|
-
* `cap
|
62
|
+
* `cap dev rails:dbconsole`
|
63
63
|
|
64
64
|
Open database console.
|
65
65
|
|
66
|
-
* `cap
|
66
|
+
* `cap dev rails:log`
|
67
67
|
|
68
|
-
Open log file. Can specify log file like so: `LOG=foobar cap
|
68
|
+
Open log file. Can specify log file like so: `LOG=foobar cap dev rails:log`
|
69
69
|
|
70
|
-
* `cap
|
70
|
+
* `cap dev rails:allthelogs`
|
71
71
|
|
72
|
-
Open the logfile for all servers (has the role :app) combined. Can specify log file like so: `LOG=foobar cap
|
72
|
+
Open the logfile for all servers (has the role :app) combined. Can specify log file like so: `LOG=foobar cap dev rails:allthelogs`
|
73
73
|
|
74
|
-
* `cap
|
74
|
+
* `cap dev rails:rake[task:name]`
|
75
|
+
|
76
|
+
Run the given rake task.
|
77
|
+
|
78
|
+
* `cap dev db:backup`
|
75
79
|
|
76
80
|
Make a database backup.
|
77
81
|
|
78
|
-
* `cap
|
82
|
+
* `cap dev db:fetch`
|
79
83
|
|
80
84
|
Fetches the latest database backup. Useful for getting production data locally.
|
81
85
|
|
82
|
-
* `cap
|
86
|
+
* `cap dev db:restore FILE=path/to/backup.dump`
|
83
87
|
|
84
88
|
Nuke the server's database with one you give it. Don't do this on production for obvious reasons. Useful for putting a backup fetched from production onto a dev server.
|
85
89
|
|
86
|
-
* `cap
|
90
|
+
* `cap dev deploy:ensure_tag`
|
87
91
|
|
88
92
|
Yells at you if there is not a tag for your code.
|
89
93
|
|
90
|
-
* `cap
|
94
|
+
* `cap dev deploy:create_tag`
|
91
95
|
|
92
96
|
Creates a tag for your code and pushes it.
|
93
97
|
|
data/jefferies_tube.gemspec
CHANGED
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "rake"
|
25
25
|
spec.add_development_dependency "rspec", '~> 3.0'
|
26
26
|
|
27
|
-
spec.add_dependency "bundler-audit", '~> 0.
|
27
|
+
spec.add_dependency "bundler-audit", '~> 0.9.0'
|
28
28
|
spec.add_dependency "pry", '~> 0.13'
|
29
29
|
end
|
@@ -34,9 +34,9 @@ namespace :deploy do
|
|
34
34
|
scanner.scan(ignore: ignore) do |result|
|
35
35
|
vulnerable = true
|
36
36
|
case result
|
37
|
-
when Bundler::Audit::
|
37
|
+
when Bundler::Audit::Results::InsecureSource
|
38
38
|
puts "Insecure Source URI found: #{result.source}"
|
39
|
-
when Bundler::Audit::
|
39
|
+
when Bundler::Audit::Results::UnpatchedGem
|
40
40
|
puts "#{result.gem} is not secure!"
|
41
41
|
end
|
42
42
|
end
|
@@ -51,4 +51,4 @@ namespace :deploy do
|
|
51
51
|
end
|
52
52
|
|
53
53
|
before 'deploy:migrate', 'deploy:backup_database'
|
54
|
-
before 'deploy', 'deploy:scan_gems'
|
54
|
+
before 'deploy', 'deploy:scan_gems'
|
@@ -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,32 @@
|
|
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
|
23
|
+
|
24
|
+
def self.pry_prompts
|
25
|
+
[
|
26
|
+
# wait_proc
|
27
|
+
proc { prompt_base + " > " },
|
28
|
+
# incomplete_proc
|
29
|
+
proc { prompt_base + "*> "}
|
30
|
+
]
|
31
|
+
end
|
26
32
|
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
|
@@ -12,8 +12,9 @@ module JefferiesTube
|
|
12
12
|
|
13
13
|
ARGV.push "-r", File.join(File.dirname(__FILE__),"custom_prompts.irbrc.rb")
|
14
14
|
|
15
|
+
require 'pry'
|
15
16
|
if defined? Pry
|
16
|
-
Pry.prompt = Pry::Prompt.new(:jefferies_tube, '
|
17
|
+
Pry.prompt = Pry::Prompt.new(:jefferies_tube, 'Jefferies Tube custom prompt', JefferiesTube::Console.pry_prompts)
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|
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:
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Samson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.9.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.9.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: pry
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
|
-
rubygems_version: 3.
|
179
|
+
rubygems_version: 3.3.3
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
182
|
summary: Ten Forward Consulting useful tools.
|