capistrano-git-submodule-strategy 0.1.0

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.
@@ -0,0 +1,36 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ # Gemfile.lock
30
+ # .ruby-version
31
+ # .ruby-gemset
32
+
33
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
+ .rvmrc
35
+
36
+ /.idea/
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Boris Gorbylev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,22 @@
1
+ capistrano-git-submodule-strategy
2
+ =================================
3
+
4
+ Git submodule support for Capistrano 3
5
+
6
+ [![Gem Version](https://badge.fury.io/rb/capistrano-git-submodule-strategy.svg)](http://badge.fury.io/rb/capistrano-git-submodule-strategy)
7
+
8
+ Capfile
9
+ ```ruby
10
+ require 'capistrano/git-submodule-strategy'
11
+ ```
12
+
13
+ Gemfile
14
+ ```ruby
15
+ gem 'capistrano-git-submodule-strategy', '~> 0.1', :github => 'i-ekho/capistrano-git-submodule-strategy'
16
+ ```
17
+
18
+ deploy.rb
19
+ ```ruby
20
+ set :scm, :git
21
+ set :git_strategy, Capistrano::Git::SubmoduleStrategy
22
+ ```
@@ -0,0 +1,22 @@
1
+ # -*- encoding: 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 |gem|
6
+ gem.name = "capistrano-git-submodule-strategy"
7
+ gem.version = '0.1.0'
8
+ gem.authors = ["Boris Gorbylev"]
9
+ gem.email = ["ekho@ekho.name"]
10
+ gem.description = %q{Git submodule support for Capistrano 3}
11
+ gem.summary = %q{Git submodule support for Capistrano 3}
12
+ gem.homepage = "http://github.com/i-ekho/capistrano-git-submodule-strategy"
13
+
14
+ gem.files = `git ls-files`.split($/)
15
+ # no tests as of yet
16
+ # gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
+ gem.require_paths = ["lib"]
18
+
19
+ gem.licenses = ['MIT']
20
+
21
+ gem.add_dependency 'capistrano', '~> 3.1'
22
+ end
@@ -0,0 +1,33 @@
1
+ require 'capistrano/git'
2
+
3
+ class Capistrano::Git
4
+ module SubmoduleStrategy
5
+ # do all the things a normal capistrano git session would do
6
+ include Capistrano::Git::DefaultStrategy
7
+
8
+ def test
9
+ test! " [ -d #{repo_path}/.git ] "
10
+ end
11
+
12
+ def check
13
+ test! :git, :'ls-remote', repo_url
14
+ end
15
+
16
+ def clone
17
+ git :clone, '-b', fetch(:branch), '--recursive', repo_url, repo_path
18
+ end
19
+
20
+ def update
21
+ git :remote, :update
22
+ end
23
+
24
+ # put the working tree in a release-branch,
25
+ # make sure the submodules are up-to-date
26
+ # and copy everything to the release path
27
+ def release
28
+ git :checkout, fetch(:branch)
29
+ git :submodule, :update, '--init', '--recursive'
30
+ context.execute "rsync -ar --exclude=.git\* #{repo_path}/ #{release_path}"
31
+ end
32
+ end
33
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-git-submodule-strategy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Boris Gorbylev
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-05-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: capistrano
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.1'
30
+ description: Git submodule support for Capistrano 3
31
+ email:
32
+ - ekho@ekho.name
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - .gitignore
38
+ - LICENSE
39
+ - README.md
40
+ - capistrano-git-submodule-strategy.gemspec
41
+ - lib/capistrano-git-submodule-strategy.rb
42
+ - lib/capistrano/capistrano-git-submodule-strategy.rb
43
+ homepage: http://github.com/i-ekho/capistrano-git-submodule-strategy
44
+ licenses:
45
+ - MIT
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 1.8.23
65
+ signing_key:
66
+ specification_version: 3
67
+ summary: Git submodule support for Capistrano 3
68
+ test_files: []