vlad-rainbows 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +18 -0
- data/README.md +4 -33
- data/Rakefile +2 -16
- data/lib/vlad/version.rb +5 -0
- data/vlad-rainbows.gemspec +15 -38
- metadata +27 -27
- data/.document +0 -5
- data/VERSION +0 -1
- data/lib/vlad/utils.rb +0 -38
data/.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
pkg
|
1
|
+
pkg/*
|
2
|
+
.bundle
|
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm ruby-1.9.2-p136@vlad-rainbows
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/README.md
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
# An opinionated Rainbows for Vlad
|
2
2
|
|
3
|
-
This plugin
|
4
|
-
|
5
|
-
* You have existing rake tasks to start/stop [Rainbows](http://rainbows.rubyforge.org/).
|
6
|
-
* Your target system(s) have a [system wide](http://rvm.beginrescueend.com/deployment/system-wide/) install of [RVM](http://rvm.beginrescueend.com/).
|
7
|
-
* Your application is [Rack](http://rack.rubyforge.org/) based, and makes use of the 'RACK_ENV' environment variable.
|
3
|
+
This plugin simply executes the tasks 'app:start' and 'app:stop' by 'run_rake'.
|
4
|
+
All of which are your responsibility to implement.
|
8
5
|
|
9
6
|
## Description
|
10
7
|
|
@@ -16,7 +13,7 @@ A [Vlad](http://rubyhitsquad.com/Vlad_the_Deployer.html) plugin for controlling
|
|
16
13
|
|
17
14
|
Add the following to your Gemfile.
|
18
15
|
|
19
|
-
gem "vlad-rainbows"
|
16
|
+
gem "vlad-rainbows"
|
20
17
|
|
21
18
|
## Usage
|
22
19
|
|
@@ -29,36 +26,10 @@ In your rake file do the following:
|
|
29
26
|
puts $!
|
30
27
|
end
|
31
28
|
|
32
|
-
This plugin assumes you have rake tasks to handle stopping/starting Rainbows. By default the tasks are named:
|
33
|
-
|
34
|
-
* app:start
|
35
|
-
* app:stop
|
36
|
-
|
37
|
-
The tasks can be overriden by updating deploy.rb with:
|
38
|
-
|
39
|
-
set :app_start_task, "task_name"
|
40
|
-
set :app_stop_task, "task_name"
|
41
|
-
|
42
|
-
The plugin provides a run_rake method for executing rake tasks remotely. If you wish to override the method's
|
43
|
-
implementation, provide a block to :run_rake_proc in deploy.rb.
|
44
|
-
|
45
|
-
set :run_rake_proc, Proc.new {
|
46
|
-
run [
|
47
|
-
"cd #{current_path}",
|
48
|
-
"#{rake_cmd} RACK_ENV=#{rack_env} #{task}",
|
49
|
-
]
|
50
|
-
}
|
51
|
-
|
52
|
-
You can also override the following defaults in deploy.rb:
|
53
|
-
|
54
|
-
* :rvmrc
|
55
|
-
* :rack_env
|
56
|
-
* :rake_cmd
|
57
|
-
|
58
29
|
## Credits
|
59
30
|
|
60
31
|
John Barnette's [vlad-git](https://github.com/jbarnette/vlad-git), for which this was based on.
|
61
32
|
|
62
33
|
## Copyright
|
63
34
|
|
64
|
-
Copyright
|
35
|
+
Copyright 2011 Vlad contributors, John Dewey (john@dewey.ws)
|
data/Rakefile
CHANGED
@@ -1,16 +1,2 @@
|
|
1
|
-
require "
|
2
|
-
|
3
|
-
|
4
|
-
begin
|
5
|
-
require "jeweler"
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "vlad-rainbows"
|
8
|
-
gem.summary = %Q{A Vlad plugin for controlling Rainbows.}
|
9
|
-
gem.email = "john@dewey.ws"
|
10
|
-
gem.homepage = "http://github.com/retr0h/vlad-rainbows"
|
11
|
-
gem.authors = ["retr0h"]
|
12
|
-
end
|
13
|
-
Jeweler::GemcutterTasks.new
|
14
|
-
rescue LoadError
|
15
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
16
|
-
end
|
1
|
+
require "bundler"
|
2
|
+
Bundler::GemHelper.install_tasks
|
data/lib/vlad/version.rb
ADDED
data/vlad-rainbows.gemspec
CHANGED
@@ -1,45 +1,22 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "vlad/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
6
|
+
s.name = "vlad-rainbows"
|
7
|
+
s.version = Vlad::Rainbows::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["retr0h"]
|
10
|
+
s.email = ["john@dewey.ws"]
|
11
|
+
s.homepage = "http://github.com/retr0h/vlad-rainbows"
|
12
|
+
s.summary = %Q{A Vlad plugin for controlling Rainbows.}
|
9
13
|
|
10
|
-
s.
|
11
|
-
s.authors = ["retr0h"]
|
12
|
-
s.date = %q{2010-11-04}
|
13
|
-
s.email = %q{john@dewey.ws}
|
14
|
-
s.extra_rdoc_files = [
|
15
|
-
"LICENSE",
|
16
|
-
"README.md"
|
17
|
-
]
|
18
|
-
s.files = [
|
19
|
-
".document",
|
20
|
-
".gitignore",
|
21
|
-
"LICENSE",
|
22
|
-
"README.md",
|
23
|
-
"Rakefile",
|
24
|
-
"VERSION",
|
25
|
-
"lib/vlad/rainbows.rb",
|
26
|
-
"lib/vlad/utils.rb",
|
27
|
-
"vlad-rainbows.gemspec"
|
28
|
-
]
|
29
|
-
s.homepage = %q{http://github.com/retr0h/vlad-rainbows}
|
30
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
31
|
-
s.require_paths = ["lib"]
|
32
|
-
s.rubygems_version = %q{1.3.7}
|
33
|
-
s.summary = %q{A Vlad plugin for controlling Rainbows.}
|
14
|
+
s.rubyforge_project = "vlad-rainbows"
|
34
15
|
|
35
|
-
|
36
|
-
|
37
|
-
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
38
20
|
|
39
|
-
|
40
|
-
else
|
41
|
-
end
|
42
|
-
else
|
43
|
-
end
|
21
|
+
s.add_dependency "hoe", "~> 2.9.1"
|
44
22
|
end
|
45
|
-
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vlad-rainbows
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 4
|
10
|
-
version: 0.1.4
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.5
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- retr0h
|
@@ -15,36 +10,47 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date:
|
13
|
+
date: 2011-02-08 00:00:00 -08:00
|
19
14
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: hoe
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 2.9.1
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
22
27
|
description:
|
23
|
-
email:
|
28
|
+
email:
|
29
|
+
- john@dewey.ws
|
24
30
|
executables: []
|
25
31
|
|
26
32
|
extensions: []
|
27
33
|
|
28
|
-
extra_rdoc_files:
|
29
|
-
|
30
|
-
- README.md
|
34
|
+
extra_rdoc_files: []
|
35
|
+
|
31
36
|
files:
|
32
|
-
- .document
|
33
37
|
- .gitignore
|
38
|
+
- .rvmrc
|
39
|
+
- Gemfile
|
40
|
+
- Gemfile.lock
|
34
41
|
- LICENSE
|
35
42
|
- README.md
|
36
43
|
- Rakefile
|
37
|
-
- VERSION
|
38
44
|
- lib/vlad/rainbows.rb
|
39
|
-
- lib/vlad/
|
45
|
+
- lib/vlad/version.rb
|
40
46
|
- vlad-rainbows.gemspec
|
41
47
|
has_rdoc: true
|
42
48
|
homepage: http://github.com/retr0h/vlad-rainbows
|
43
49
|
licenses: []
|
44
50
|
|
45
51
|
post_install_message:
|
46
|
-
rdoc_options:
|
47
|
-
|
52
|
+
rdoc_options: []
|
53
|
+
|
48
54
|
require_paths:
|
49
55
|
- lib
|
50
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -52,23 +58,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
52
58
|
requirements:
|
53
59
|
- - ">="
|
54
60
|
- !ruby/object:Gem::Version
|
55
|
-
hash: 3
|
56
|
-
segments:
|
57
|
-
- 0
|
58
61
|
version: "0"
|
59
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
63
|
none: false
|
61
64
|
requirements:
|
62
65
|
- - ">="
|
63
66
|
- !ruby/object:Gem::Version
|
64
|
-
hash: 3
|
65
|
-
segments:
|
66
|
-
- 0
|
67
67
|
version: "0"
|
68
68
|
requirements: []
|
69
69
|
|
70
|
-
rubyforge_project:
|
71
|
-
rubygems_version: 1.
|
70
|
+
rubyforge_project: vlad-rainbows
|
71
|
+
rubygems_version: 1.5.0
|
72
72
|
signing_key:
|
73
73
|
specification_version: 3
|
74
74
|
summary: A Vlad plugin for controlling Rainbows.
|
data/.document
DELETED
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.4
|
data/lib/vlad/utils.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# Utility Class which provides basic support to Vlad::Rainbows.
|
3
|
-
# If tasks tend to call these methods directly, it should probably
|
4
|
-
# spawn into it's own gem.
|
5
|
-
|
6
|
-
class Vlad::Utils
|
7
|
-
set :rake_cmd, Rake::RemoteTask.fetch(:rake_cmd, "bundle exec rake")
|
8
|
-
set :rvmrc, Rake::RemoteTask.fetch(:rvmrc, "/usr/local/lib/rvm")
|
9
|
-
|
10
|
-
##
|
11
|
-
# Invokes the given rake task remotely; setting up the proper environment.
|
12
|
-
# If :run_rake_proc is provided it's proc will be called.
|
13
|
-
#
|
14
|
-
# +task+ is the fully qualified task name.
|
15
|
-
# +rake_cmd+ is the rake command to execute remotely.
|
16
|
-
|
17
|
-
def self.run_rake task
|
18
|
-
if defined? run_rake_proc
|
19
|
-
run_rake_proc.call
|
20
|
-
else
|
21
|
-
rvm_run [
|
22
|
-
"cd #{current_path}",
|
23
|
-
"#{rake_cmd} RACK_ENV=#{rack_env} #{task}",
|
24
|
-
]
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
##
|
29
|
-
# A wrapper to rake-remote_task's +run+, making sure to setup
|
30
|
-
# rvm's environment.
|
31
|
-
#
|
32
|
-
# +cmds+ is expected to be an array.
|
33
|
-
|
34
|
-
def self.rvm_run cmds
|
35
|
-
cmds.unshift "source #{rvmrc}"
|
36
|
-
run cmds.join " && "
|
37
|
-
end
|
38
|
-
end
|