capistrano-local-precompile 1.1.5 → 1.2.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 +4 -4
- data/README.md +9 -3
- data/capistrano-local-precompile.gemspec +1 -1
- data/lib/capistrano/local_precompile.rb +12 -2
- 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: e415159b85b66e805bdb97cea19f65e0f483283f
|
|
4
|
+
data.tar.gz: 6172e8504e9e0ecdac486b5301d401ab484b3172
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a0fcafa9c321d50cb7262064e583de1e893bb6de3434e9ca1e8cab87fb54988e51a0085a2ef95da1b63336c4fe0d201892b852fcbf80ccd284d130a6a020e88
|
|
7
|
+
data.tar.gz: 4ba159fc18f0c7413c6e0a3d32fc222f2b487f56577bc099dd70c1141a7af643cca07d2a178bafca960307312ade835abe3d608361122a8d8f0845e34ef8fbc5
|
data/README.md
CHANGED
|
@@ -10,8 +10,8 @@ Add capistrano-local-precompile to your Gemfile:
|
|
|
10
10
|
group :development do
|
|
11
11
|
# Capistrano v2 should use '~> 0.0.5'
|
|
12
12
|
# Capistrano v3 should use '~> 1.0.0'
|
|
13
|
-
# Capistrano v3.8+ should use '~> 1.
|
|
14
|
-
gem 'capistrano-local-precompile', '~> 1.
|
|
13
|
+
# Capistrano v3.8+ should use '~> 1.2.0'
|
|
14
|
+
gem 'capistrano-local-precompile', '~> 1.2.0', require: false
|
|
15
15
|
end
|
|
16
16
|
```
|
|
17
17
|
|
|
@@ -35,6 +35,12 @@ set :assets_dir # default: "public/assets"
|
|
|
35
35
|
set :rsync_cmd # default: "rsync -av --delete"
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
Capistrano supports **dry run** mode. In that case the `rsync` command will not actually be run but only shown in stdout:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
cap production deploy --dry-run
|
|
42
|
+
```
|
|
43
|
+
|
|
38
44
|
## Acknowledgement
|
|
39
45
|
|
|
40
46
|
This gem is derived from gists by [uhlenbrock][] and [keighl][].
|
|
@@ -48,4 +54,4 @@ Pull requests welcome: fork, make a topic branch, commit (squash when possible)
|
|
|
48
54
|
|
|
49
55
|
## Copyright
|
|
50
56
|
|
|
51
|
-
Copyright (c)
|
|
57
|
+
Copyright (c) 2019 Steve Agalloco / Tom Caflisch. See [LICENSE](LICENSE.md) for detail
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |gem|
|
|
6
6
|
gem.name = 'capistrano-local-precompile'
|
|
7
|
-
gem.version = '1.
|
|
7
|
+
gem.version = '1.2.0'
|
|
8
8
|
gem.homepage = 'https://github.com/spagalloco/capistrano-local-precompile'
|
|
9
9
|
|
|
10
10
|
gem.author = "Steve Agalloco, Tom Caflisch"
|
|
@@ -37,8 +37,18 @@ namespace :deploy do
|
|
|
37
37
|
on roles(fetch(:assets_role)), in: :parallel do |server|
|
|
38
38
|
run_locally do
|
|
39
39
|
remote_shell = %(-e "ssh -p #{server.port}") if server.port
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
|
|
41
|
+
commands = []
|
|
42
|
+
commands << "#{fetch(:rsync_cmd)} #{remote_shell} ./#{fetch(:assets_dir)}/ #{server.user}@#{server.hostname}:#{release_path}/#{fetch(:assets_dir)}/" if Dir.exists?(fetch(:assets_dir))
|
|
43
|
+
commands << "#{fetch(:rsync_cmd)} #{remote_shell} ./#{fetch(:packs_dir)}/ #{server.user}@#{server.hostname}:#{release_path}/#{fetch(:packs_dir)}/" if Dir.exists?(fetch(:packs_dir))
|
|
44
|
+
|
|
45
|
+
commands.each do |command|
|
|
46
|
+
if dry_run?
|
|
47
|
+
SSHKit.config.output.info command
|
|
48
|
+
else
|
|
49
|
+
execute command
|
|
50
|
+
end
|
|
51
|
+
end
|
|
42
52
|
end
|
|
43
53
|
end
|
|
44
54
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capistrano-local-precompile
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steve Agalloco, Tom Caflisch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-02-
|
|
11
|
+
date: 2019-02-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: capistrano
|