akitaonrails-locarails 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/locarails/copy.rb +8 -1
- data/lib/locarails/fix.rb +4 -0
- data/lib/locarails/none.rb +2 -1
- data/lib/locarails/version.rb +1 -1
- metadata +5 -2
data/lib/locarails/copy.rb
CHANGED
@@ -40,7 +40,14 @@ class Capistrano::Deploy::Strategy::Copy
|
|
40
40
|
|
41
41
|
if copy_exclude.any?
|
42
42
|
logger.debug "processing exclusions..."
|
43
|
-
copy_exclude.
|
43
|
+
if copy_exclude.any?
|
44
|
+
copy_exclude.each do |pattern|
|
45
|
+
delete_list = Dir.glob(File.join(destination, pattern), File::FNM_DOTMATCH)
|
46
|
+
# avoid the /.. trap that deletes the parent directories
|
47
|
+
delete_list.delete_if { |dir| dir =~ /\/\.\.$/ }
|
48
|
+
FileUtils.rm_rf(delete_list.compact)
|
49
|
+
end
|
50
|
+
end
|
44
51
|
end
|
45
52
|
end
|
46
53
|
|
data/lib/locarails/fix.rb
CHANGED
@@ -2,8 +2,12 @@ require 'rubygems'
|
|
2
2
|
unless Gem.source_index.search('capistrano').select { |g| g.version.to_s =~ /^2\.5/ }.empty?
|
3
3
|
puts "Loading temporary fixes for Capistrano 2.5.x"
|
4
4
|
require 'capistrano'
|
5
|
+
require 'capistrano/recipes/deploy/dependencies'
|
6
|
+
require 'capistrano/recipes/deploy/strategy/base'
|
5
7
|
require 'capistrano/recipes/deploy/strategy/copy'
|
6
8
|
require 'capistrano/recipes/deploy/scm/none'
|
9
|
+
require 'locarails/base'
|
7
10
|
require 'locarails/copy'
|
8
11
|
require 'locarails/none'
|
12
|
+
end
|
9
13
|
end
|
data/lib/locarails/none.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
class Capistrano::Deploy::SCM::None
|
2
2
|
# Simply does a copy from the :repository directory to the
|
3
3
|
# :destination directory.
|
4
|
+
# fix: avoid xcopy parameters to be erroneously replaced by backslashes
|
4
5
|
def checkout(revision, destination)
|
5
|
-
!Capistrano::Deploy::LocalDependency.on_windows? ? "cp -R #{repository} #{destination}" : "xcopy
|
6
|
+
!Capistrano::Deploy::LocalDependency.on_windows? ? "cp -R #{repository} #{destination}" : "xcopy #{repository} \"#{destination}\" %%S%%I%%Y%%Q%%E"
|
6
7
|
end
|
7
8
|
|
8
9
|
alias_method :export, :checkout
|
data/lib/locarails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: akitaonrails-locarails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Akita
|
@@ -14,15 +14,17 @@ default_executable: locarails
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capistrano
|
17
|
+
type: :runtime
|
17
18
|
version_requirement:
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
19
20
|
requirements:
|
20
21
|
- - ">="
|
21
22
|
- !ruby/object:Gem::Version
|
22
|
-
version: 2.
|
23
|
+
version: 2.5.0
|
23
24
|
version:
|
24
25
|
- !ruby/object:Gem::Dependency
|
25
26
|
name: highline
|
27
|
+
type: :runtime
|
26
28
|
version_requirement:
|
27
29
|
version_requirements: !ruby/object:Gem::Requirement
|
28
30
|
requirements:
|
@@ -32,6 +34,7 @@ dependencies:
|
|
32
34
|
version:
|
33
35
|
- !ruby/object:Gem::Dependency
|
34
36
|
name: archive-tar-minitar
|
37
|
+
type: :runtime
|
35
38
|
version_requirement:
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|