capistrano-strategy-copy-smart 0.0.2

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
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in capistrano-strategy-copy-smart.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require 'capistrano-strategy-copy-smart'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "capistrano-strategy-copy-smart"
7
+ s.version = CapistranoStrategyCopySmart::VERSION
8
+ s.authors = ["Anssi Syrjäsalo", "Juha-Pekka Laiho"]
9
+ s.email = ["anssi.syrjasalo@eficode.fi", "juha-pekka.laiho@eficode.fi"]
10
+ s.homepage = ""
11
+ s.summary = %q{Adds new smart copy strategy to Capistrano}
12
+ s.description = %q{Adds new smart copy strategy to Capistrano}
13
+
14
+ s.rubyforge_project = "capistrano-strategy-copy-smart"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ # s.add_development_dependency "rspec"
23
+ s.add_runtime_dependency "capistrano", "~> 2"
24
+ end
@@ -0,0 +1,5 @@
1
+ module CapistranoStrategyCopySmart
2
+
3
+ VERSION = '0.0.2'
4
+
5
+ end
@@ -0,0 +1,46 @@
1
+ require 'capistrano/recipes/deploy/strategy/copy'
2
+
3
+ module Capistrano
4
+ module Deploy
5
+ module Strategy
6
+
7
+ class CopySmart < Copy
8
+
9
+ def self.hello
10
+ p "hello"
11
+ end
12
+
13
+ # @overload
14
+ def deploy!
15
+ FileUtils.mkdir_p(destination)
16
+
17
+ logger.trace "copying working directory"
18
+
19
+ files_to_copy = `git ls-files #{working_dir}`.split("\n")
20
+ logger.trace "copying #{files_to_copy.size} files"
21
+
22
+ files_to_copy.each do |file|
23
+ FileUtils.cp(file, destination, :force => true)
24
+ end
25
+
26
+ logger.trace "all files copied"
27
+
28
+ #logger.trace "compressing #{destination} to #{filename}"
29
+ #Dir.chdir(copy_dir) { system(compress(File.basename(destination), File.basename(filename)).join(" ")) }
30
+
31
+ #distribute!
32
+ ensure
33
+ #FileUtils.rm filename rescue nil
34
+ #FileUtils.rm_rf destination rescue nil
35
+ end
36
+
37
+ private
38
+
39
+ def working_dir
40
+ @working_dir ||= Dir.pwd
41
+ end
42
+
43
+ end
44
+ end
45
+ end
46
+ end
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-strategy-copy-smart
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Anssi Syrjäsalo
9
+ - Juha-Pekka Laiho
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2011-10-13 00:00:00.000000000 +03:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: capistrano
18
+ requirement: &2168718980 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: '2'
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: *2168718980
27
+ description: Adds new smart copy strategy to Capistrano
28
+ email:
29
+ - anssi.syrjasalo@eficode.fi
30
+ - juha-pekka.laiho@eficode.fi
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - .gitignore
36
+ - Gemfile
37
+ - Rakefile
38
+ - capistrano-strategy-copy-smart.gemspec
39
+ - lib/capistrano-strategy-copy-smart.rb
40
+ - lib/capistrano/recipes/deploy/strategy/copy_smart.rb
41
+ has_rdoc: true
42
+ homepage: ''
43
+ licenses: []
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project: capistrano-strategy-copy-smart
62
+ rubygems_version: 1.6.2
63
+ signing_key:
64
+ specification_version: 3
65
+ summary: Adds new smart copy strategy to Capistrano
66
+ test_files: []