immosquare-capistrano 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d5ce30da4725609f237136b6fa05c3cae9668c128a9c10c7db824c26564df61
|
4
|
+
data.tar.gz: 7135f08dfb35aa6a54eda7c03ad8825df43c2f7aea822a813eb4a0fc161d67c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91ffa7cba4f9af474bd1ae3a77f83199e740f49e44149f805fb8734759664b389ac13ec6ff9a686545810710c4d0673ac789e10bcae84aba9ae9bd7c2b2eab3c
|
7
|
+
data.tar.gz: ffe745d0bb6d5ad2c4570c3064e84a8ac0ce345feb938854a7ffcd5ed94f79df1c9b0de9236fa6528338bb6ac1c5e8cbb704f09dc6b719a51f6d420d1d6c6209
|
@@ -13,3 +13,8 @@ load File.expand_path("tasks/rvm.rake", __dir__)
|
|
13
13
|
Capistrano::DSL.stages.each do |stage|
|
14
14
|
after stage, "rvm:hook"
|
15
15
|
end
|
16
|
+
|
17
|
+
##============================================================##
|
18
|
+
## Update .ruby-gemset && ruby-version files
|
19
|
+
##============================================================##
|
20
|
+
before "deploy:updated", "rvm:update_rvm_dot_files"
|
@@ -65,4 +65,38 @@ namespace :rvm do
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
69
|
+
##============================================================##
|
70
|
+
## Update .ruby-gemset and .ruby-version files with
|
71
|
+
## values from the rvm_ruby_version variable
|
72
|
+
##============================================================##
|
73
|
+
task :update_rvm_dot_files do
|
74
|
+
on roles(:app) do
|
75
|
+
rvm_ruby_version = fetch(:rvm_ruby_version)
|
76
|
+
ruby_version = rvm_ruby_version.split("@").first
|
77
|
+
gemset_name = rvm_ruby_version.split("@").last
|
78
|
+
|
79
|
+
info "Updating .ruby-version file with #{ruby_version}"
|
80
|
+
info "Updating .ruby-gemset file with #{gemset_name}"
|
81
|
+
|
82
|
+
##============================================================##
|
83
|
+
## Mettre à jour les fichiers dans `release_path`
|
84
|
+
## The gem capistrano-bundler launch
|
85
|
+
## bundle config --local deployment true with the release_path
|
86
|
+
##============================================================##
|
87
|
+
within release_path do
|
88
|
+
execute :echo, ruby_version.to_s, ">", ".ruby-version"
|
89
|
+
execute :echo, gemset_name.to_s, ">", ".ruby-gemset"
|
90
|
+
end
|
91
|
+
|
92
|
+
##============================================================##
|
93
|
+
## To have the same version in the current path to lauch
|
94
|
+
## bundle exec commands from the current path
|
95
|
+
##============================================================##
|
96
|
+
within current_path do
|
97
|
+
execute :echo, ruby_version.to_s, ">", ".ruby-version"
|
98
|
+
execute :echo, gemset_name.to_s, ">", ".ruby-gemset"
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
68
102
|
end
|