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: d21992d6862c4412d439d94e332daa87bd4388d897968d622cbcfec44b288f55
4
- data.tar.gz: d4038ca94a06375b0c01c74f09c94678cf397ac538d866b940b0968cdb9dbecd
3
+ metadata.gz: 4d5ce30da4725609f237136b6fa05c3cae9668c128a9c10c7db824c26564df61
4
+ data.tar.gz: 7135f08dfb35aa6a54eda7c03ad8825df43c2f7aea822a813eb4a0fc161d67c1
5
5
  SHA512:
6
- metadata.gz: 76a896e2b628412f9bb2a4b1b4ade6c8def6020dbe73430c64d9c86739b723d7050fc544f9d00a2271d7110ebed1a3d6c50aacc3f61e3061a7b38e8954343313
7
- data.tar.gz: dc02e35d9e183637e9ce333605b071ef3473c1c25892b8cc0bb23f14d8c2afae91f81b50f9af2696e705ca57de3a46288ab706543eedbc9c3caa15b72bb505ec
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
@@ -1,3 +1,3 @@
1
1
  module ImmosquareCapistrano
2
- VERSION = "0.1.6".freeze
2
+ VERSION = "0.1.7".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immosquare-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - immosquare