mina-mercurial 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +44 -0
- data/Rakefile +1 -0
- data/lib/mina/mercurial.rb +1 -0
- data/lib/mina/mercurial/tasks.rake +54 -0
- data/lib/mina/mercurial/version.rb +5 -0
- data/mina-mercurial.gemspec +25 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e14c63e0f5e8bbbc29dc0d4e12b428c70db36e46
|
4
|
+
data.tar.gz: cf56216d04dcb622b8f9a2e226b82dcd5fa5601b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f1c42600287cc4e04ae19929b9cad333636d6b65de8cd673028e0070ddc1e71da93d209410d6d1347748470fbcc0f4655bd013c5303eddd642ecb63701e834e9
|
7
|
+
data.tar.gz: 5e88943484cd27f5dad3a3e157c173be63bf5b23937a6b1d2da2dec3a1dcef45ff5f570bea4e3bea69728edae42a80b4c0bc6c5fa812ff74fcf05f5d562a9869
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Vladimir Zyablitskiy
|
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.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# mina-mercurial
|
2
|
+
|
3
|
+
#### [Mina][1] tasks for handle with [Mercurial][1].
|
4
|
+
|
5
|
+
This gem provide mina task:
|
6
|
+
|
7
|
+
mina mercurial:clone # clone remote repository to build path
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'mina-mercurial', :require => false
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install mina-mercurial
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Add this to your `config/deploy.rb` file:
|
26
|
+
|
27
|
+
require 'mina/mercurial'
|
28
|
+
|
29
|
+
Add *optional* parameters in your `config/deploy.rb`:
|
30
|
+
|
31
|
+
* `branch` - repository branch
|
32
|
+
* `revison` - repository revision (using instead `branch`)
|
33
|
+
|
34
|
+
## Contributing
|
35
|
+
|
36
|
+
1. Fork it
|
37
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
38
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
39
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
40
|
+
5. Create new Pull Request
|
41
|
+
|
42
|
+
|
43
|
+
[1]: https://github.com/mina-deploy/mina
|
44
|
+
[2]: http://mercurial.selenic.com/
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path("../mercurial/tasks.rake", __FILE__)
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# # Modules: Mercural
|
4
|
+
# Adds settings and tasks related to managing Mercurial.
|
5
|
+
#
|
6
|
+
# require 'mina/mercurial'
|
7
|
+
|
8
|
+
# ## Settings
|
9
|
+
# Any and all of these settings can be overriden in your `deploy.rb`.
|
10
|
+
|
11
|
+
# ### branch
|
12
|
+
# Sets the branch to be deployed.
|
13
|
+
|
14
|
+
set_default :branch, 'default'
|
15
|
+
|
16
|
+
namespace :mercurial do
|
17
|
+
# ## Deploy tasks
|
18
|
+
# These tasks are meant to be invoked inside deploy scripts, not invoked on
|
19
|
+
# their own.
|
20
|
+
|
21
|
+
# ### mercurial:clone
|
22
|
+
# Clones the Mercurial repository. Meant to be used inside a deploy script.
|
23
|
+
|
24
|
+
desc "Clones the Mercurial repository to the release path."
|
25
|
+
task :clone do
|
26
|
+
if commit?
|
27
|
+
error "The Mercurial option `:commit` has now not supported."
|
28
|
+
error "Please use `:revision` or `:branch` instead."
|
29
|
+
exit
|
30
|
+
end
|
31
|
+
|
32
|
+
clone = if revision?
|
33
|
+
%[
|
34
|
+
echo "-----> Using mercurial commit '#{revision}'" &&
|
35
|
+
#{echo_cmd %[mercurial clone "#{repository!}" -r #{revision} .]}
|
36
|
+
]
|
37
|
+
else
|
38
|
+
%{
|
39
|
+
echo "-----> Cloning the Mercurial repository" &&
|
40
|
+
#{echo_cmd %[hg clone "#{repository!}" -r #{branch} .]}
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
status = %[
|
45
|
+
echo "-----> Using this mercurial revision" &&
|
46
|
+
echo &&
|
47
|
+
#{echo_cmd %[hg log -l 1]} &&
|
48
|
+
#{echo_cmd %[rm -rf .hg]} &&
|
49
|
+
echo
|
50
|
+
]
|
51
|
+
|
52
|
+
queue clone + status
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mina/mercurial/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'mina-mercurial'
|
8
|
+
spec.version = Mina::Mercurial::VERSION
|
9
|
+
spec.authors = ['Vladimir Zyablitskiy']
|
10
|
+
spec.email = ['zyablitskiy@gmail.com']
|
11
|
+
spec.description = %q{Mercurial tasks for Mina}
|
12
|
+
spec.summary = %q{Mercurial tasks for Mina}
|
13
|
+
spec.homepage = 'https://github.com/rainlabs/mina-mercurial'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'mina'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
|
+
spec.add_development_dependency 'rake'
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mina-mercurial
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vladimir Zyablitskiy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: mina
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Mercurial tasks for Mina
|
56
|
+
email:
|
57
|
+
- zyablitskiy@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
64
|
+
- LICENSE
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- lib/mina/mercurial.rb
|
68
|
+
- lib/mina/mercurial/tasks.rake
|
69
|
+
- lib/mina/mercurial/version.rb
|
70
|
+
- mina-mercurial.gemspec
|
71
|
+
homepage: https://github.com/rainlabs/mina-mercurial
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.2.2
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: Mercurial tasks for Mina
|
95
|
+
test_files: []
|