shuttle-deploy 0.2.0.beta12 → 0.2.0.beta13
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/shuttle/deployment/rails.rb +26 -2
- data/lib/shuttle/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48ac61e4be7aa5690dcf6edcb3fbb0e601a72703
|
4
|
+
data.tar.gz: d9a6e5a5ea69859d9df6e986d8c1deee84244b39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7de4b7784cbcfe8b294988046a2e96b23e3f2ac37d2fadc85fe579dbc2c9241a29164e02cf6afe5f7021652704e970319e480b78180eb5b287af488d1c7f3e3
|
7
|
+
data.tar.gz: 8966d34feac331a67924cbbdd63acbe92958fc7af9f5e6ffdb1a2f22ffbbfa4c2800f6760214a41d47cc347c8f95fe29876d3869e1a420cb27557dc732b271fc
|
@@ -15,6 +15,10 @@ module Shuttle
|
|
15
15
|
config.rails && config.rails.precompile_assets != false
|
16
16
|
end
|
17
17
|
|
18
|
+
def cache_assets?
|
19
|
+
config.rails && config.rails.cache_assets == true
|
20
|
+
end
|
21
|
+
|
18
22
|
def start_server?
|
19
23
|
if config.rails && !config.rails.start_server.nil?
|
20
24
|
config.rails.start_server
|
@@ -43,10 +47,30 @@ module Shuttle
|
|
43
47
|
end
|
44
48
|
end
|
45
49
|
|
50
|
+
# Precompile rails assets. If no changes detected between last and
|
51
|
+
# current releases, precompile task will be skipped.
|
46
52
|
def precompile_assets
|
47
53
|
if precompile_assets?
|
48
|
-
|
49
|
-
|
54
|
+
precompile = true
|
55
|
+
|
56
|
+
# Detect if there any change in assets
|
57
|
+
if cache_assets? && last_version != version
|
58
|
+
old_path = deploy_path("releases/#{last_version}")
|
59
|
+
new_path = release_path
|
60
|
+
|
61
|
+
result = ssh.run("diff -arq #{old_path}/app/assets #{new_path}/app/assets")
|
62
|
+
if result.success?
|
63
|
+
precompile = false
|
64
|
+
ssh.run("cp -a #{old_path}/public/assets #{new_path}/public/")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
if precompile
|
69
|
+
log "Precompiling assets"
|
70
|
+
rake 'assets:precompile'
|
71
|
+
else
|
72
|
+
log "Asset procompilation skipped"
|
73
|
+
end
|
50
74
|
end
|
51
75
|
end
|
52
76
|
|
data/lib/shuttle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shuttle-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.beta13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Sosedoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
222
|
version: 1.3.1
|
223
223
|
requirements: []
|
224
224
|
rubyforge_project:
|
225
|
-
rubygems_version: 2.0.
|
225
|
+
rubygems_version: 2.0.3
|
226
226
|
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: Minimalistic deployment tool
|