capistrano-ssh-doctor 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f6a315084d957611956b98eb45770af4d663d31
4
- data.tar.gz: 2ed9041723f8508c57e4e54d2166fee521d67dc9
3
+ metadata.gz: ef8401ae50a229170d1d7623f17a25414a11ba54
4
+ data.tar.gz: 924e11bbae6cd821fba5372f72826cc1c5ac6365
5
5
  SHA512:
6
- metadata.gz: 736cb8e50188ecd0dc1144a7cd0d3624e5adbfd878623ad2f725ab3d7154aec681b6cfc19bda5d53154f098dc663743b8ba225d79c4bcc9a168bf3ab4d42774d
7
- data.tar.gz: 67a494421f56b50a120a3527d9af164d9e40cdc37cf3f4f212ece7203705ffdf480a4fde641c19a07d286f787136fd3a3fd9820b374d6d0663126d583ebfc8ef
6
+ metadata.gz: 4640484fdd03aa6b531a9a61bab3bf32b8b596d5ddfc630480eec8c19931cecc9d525d69a048c7d2638e77b1faf06e771ada0ee91f24e8fa369c4fd782e70ad5
7
+ data.tar.gz: a4357d2315fe1d333ecd3283771b9cc974c3f3ccd5dbc6ad9ab0caa07880a4148e780841acb55742bdf07cc5eb5b4b51392c81cc4c32a82289d3b3023a2745bf
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ### master
4
+ - cosmetic changes
5
+
6
+ ### v0.0.1
7
+ - get the plugin working
data/README.md CHANGED
@@ -3,11 +3,12 @@
3
3
  This plugin helps you setup and debug `ssh-agent` forwarding for Capistrano
4
4
  deployment.
5
5
 
6
- It's created to complement the official [capistrano authentication guide](http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/).
6
+ It's created to complement the official
7
+ [capistrano authentication guide](http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/).
7
8
 
8
9
  The following is presumed:
9
10
  - you're using `git`
10
- - you want to use passwordless ssh login to the servers
11
+ - you want to use passwordless ssh to login to the servers
11
12
  - you want to use the `ssh-agent` forwarding strategy for checking out code in
