capistrano-upload-config 0.3.0 → 0.4.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 +4 -4
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +4 -4
- data/capistrano-upload-config.gemspec +1 -1
- data/lib/capistrano/tasks/upload-config.rake +7 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a27f0395abbae3d12f324c5f1a35bc6c066b9c36
|
4
|
+
data.tar.gz: c3e49f485f5263159ab9f5c4b8af028b605173d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd352609cf454193b4ad10019702986a90a1240453add72b8699b8431adb0cff9f2820a9653b9229da2ada730f289b7e87153d5b69a844cd5684ee8864675f71
|
7
|
+
data.tar.gz: 880d96f90c8679897cbfac04fe8f2f6ebd6e5098331e3a682abd4611be1f7469616a7e6e3f34699393b3359ddb80042d065cd0750fc35e6ef3748014373f7798
|
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -95,7 +95,7 @@ Configurable options, shown here with defaults:
|
|
95
95
|
|
96
96
|
```ruby
|
97
97
|
set :config_files, fetch(:linked_files)
|
98
|
-
set :
|
98
|
+
set :config_example_suffix, '-example'
|
99
99
|
```
|
100
100
|
|
101
101
|
By default your `:linked_files` are assumed to be config files, this might be totally wrong for your environment, never fear just:
|
@@ -112,16 +112,16 @@ Note, capistrano-upload-config can only upload confir to your shared folder (and
|
|
112
112
|
#### Example files
|
113
113
|
|
114
114
|
Do you use example files checked into your source control? e.g. `config/database.yml-example`
|
115
|
-
These will be used when running `config:init`. If your
|
115
|
+
These will be used when running `config:init`. If your suffix differs, e.g. `config/database.yml.eg` set this as:
|
116
116
|
|
117
117
|
```ruby
|
118
118
|
# in deploy.rb (or similar)
|
119
119
|
|
120
|
-
set :
|
120
|
+
set :config_example_suffix, '.eg'
|
121
121
|
|
122
122
|
```
|
123
123
|
|
124
|
-
Note, only
|
124
|
+
Note, only suffixes (i.e. after the whole filename) are supported.
|
125
125
|
|
126
126
|
|
127
127
|
## Contributing
|
@@ -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.
|
7
|
+
spec.version = '0.4.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}
|
@@ -8,10 +8,10 @@ namespace :config do
|
|
8
8
|
if File.exists?(local_path)
|
9
9
|
warn "Already Exists: #{local_path}"
|
10
10
|
else
|
11
|
-
|
12
|
-
if File.exists?("#{config}#{
|
13
|
-
FileUtils.cp "#{config}#{
|
14
|
-
info "Copied: #{config}#{
|
11
|
+
example_suffix = fetch(:config_example_suffix, '')
|
12
|
+
if File.exists?("#{config}#{example_suffix}")
|
13
|
+
FileUtils.cp "#{config}#{example_suffix}", local_path
|
14
|
+
info "Copied: #{config}#{example_suffix} to #{local_path}"
|
15
15
|
else
|
16
16
|
File.open(local_path, "w") {}
|
17
17
|
info "Created: #{local_path} as empty file"
|
@@ -58,7 +58,9 @@ namespace :load do
|
|
58
58
|
task :defaults do
|
59
59
|
|
60
60
|
set :config_files, -> { fetch(:linked_files) }
|
61
|
-
set :
|
61
|
+
set :config_example_suffix, '-example'
|
62
|
+
# https://github.com/rjocoleman/capistrano-upload-config/issues/1
|
63
|
+
set :config_example_prefix, -> { fetch(:config_example_suffix) }
|
62
64
|
|
63
65
|
end
|
64
66
|
end
|
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.
|
4
|
+
version: 0.4.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-
|
11
|
+
date: 2014-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -61,7 +61,7 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
63
|
- Gemfile
|
64
|
-
- LICENSE
|
64
|
+
- LICENSE
|
65
65
|
- README.md
|
66
66
|
- Rakefile
|
67
67
|
- capistrano-upload-config.gemspec
|