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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f8c3a6ded406df00ec1ceedf13e6373b47a23549
4
- data.tar.gz: 73d3694d8cafbdd2ec81d210f22e778ccf748f3f
2
+ SHA256:
3
+ metadata.gz: a4d2ddd03a38b5b5dd1a5025543a74186361ac4b5d176661d854b9756a31a348
4
+ data.tar.gz: 56e5c3ae8ea3c69e878445c40f644ddaab1935316db42753a34f3ac65d637ac7
5
5
  SHA512:
6
- metadata.gz: c8434bdb90e5b603b79afb8ac8b5063e0df82aa76405b3ff3a56e43571f39db48058e7c2963247fe331975e715b24b59b70258fd3d6d3d71ae6711c55ab4f269
7
- data.tar.gz: d83e0acd082bc21f66d7efb64111a582e89143be33334752e99a44564ad54bfe7d1276349050db3d4e9e378f950c15276b1e2e3c68e23bfde0bb39fea3cdbaef
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.2.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
- within local_build_path do
17
- execute :bundle, :install, "--gemfile #{local_build_path}/Gemfile --deployment --path #{local_bundle_path} -j 4 --without development test"
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
- within local_build_path do
25
- with rails_env: fetch(:rails_env) do
26
- begin
27
- checkout_dirs = capture(:ls, '-xr', local_checkout_path)
28
- latest_path = "#{local_checkout_path}/#{checkout_dirs.split[0]}"
29
- previous_path = "#{local_checkout_path}/#{checkout_dirs.split[1]}"
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
- raise PrecompileRequired unless previous_path
34
+ raise PrecompileRequired unless previous_path
32
35
 
33
- execute :ls, "#{previous_path}/public/assets" rescue raise PrecompileRequired
36
+ execute :ls, "#{previous_path}/public/assets" rescue raise PrecompileRequired
34
37
 
35
- fetch(:assets_dependencies).each do |dep|
36
- latest = "#{latest_path}/#{dep}"
37
- previous = "#{previous_path}/#{dep}"
38
- next if [latest, previous].map{|d| test "[ -e #{d} ]"}.uniq == [false]
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
- execute :diff, '-Nqr', latest, previous rescue raise PrecompileRequired
41
- end
43
+ execute :diff, '-Nqr', latest, previous rescue raise PrecompileRequired
44
+ end
42
45
 
43
- info('Skipping asset precompile, no asset diff found')
46
+ info('Skipping asset precompile, no asset diff found')
44
47
 
45
- execute :cp, '-r', "#{previous_path}/public/assets", "#{latest_path}/public/"
48
+ execute :cp, '-r', "#{previous_path}/public/assets", "#{latest_path}/public/"
46
49
 
47
- rescue PrecompileRequired
48
- execute :rm, '-rf', 'public/assets'
49
- execute :bundle, :exec, :rake, 'assets:precompile'
50
- execute :cp, '-r', 'public/assets', "#{latest_path}/public/"
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.2.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: 2017-05-01 00:00:00.000000000 Z
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.11
92
+ rubygems_version: 2.7.6
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: rails specific tasks for capistrano-stretcher