12
13
  the remote repository (btw. good choice, it's a least hassle)
13
14
 
@@ -21,16 +22,12 @@ this configuration. The above assumptions should hold true for 98% users.
21
22
  The plugin is made for beginners and users that are not sure if their setup is
22
23
  good, so they want to confirm or debug it.
23
24
 
24
- If you have enough knowldge/experience with `ssh` tool and you're sure you have
25
- `ssh-agent` forwarding working for your server, you probably don't need this
26
- plugin.
27
-
28
25
  ### Installation
29
26
 
30
27
  Put the following in your application's `Gemfile`:
31
28
 
32
29
  group :development do
33
- gem 'capistrano', '~> 3.1'
30
+ gem 'capistrano', '~> 3.2.1'
34
31
  gem 'capistrano-ssh-doctor'
35
32
  end
36
33
 
@@ -50,15 +47,15 @@ In the console run:
50
47
 
51
48
  $ bundle exec cap production ssh:doctor
52
49
 
53
- The plugin will perform a number of checks and output a report at the end.
50
+ A number of checks will be performed and you'll get a report at the end.
54
51
 
55
- **Solving Errors**
52
+ #### Solving Errors
56
53
 
57
54
  In case there are errors in your setup, specific instructions for next
58
55
  steps will be provided in report output.
59
56
 
60
57
  **Important:** errors should be tackled in the order of their output. So, if
61
- you got errors 2, 5 and 7 in the report, start by solving error 2.
58
+ you get errors 2, 5 and 7 in the report, start by solving error 2.
62
59
 
63
60
  It is very probable that "solving" one or two initial errors will actually make
64
61
  everything work. A lot of the checks are inter-dependent. So don't be
@@ -72,7 +69,7 @@ tasks. You're ok with proceeding with the deployment then.
72
69
 
73
70
  ### Which checks are performed?
74
71
 
75
- 1. checks that you're using `git` repository protocol
72
+ 1. checks that you're using `git` as a `scm`
76
73
  2. checks that ssh private key file exists locally
77
74
  3. checks if `ssh-agent` process is running locally
78
75
  4. checks that `ssh-add` process can communicate with `ssh-agent`
@@ -88,29 +85,14 @@ task.
88
85
 
89
86
  ### More Capistrano automation?
90
87
 
91
- If you'd like to streamline your Capistrano deploys, you might want to check
92
- these zero-configuration, plug-n-play plugins:
93
-
94
- - [capistrano-unicorn-nginx](https://github.com/bruno-/capistrano-unicorn-nginx)<br/>
95
- no-configuration unicorn and nginx setup with sensible defaults
96
- - [capistrano-postgresql](https://github.com/bruno-/capistrano-postgresql)<br/>
97
- plugin that automates postgresql configuration and setup
98
- - [capistrano-rbenv-install](https://github.com/bruno-/capistrano-rbenv-install)<br/>
99
- would you like Capistrano to install rubies for you automatically?
100
- - [capistrano-safe-deploy-to](https://github.com/bruno-/capistrano-safe-deploy-to)<br/>
101
- if you're annoyed that Capistrano does **not** create a deployment path for the
102
- app on the server (default `/var/www/myapp`), this is what you need!
88
+ Check out [capistrano-plugins](https://github.com/capistrano-plugins) github org.
103
89
 
104
90
  ### Contributing and bug reports
105
91
 
106
92
  If you got stuck at some point and really can't find a solution, please open a
107
- [github issue](/issues) and maybe I can help you.
108
-
109
- Also, I can use your problem to improve this plugin.
93
+ github issue and maybe I can help. Also, your problem can be used to improve
94
+ this plugin and help others.
110
95
 
111
96
  ### License
112
97
 
113
98
  [MIT](LICENSE.md)
114
-
115
- # TODO
116
- - do not store text in report hash, store only success/fail there
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  are any errors with the setup.
18
18
  EOF
19
19
  gem.summary = 'This plugin helps you setup and debug `ssh-doctor` forwarding for Capistrano deployment.'
20
- gem.homepage = 'https://github.com/bruno-/capistrano-ssh-doctor'
20
+ gem.homepage = 'https://github.com/capistrano-plugins/capistrano-ssh-doctor'
21
21
 
22
22
  gem.license = 'MIT'
23
23
 
@@ -4,11 +4,7 @@ module Capistrano
4
4
  module SshDoctor
5
5
  class Report
6
6
 
7
- include Capistrano::SshDoctor::Report::Messages
8
-
9
- def self.report
10
- @report ||= new
11
- end
7
+ include Messages
12
8
 
13
9
  def initialize
14
10
  @report_messages = default_messages
@@ -39,7 +39,7 @@ module Capistrano
39
39
  end
40
40
 
41
41
  def config_repo_url_error(_)
42
- <<-EOF.gsub(/^\s+/, '')
42
+ <<-EOF.gsub(/^ +/, '')
43
43
  It seems the git repository url in `repo_url` setting uses https
44
44
  protocol. Https protocol prompts for password and so git protocol
45
45
  should be used.
@@ -54,7 +54,7 @@ module Capistrano
54
54
  msg = "It seems Capistrano connects to the following hosts using password login:\n"
55
55
  msg << hosts.map(&:to_s).join(', ')
56
56
  msg.concat "\n"
57
- msg.concat <<-EOF.gsub(/^\s+/, '')
57
+ msg.concat <<-EOF.gsub(/^ +/, '')
58
58
  It is strongly suggested to use passwordless ssh login.
59
59
 
60
60
  Actions:
@@ -72,7 +72,7 @@ module Capistrano
72
72
  msg = "It seems Capistrano connects without ssh agent forwarding to the following hosts:\n"
73
73
  msg << hosts.join(', ')
74
74
  msg.concat "\n"
75
- msg.concat <<-EOF.gsub(/^\s+/, '')
75
+ msg.concat <<-EOF.gsub(/^ +/, '')
76
76
  Actions:
77
77
  - make sure Capistrano uses the default ssh option for `forward_agent`.
78
78
  Just remove any `forward_agent` setting from the stage file (e.g.
@@ -81,7 +81,7 @@ module Capistrano
81
81
  end
82
82
 
83
83
  def local_private_key_exists_error(_)
84
- <<-EOF.gsub(/^\s+/, '')
84
+ <<-EOF.gsub(/^ +/, '')
85
85
  Uh, oh. It seems you do not have ssh private keys generated, or they're
86
86
  not located in standard location.
87
87
 
@@ -93,7 +93,7 @@ module Capistrano
93
93
  end
94
94
 
95
95
  def local_agent_running_env_var_error(_)
96
- <<-EOF.gsub(/^\s+/, '')
96
+ <<-EOF.gsub(/^ +/, '')
97
97
  It seems `ssh-agent` is not running on local machine.
98
98
 
99
99
  Actions:
@@ -103,7 +103,7 @@ module Capistrano
103
103
  end
104
104
 
105
105
  def local_agent_running_ssh_add_error(_)
106
- <<-EOF.gsub(/^\s+/, '')
106
+ <<-EOF.gsub(/^ +/, '')
107
107
  It seems ssh-add cannot make a connection with ssh-agent process
108
108
  on local machine.
109
109
 
@@ -119,7 +119,7 @@ module Capistrano
119
119
  end
120
120
 
121
121
  def local_keys_added_to_agent_error(_)
122
- <<-EOF.gsub(/^\s+/, '')
122
+ <<-EOF.gsub(/^ +/, '')
123
123
  It seems local ssh-agent process has no loaded keys.
124
124
 
125
125
  Actions:
@@ -131,7 +131,7 @@ module Capistrano
131
131
  end
132
132
 
133
133
  def local_repo_access_error(_)
134
- <<-EOF.gsub(/^\s+/, '')
134
+ <<-EOF.gsub(/^ +/, '')
135
135
  It seems git application repository cannot be accessed from local machine.
136
136
 
137
137
  Actions:
@@ -146,7 +146,7 @@ module Capistrano
146
146
  msg = "It seems Capistrano did not succeed in making ssh agent forwarding for these hosts:\n"
147
147
  msg << hosts.join(', ')
148
148
  msg.concat "\n"
149
- msg.concat <<-EOF.gsub(/^\s+/, '')
149
+ msg.concat <<-EOF.gsub(/^ +/, '')
150
150
  Actions:
151
151
  - make sure all the previous checks pass
152
152
  EOF
@@ -156,7 +156,7 @@ module Capistrano
156
156
  msg = "It seems Capistrano cannot access application git repository from these hosts:\n"
157
157
  msg << hosts.join(', ')
158
158
  msg.concat "\n"
159
- msg.concat <<-EOF.gsub(/^\s+/, '')
159
+ msg.concat <<-EOF.gsub(/^ +/, '')
160
160
  Actions:
161
161
  - make sure all the previous checks pass. That should make this one work too.
162
162
  EOF
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module SshDoctor
3
- VERSION = "0.0.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -1,7 +1,11 @@
1
- require 'capistrano/ssh_doctor/dsl'
1
+ require 'capistrano/ssh_doctor/report'
2
2
 
3
3
  namespace :ssh do
4
4
 
5
+ def report
6
+ @report ||= Capistrano::SshDoctor::Report.new
7
+ end
8
+
5
9
  namespace :config do
6
10
 
7
11
  task :git do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-ssh-doctor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Sutic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-23 00:00:00.000000000 Z
11
+ date: 2014-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -57,12 +57,11 @@ files:
57
57
  - capistrano-ssh-doctor.gemspec
58
58
  - lib/capistrano-ssh-doctor.rb
59
59
  - lib/capistrano/ssh_doctor.rb
60
- - lib/capistrano/ssh_doctor/dsl.rb
61
60
  - lib/capistrano/ssh_doctor/report.rb
62
61
  - lib/capistrano/ssh_doctor/report/messages.rb
63
62
  - lib/capistrano/ssh_doctor/version.rb
64
63
  - lib/capistrano/tasks/ssh_doctor.rake
65
- homepage: https://github.com/bruno-/capistrano-ssh-doctor
64
+ homepage: https://github.com/capistrano-plugins/capistrano-ssh-doctor
66
65
  licenses:
67
66
  - MIT
68
67
  metadata: {}
@@ -82,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
81
  version: '0'
83
82
  requirements: []
84
83
  rubyforge_project:
85
- rubygems_version: 2.1.5
84
+ rubygems_version: 2.2.2
86
85
  signing_key:
87
86
  specification_version: 4
88
87
  summary: This plugin helps you setup and debug `ssh-doctor` forwarding for Capistrano
@@ -1,14 +0,0 @@
1
- require_relative 'report'
2
-
3
- module Capistrano
4
- module SshDoctor
5
- module DSL
6
-
7
- def report
8
- Capistrano::SshDoctor::Report.report
9
- end
10
-
11
- end
12
- end
13
- end
14
- self.extend Capistrano::SshDoctor::DSL