capistrano-upload-restart 1.0
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 +7 -0
- data/.gitignore +1 -0
- data/README.md +32 -0
- data/capistrano-upload-restart.gemspec +19 -0
- data/lib/capistrano-upload-restart.rb +0 -0
- data/lib/capistrano/tasks/upload.cap +30 -0
- data/lib/capistrano/upload.rb +1 -0
- metadata +70 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f1ba2e1bc2a249109bb6232ca0f837ab22dadff9
|
4
|
+
data.tar.gz: af9a7fa17109e61a191ddc59a7439db3e2423d2d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 17db110fa8d6832ba244fcc5505dd3346876bc4d9c4168efddb502bdcfda3041094920f9aed6088c46db23ff85759e75fd309147fef6d94a43b377d67549e1f3
|
7
|
+
data.tar.gz: e69536642538f1d8c8df84491590140ddd97a6cc161404ca43fdc4f0792398bdfec1f4c4c0cfbd94d4296074a9501d61ae4cb7df3470cb93f9caa95444de3980
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Gemfile
|
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Capistrano upload
|
2
|
+
|
3
|
+
Adds a `deploy:upload` task that can be used to copy files to the currently deployed version.
|
4
|
+
After it uploads, it restarts the app on the server for an instant update.
|
5
|
+
|
6
|
+
## Install
|
7
|
+
|
8
|
+
Add the library to your Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'capistrano-upload-restart', require: false
|
12
|
+
```
|
13
|
+
|
14
|
+
And load it into your deployment script `config/deploy.rb`:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'capistrano/upload-restart'
|
18
|
+
```
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Example of usage:
|
23
|
+
|
24
|
+
```
|
25
|
+
$ cap staging deploy:upload FILES=config/locales/en.yml
|
26
|
+
```
|
27
|
+
|
28
|
+
This will upload your locale file to the staging deployment.
|
29
|
+
|
30
|
+
## Responsibility
|
31
|
+
|
32
|
+
This task can be used to override files and may damage your deployment if used incorrectly. We take no responsibility for the use of this task. **Use at your own risk!**
|
@@ -0,0 +1,19 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'capistrano-upload-restart'
|
6
|
+
s.version = '1.0'
|
7
|
+
s.date = '2017-04-09'
|
8
|
+
s.summary = "Adds the deploy:upload task back to Capistrano 3 (also restarts app)"
|
9
|
+
s.description = "Adds the deploy:upload task back to Capistrano 3 (also restarts app)"
|
10
|
+
s.authors = ["Erlingur Þorsteinsson", "Noah Saso"]
|
11
|
+
s.email = 'noahsaso@gmail.com'
|
12
|
+
s.homepage = 'https://github.com/NoahSaso/capistrano-upload-restart'
|
13
|
+
s.license = 'MIT'
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split($/)
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
|
18
|
+
s.add_runtime_dependency 'capistrano', '~> 3.0', '>= 3.0.0'
|
19
|
+
end
|
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
namespace :deploy do
|
2
|
+
desc <<-DESC
|
3
|
+
Copy files to the currently deployed version. This is useful for updating \
|
4
|
+
files piecemeal, such as when you need to quickly deploy only a single \
|
5
|
+
file. Some files, such as updated templates, images, or stylesheets, \
|
6
|
+
might not require a full deploy, and especially in emergency situations \
|
7
|
+
it can be handy to just push the updates to production, quickly.
|
8
|
+
|
9
|
+
To use this task, specify the files and directories you want to copy as a \
|
10
|
+
comma-delimited list in the FILES environment variable. All directories \
|
11
|
+
will be processed recursively, with all files being pushed to the \
|
12
|
+
deployment servers.
|
13
|
+
|
14
|
+
$ cap staging deploy:upload FILES=templates,controller.rb
|
15
|
+
|
16
|
+
Dir globs are also supported:
|
17
|
+
|
18
|
+
$ cap staging deploy:upload FILES='config/apache/*.conf'
|
19
|
+
DESC
|
20
|
+
task :upload do
|
21
|
+
files = (ENV["FILES"] || "").split(",").map { |f| Dir[f.strip] }.flatten
|
22
|
+
abort "Please specify at least one file or directory to update (via the FILES environment variable)" if files.empty?
|
23
|
+
|
24
|
+
on release_roles :all do
|
25
|
+
files.each { |file| upload!(file, File.join(current_path, file)) }
|
26
|
+
end
|
27
|
+
|
28
|
+
invoke "deploy:restart"
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path("../tasks/upload.cap", __FILE__)
|
metadata
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-upload-restart
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Erlingur Þorsteinsson
|
8
|
+
- Noah Saso
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2017-04-09 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: capistrano
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '3.0'
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 3.0.0
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
requirements:
|
28
|
+
- - "~>"
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '3.0'
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.0.0
|
34
|
+
description: Adds the deploy:upload task back to Capistrano 3 (also restarts app)
|
35
|
+
email: noahsaso@gmail.com
|
36
|
+
executables: []
|
37
|
+
extensions: []
|
38
|
+
extra_rdoc_files: []
|
39
|
+
files:
|
40
|
+
- ".gitignore"
|
41
|
+
- README.md
|
42
|
+
- capistrano-upload-restart.gemspec
|
43
|
+
- lib/capistrano-upload-restart.rb
|
44
|
+
- lib/capistrano/tasks/upload.cap
|
45
|
+
- lib/capistrano/upload.rb
|
46
|
+
homepage: https://github.com/NoahSaso/capistrano-upload-restart
|
47
|
+
licenses:
|
48
|
+
- MIT
|
49
|
+
metadata: {}
|
50
|
+
post_install_message:
|
51
|
+
rdoc_options: []
|
52
|
+
require_paths:
|
53
|
+
- lib
|
54
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
requirements: []
|
65
|
+
rubyforge_project:
|
66
|
+
rubygems_version: 2.6.11
|
67
|
+
signing_key:
|
68
|
+
specification_version: 4
|
69
|
+
summary: Adds the deploy:upload task back to Capistrano 3 (also restarts app)
|
70
|
+
test_files: []
|