capistrano-stretcher-rails 0.2.0 → 0.3.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 +5 -5
- data/capistrano-stretcher-rails.gemspec +1 -1
- data/lib/capistrano/stretcher/tasks/rails.rake +26 -22
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a4d2ddd03a38b5b5dd1a5025543a74186361ac4b5d176661d854b9756a31a348
|
4
|
+
data.tar.gz: 56e5c3ae8ea3c69e878445c40f644ddaab1935316db42753a34f3ac65d637ac7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bd23c67e6f7a776ae4eca25b571b9be4e30c77e7e32a35066c9218d1b7651d97b99501233180a595beaf2735fa0e4fdb7f887a0230464d04593a2fae6cf691d
|
7
|
+
data.tar.gz: 24fffe10db0170f3a408401de61821def38381605cf616231bc1555808ce324b5641251974674f465da02ae121a365dd0bbf12a8de0e82b4fba3970efa9ccbf6
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "capistrano-stretcher-rails"
|
7
|
-
spec.version = "0.
|
7
|
+
spec.version = "0.3.0"
|
8
8
|
spec.authors = ["SHIBATA Hiroshi", "Uchio Kondo"]
|
9
9
|
spec.email = ["hsbt@ruby-lang.org", "udzura@udzura.jp"]
|
10
10
|
|
@@ -13,41 +13,45 @@ namespace :stretcher do
|
|
13
13
|
|
14
14
|
task :bundle do
|
15
15
|
on application_builder_roles do
|
16
|
-
|
17
|
-
|
16
|
+
with rbenv_version: fetch(:rbenv_version) do
|
17
|
+
within local_build_path do
|
18
|
+
execute :bundle, :install, "--gemfile #{local_build_path}/Gemfile --deployment --path #{local_bundle_path} -j 4 --without development test"
|
19
|
+
end
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
22
24
|
task :asset_precompile do
|
23
25
|
on application_builder_roles do
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
with rbenv_version: fetch(:rbenv_version) do
|
27
|
+
within local_build_path do
|
28
|
+
with rails_env: fetch(:rails_env) do
|
29
|
+
begin
|
30
|
+
checkout_dirs = capture(:ls, '-xr', local_checkout_path)
|
31
|
+
latest_path = "#{local_checkout_path}/#{checkout_dirs.split[0]}"
|
32
|
+
previous_path = "#{local_checkout_path}/#{checkout_dirs.split[1]}"
|
30
33
|
|
31
|
-
|
34
|
+
raise PrecompileRequired unless previous_path
|
32
35
|
|
33
|
-
|
36
|
+
execute :ls, "#{previous_path}/public/assets" rescue raise PrecompileRequired
|
34
37
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
38
|
+
fetch(:assets_dependencies).each do |dep|
|
39
|
+
latest = "#{latest_path}/#{dep}"
|
40
|
+
previous = "#{previous_path}/#{dep}"
|
41
|
+
next if [latest, previous].map{|d| test "[ -e #{d} ]"}.uniq == [false]
|
39
42
|
|
40
|
-
|
41
|
-
|
43
|
+
execute :diff, '-Nqr', latest, previous rescue raise PrecompileRequired
|
44
|
+
end
|
42
45
|
|
43
|
-
|
46
|
+
info('Skipping asset precompile, no asset diff found')
|
44
47
|
|
45
|
-
|
48
|
+
execute :cp, '-r', "#{previous_path}/public/assets", "#{latest_path}/public/"
|
46
49
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
50
|
+
rescue PrecompileRequired
|
51
|
+
execute :rm, '-rf', 'public/assets'
|
52
|
+
execute :bundle, :exec, :rake, 'assets:precompile'
|
53
|
+
execute :cp, '-r', 'public/assets', "#{latest_path}/public/"
|
54
|
+
end
|
51
55
|
end
|
52
56
|
end
|
53
57
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-stretcher-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SHIBATA Hiroshi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano-stretcher
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
91
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.6
|
92
|
+
rubygems_version: 2.7.6
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: rails specific tasks for capistrano-stretcher
|