capistrano-upload-archive 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: ce4e4a47475ba1793d301723deea204e02226581
4
+ data.tar.gz: ef09f411f1d05ae4a729d80aeef7c8ceb6f9594b
5
+ SHA512:
6
+ metadata.gz: a146df54eea21a89acc2673f70c4415c2fc9713ebdc3690c72ca61a5a8fac6107d5b87e2112345a5e8324dae5887b4f98992b30b9a0de5f9e158cadd6a78f3ed
7
+ data.tar.gz: b215ac830fd78039e15a937da7bb5ba18d48ba568b0f56c4a5d85907a08d4592b1f196ea911d4a6da297c22a8de78ce483fbecddf2f34a3598986daa43aa28ae
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ .idea/
2
+ .DS_Store
3
+ *.gem
4
+ *.rbc
5
+ .bundle
6
+ .config
7
+ .yardoc
8
+ Gemfile.lock
9
+ InstalledFiles
10
+ _yardoc
11
+ coverage
12
+ doc/
13
+ lib/bundler/man
14
+ pkg
15
+ rdoc
16
+ spec/reports
17
+ test/tmp
18
+ test/version_tmp
19
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-scm-passthrough.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Simo Kinnunen
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ capistrano-upload-archive
2
+ =========================
3
+
4
+ Uploads archive
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,18 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.name = "capistrano-upload-archive"
5
+ gem.version = "0.0.1"
6
+ gem.authors = ["Simonas Serlinskas"]
7
+ gem.email = ["simonas.serlinskas@gmail.com"]
8
+ gem.homepage = "https://github.com/saimaz/capistrano-upload-archive"
9
+ gem.summary = %q{Archive upload strategy for Capistrano.}
10
+ gem.description = %q{Provides an :upload strategy. Sometimes is usefull to sent only archive file to remote server with capistrano.}
11
+
12
+ gem.files = `git ls-files`.split($/)
13
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
14
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
+ gem.require_paths = ["lib"]
16
+
17
+ gem.add_dependency('capistrano', '>=2.15.0')
18
+ end
@@ -0,0 +1,38 @@
1
+ require 'capistrano/recipes/deploy/strategy/base'
2
+
3
+ module Capistrano
4
+ module Deploy
5
+ module Strategy
6
+
7
+ # This class implements a strategy for deployments with prebuilt
8
+ # packages. It copies the package to each target host and uncompresses
9
+ # it to the release directory. While normally discouraged, you
10
+ # usually want to use the :none SCM with this strategy (or for even less
11
+ # overhead, the :passthrough SCM from capistrano-deploy-scm-passthrough).
12
+ # You'll also need to set :repository to the target archive.
13
+ #
14
+ # set :scm, :none
15
+ # set :deploy_via, :upload
16
+ # set :repository, "target/#{application}.tar.gz"
17
+ #
18
+ # This strategy is meant to be a drop-in replacement for the :copy
19
+ # strategy.
20
+ class Upload < Base
21
+ # Copies the package to all target servers, and uncompresses it on
22
+ # each of them into the deployment directory.
23
+ def deploy!
24
+ distribute!
25
+ end
26
+
27
+ private
28
+ # Distributes the file to the remote hosts.
29
+ def distribute!
30
+ args = [ filename, remote_filename ]
31
+ args << { :via => configuration[:copy_via] } if configuration[:copy_via]
32
+ upload(*args)
33
+ end
34
+ end
35
+
36
+ end
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-upload-archive
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Simonas Serlinskas
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-17 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: 2.15.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 2.15.0
27
+ description: Provides an :upload strategy. Sometimes is usefull to sent only archive
28
+ file to remote server with capistrano.
29
+ email:
30
+ - simonas.serlinskas@gmail.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - .gitignore
36
+ - Gemfile
37
+ - LICENSE.txt
38
+ - README.md
39
+ - Rakefile
40
+ - capistrano-upload-archive.gemspec
41
+ - lib/capistrano/recipes/deploy/strategy/upload.rb
42
+ homepage: https://github.com/saimaz/capistrano-upload-archive
43
+ licenses: []
44
+ metadata: {}
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project:
61
+ rubygems_version: 2.1.11
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: Archive upload strategy for Capistrano.
65
+ test_files: []