capistrano-rails-console 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +7 -0
- data/README.md +14 -3
- data/capistrano-rails-console.gemspec +1 -1
- data/lib/capistrano/rails/console/tasks.cap +8 -5
- data/lib/capistrano/rails/console/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 38a27bfdf806ca51c81bfc48b4943c824ffa6c742cc12ba0a2cee5249d239532
|
4
|
+
data.tar.gz: cffc8bea8503050b9075a9050d885420478c49987003de6ff0a97d0d939497e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 552641954aa91b0f1fcc4b0264c24a61f22124b830464f30d59021102458bc1877ef935cd57d1871891f7360af3e174063e9782ec182f0da2f48c7c59af24cf9
|
7
|
+
data.tar.gz: dcfe787290f044407a46754d15a3d1ec1149e678f30d0076b3774e6ba3e6431b3a40f68c4c3d1417bfd1f23c82dac31468cabb92e3cd7e247cd0d21a92fd0843
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 2.3.0 (2018-05-24)
|
4
|
+
### Feature
|
5
|
+
- remove rails 5.2 deprecation: _Passing the environment's name as a regular argument is deprecated and will be removed in the next Rails version. Please, use the -e option instead._
|
6
|
+
- allow to set capistrano role to select server for remote console (#33)
|
7
|
+
- allow to set shell used on server (#31)
|
8
|
+
- [add rails:c alias to rails:console](https://github.com/ydkn/capistrano-rails-console/issues/36)
|
9
|
+
|
3
10
|
## 2.2.1 (2017-09-04)
|
4
11
|
### Feature
|
5
12
|
- [add rails:db alias to rails:dbconsole](https://github.com/ydkn/capistrano-rails-console/pull/32)
|
data/README.md
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
[![Gem Version](https://img.shields.io/gem/v/capistrano-rails-console.svg)](https://rubygems.org/gems/capistrano-rails-console)
|
2
|
-
[![Dependencies](https://img.shields.io/gemnasium/ydkn/capistrano-rails-console.svg)](https://gemnasium.com/ydkn/capistrano-rails-console)
|
3
2
|
[![Code Climate](https://img.shields.io/codeclimate/github/ydkn/capistrano-rails-console.svg)](https://codeclimate.com/github/ydkn/capistrano-rails-console)
|
4
3
|
|
5
|
-
[![Join the chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ydkn/capistrano-rails-console)
|
6
|
-
|
7
4
|
|
8
5
|
# Capistrano::Rails::Console
|
9
6
|
|
@@ -43,6 +40,7 @@ require 'capistrano/rails/console'
|
|
43
40
|
Run a remote rails console with:
|
44
41
|
|
45
42
|
$ cap production rails:console
|
43
|
+
$ cap production rails:c
|
46
44
|
|
47
45
|
You can also start a sandbox session:
|
48
46
|
|
@@ -53,6 +51,7 @@ Or run a dbconsole:
|
|
53
51
|
$ cap production rails:dbconsole
|
54
52
|
$ cap production rails:db
|
55
53
|
|
54
|
+
|
56
55
|
## Options
|
57
56
|
|
58
57
|
### Rails environment
|
@@ -68,6 +67,18 @@ set :console_user, :appuser # run rails console as appuser through sudo
|
|
68
67
|
set :console_user, nil # explicitly disable switching user through sudo
|
69
68
|
```
|
70
69
|
|
70
|
+
### Role
|
71
|
+
|
72
|
+
```ruby
|
73
|
+
set :console_role, :app # start remote console on primary server for this role
|
74
|
+
```
|
75
|
+
|
76
|
+
### Shell
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
set :console_shell, '/bin/bash' # select shell to be used on server in case you experience problems (see #31)
|
80
|
+
```
|
81
|
+
|
71
82
|
|
72
83
|
## Contributing
|
73
84
|
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'capistrano', '>= 3.5.0', '< 4.0.0'
|
22
|
-
spec.add_dependency 'sshkit-interactive', '~> 0.
|
22
|
+
spec.add_dependency 'sshkit-interactive', '~> 0.3.0'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler'
|
25
25
|
spec.add_development_dependency 'rake'
|
@@ -7,8 +7,10 @@ namespace :load do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
# Default values
|
10
|
-
set :console_env,
|
11
|
-
set :console_user,
|
10
|
+
set :console_env, -> { fetch(:rails_env, fetch(:stage, 'production')) }
|
11
|
+
set :console_user, -> { fetch(:app_user, nil) }
|
12
|
+
set :console_role, :app
|
13
|
+
set :console_shell, nil
|
12
14
|
end
|
13
15
|
end
|
14
16
|
|
@@ -18,10 +20,10 @@ namespace :rails do
|
|
18
20
|
args = []
|
19
21
|
args << '--sandbox' if ENV.key?('sandbox') || ENV.key?('s')
|
20
22
|
|
21
|
-
run_interactively primary(:
|
23
|
+
run_interactively primary(fetch(:console_role)), shell: fetch(:console_shell) do
|
22
24
|
within current_path do
|
23
25
|
as user: fetch(:console_user) do
|
24
|
-
execute(:rails, :console, fetch(:console_env), *args)
|
26
|
+
execute(:rails, :console, '-e', fetch(:console_env), *args)
|
25
27
|
end
|
26
28
|
end
|
27
29
|
end
|
@@ -29,7 +31,7 @@ namespace :rails do
|
|
29
31
|
|
30
32
|
desc 'Interact with a remote rails dbconsole'
|
31
33
|
task :dbconsole do
|
32
|
-
run_interactively primary(:
|
34
|
+
run_interactively primary(fetch(:console_role)), shell: fetch(:console_shell) do
|
33
35
|
within current_path do
|
34
36
|
as user: fetch(:console_user) do
|
35
37
|
execute(:rails, :dbconsole, '-p', '-e', fetch(:console_env))
|
@@ -38,5 +40,6 @@ namespace :rails do
|
|
38
40
|
end
|
39
41
|
end
|
40
42
|
|
43
|
+
task c: :console
|
41
44
|
task db: :dbconsole
|
42
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-rails-console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Schwab
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.
|
39
|
+
version: 0.3.0
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
46
|
+
version: 0.3.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.6
|
113
|
+
rubygems_version: 2.7.6
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: Remote rails console for capistrano
|