capistrano-robo 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f9e6b8953e4aa2d7ad37cafb0e06d650f99917b8
4
+ data.tar.gz: 8b48d15195c519984fc4aecf44ffe025ce06a283
5
+ SHA512:
6
+ metadata.gz: 24c72082d8c4f1879e8cccb0782ecd0d5a6e311d74bef3609500c279ddda90cc65835f66d4769664f8297ab6b9b055e70991ba9e6d50add7a65793ff9089b8d9
7
+ data.tar.gz: 46e6dbdb0d6084716fd60889acb315a8b4280f55c067c8c0ba8d9132ec87ebef50ab2e397a02a6c4148fe17cdb67093533150e65df2005a372cb3d98353107c1
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-robo.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Eduardo Sampaio
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # Capistrano::Robo
2
+
3
+ This gem will let you run [Robo](http://robo.li/) tasks with Capistrano 3.x.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```bash
10
+ gem 'capistrano', '~> 3.1'
11
+ gem 'capistrano-robo'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ ```
17
+ $ bundle install
18
+ ```
19
+
20
+ 2. Add to `Capfile` or `config/deploy.rb`:
21
+
22
+ ```ruby
23
+ require 'capistrano/robo'
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ To run tasks:
29
+
30
+ ```ruby
31
+ after :updated, :test do
32
+ invoke :robo, 'test'
33
+ end
34
+ ```
35
+
36
+ You can pass additional parameters if needed:
37
+
38
+ ```ruby
39
+ after :updated, :migrate do
40
+ invoke :robo, 'migrations:migrate production'
41
+ end
42
+ ```
43
+
44
+ The above would be equivalent of running the following from the command line:
45
+
46
+ ```bash
47
+ robo migrations:migrate production
48
+ ```
49
+
50
+ ## Configuration
51
+
52
+ To specify where the Robo executable is, use the `:robo_exec` option:
53
+
54
+ ```ruby
55
+ set :robo_exec, 'bin/robo'
56
+ ```
57
+
58
+ Configurable options:
59
+
60
+ ```ruby
61
+ set :robo_exec, 'robo' # default
62
+ set :robo_flags, '-v' # default
63
+ set :robo_roles, :all # default
64
+ set :robo_target_path, -> { release_path } # default
65
+ ```
66
+
67
+ ## Contributing
68
+
69
+ 1. Fork it
70
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
71
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
72
+ 4. Push to the branch (`git push origin my-new-feature`)
73
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -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 'capistrano/robo/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "capistrano-robo"
8
+ spec.version = Capistrano::Robo::VERSION
9
+ spec.authors = ["Eduardo Sampaio"]
10
+ spec.email = ["eduardo@sampa.io"]
11
+ spec.summary = %q{Robo support for Capistrano 3.X}
12
+ spec.description = %q{Add the capability to run Robo tasks on Capistrano 3.X}
13
+ spec.homepage = "https://github.com/esampaio/capistrano-robo"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
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 'capistrano', '~> 3.0'
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.7"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ end
@@ -0,0 +1,37 @@
1
+ desc <<-DESC
2
+ Run Robo tasks. By default, it runs with no task specified, which \
3
+ means the default Robo task will be run.
4
+
5
+ You can override any of these defaults by setting the variables shown below.
6
+
7
+ set :robo_exec, 'robo'
8
+ set :robo_target_path, release_path
9
+ set :robo_roles, :all
10
+ set :robo_flags, '-v'
11
+ DESC
12
+ task :robo, :task_name do |t, args|
13
+ fail ArgumentError.new('The robo task needs an argument, none passed.') unless args[:task_name]
14
+ on roles fetch(:robo_roles) do
15
+ within fetch(:robo_target_path, release_path) do
16
+ options = [fetch(:robo_flags)]
17
+ options << args[:task_name]
18
+
19
+ execute :robo, options
20
+ end
21
+ end
22
+ end
23
+
24
+ SSHKit.config.command_map[:robo] = proc {fetch(:robo_exec)}
25
+
26
+ namespace :robo do
27
+ task default: :robo
28
+ end
29
+
30
+ namespace :load do
31
+ task :defaults do
32
+ set :robo_exec, 'robo'
33
+ set :robo_target_path, nil
34
+ set :robo_roles, :all
35
+ set :robo_flags, '-v'
36
+ end
37
+ end
@@ -0,0 +1,5 @@
1
+ module Capistrano
2
+ module Robo
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,2 @@
1
+ require 'capistrano/robo/version'
2
+ load File.expand_path('../robo/robo.rake', __FILE__)
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-robo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Eduardo Sampaio
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.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.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description: Add the capability to run Robo tasks on Capistrano 3.X
56
+ email:
57
+ - eduardo@sampa.io
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - capistrano-robo.gemspec
68
+ - lib/capistrano/robo.rb
69
+ - lib/capistrano/robo/robo.rake
70
+ - lib/capistrano/robo/version.rb
71
+ homepage: https://github.com/esampaio/capistrano-robo
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: Robo support for Capistrano 3.X
95
+ test_files: []