capistrano-remote 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: da76f0d7bf5b90ddda1a32a193d061bf316c2b8d
4
- data.tar.gz: 6afd603dc39969d71f1823da7f1758fb699233a9
3
+ metadata.gz: 718fdb75292fd474fcee505953d5008199a9b158
4
+ data.tar.gz: c1fa1c54aadfb230550a222a7907afce9290e24d
5
5
  SHA512:
6
- metadata.gz: 3a2e432292228d2e47ee02a27fd0d1695eb90559e77a8bb8c449eef935999d1d2380daf512ed46c065b2aa5c98980abd0dfa46023938c54994560a1b7a2681d2
7
- data.tar.gz: a0b909fe24f1aa23defb367e32151cc1208c0b2add6e869c4855489af39a0997ebb834e705c08ba628025b753dceb3f6872a4adad3ce18a73884c047c5154f54
6
+ metadata.gz: 47a07a6a424cd2370958b1a26620fc9ab783ebbcbf877316030a4066e6cf31631c41a78fb13a1ace5ca5eba4b19d2c521258b37cd0201bd8eccccf29ae5d9cd7
7
+ data.tar.gz: 8252e86db25c07bbbb5fd8cf24cd36cf9577de23a3cf0ef0f76fa28d733df9f04e90e7d2438351dd22217bccb59b9ce239fdb36f869a9039bbad3f9965fec562
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## Unreleased
7
+
8
+ ...
9
+
10
+ ## [0.2.1] - 2018-02-13
11
+
12
+ ### Fixed
13
+
14
+ - We no longer construct a faulty local command when the SSH username isn't set
15
+ - Ensure we shellescape the remote command to prevent issues when it contains special characters, like references to ENV variables.
16
+
6
17
  ## [0.2.0] - 2016-02-15
7
18
 
8
19
  ### Added
data/README.md CHANGED
@@ -4,9 +4,9 @@ Every so often you need to look at your production data or otherwise run some ma
4
4
 
5
5
  Sure, you could SSH to the server, find the proper path, and remember the correct invocation for your rails console, but we already have an SSH automation tool; Capistrano.
6
6
 
7
- This gem adds tasks to Capistrano that lets you start a Rails console or dbconsole on your servers without manually SSH'ing:
7
+ This gem adds tasks to Capistrano that lets you run rake tasks or start a Rails console or dbconsole on your servers without manually SSH'ing:
8
8
 
9
- ## Examples
9
+ ## Usage
10
10
 
11
11
  ### Rails console
12
12
 
@@ -23,6 +23,14 @@ This gem adds tasks to Capistrano that lets you start a Rails console or dbconso
23
23
 
24
24
  example_production=>
25
25
 
26
+ ### Rake tasks
27
+
28
+ $ cap production remote:rake task=about
29
+ About your application's environment
30
+ Rails version 4.2.5.1
31
+ Ruby version 2.3.0-p0 (x86_64-linux)
32
+ [...]
33
+
26
34
 
27
35
  ## Installation
28
36
 
@@ -32,6 +40,10 @@ Add this line to your application's Gemfile:
32
40
  gem "capistrano-remote", :require => false
33
41
  ```
34
42
 
43
+ And this to your Capfile:
44
+
45
+ require "capistrano/remote"
46
+
35
47
  And then execute:
36
48
 
37
49
  $ bundle
@@ -41,13 +53,6 @@ Or install it yourself as:
41
53
  $ gem install capistrano-remote
42
54
 
43
55
 
44
- ## Usage
45
-
46
- Add to Capfile:
47
-
48
- require "capistrano/remote"
49
-
50
-
51
56
  ## Development
52
57
 
53
58
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -40,7 +40,13 @@ module Capistrano
40
40
  end
41
41
 
42
42
  def run_interactively(remote_command)
43
- local_command = "ssh -l #{user} #{hostname} -t \"#{remote_command}\""
43
+ parts = [
44
+ 'ssh',
45
+ (user ? "-l #{user}" : nil),
46
+ hostname,
47
+ "-t #{Shellwords.escape(remote_command)}"
48
+ ]
49
+ local_command = parts.compact.join(' ')
44
50
  exec local_command
45
51
  end
46
52
 
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Remote # :nodoc:
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Skjerning
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-15 00:00:00.000000000 Z
11
+ date: 2018-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -98,9 +98,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 2.4.8
101
+ rubygems_version: 2.6.12
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Capistrano tasks to start a Rails console or dbconsole on your servers
105
105
  test_files: []
106
- has_rdoc: