prun-ops 0.2.10 → 0.2.11
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 +4 -4
- data/lib/capistrano/diagnosis.rake +23 -1
- data/lib/prun-ops/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67423974106f368510f030fb614ffc9f724b8c1a
|
4
|
+
data.tar.gz: 78509c073e43ad0955b477eefa23ce9b48775f9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a4fee7ea259e60f0614782bf9ead313d612bf23a659da5cfeace428d082b30df8873713a97c30c2aff91bd849c5addc9ed67423360b287a6e42e39895d870d0
|
7
|
+
data.tar.gz: a8b06a123a9b9cacfbbc4c06596bd91e08afe2833520e3c0333b9bc947785ee5a20daaec661cf63eb48e7c1657e65a5dabe91eef6e291b879faec275028073d8
|
@@ -60,6 +60,15 @@ task :rake, :remote_task do |task, args|
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
+
desc 'Uploads a file to /tmp folder. i.e.: cap staging scp[tmp/db.sql]'
|
64
|
+
task :scp, :file_path do |task, args|
|
65
|
+
on roles(:app) do |host|
|
66
|
+
run_locally do
|
67
|
+
scp host, args[:file_path]
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
63
72
|
|
64
73
|
def run_in(host, remote_cmd)
|
65
74
|
cmd = %w[ssh]
|
@@ -72,4 +81,17 @@ def run_in(host, remote_cmd)
|
|
72
81
|
command = cmd.join(' ')
|
73
82
|
Rails.logger.info command
|
74
83
|
exec command
|
75
|
-
end
|
84
|
+
end
|
85
|
+
|
86
|
+
def scp(host, file_path)
|
87
|
+
cmd = %w[scp]
|
88
|
+
opts = fetch(:ssh_options)
|
89
|
+
cmd << "-oProxyCommand='#{opts[:proxy].command_line_template}'" if opts
|
90
|
+
cmd << file_path
|
91
|
+
cmd << "#{host.user}@#{host.hostname}:/tmp"
|
92
|
+
|
93
|
+
command = cmd.join(' ')
|
94
|
+
Rails.logger.info command
|
95
|
+
exec command
|
96
|
+
end
|
97
|
+
|
data/lib/prun-ops/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prun-ops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Lebrijo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|