capistrano-git-methods 0.0.1 → 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 CHANGED
@@ -3,3 +3,4 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  .Ds_Store
6
+ .rvmrc
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ ## v 0.0.2: Better abstractions
2
+
3
+ The namespace has been updated to *not* contain the `bundle` method.
4
+ Also the `rollback.repo` method doesn't callback to the default namespace.
5
+
6
+ ## v 0.0.1: Initial release
7
+
8
+ This is the initial release, and contains very basic usage.
data/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # Capistrano git methods
2
+
3
+ This is a namespace containing methods for maintaining a remote server through git instead of the standard capistrano way.
4
+
5
+ ## Usage
6
+
7
+ Including this gem with `require `capistrano-git-methods` in your recipe gives access to the `git.<method>` methods.
8
+
9
+ ## Methods
10
+
11
+ There is the following methods available:
12
+
13
+ * `setup` clones the repository onto the server, and should be done when doing a cold deploy.
14
+ * `update_code` updates the remote code to match the latest head in the given `branch`.
15
+ * `repo` sets the branch to the current head of the remote version of the code.
16
+ * `cleanup` cleans up after the git processes.
data/Rakefile CHANGED
@@ -1 +1,5 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ task :default do
4
+ puts "Default rake task.."
5
+ end
@@ -18,7 +18,9 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- # specify any dependencies here; for example:
22
- # s.add_development_dependency "rspec"
23
- # s.add_runtime_dependency "rest-client"
21
+ s.add_development_dependency "rspec"
22
+ s.add_development_dependency "git"
23
+ s.add_development_dependency "rake"
24
+ s.add_development_dependency "yard"
25
+ s.add_runtime_dependency "git"
24
26
  end
@@ -1,29 +1,49 @@
1
1
  require "capistrano-git-methods/version"
2
+
3
+ #
4
+ # Extends the capistrano configuration, to allow the <tt>git</tt> namespace to
5
+ # be available within the capistrano recipe.
6
+ #
7
+ # == Requirements
8
+ #
9
+ # This requires the <tt>current_path</tt> variable to be present. This should
10
+ # already be available in the standard capistrano deploy scheme.
11
+ #
2
12
  Capistrano::Configuration.instance.load do
13
+
14
+ #
15
+ # Sets some default values, if they have not been set
16
+ #
17
+ _cset :branch, "master"
18
+
3
19
  namespace :git do
20
+
21
+ #
22
+ # Clones the repository onto the remote server.
23
+ #
24
+ # This is required before you can run the <tt>update_code</tt> method
25
+ # successfully.
26
+ #
4
27
  desc "Setup your git-based deployment app"
5
28
  task :setup, :except => { :no_release => true } do
6
29
  dirs = [deploy_to, shared_path]
7
30
  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(' ')}"
31
+ run "mkdir -p #{dirs.join(' ')} && chmod g+w #{dirs.join(' ')}"
9
32
  run "git clone #{repository} #{current_path}"
10
33
  end
11
34
 
35
+ #
36
+ # Updates the remote code to the latest head of the selected
37
+ # git branch.
38
+ #
12
39
  desc "Update the deployed code."
13
40
  task :update_code, :except => { :no_release => true } do
14
41
  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
42
  end
22
43
 
23
44
  desc "Moves the repo back to the previous version of HEAD"
24
45
  task :repo, :except => { :no_release => true } do
25
46
  set :branch, "HEAD@{1}"
26
- deploy.default
27
47
  end
28
48
 
29
49
  desc "Rewrite reflog so HEAD@{1} will continue to point to at the next previous release."
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module Git
3
3
  module Methods
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-git-methods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,63 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-23 00:00:00.000000000Z
13
- dependencies: []
12
+ date: 2012-01-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &70346812320280 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70346812320280
25
+ - !ruby/object:Gem::Dependency
26
+ name: git
27
+ requirement: &70346812318860 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *70346812318860
36
+ - !ruby/object:Gem::Dependency
37
+ name: rake
38
+ requirement: &70346812315420 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70346812315420
47
+ - !ruby/object:Gem::Dependency
48
+ name: yard
49
+ requirement: &70346812314040 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70346812314040
58
+ - !ruby/object:Gem::Dependency
59
+ name: git
60
+ requirement: &70346812313280 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *70346812313280
14
69
  description: Contains a git namespace with methods for deploying to a single folder
15
70
  using git as the versioning tool instead of the buildin capistrano versioning
16
71
  email:
@@ -20,7 +75,9 @@ extensions: []
20
75
  extra_rdoc_files: []
21
76
  files:
22
77
  - .gitignore
78
+ - CHANGELOG.md
23
79
  - Gemfile
80
+ - README.md
24
81
  - Rakefile
25
82
  - capistrano-git-methods.gemspec
26
83
  - lib/capistrano-git-methods.rb
@@ -45,8 +102,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
102
  version: '0'
46
103
  requirements: []
47
104
  rubyforge_project: capistrano-git-methods
48
- rubygems_version: 1.8.15
105
+ rubygems_version: 1.8.10
49
106
  signing_key:
50
107
  specification_version: 3
51
108
  summary: Capistrano git methods
52
109
  test_files: []
110
+ has_rdoc: