capistrano-scm-copy 0.0.1

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: 3a3993202a20e4f214c64771ebb6eba9eb6d2004
4
+ data.tar.gz: 8c2ddb12f0e4b79bcc74651935342b9514bed80f
5
+ SHA512:
6
+ metadata.gz: 1b8e0dcb8e24837a6a8baf09f494c8c876007e02428cfbd01a2ca5577b5263ea696df14a8fd1431fa7003b6005dad71f2ea9d160ff1d39b604440dbcb7ce4656
7
+ data.tar.gz: 4fe68299019418de548b349584eba18ee3ab6e580b0d07d514b4276c1d461d567b0afcf0d6bfb99f7c5995fc43faed60e4c319f03acb2c02684bb69fb1e81cf0
data/.gitignore ADDED
@@ -0,0 +1,18 @@
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/
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,31 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ capistrano-scm-copy (0.0.1.pre)
5
+ capistrano (>= 3.0.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ capistrano (3.0.1)
11
+ i18n
12
+ rake (>= 10.0.0)
13
+ sshkit (>= 0.0.23)
14
+ i18n (0.6.9)
15
+ net-scp (1.1.2)
16
+ net-ssh (>= 2.6.5)
17
+ net-ssh (2.7.0)
18
+ rake (10.1.0)
19
+ sshkit (1.2.0)
20
+ net-scp (>= 1.1.2)
21
+ net-ssh
22
+ term-ansicolor
23
+ term-ansicolor (1.2.2)
24
+ tins (~> 0.8)
25
+ tins (0.13.1)
26
+
27
+ PLATFORMS
28
+ ruby
29
+
30
+ DEPENDENCIES
31
+ capistrano-scm-copy!
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 wercker
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,50 @@
1
+ capistrano-scm-copy
2
+ ===================
3
+
4
+ A copy strategy for Capistrano 3, which mimics the `:copy` scm of Capistrano 2.
5
+
6
+ This will make Capistrano tar the current directory, upload it to the server(s) and then extract it.
7
+
8
+ Requirements
9
+ ============
10
+
11
+ Machine running Capistrano:
12
+
13
+ - Capistrano 3
14
+ - tar
15
+
16
+ Servers:
17
+
18
+ - mktemp
19
+ - tar
20
+
21
+ Installation
22
+ ============
23
+
24
+ First make sure you install the capistrano-scm-copy by adding it to your `Gemfile`:
25
+
26
+ gem "capistrano-scm-copy"
27
+
28
+ Then switch the `:scm` option to `:copy` in `config/deploy.rb`:
29
+
30
+ set :scm, :copy
31
+
32
+ TODO
33
+ ====
34
+
35
+ - Make exclude filters configurable
36
+
37
+ I'm new to programming for Capistrano and even Ruby in general. So any feedback is appreciated.
38
+
39
+ License
40
+ =======
41
+
42
+ The MIT License (MIT)
43
+
44
+ Changelog
45
+ =========
46
+
47
+ 0.0.1
48
+ -----
49
+
50
+ - 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-scm-copy"
6
+ s.version = "0.0.1"
7
+ s.licenses = ["MIT"]
8
+ s.authors = ["Benno van den Berg"]
9
+ s.email = ["bennovandenberg@gmail.com"]
10
+ s.homepage = "https://github.com/wercker/capistrano-scm-copy"
11
+ s.summary = %q{Copy strategy for capistrano 3.x}
12
+ s.description = %q{Copy strategy for capistrano 3.x}
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
@@ -0,0 +1 @@
1
+ load File.expand_path('../tasks/copy.rake', __FILE__)
@@ -0,0 +1,40 @@
1
+ namespace :copy do
2
+
3
+ archive_name = "archive.tar.gz"
4
+
5
+ desc "Archive files to #{archive_name}"
6
+ file archive_name => FileList["*"].exclude(archive_name) do |t|
7
+ sh "tar -cvzf #{t.name} #{t.prerequisites.join(" ")}"
8
+ end
9
+
10
+ desc "Deploy #{archive_name} to release_path"
11
+ task :deploy => archive_name do |t|
12
+ tarball = t.prerequisites.first
13
+ on roles :all do
14
+
15
+ # Make sure the release directory exists
16
+ execute :mkdir, "-p", release_path
17
+
18
+ # Create a temporary file on the server
19
+ tmp_file = capture("mktemp")
20
+
21
+ # Upload the archive, extract it and finally remove the tmp_file
22
+ upload!(tarball, tmp_file)
23
+ execute :tar, "-xzf", tmp_file, "-C", release_path
24
+ execute :rm, tmp_file
25
+ end
26
+
27
+ Rake::Task["copy:clean"].invoke
28
+
29
+ end
30
+
31
+ task :clean do |t|
32
+ # Delete the local archive
33
+ File.delete archive_name if File.exists? archive_name
34
+ end
35
+
36
+ task :create_release => :deploy
37
+
38
+ task :check
39
+
40
+ end
File without changes
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-scm-copy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Benno van den Berg
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-13 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: Copy strategy for capistrano 3.x
28
+ email:
29
+ - bennovandenberg@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - .gitignore
35
+ - Gemfile
36
+ - Gemfile.lock
37
+ - LICENSE
38
+ - README.md
39
+ - Rakefile
40
+ - capistrano-scm-copy.gemspec
41
+ - lib/capistrano-scm-copy.rb
42
+ - lib/capistrano/copy.rb
43
+ - lib/capistrano/tasks/copy.rake
44
+ homepage: https://github.com/wercker/capistrano-scm-copy
45
+ licenses:
46
+ - MIT
47
+ metadata: {}
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 2.2.0
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: Copy strategy for capistrano 3.x
68
+ test_files: []