capistrano-rails-console 0.5.2 → 1.0.0
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/CHANGELOG.md +15 -7
- data/README.md +3 -0
- data/capistrano-rails-console.gemspec +8 -8
- data/lib/capistrano/rails/console/tasks/remote.cap +21 -7
- data/lib/capistrano/rails/console/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 598ddcd8d79222e0574cd8e09448a5a0032f355e
|
4
|
+
data.tar.gz: 7541199e11fbbe296e238c01181081f24b505454
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 298a610fa794f2ce123cbeff593de162d3e2363524e9f002abd4966fcea9a5e615ab104bcb22b374c2c1adb4d70e6ebbc0daebc53928d0a33fdebc97dc66c3bb
|
7
|
+
data.tar.gz: fc662fff600897df4bcce8d960a5ecb5376106db423d94e7c435d99c5907716a39b9db55e59b19266d0b028334d91b6cd1925949fc389da2dcaccafcdecf2030
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Bugfixes:
|
1
|
+
# Change Log
|
4
2
|
|
5
|
-
|
3
|
+
## 1.0.0 (2015-08-01)
|
4
|
+
### Fixed
|
5
|
+
- removed dependency on capistrano-rails gem setting propper rails_env
|
6
|
+
- setting ssh port through `ssh_options`
|
7
|
+
- setting ssh user through `ssh_options`
|
8
|
+
- require a minimum version of 3.1.0 for capistrano (sshkit compatibility)
|
6
9
|
|
7
|
-
|
10
|
+
### Feature
|
11
|
+
- support for ssh keys
|
8
12
|
|
9
|
-
|
13
|
+
## 0.5.2 (2015-04-02)
|
14
|
+
### Fixed
|
15
|
+
- removed rails binary check due to different environments in sshkit and the ssh shellout
|
10
16
|
|
11
|
-
|
17
|
+
## 0.5.1 (2015-04-01)
|
18
|
+
### Fixed
|
19
|
+
- missing ssh proxy options in console task
|
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
[](https://gemnasium.com/ydkn/capistrano-rails-console)
|
3
3
|
[](https://codeclimate.com/github/ydkn/capistrano-rails-console)
|
4
4
|
|
5
|
+
[](https://gitter.im/ydkn/capistrano-rails-console)
|
6
|
+
|
7
|
+
|
5
8
|
# Capistrano::Rails::Console
|
6
9
|
|
7
10
|
Remote rails console for capistrano
|
@@ -4,23 +4,23 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'capistrano/rails/console/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'capistrano-rails-console'
|
8
8
|
spec.version = Capistrano::Rails::Console::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Florian Schwab']
|
10
|
+
spec.email = ['me@ydkn.de']
|
11
11
|
spec.description = %q{Remote rails console for capistrano}
|
12
12
|
spec.summary = %q{Remote rails console for capistrano}
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
13
|
+
spec.homepage = 'https://github.com/ydkn/capistrano-rails-console'
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'capistrano', '>= 3.
|
21
|
+
spec.add_dependency 'capistrano', '>= 3.1.0', '< 4.0.0'
|
22
22
|
|
23
|
-
spec.add_development_dependency 'bundler'
|
23
|
+
spec.add_development_dependency 'bundler'
|
24
24
|
spec.add_development_dependency 'rake'
|
25
25
|
spec.add_development_dependency 'yard'
|
26
26
|
end
|
@@ -7,27 +7,41 @@ end
|
|
7
7
|
|
8
8
|
namespace :rails do
|
9
9
|
desc "Interact with a remote rails console"
|
10
|
-
task console
|
10
|
+
task :console do
|
11
11
|
on primary :app do |host|
|
12
12
|
test(:true) # initialize ssh_options on host
|
13
13
|
|
14
|
-
|
14
|
+
ssh_cmd_args = []
|
15
15
|
rails_console_args = []
|
16
16
|
|
17
17
|
if host.ssh_options && host.ssh_options[:proxy]
|
18
18
|
template = host.ssh_options[:proxy].command_line_template
|
19
|
-
|
19
|
+
ssh_cmd_args << "-o ProxyCommand=\"#{template}\""
|
20
20
|
end
|
21
21
|
|
22
22
|
rails_console_args << '--sandbox' if ENV.key?('sandbox') || ENV.key?('s')
|
23
23
|
|
24
|
-
|
24
|
+
rails_env = fetch(:rails_env, fetch(:stage, 'production'))
|
25
|
+
|
26
|
+
cmd = SSHKit::Command.new(:rails, :console, rails_env, *rails_console_args, host: host)
|
25
27
|
SSHKit.config.output << cmd
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
+
port = host.port || (host.ssh_options || {})[:port]
|
30
|
+
ssh_cmd_args << "-p #{port}" if port
|
31
|
+
|
32
|
+
ssh_user = if host.ssh_options && host.ssh_options[:user]
|
33
|
+
host.ssh_options[:user]
|
34
|
+
else
|
35
|
+
host.user
|
36
|
+
end
|
37
|
+
ssh_cmd_args << [ssh_user, host.hostname].compact.join('@')
|
38
|
+
|
39
|
+
if host.ssh_options && host.ssh_options[:keys] && host.ssh_options[:keys].length > 0
|
40
|
+
identity = host.ssh_options[:keys][0]
|
41
|
+
ssh_cmd_args << "-i #{identity}"
|
42
|
+
end
|
29
43
|
|
30
|
-
exec(%Q(#{
|
44
|
+
exec(%Q(ssh #{ssh_cmd_args.join(' ')} -t "cd #{current_path} && (#{cmd.environment_string} #{cmd})"))
|
31
45
|
end
|
32
46
|
end
|
33
47
|
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: 0.
|
4
|
+
version: 1.0.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: 2015-
|
11
|
+
date: 2015-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.1.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 4.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.
|
29
|
+
version: 3.1.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 4.0.0
|
@@ -34,16 +34,16 @@ dependencies:
|
|
34
34
|
name: bundler
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '0'
|
40
40
|
type: :development
|
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: '
|
46
|
+
version: '0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.4.
|
114
|
+
rubygems_version: 2.4.8
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Remote rails console for capistrano
|