capistrano-git-methods 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.
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/capistrano-git-methods.gemspec +24 -0
- data/lib/capistrano-git-methods.rb +34 -0
- data/lib/capistrano-git-methods/version.rb +7 -0
- metadata +52 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
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-git-methods/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "capistrano-git-methods"
|
7
|
+
s.version = Capistrano::Git::Methods::VERSION
|
8
|
+
s.authors = ["Emil Kampp"]
|
9
|
+
s.email = ["emiltk@benjamin.dk"]
|
10
|
+
s.homepage = "http://emil.kampp.me"
|
11
|
+
s.summary = %q{Capistrano git methods}
|
12
|
+
s.description = %q{Contains a git namespace with methods for deploying to a single folder using git as the versioning tool instead of the buildin capistrano versioning}
|
13
|
+
|
14
|
+
s.rubyforge_project = "capistrano-git-methods"
|
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 "rest-client"
|
24
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "capistrano-git-methods/version"
|
2
|
+
Capistrano::Configuration.instance.load do
|
3
|
+
namespace :git do
|
4
|
+
desc "Setup your git-based deployment app"
|
5
|
+
task :setup, :except => { :no_release => true } do
|
6
|
+
dirs = [deploy_to, shared_path]
|
7
|
+
dirs += shared_children.map { |d| File.join(shared_path, d) }
|
8
|
+
run "#{try_sudo} mkdir -p #{dirs.join(' ')} && #{try_sudo} chmod g+w #{dirs.join(' ')}"
|
9
|
+
run "git clone #{repository} #{current_path}"
|
10
|
+
end
|
11
|
+
|
12
|
+
desc "Update the deployed code."
|
13
|
+
task :update_code, :except => { :no_release => true } do
|
14
|
+
run "cd #{current_path}; git fetch origin; git reset --hard #{branch}"
|
15
|
+
finalize_update
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "Installs the bundle gems"
|
19
|
+
task :bundle, :except => { :no_release => true } do
|
20
|
+
run "cd #{current_path}; bundle --deployment --without test --without development"
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "Moves the repo back to the previous version of HEAD"
|
24
|
+
task :repo, :except => { :no_release => true } do
|
25
|
+
set :branch, "HEAD@{1}"
|
26
|
+
deploy.default
|
27
|
+
end
|
28
|
+
|
29
|
+
desc "Rewrite reflog so HEAD@{1} will continue to point to at the next previous release."
|
30
|
+
task :cleanup, :except => { :no_release => true } do
|
31
|
+
run "cd #{current_path}; git reflog delete --rewrite HEAD@{1}; git reflog delete --rewrite HEAD@{1}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-git-methods
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Emil Kampp
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-23 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description: Contains a git namespace with methods for deploying to a single folder
|
15
|
+
using git as the versioning tool instead of the buildin capistrano versioning
|
16
|
+
email:
|
17
|
+
- emiltk@benjamin.dk
|
18
|
+
executables: []
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- .gitignore
|
23
|
+
- Gemfile
|
24
|
+
- Rakefile
|
25
|
+
- capistrano-git-methods.gemspec
|
26
|
+
- lib/capistrano-git-methods.rb
|
27
|
+
- lib/capistrano-git-methods/version.rb
|
28
|
+
homepage: http://emil.kampp.me
|
29
|
+
licenses: []
|
30
|
+
post_install_message:
|
31
|
+
rdoc_options: []
|
32
|
+
require_paths:
|
33
|
+
- lib
|
34
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
requirements: []
|
47
|
+
rubyforge_project: capistrano-git-methods
|
48
|
+
rubygems_version: 1.8.15
|
49
|
+
signing_key:
|
50
|
+
specification_version: 3
|
51
|
+
summary: Capistrano git methods
|
52
|
+
test_files: []
|