akitaonrails-locarails 1.1.7 → 1.1.8

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.
@@ -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.each { |pattern| FileUtils.rm_rf(Dir.glob(File.join(destination, pattern))) }
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
@@ -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 \"#{repository.gsub('/', '\\')}\" \"#{destination}\" /I /Y /Q /E"
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
@@ -2,7 +2,7 @@ module Locarails
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- TINY = 7
5
+ TINY = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
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.7
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.0.0
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: