capistrano-linked-files 0.1.0 → 1.1.0

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: 869df53defa75a669478fd9d3f52cfd7454190d1
4
- data.tar.gz: 8fb45854a55ca7f9038a1d93d146d3be72b54d81
3
+ metadata.gz: e5bde76f852c3dacf613dc1f1ff1d0efaeb29bc9
4
+ data.tar.gz: 0f61296236d70b88b8a7b2a7cd1ada7a43e716ee
5
5
  SHA512:
6
- metadata.gz: d40ae7b29972288aa25617964938d338495f99befebf9e7bb99c7083757f48696cf5d7c4248a148b0742d73575e99ee4fb3500b5a5f0b368649bf49a0a7bea2c
7
- data.tar.gz: 994cbd4afefaef1032ff9b8d1d6cc30f612c008a43eeed3159f45215bc29d013a1c974a473ee647f2e01b715bc3ec90d1ac877373d98da5bbe25c9ce3a18de0b
6
+ metadata.gz: c3eda4894c3634f2515af749165eff6c8c696528eeef06e18c0d294bef3421bc4b03004b2ce69184d7464b0e61f533806943160bcde32d347fb4fe0d67cf4489
7
+ data.tar.gz: d061dcf2827e023a6192a4b528e1178576cba9b0cf0a38d1d3268a260fa6820e2b051535effe19e3df7d357c6d7a0146f2cfdf5f401720033802488f710f9732
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # capistrano-linked-files
2
2
 
3
- This gem provides Capistrano reciepes to upload your linked files and directories. It's quite useful for files such as `config/database.yml` and `config/secrets.yml`, which are usually ignored (at least they should be) from version control systems.
3
+ This gem provides Capistrano 3.1 reciepes to upload your linked files and directories. It's quite useful for files such as `config/database.yml` and `config/secrets.yml`, which are usually ignored (at least they should be) from version control systems.
4
4
 
5
5
  Linked files and directories are placed in the `shared` directory on your remote servers and kept between deployments. After a new deployment, a symlink is created from the `shared` directory to the `current` directory.
6
6
 
@@ -41,10 +41,24 @@ Then run the task:
41
41
  $ bundle exec cap <STAGE> linked_files:upload
42
42
  ```
43
43
 
44
+ If you only want to upload files or dirs, then run the tasks accordingly:
45
+
46
+ ```
47
+ $ bundle exec cap <STAGE> linked_files:upload_files
48
+ $ bundle exec cap <STAGE> linked_files:upload_dirs
49
+ ```
50
+
44
51
  To automatically upload linked files and directories after a new deployment, add the following to your `deploy.rb`:
45
52
 
46
53
  ```ruby
54
+ # Uploading both linked_files and dirs
47
55
  before :finishing, 'linked_files:upload'
56
+
57
+ # Uploading only linked_files
58
+ before :finishing, 'linked_files:upload_files'
59
+
60
+ # Uploading only dirs
61
+ before :finishing, 'linked_files:upload_dirs'
48
62
  ```
49
63
 
50
64
  ## Contributing
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'capistrano-linked-files'
6
- s.version = '0.1.0'
6
+ s.version = '1.1.0'
7
7
  s.summary = 'Upload linked files and directories.'
8
8
  s.description = 'Adds tasks to upload your linked files and directories. '
9
9
 
@@ -1,7 +1,3 @@
1
- def backup_path_for(file)
2
- File.join(File.dirname(file), "#{Time.now.strftime('%Y%m%d%H%M%S')}_#{File.basename(file)}")
3
- end
4
-
5
1
  namespace :linked_files do
6
2
 
7
3
  desc 'Upload linked files and directories'
@@ -9,6 +5,12 @@ namespace :linked_files do
9
5
  invoke 'linked_files:upload:files'
10
6
  invoke 'linked_files:upload:dirs'
11
7
  end
8
+ task :upload_files do
9
+ invoke 'linked_files:upload:files'
10
+ end
11
+ task :upload_dirs do
12
+ invoke 'linked_files:upload:dirs'
13
+ end
12
14
 
13
15
  namespace :upload do
14
16
 
@@ -30,29 +32,6 @@ namespace :linked_files do
30
32
 
31
33
  end
32
34
 
33
- namespace :backup do
34
-
35
- desc 'Download a backup of remote linked files'
36
- task :files do
37
- on roles :web do
38
- fetch(:linked_files).each do |file|
39
- download! "#{shared_path}/#{file}", backup_path_for(file)
40
- end
41
- end
42
- end
43
-
44
- desc 'Download a backup of remote linked directories'
45
- task :dirs do
46
- on roles :web do
47
- fetch(:linked_dirs).each do |dir|
48
- download! "#{shared_path}/#{dir}", "backups_#{dir}", recursive: true
49
- # info "#{shared_path}/#{dir} #{backup_path_for(dir)}"
50
- end
51
- end
52
- end
53
-
54
- end
55
-
56
35
  before 'linked_files:upload', 'deploy:check:make_linked_dirs'
57
36
 
58
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-linked-files
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Runar Skaare Tveiten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-28 00:00:00.000000000 Z
11
+ date: 2015-03-10 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.0
91
+ rubygems_version: 2.2.2
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Upload linked files and directories.