capistrano-remote 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +7 -0
- data/CHANGELOG.md +5 -7
- data/Gemfile +1 -1
- data/README.md +5 -0
- data/Rakefile +1 -1
- data/capistrano-remote.gemspec +17 -16
- 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 +4 -5
- metadata +29 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
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,19 +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
|
-
##
|
6
|
+
## [1.0.0] - 2023-02-03
|
7
7
|
|
8
8
|
### Added
|
9
9
|
|
10
|
-
-
|
11
|
-
|
12
|
-
### Fixed
|
13
|
-
|
14
|
-
-
|
10
|
+
- Compatibility with Rails 7+. We no longer pass the environment to dbconsole in a deprecated way. (@glaszig)
|
15
11
|
|
16
12
|
### Changed
|
17
13
|
|
18
|
-
-
|
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.
|
19
17
|
|
20
18
|
## [0.3.0] - 2019-09-25
|
21
19
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -55,6 +55,11 @@ Or install it yourself as:
|
|
55
55
|
$ gem install capistrano-remote
|
56
56
|
|
57
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
|
+
|
58
63
|
## Development
|
59
64
|
|
60
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,15 +1,15 @@
|
|
1
|
-
lib = File.expand_path(
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require
|
3
|
+
require "capistrano/remote/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.authors
|
9
|
-
spec.email
|
6
|
+
spec.name = "capistrano-remote"
|
7
|
+
spec.version = Capistrano::Remote::VERSION
|
8
|
+
spec.authors = ["Jakob Skjerning"]
|
9
|
+
spec.email = ["jakob@mentalized.net"]
|
10
10
|
|
11
11
|
spec.summary = \
|
12
|
-
|
12
|
+
"Capistrano tasks to start a Rails console or dbconsole on your servers"
|
13
13
|
spec.description = <<-DESCRIPTION
|
14
14
|
Every so often you need to look at your production data or otherwise run
|
15
15
|
some manual maintenance tasks in your production Rails application.
|
@@ -18,18 +18,19 @@ Gem::Specification.new do |spec|
|
|
18
18
|
dbconsole on your servers without manually SSH'ing.
|
19
19
|
DESCRIPTION
|
20
20
|
|
21
|
-
spec.homepage
|
22
|
-
spec.license
|
21
|
+
spec.homepage = "https://github.com/substancelab/capistrano-remote"
|
22
|
+
spec.license = "MIT"
|
23
23
|
|
24
|
-
spec.files
|
24
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f|
|
25
25
|
f.match(%r{^(test|spec|features)/})
|
26
26
|
}
|
27
|
-
spec.bindir
|
28
|
-
spec.executables
|
29
|
-
spec.require_paths = [
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_dependency
|
31
|
+
spec.add_dependency "capistrano", "~> 3.0"
|
32
32
|
|
33
|
-
spec.add_development_dependency
|
34
|
-
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"
|
35
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,6 +1,5 @@
|
|
1
|
-
# rubocop:disable Metrics/BlockLength
|
2
1
|
namespace :remote do
|
3
|
-
desc
|
2
|
+
desc "Run and attach to a remote Rails console"
|
4
3
|
task :console do
|
5
4
|
rails_env = fetch(:rails_env)
|
6
5
|
on roles(:db) do |host|
|
@@ -10,12 +9,12 @@ namespace :remote do
|
|
10
9
|
end
|
11
10
|
end
|
12
11
|
|
13
|
-
desc
|
12
|
+
desc "Run and attach to a remote Rails database console"
|
14
13
|
task :dbconsole do
|
15
14
|
rails_env = fetch(:rails_env)
|
16
15
|
on roles(:db) do |host|
|
17
16
|
Capistrano::Remote::Runner.new(host).rails(
|
18
|
-
"dbconsole #{rails_env} -p"
|
17
|
+
"dbconsole -e #{rails_env} -p"
|
19
18
|
)
|
20
19
|
end
|
21
20
|
end
|
@@ -26,7 +25,7 @@ namespace :remote do
|
|
26
25
|
rails_env = fetch(:rails_env)
|
27
26
|
on roles(:db) do |host|
|
28
27
|
Capistrano::Remote::Runner.new(host).rake(
|
29
|
-
"RAILS_ENV=#{rails_env} #{ENV[
|
28
|
+
"RAILS_ENV=#{rails_env} #{ENV["task"]}"
|
30
29
|
)
|
31
30
|
end
|
32
31
|
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.
|
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: '
|
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: '
|
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
|
-
version: '
|
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
|
+
- !ruby/object:Gem::Version
|
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
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
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,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
112
|
- !ruby/object:Gem::Version
|
98
113
|
version: '0'
|
99
114
|
requirements: []
|
100
|
-
rubygems_version: 3.
|
101
|
-
signing_key:
|
115
|
+
rubygems_version: 3.2.22
|
116
|
+
signing_key:
|
102
117
|
specification_version: 4
|
103
118
|
summary: Capistrano tasks to start a Rails console or dbconsole on your servers
|
104
119
|
test_files: []
|