capistrano-strategy-copy-working-dir 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.
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require 'capistrano-strategy-copy-working-dir'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.autorequire = false
|
7
|
+
|
8
|
+
s.name = "capistrano-strategy-copy-working-dir"
|
9
|
+
s.version = CapistranoStrategyCopyWorkingDir::VERSION
|
10
|
+
|
11
|
+
s.authors = ["Rudolf Schmidt"]
|
12
|
+
s.homepage = "http://github.com/rudionrails/capistrano-strategy-copy-working-dir"
|
13
|
+
|
14
|
+
s.summary = %q{Capistrano copy recipe to transfer files from the current working directory}
|
15
|
+
s.description = %q{Not every server allows access to rubygems or other repository sources, so this is just to make life a little easier}
|
16
|
+
|
17
|
+
s.rubyforge_project = "capistrano-strategy-copy-working-dir"
|
18
|
+
|
19
|
+
s.files = `git ls-files`.split("\n")
|
20
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
22
|
+
s.require_paths = ["lib"]
|
23
|
+
|
24
|
+
# specify any dependencies here; for example:
|
25
|
+
# s.add_development_dependency "rspec"
|
26
|
+
s.add_runtime_dependency "capistrano", "~> 2"
|
27
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'capistrano/recipes/deploy/strategy/copy'
|
2
|
+
|
3
|
+
module Capistrano
|
4
|
+
module Deploy
|
5
|
+
module Strategy
|
6
|
+
|
7
|
+
# This strategy behaves exactly as the regular :copy strategy, but
|
8
|
+
# it it uses the current working directory as source for deployment.
|
9
|
+
# So you need to make sure that all your gems are already bundled correctly.
|
10
|
+
#
|
11
|
+
# Not every server has access to rubygems or other repository sources,
|
12
|
+
# so this is a try to make life easier for those who want to deploy a complete
|
13
|
+
# package without having to run extra tasks on the remote machines.
|
14
|
+
class CopyWorkingDir < Copy
|
15
|
+
|
16
|
+
# @overload
|
17
|
+
def deploy!
|
18
|
+
FileUtils.mkdir_p(destination)
|
19
|
+
|
20
|
+
logger.trace "copying working directory"
|
21
|
+
FileUtils.cp_r( File.join(working_dir, '.'), destination )
|
22
|
+
|
23
|
+
File.open( File.join(destination, "REVISION"), "w" ) { |f| f.puts(revision) }
|
24
|
+
|
25
|
+
logger.trace "compressing #{destination} to #{filename}"
|
26
|
+
Dir.chdir(copy_dir) { system(compress(File.basename(destination), File.basename(filename)).join(" ")) }
|
27
|
+
|
28
|
+
distribute!
|
29
|
+
ensure
|
30
|
+
FileUtils.rm filename rescue nil
|
31
|
+
FileUtils.rm_rf destination rescue nil
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def working_dir
|
37
|
+
@working_dir ||= Dir.pwd
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
metadata
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-strategy-copy-working-dir
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Rudolf Schmidt
|
9
|
+
autorequire: false
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-09-15 00:00:00 +02:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: capistrano
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "2"
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
description: Not every server allows access to rubygems or other repository sources, so this is just to make life a little easier
|
28
|
+
email:
|
29
|
+
executables: []
|
30
|
+
|
31
|
+
extensions: []
|
32
|
+
|
33
|
+
extra_rdoc_files: []
|
34
|
+
|
35
|
+
files:
|
36
|
+
- .gitignore
|
37
|
+
- Gemfile
|
38
|
+
- Rakefile
|
39
|
+
- capistrano-strategy-copy-working-dir.gemspec
|
40
|
+
- lib/capistrano-strategy-copy-working-dir.rb
|
41
|
+
- lib/capistrano/recipes/deploy/strategy/copy_working_dir.rb
|
42
|
+
has_rdoc: true
|
43
|
+
homepage: http://github.com/rudionrails/capistrano-strategy-copy-working-dir
|
44
|
+
licenses: []
|
45
|
+
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: "0"
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: "0"
|
63
|
+
requirements: []
|
64
|
+
|
65
|
+
rubyforge_project: capistrano-strategy-copy-working-dir
|
66
|
+
rubygems_version: 1.5.1
|
67
|
+
signing_key:
|
68
|
+
specification_version: 3
|
69
|
+
summary: Capistrano copy recipe to transfer files from the current working directory
|
70
|
+
test_files: []
|
71
|
+
|