From 7618080e7d4e4d7f8f4f12fbd4b85aba8f8748c0 Mon Sep 17 00:00:00 2001 From: Joel Cogen Date: Tue, 23 Jun 2015 14:06:29 +0200 Subject: [PATCH 1/5] Support user being set in ssh_options Fixes https://github.com/ydkn/capistrano-rails-console/issues/13 --- lib/capistrano/rails/console/tasks/remote.cap | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/capistrano/rails/console/tasks/remote.cap b/lib/capistrano/rails/console/tasks/remote.cap index 5e4ff0b..f6fd2a8 100644 --- a/lib/capistrano/rails/console/tasks/remote.cap +++ b/lib/capistrano/rails/console/tasks/remote.cap @@ -29,7 +29,12 @@ namespace :rails do port = host.port || (host.ssh_options || {})[:port] ssh_cmd_args << "-p #{port}" if port - ssh_cmd_args << [host.user, host.hostname].compact.join('@') + ssh_user = if host.ssh_options && host.ssh_options[:user] + host.ssh_options[:user] + else + host.user + end + ssh_cmd_args << [ssh_user, host.hostname].compact.join('@') if host.ssh_options && host.ssh_options[:keys] && host.ssh_options[:keys].length > 0 identity = host.ssh_options[:keys][0] From 50f124f3a5a3b129c271c152a70ffa7ded7e261e Mon Sep 17 00:00:00 2001 From: Florian Schwab Date: Sun, 26 Jul 2015 13:57:07 +0200 Subject: [PATCH 2/5] added gitter badge --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d380c45..dddafa2 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ [![Dependencies](https://img.shields.io/gemnasium/ydkn/capistrano-rails-console.svg)](https://gemnasium.com/ydkn/capistrano-rails-console) [![Code Climate](https://img.shields.io/codeclimate/github/ydkn/capistrano-rails-console.svg)](https://codeclimate.com/github/ydkn/capistrano-rails-console) +[![Join the chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ydkn/capistrano-rails-console) + + # Capistrano::Rails::Console Remote rails console for capistrano From 0377e0aa27733fffdd4e861d61a87e0b702a153b Mon Sep 17 00:00:00 2001 From: Florian Schwab Date: Mon, 27 Jul 2015 20:46:59 +0200 Subject: [PATCH 3/5] require a min version of 3.1.0 for capistrano --- capistrano-rails-console.gemspec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/capistrano-rails-console.gemspec b/capistrano-rails-console.gemspec index aad9634..0f16297 100644 --- a/capistrano-rails-console.gemspec +++ b/capistrano-rails-console.gemspec @@ -4,10 +4,10 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'capistrano/rails/console/version' Gem::Specification.new do |spec| - spec.name = "capistrano-rails-console" + spec.name = 'capistrano-rails-console' spec.version = Capistrano::Rails::Console::VERSION - spec.authors = ["Florian Schwab"] - spec.email = ["me@ydkn.de"] + spec.authors = ['Florian Schwab'] + spec.email = ['me@ydkn.de'] spec.description = %q{Remote rails console for capistrano} spec.summary = %q{Remote rails console for capistrano} spec.homepage = "https://github.com/ydkn/capistrano-rails-console" @@ -16,9 +16,9 @@ Gem::Specification.new do |spec| spec.files = `git ls-files`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) - spec.require_paths = ["lib"] + spec.require_paths = ['lib'] - spec.add_dependency 'capistrano', '>= 3.0.0', '< 4.0.0' + spec.add_dependency 'capistrano', '>= 3.1.0', '< 4.0.0' spec.add_development_dependency 'bundler', '~> 1.3' spec.add_development_dependency 'rake' From 7231a824c846eeafcb72f49702bbcb950b4b6a02 Mon Sep 17 00:00:00 2001 From: Florian Schwab Date: Tue, 28 Jul 2015 16:15:29 +0200 Subject: [PATCH 4/5] updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc826b..53b1984 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Fixed - removed dependency on capistrano-rails gem setting propper rails_env - setting ssh port through `ssh_options` +- setting ssh user through `ssh_options` +- require a minimum version of 3.1.0 for capistrano (sshkit compatibility) ### Feature - support for ssh keys From 5d26ce90cd5bc44812100737c5962bb1b1233eae Mon Sep 17 00:00:00 2001 From: Florian Schwab Date: Tue, 28 Jul 2015 16:15:46 +0200 Subject: [PATCH 5/5] * use single quotes in gemspec * removed version requirement for bundler --- capistrano-rails-console.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/capistrano-rails-console.gemspec b/capistrano-rails-console.gemspec index 0f16297..eac2218 100644 --- a/capistrano-rails-console.gemspec +++ b/capistrano-rails-console.gemspec @@ -10,8 +10,8 @@ Gem::Specification.new do |spec| spec.email = ['me@ydkn.de'] spec.description = %q{Remote rails console for capistrano} spec.summary = %q{Remote rails console for capistrano} - spec.homepage = "https://github.com/ydkn/capistrano-rails-console" - spec.license = "MIT" + spec.homepage = 'https://github.com/ydkn/capistrano-rails-console' + spec.license = 'MIT' spec.files = `git ls-files`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'capistrano', '>= 3.1.0', '< 4.0.0' - spec.add_development_dependency 'bundler', '~> 1.3' + spec.add_development_dependency 'bundler' spec.add_development_dependency 'rake' spec.add_development_dependency 'yard' end