capistrano-remote 0.2.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +7 -0
- data/CHANGELOG.md +16 -2
- data/Gemfile +1 -1
- data/README.md +7 -0
- data/Rakefile +1 -1
- data/capistrano-remote.gemspec +19 -19
- data/lib/capistrano/remote/runner.rb +2 -2
- data/lib/capistrano/remote/version.rb +1 -1
- data/lib/capistrano/remote.rb +3 -3
- data/lib/capistrano/tasks/remote.rake +6 -5
- metadata +27 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d884c335b6a962e109d4dda7c1e5ad79c4ac3d405914a0193fcda5aa38419ef9
|
4
|
+
data.tar.gz: a7b9a25882d483548e73c9c55e479f1c2ab1e0ba416272118b3b1116e2c17962
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b6de5763a0bc49083667d96f3e6d4d153a7c510a81ad20b999f56df808aca2469128524ccb0acc4084e2ee01ecdc3d86a7d8afb18af501c0c6268101404cd9d
|
7
|
+
data.tar.gz: c5fb150b69d81297400658dc23cefca6c1f118eeb47c69d72cf34d3db0004c58575dc7ed6d7453da7e4134146435ca148c31e8413a179c529b1504d6121b99d6
|
data/CHANGELOG.md
CHANGED
@@ -3,9 +3,23 @@
|
|
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
|
-
##
|
6
|
+
## [1.0.0] - 2023-02-03
|
7
7
|
|
8
|
-
|
8
|
+
### Added
|
9
|
+
|
10
|
+
- Compatibility with Rails 7+. We no longer pass the environment to dbconsole in a deprecated way. (@glaszig)
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- Requirements for Bundler versions have been relaxed. We should work just fine on 10.0 and forward as we have done since the beginning of the project.
|
15
|
+
|
16
|
+
- Requirements for Rake versions have been relaxed. We should work just fine on 1.17 and forward as we have done since the beginning of the project.
|
17
|
+
|
18
|
+
## [0.3.0] - 2019-09-25
|
19
|
+
|
20
|
+
### Added
|
21
|
+
|
22
|
+
- cap remote:console is now ready for Rails 6. (@ifsc01)
|
9
23
|
|
10
24
|
## [0.2.1] - 2018-02-13
|
11
25
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Capistrano Remote
|
2
2
|
|
3
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/c69e3398c8ea206d3876/maintainability)](https://codeclimate.com/github/substancelab/capistrano-remote/maintainability)
|
4
|
+
|
3
5
|
Every so often you need to look at your production data or otherwise run some manual maintenance tasks in your production Rails application.
|
4
6
|
|
5
7
|
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.
|
@@ -53,6 +55,11 @@ Or install it yourself as:
|
|
53
55
|
$ gem install capistrano-remote
|
54
56
|
|
55
57
|
|
58
|
+
## Alternatives
|
59
|
+
|
60
|
+
- If you just need a remote Rails console [capistrano-rails-console](https://gitlab.com/ydkn/capistrano-rails-console) might be a better fit.
|
61
|
+
|
62
|
+
|
56
63
|
## Development
|
57
64
|
|
58
65
|
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.
|
data/Rakefile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require
|
1
|
+
require "bundler/gem_tasks"
|
data/capistrano-remote.gemspec
CHANGED
@@ -1,36 +1,36 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
3
|
+
require "capistrano/remote/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name
|
8
|
-
spec.version
|
9
|
-
spec.authors
|
10
|
-
spec.email
|
6
|
+
spec.name = "capistrano-remote"
|
7
|
+
spec.version = Capistrano::Remote::VERSION
|
8
|
+
spec.authors = ["Jakob Skjerning"]
|
9
|
+
spec.email = ["jakob@mentalized.net"]
|
11
10
|
|
12
11
|
spec.summary = \
|
13
|
-
|
14
|
-
spec.description = <<-
|
12
|
+
"Capistrano tasks to start a Rails console or dbconsole on your servers"
|
13
|
+
spec.description = <<-DESCRIPTION
|
15
14
|
Every so often you need to look at your production data or otherwise run
|
16
15
|
some manual maintenance tasks in your production Rails application.
|
17
16
|
|
18
17
|
This gem adds tasks to Capistrano that lets you start a Rails console or
|
19
18
|
dbconsole on your servers without manually SSH'ing.
|
20
|
-
|
19
|
+
DESCRIPTION
|
21
20
|
|
22
|
-
spec.homepage
|
23
|
-
spec.license
|
21
|
+
spec.homepage = "https://github.com/substancelab/capistrano-remote"
|
22
|
+
spec.license = "MIT"
|
24
23
|
|
25
|
-
spec.files
|
24
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f|
|
26
25
|
f.match(%r{^(test|spec|features)/})
|
27
26
|
}
|
28
|
-
spec.bindir
|
29
|
-
spec.executables
|
30
|
-
spec.require_paths = [
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
31
30
|
|
32
|
-
spec.add_dependency
|
31
|
+
spec.add_dependency "capistrano", "~> 3.0"
|
33
32
|
|
34
|
-
spec.add_development_dependency
|
35
|
-
spec.add_development_dependency
|
33
|
+
spec.add_development_dependency "bundler", ">= 1.17"
|
34
|
+
spec.add_development_dependency "rake", ">= 10.0"
|
35
|
+
spec.add_development_dependency "standard"
|
36
36
|
end
|
@@ -41,12 +41,12 @@ module Capistrano
|
|
41
41
|
|
42
42
|
def run_interactively(remote_command)
|
43
43
|
parts = [
|
44
|
-
|
44
|
+
"ssh",
|
45
45
|
(user ? "-l #{user}" : nil),
|
46
46
|
hostname,
|
47
47
|
"-t #{Shellwords.escape(remote_command)}"
|
48
48
|
]
|
49
|
-
local_command = parts.compact.join(
|
49
|
+
local_command = parts.compact.join(" ")
|
50
50
|
exec local_command
|
51
51
|
end
|
52
52
|
|
data/lib/capistrano/remote.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "capistrano/remote/runner"
|
2
|
+
require "capistrano/remote/version"
|
3
3
|
|
4
4
|
# Load the actual tasks
|
5
|
-
load File.expand_path(
|
5
|
+
load File.expand_path("tasks/remote.rake", __dir__)
|
@@ -1,20 +1,20 @@
|
|
1
1
|
namespace :remote do
|
2
|
-
desc
|
2
|
+
desc "Run and attach to a remote Rails console"
|
3
3
|
task :console do
|
4
4
|
rails_env = fetch(:rails_env)
|
5
5
|
on roles(:db) do |host|
|
6
6
|
Capistrano::Remote::Runner.new(host).rails(
|
7
|
-
"console #{rails_env}"
|
7
|
+
"console -e #{rails_env}"
|
8
8
|
)
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
desc
|
12
|
+
desc "Run and attach to a remote Rails database console"
|
13
13
|
task :dbconsole do
|
14
14
|
rails_env = fetch(:rails_env)
|
15
15
|
on roles(:db) do |host|
|
16
16
|
Capistrano::Remote::Runner.new(host).rails(
|
17
|
-
"dbconsole #{rails_env} -p"
|
17
|
+
"dbconsole -e #{rails_env} -p"
|
18
18
|
)
|
19
19
|
end
|
20
20
|
end
|
@@ -25,8 +25,9 @@ namespace :remote do
|
|
25
25
|
rails_env = fetch(:rails_env)
|
26
26
|
on roles(:db) do |host|
|
27
27
|
Capistrano::Remote::Runner.new(host).rake(
|
28
|
-
"RAILS_ENV=#{rails_env} #{ENV[
|
28
|
+
"RAILS_ENV=#{rails_env} #{ENV["task"]}"
|
29
29
|
)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
33
|
+
# rubocop:enable Metrics/BlockLength
|
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.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakob Skjerning
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -28,30 +28,44 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.17'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.17'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '10.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: standard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: |2
|
56
70
|
Every so often you need to look at your production data or otherwise run
|
57
71
|
some manual maintenance tasks in your production Rails application.
|
@@ -64,6 +78,7 @@ executables: []
|
|
64
78
|
extensions: []
|
65
79
|
extra_rdoc_files: []
|
66
80
|
files:
|
81
|
+
- ".github/dependabot.yml"
|
67
82
|
- ".gitignore"
|
68
83
|
- CHANGELOG.md
|
69
84
|
- CODE_OF_CONDUCT.md
|
@@ -82,7 +97,7 @@ homepage: https://github.com/substancelab/capistrano-remote
|
|
82
97
|
licenses:
|
83
98
|
- MIT
|
84
99
|
metadata: {}
|
85
|
-
post_install_message:
|
100
|
+
post_install_message:
|
86
101
|
rdoc_options: []
|
87
102
|
require_paths:
|
88
103
|
- lib
|
@@ -97,9 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
112
|
- !ruby/object:Gem::Version
|
98
113
|
version: '0'
|
99
114
|
requirements: []
|
100
|
-
|
101
|
-
|
102
|
-
signing_key:
|
115
|
+
rubygems_version: 3.2.22
|
116
|
+
signing_key:
|
103
117
|
specification_version: 4
|
104
118
|
summary: Capistrano tasks to start a Rails console or dbconsole on your servers
|
105
119
|
test_files: []
|