capistrano-env 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: a2f05a404be7951d97e2812db6c4cae6dd121da9
4
- data.tar.gz: c346385af488c4e91dc8e9cb040b83bba7b04793
3
+ metadata.gz: 62a5c599be9a5f7035abc1b4c1d8e186bd64cf5a
4
+ data.tar.gz: e423190c788c45cb7826fe671bf66eb4d3438040
5
5
  SHA512:
6
- metadata.gz: ad0a5a6473def8e4bf1e862c04ff245b2b597a55227209f4dee0db8ca7f29936d9925db86d98deddd2a1c419e0b6273b1e741123fc5e7de16359fb4bc267a36e
7
- data.tar.gz: cacbc33941cd7b9dcb6953a96cb514ab2b5e768277bd466550b192db69d81543c210fe1b7b7bf8173f8a9d62f70360524317214cda908fb386a4222d4fb9a8ac
6
+ metadata.gz: 14e45200a7211a2d043a9c46d961b795b9a9474a58d8b19cb87dc905e13e1c6395e0b8123dead0b1d9737311b596244523edca83efdaf525dc9320fe06384070
7
+ data.tar.gz: 0077c5252713c32a5027d33ed6850f6df2054bf03e37c28a349ac2096dd3b098bf080e7a1f345d47be33cf915d53f350f2d60b72affdd09ee559d18b90d05387
@@ -1,3 +1,4 @@
1
+ require 'pry'
1
2
  module Capistrano
2
3
  module Env
3
4
  module Plugin
@@ -11,13 +12,18 @@ module Capistrano
11
12
  def add(config)
12
13
  namespace :deploy do
13
14
  namespace :capenv do
14
- task :copy do
15
- parent.parent.upload StringIO.new(config.capenv_content), "#{fetch(:release_path)}/#{config.capenv_file}"
15
+ namespace :copy do
16
+ [:release, :current].each do |type|
17
+ task type do
18
+ path = fetch "#{type}_path".to_sym
19
+ parent.parent.parent.upload StringIO.new(config.capenv_content), "#{path}/#{config.capenv_file}"
20
+ end
21
+ end
16
22
  end
17
23
  end
18
24
  end
19
- after 'deploy:finalize_update', 'deploy:capenv:copy'
20
- before 'deploy:restart', 'deploy:capenv:copy'
25
+ after 'deploy:finalize_update', 'deploy:capenv:copy:release'
26
+ before 'deploy:restart', 'deploy:capenv:copy:current'
21
27
  end
22
28
  end
23
29
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Env
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-env
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - masarakki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2014-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails