capistrano-simplegit 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14dce731d171bae80af51603497ec63456c8875a
4
- data.tar.gz: 530726c1d96a77132132773f882cabd497073392
3
+ metadata.gz: f24dcb5bde051a9f5de821aa4b8b5cdef47ff818
4
+ data.tar.gz: c425c2658c67acc89db19ee3b3224a2be8122453
5
5
  SHA512:
6
- metadata.gz: 850ae85c4e18e9b5d5b2ce48bf615b96e10a914611a9f4e4a8936f546429e229b028b6eac25160248ad8a4eb22a26b43ad4daa0657824bbd297ce52d29ed0b89
7
- data.tar.gz: b32ddb66db740b8251e39026e52883209ab8940128ef690b3ad8f02019a911d00bba04f37592bed8f7e2e8aba2164422d825ee9924bb141d58dfc58a17ec200a
6
+ metadata.gz: f9a2fc23b662a38e855d7a5bb05161c7a5a8418b08e63e4097b1d0d7f6ba34407d192cd9669f9a2f05370deee2a52d508b00ec0101c0086cb434b727d7fb280b
7
+ data.tar.gz: a784f0ab7921902d259825a6f563e89fa23b65d09946f55e2c4abb6879214d5c7842e93a6d4ba07c8f6c94a108c9eb1735557a413d70c8cf399cd93632803045
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .DS_*
2
+ *.gem
@@ -0,0 +1,24 @@
1
+ 76859# coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'capistrano-simplegit'
7
+ spec.version = '0.0.4'
8
+ spec.authors = ['Ross Riley']
9
+ spec.email = ['riley.ross@gmail.com']
10
+ spec.description = %q{A simple Git Deploy Command for Capistrano 3.x}
11
+ spec.summary = %q{A simple Git Deploy Command for Capistrano 3.x}
12
+ spec.homepage = 'https://github.com/rossriley/capistrano-simplegit'
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
19
+
20
+ spec.add_dependency 'capistrano', '>= 3.1.0'
21
+
22
+ spec.add_development_dependency 'bundler', '~> 1.3'
23
+ spec.add_development_dependency 'rake'
24
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path('../tasks/simplegit.rake', __FILE__)
@@ -0,0 +1,39 @@
1
+ namespace :simplegit do
2
+
3
+ desc 'Perform a simple git checkout deploy'
4
+ task :deploy do
5
+
6
+ on roles :all do
7
+ info "--> Deploy from #{fetch(:repository)} on branch #{fetch(:branch)}"
8
+
9
+ begin
10
+ execute "ls #{fetch(:deploy_to)}/.git"
11
+ rescue
12
+ invoke 'simplegit:prepare'
13
+ end
14
+
15
+ info "--> Updating code from remote repository"
16
+
17
+ begin
18
+ execute "cd #{fetch(:deploy_to)} && git fetch"
19
+ rescue
20
+ error "Unable to connect to remote repository, check your configuration, and that a valid ssh key exists for remote server."
21
+ exit
22
+ end
23
+
24
+ begin
25
+ execute "cd #{fetch(:deploy_to)} && git show-branch #{fetch(:branch)} && git checkout #{fetch(:branch)} ; git reset --hard origin/#{fetch(:branch)}"
26
+ rescue
27
+ execute "cd #{fetch(:deploy_to)} && git checkout -b #{fetch(:branch)} origin/#{fetch(:branch)} ;"
28
+ end
29
+ execute "git submodule update --init --recursive"
30
+ end
31
+ end
32
+
33
+ desc 'Performs the initial setup and fetch of the repo'
34
+ task :prepare do
35
+ execute "cd #{fetch(:deploy_to)} && git init"
36
+ execute "cd #{fetch(:deploy_to)} && git remote add origin #{fetch(:repository)}"
37
+ end
38
+
39
+ end
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-simplegit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Riley
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0.pre
19
+ version: 3.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.0.pre
26
+ version: 3.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,12 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - .gitignore
62
63
  - README.md
64
+ - capistrano-simplegit.gemspec
65
+ - lib/capistrano-simplegit.rb
66
+ - lib/capistrano/simplegit.rb
67
+ - lib/capistrano/tasks/simplegit.rake
63
68
  homepage: https://github.com/rossriley/capistrano-simplegit
64
69
  licenses:
65
70
  - MIT