capistrano-upload-config 0.5.0 → 0.6.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
2
  SHA1:
3
- metadata.gz: 455b63f26e85ec7ddbeb19d2e08fc972b07fe9b8
4
- data.tar.gz: fea12aa2b9fb534ab814e96d164d4c88149481f1
3
+ metadata.gz: 45bcc121c9d71f9a727cf88810ca9cf28a3bb0b8
4
+ data.tar.gz: 491a885002828e44629bcf24383e5611b68d9489
5
5
  SHA512:
6
- metadata.gz: 49c929363f7ad3caf2c154643f6a33471d3f2caf5a72b9ff8513abe83d7b7c1ea8755c2d38803db4802db7fc674f2e42b290a52ad092d29f9cac6a8a6f1cc13c
7
- data.tar.gz: 8df46c1b11562a56f620cf655fb840e975d16c4d25ee33c6ef763d25b7b7e32c22f25ef707aaf21bd462a89eb9088084b944fb434534e696958203652319fe22
6
+ metadata.gz: 857d580344523afd49dec47e7b6ade4b763cd9fc0b3f607e45a9d69325153a6011744ae9d311be2bebc236b253ee7fcd3ebaf318bc88fef628e059e9c4b817e5
7
+ data.tar.gz: 9348d06e1175088509ca9eff0c84ab7a92aa86b68328d96b9ec8554179d61a23448a1485fb08a640c63b265964d959de99f1362fa1a9339ace0910b9c6ef128f
data/README.md CHANGED
@@ -37,11 +37,12 @@ Require the module in your `Capfile`:
37
37
  require 'capistrano/upload-config'
38
38
  ```
39
39
 
40
- `capistrano-upload-config` comes with 3 tasks:
40
+ `capistrano-upload-config` comes with 4 tasks:
41
41
 
42
42
  * `config:check`
43
43
  * `config:init`
44
44
  * `config:push`
45
+ * `config:pull`
45
46
 
46
47
 
47
48
  #### config:check
@@ -91,6 +92,20 @@ before 'deploy:check:linked_files', 'config:push'
91
92
  ```
92
93
 
93
94
 
95
+ #### config:push
96
+
97
+ This task download the config from the remote server.
98
+
99
+ Can be used to get a freshly updated config file before edit on push it.
100
+
101
+ ```shell
102
+ $ cap staging config:pull
103
+ INFO Downloading config config/database.yml as config/database.staging.yml
104
+ INFO Downloading config/database.staging.yml 100.0%
105
+ ```
106
+
107
+
108
+
94
109
  ### Configuration
95
110
 
96
111
  Configurable options, shown here with defaults:
@@ -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-upload-config'
7
- spec.version = '0.5.0'
7
+ spec.version = '0.6.0'
8
8
  spec.authors = 'Robert Coleman'
9
9
  spec.email = 'github@robert.net.nz'
10
10
  spec.description = %q{Capistrano 3.x tasks to upload shared config that is stored outside of SCM}
@@ -52,6 +52,19 @@ namespace :config do
52
52
  end
53
53
  end
54
54
 
55
+ desc 'Pull configuration from the remote server'
56
+ task :pull do
57
+ on release_roles :all do
58
+ within shared_path do
59
+ fetch(:config_files).each do |config|
60
+ local_path = CapistranoUploadConfig::Helpers.get_local_config_name(config, fetch(:stage).to_s)
61
+ info "Downloading config #{config} as #{local_path} "
62
+ download! File.join(shared_path, config), local_path
63
+ end
64
+ end
65
+ end
66
+ end
67
+
55
68
  end
56
69
 
57
70
  namespace :load do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-upload-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Coleman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-24 00:00:00.000000000 Z
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  version: '0'
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.2.2
91
+ rubygems_version: 2.4.5
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Capistrano 3.x tasks to upload shared config that is stored outside of SCM