capistrano-scm-tar 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e4e76ed8bf48cd04e82ebdd3e060193f1a2b9524
4
+ data.tar.gz: 611c481c29144bc1ec9d77338a85f2d8d794804d
5
+ SHA512:
6
+ metadata.gz: 9207f7d86db8d50318a65b3767c47f73f60ce5cb696e9705cc48997d0b08378c06256c4c53345b974b0d703b8acad23cb36671faf9cd80edd292953785bd325c
7
+ data.tar.gz: af73a920460e5d58ee05f92ed9afbc5db3b873a5b5f626ff7a075bb6f4f771bec2f09db25c4d24150f8f65ff955ccd570aac9397adb11ca5991978c80b4bb890
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-scm-tar.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 ziguzagu
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.
@@ -0,0 +1,38 @@
1
+ # capistrano-scm-tar
2
+
3
+ A tar strategy for Capistrano 3 to deploy tarball.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'capistrano-scm-tar'
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Set `tar` as `scm` option in your `config/deploy.rb`:
16
+
17
+ ```ruby
18
+ set :scm, :tar
19
+ ```
20
+
21
+ Build a release package of your project and upload it to the server you run capistrano:
22
+
23
+ ```shell
24
+ tar czf /tmp/v1.0.0.tar.gz *
25
+ scp /tmp/v1.0.0.tar.gz example.com:/tmp/v1.0.0.tar.gz
26
+ ```
27
+
28
+ And then, deploy it:
29
+
30
+ ```shell
31
+ cap deploy package=/tmp/v1.0.0.tar.gz
32
+ ```
33
+
34
+ The basename of tarball is used for the revision number of capistrano setting by `set_current_revision`.
35
+
36
+ ## License
37
+
38
+ The MIT License (MIT)
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'capistrano/scm/tar/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "capistrano-scm-tar"
8
+ spec.version = Capistrano::Scm::Tar::VERSION
9
+ spec.authors = ["ziguzagu"]
10
+ spec.email = ["ziguzagu@gmail.com"]
11
+ spec.summary = %q{A tar strategy for Capistrano 3 to deploy tarball.}
12
+ spec.description = %q{A tar strategy for Capistrano 3 to deploy tarball.}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "capistrano", "~> 3.0"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.6"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ end
@@ -0,0 +1,9 @@
1
+ require "capistrano/scm/tar/version"
2
+
3
+ module Capistrano
4
+ module Scm
5
+ module Tar
6
+ # Your code goes here...
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ module Capistrano
2
+ module Scm
3
+ module Tar
4
+ VERSION = "0.0.1"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path('../tasks/tar.rake', __FILE__)
@@ -0,0 +1,31 @@
1
+ # -*- mode: ruby -*-
2
+ namespace :tar do
3
+
4
+ task :create_release do
5
+ if ! ENV['package']
6
+ abort "require 'package=<path/to/archive.tar.gz>' environment variable by tar scm"
7
+ end
8
+
9
+ on release_roles :all do
10
+ pkg = ENV['package']
11
+ rev = File.basename(pkg).split('.')[0]
12
+ tmp = capture 'mktemp'
13
+
14
+ # upload tarball
15
+ upload! pkg, tmp
16
+
17
+ # expand tarball
18
+ execute :mkdir, '-p', release_path
19
+ execute :tar, '-xzpf', tmp, '-C', release_path
20
+ set :current_revision, rev
21
+
22
+ # cleanup
23
+ execute :rm, tmp
24
+ end
25
+ end
26
+
27
+ task :check
28
+ task :set_current_revision
29
+
30
+ end
31
+
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-scm-tar
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - ziguzagu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-16 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
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description: A tar strategy for Capistrano 3 to deploy tarball.
56
+ email:
57
+ - ziguzagu@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - capistrano-scm-tar.gemspec
68
+ - lib/capistrano/scm/tar.rb
69
+ - lib/capistrano/scm/tar/version.rb
70
+ - lib/capistrano/tar.rb
71
+ - lib/capistrano/tasks/tar.rake
72
+ homepage: ''
73
+ licenses:
74
+ - MIT
75
+ metadata: {}
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubyforge_project:
92
+ rubygems_version: 2.2.2
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: A tar strategy for Capistrano 3 to deploy tarball.
96
+ test_files: []