capistrano-deploy-relative 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6d76cb1031ea0277b3db9e76c87cc387dc4c4231
4
+ data.tar.gz: 53364ba549733201c753eeb1ad0409803c442343
5
+ SHA512:
6
+ metadata.gz: 3b3ff66c6ecd87342b8303bb237d1413fea6f2e563e7c3d43b65adb8bff9767eba61fd069811d7cd6796059f9f0f475e980c55fd5978fe3ee7b2fc934be405e7
7
+ data.tar.gz: 310efb6facb5cd3c2fa48f66d03ffe72e62f7bd83aa30d1881925d33a4edbfc8a4414c99e4725999c01c867d3717b41c42b221f72e3811eb6dadfd5cff15573b
data/.gitignore ADDED
@@ -0,0 +1,20 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
19
+
20
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 creative-workflow
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # capistrano-deploy-relative
2
+
3
+ This gem overrides capistranos link tasks and replaces them by using relative paths. This could be usefull if you are in a shared hosting environment.
4
+
5
+ ## Installation
6
+ First make sure you install the capistrano-deploy-relative by adding it to your `Gemfile`:
7
+
8
+ gem "capistrano-deploy-relative"
9
+
10
+ Add to Capfile (after 'capistrano/deploy'):
11
+
12
+ require 'capistrano/deploy/relative'
13
+
14
+ ### License
15
+ The MIT License (MIT)
16
+
17
+ ### Changelog
18
+
19
+ 0.1.0
20
+ -----
21
+
22
+ - Initial release
data/Rakefile ADDED
File without changes
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "capistrano-deploy-relative"
6
+ s.version = "0.1.0"
7
+ s.licenses = ["MIT"]
8
+ s.authors = ["Tom Hanoldt"]
9
+ s.email = ["tom@creative-workflow.berlin"]
10
+ s.homepage = "https://github.com/creative-workflow/capistrano-deploy-relative"
11
+ s.summary = %q{This gem overrides capistranos link tasks and replaces them by using relative paths. This could be usefull if you are in a shared hosting environment.}
12
+ s.description = %q{This gem overrides capistranos link tasks and replaces them by using relative paths. This could be usefull if you are in a shared hosting environment.}
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.require_paths = ["lib"]
18
+
19
+ # specify any dependencies here; for example:
20
+ s.add_dependency "capistrano", "~> 3.0"
21
+ end
File without changes
@@ -0,0 +1,64 @@
1
+ Rake::Task["deploy:symlink:linked_dirs"].clear_actions
2
+ Rake::Task["deploy:symlink:linked_files"].clear_actions
3
+ Rake::Task["deploy:symlink:release"].clear_actions
4
+
5
+ Rake::Task["deploy:symlink:release"].reenable
6
+
7
+ namespace :deploy do
8
+ namespace :symlink do
9
+ desc 'Symlink release to current'
10
+ task :release do
11
+ on release_roles :all do
12
+ tmp_current_path = release_path.parent.join(current_path.basename)
13
+ execute :ln, '-s', release_path.relative_path_from(current_path.dirname), tmp_current_path
14
+ execute :mv, tmp_current_path, current_path.parent
15
+ end
16
+ end
17
+
18
+ desc 'Symlink files and directories from shared to release'
19
+ task :shared do
20
+ Rake::Task["deploy:symlink:linked_dirs"].reenable
21
+ Rake::Task["deploy:symlink:linked_files"].reenable
22
+ invoke 'deploy:symlink:linked_files'
23
+ invoke 'deploy:symlink:linked_dirs'
24
+ end
25
+
26
+ desc 'Symlink linked directories'
27
+ task :linked_dirs do
28
+ next unless any? :linked_dirs
29
+ on release_roles :all do
30
+ execute :mkdir, '-p', linked_dir_parents(release_path)
31
+
32
+ fetch(:linked_dirs).each do |dir|
33
+ target = release_path.join(dir)
34
+ source = shared_path.join(dir)
35
+ unless test "[ -L #{target} ]"
36
+ if test "[ -d #{target} ]"
37
+ execute :rm, '-rf', target
38
+ end
39
+ execute :ln, '-s', source.relative_path_from(target.dirname), target
40
+ end
41
+ end
42
+ end
43
+ end
44
+
45
+ desc 'Symlink linked files'
46
+ task :linked_files do
47
+ next unless any? :linked_files
48
+ on release_roles :all do
49
+ execute :mkdir, '-p', linked_file_dirs(release_path)
50
+
51
+ fetch(:linked_files).each do |file|
52
+ target = release_path.join(file)
53
+ source = shared_path.join(file)
54
+ unless test "[ -L #{target} ]"
55
+ if test "[ -f #{target} ]"
56
+ execute :rm, target
57
+ end
58
+ execute :ln, '-s', source.relative_path_from(target.dirname), target
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-deploy-relative
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Tom Hanoldt
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ description: This gem overrides capistranos link tasks and replaces them by using
28
+ relative paths. This could be usefull if you are in a shared hosting environment.
29
+ email:
30
+ - tom@creative-workflow.berlin
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - ".gitignore"
36
+ - Gemfile
37
+ - LICENSE
38
+ - README.md
39
+ - Rakefile
40
+ - capistrano-deploy-relative.gemspec
41
+ - lib/capistrano-deploy-relative.rb
42
+ - lib/capistrano/deploy/relative.rb
43
+ homepage: https://github.com/creative-workflow/capistrano-deploy-relative
44
+ licenses:
45
+ - MIT
46
+ metadata: {}
47
+ post_install_message:
48
+ rdoc_options: []
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ requirements: []
62
+ rubyforge_project:
63
+ rubygems_version: 2.6.12
64
+ signing_key:
65
+ specification_version: 4
66
+ summary: This gem overrides capistranos link tasks and replaces them by using relative
67
+ paths. This could be usefull if you are in a shared hosting environment.
68
+ test_files: []