capistrano-git-local 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.
- data/.gitignore +36 -0
- data/LICENSE +21 -0
- data/README.md +26 -0
- data/capistrano-git-local.gemspec +22 -0
- data/lib/capistrano-git-local.rb +0 -0
- data/lib/capistrano/git-local.cap +67 -0
- metadata +68 -0
data/.gitignore
ADDED
@@ -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.
|
data/README.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
capistrano-git-local
|
2
|
+
=================================
|
3
|
+
|
4
|
+
Git scm which works on local for Capistrano 3
|
5
|
+
|
6
|
+
[](http://badge.fury.io/rb/capistrano-git-local)
|
7
|
+
|
8
|
+
Capfile
|
9
|
+
```ruby
|
10
|
+
require 'capistrano/git-local'
|
11
|
+
```
|
12
|
+
|
13
|
+
Gemfile
|
14
|
+
```ruby
|
15
|
+
gem 'capistrano-git-local', '~> 0.1', :github => 'i-ekho/capistrano-git-local'
|
16
|
+
```
|
17
|
+
OR
|
18
|
+
```ruby
|
19
|
+
source 'https://rubygems.org'
|
20
|
+
gem 'capistrano-git-local', '~> 0.1'
|
21
|
+
```
|
22
|
+
|
23
|
+
deploy.rb
|
24
|
+
```ruby
|
25
|
+
set :scm, :git_local
|
26
|
+
```
|
@@ -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-local"
|
7
|
+
gem.version = '0.1.0'
|
8
|
+
gem.authors = ["Boris Gorbylev"]
|
9
|
+
gem.email = ["ekho@ekho.name"]
|
10
|
+
gem.description = %q{Git scm which works on local host}
|
11
|
+
gem.summary = %q{Operate with git locally}
|
12
|
+
gem.homepage = "http://github.com/i-ekho/capistrano-git-local"
|
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
|
File without changes
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'capistrano/git'
|
2
|
+
|
3
|
+
namespace :git_local do
|
4
|
+
|
5
|
+
def strategy
|
6
|
+
@strategy ||= Capistrano::Git.new(self, fetch(:git_strategy, Capistrano::Git::DefaultStrategy))
|
7
|
+
end
|
8
|
+
|
9
|
+
desc 'Check that the repository is reachable'
|
10
|
+
task :check do |task|
|
11
|
+
run_locally do debug "Task #{task}" end
|
12
|
+
|
13
|
+
fetch(:branch)
|
14
|
+
run_locally do
|
15
|
+
exit 1 unless strategy.check
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
desc 'Clone the repo to the cache'
|
20
|
+
task :clone do |task|
|
21
|
+
run_locally do debug "Task #{task}" end
|
22
|
+
|
23
|
+
run_locally do
|
24
|
+
if strategy.test
|
25
|
+
info t(:mirror_exists, at: repo_path)
|
26
|
+
else
|
27
|
+
within deploy_path do
|
28
|
+
strategy.clone
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
desc 'Update the repo mirror to reflect the origin state'
|
35
|
+
task :update => :clone do |task|
|
36
|
+
run_locally do debug "Task #{task}" end
|
37
|
+
run_locally do
|
38
|
+
within repo_path do
|
39
|
+
strategy.update
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
desc 'Copy repo to releases'
|
45
|
+
task :create_release => :update do |task|
|
46
|
+
run_locally do debug "Task #{task}" end
|
47
|
+
|
48
|
+
run_locally do
|
49
|
+
within repo_path do
|
50
|
+
execute :mkdir, '-p', release_path
|
51
|
+
strategy.release
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
desc 'Determine the revision that will be deployed'
|
57
|
+
task :set_current_revision do |task|
|
58
|
+
run_locally do debug "Task #{task}" end
|
59
|
+
|
60
|
+
run_locally do
|
61
|
+
within repo_path do
|
62
|
+
set :current_revision, strategy.fetch_revision
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
metadata
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-git-local
|
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-26 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 scm which works on local host
|
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-local.gemspec
|
41
|
+
- lib/capistrano-git-local.rb
|
42
|
+
- lib/capistrano/git-local.cap
|
43
|
+
homepage: http://github.com/i-ekho/capistrano-git-local
|
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: Operate with git locally
|
68
|
+
test_files: []
|