vlad-merb 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/.autotest +23 -0
- data/History.txt +10 -0
- data/Manifest.txt +7 -0
- data/README.txt +78 -0
- data/Rakefile +12 -0
- data/lib/vlad/merb.rb +56 -0
- data/test/test_vlad_merb.rb +8 -0
- metadata +108 -0
- metadata.gz.sig +0 -0
data.tar.gz.sig
ADDED
Binary file
|
data/.autotest
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require 'autotest/restart'
|
4
|
+
|
5
|
+
# Autotest.add_hook :initialize do |at|
|
6
|
+
# at.extra_files << "../some/external/dependency.rb"
|
7
|
+
#
|
8
|
+
# at.libs << ":../some/external"
|
9
|
+
#
|
10
|
+
# at.add_exception 'vendor'
|
11
|
+
#
|
12
|
+
# at.add_mapping(/dependency.rb/) do |f, _|
|
13
|
+
# at.files_matching(/test_.*rb$/)
|
14
|
+
# end
|
15
|
+
#
|
16
|
+
# %w(TestA TestB).each do |klass|
|
17
|
+
# at.extra_class_map[klass] = "test/test_misc.rb"
|
18
|
+
# end
|
19
|
+
# end
|
20
|
+
|
21
|
+
# Autotest.add_hook :run_command do |at|
|
22
|
+
# system "rake build"
|
23
|
+
# end
|
data/History.txt
ADDED
data/Manifest.txt
ADDED
data/README.txt
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
= vlad-merb
|
2
|
+
|
3
|
+
* http://hitsquad.rubyforge.org/vlad-merb/
|
4
|
+
* http://rubyforge.org/projects/hitsquad/
|
5
|
+
* http://bitbucket.org/krbullock/vlad-merb/
|
6
|
+
|
7
|
+
== DESCRIPTION:
|
8
|
+
|
9
|
+
Merb support for Vlad. Prior to 2.0.0, Vlad included support to make vlad:start
|
10
|
+
and vlad:stop work with Merb; this plugin adds Merb support back in, and makes
|
11
|
+
it a bit more robust.
|
12
|
+
|
13
|
+
== FEATURES/PROBLEMS:
|
14
|
+
|
15
|
+
* Adds Merb support for vlad:start_app and vlad:stop_app tasks.
|
16
|
+
|
17
|
+
== SYNOPSIS:
|
18
|
+
|
19
|
+
# lib/tasks/vlad.rake
|
20
|
+
begin
|
21
|
+
require 'vlad'
|
22
|
+
Vlad.load(:app => :merb)
|
23
|
+
rescue LoadError
|
24
|
+
end
|
25
|
+
|
26
|
+
== REQUIREMENTS:
|
27
|
+
|
28
|
+
* Vlad[http://rubyhitsquad.com/Vlad_the_Deployer.html]
|
29
|
+
|
30
|
+
* Merb[http://www.merbivore.com/]
|
31
|
+
|
32
|
+
== INSTALL:
|
33
|
+
|
34
|
+
$ sudo gem install vlad-merb
|
35
|
+
|
36
|
+
== VARIABLES:
|
37
|
+
|
38
|
+
merb_command:: Defaults to 'merb'.
|
39
|
+
merb_adapter:: The Rack adapter to use. Defaults to 'mongrel'. See
|
40
|
+
'merb --help' for available adapters.
|
41
|
+
merb_environment:: The Merb environment to use (one of: development, test,
|
42
|
+
production).
|
43
|
+
merb_address:: The IP address to bind to. Defaults to '127.0.0.1'. Note
|
44
|
+
that this is different from Merb's default bind address.
|
45
|
+
merb_port:: The starting port that the Merb daemons should listen on.
|
46
|
+
Defaults to 4000.
|
47
|
+
merb_servers:: The number of Merb daemons to run. Defaults to 3.
|
48
|
+
merb_user:: The user that the Merb daemons should run as. Must be
|
49
|
+
specified along with merb_group.
|
50
|
+
merb_group:: The group that the Merb daemons should run as.
|
51
|
+
merb_use_sudo:: Whether to use sudo to run the 'merb' command on the remote
|
52
|
+
host. Probably necessary if specifying merb_user and
|
53
|
+
merb_group. Defaults to false.
|
54
|
+
|
55
|
+
== LICENSE:
|
56
|
+
|
57
|
+
(The MIT License)
|
58
|
+
|
59
|
+
Copyright (c) 2009 Kevin Bullock and the rest of the Ruby Hit Squad
|
60
|
+
|
61
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
62
|
+
a copy of this software and associated documentation files (the
|
63
|
+
'Software'), to deal in the Software without restriction, including
|
64
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
65
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
66
|
+
permit persons to whom the Software is furnished to do so, subject to
|
67
|
+
the following conditions:
|
68
|
+
|
69
|
+
The above copyright notice and this permission notice shall be
|
70
|
+
included in all copies or substantial portions of the Software.
|
71
|
+
|
72
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
73
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
74
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
75
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
76
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
77
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
78
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
data/lib/vlad/merb.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'vlad'
|
2
|
+
|
3
|
+
module Vlad
|
4
|
+
module Merb
|
5
|
+
VERSION = '2.0.0' #:nodoc:
|
6
|
+
|
7
|
+
# Runs +cmd+ using sudo if the +:merb_use_sudo+ variable is set.
|
8
|
+
def self.maybe_sudo(cmd)
|
9
|
+
if merb_use_sudo
|
10
|
+
sudo cmd
|
11
|
+
else
|
12
|
+
run cmd
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
namespace :vlad do
|
19
|
+
##
|
20
|
+
# Merb app server
|
21
|
+
|
22
|
+
set :merb_command, "merb"
|
23
|
+
set :merb_adapter, nil
|
24
|
+
set :merb_environment, "production"
|
25
|
+
set :merb_address, "127.0.0.1"
|
26
|
+
set :merb_port, 4000
|
27
|
+
set :merb_servers, 3
|
28
|
+
set :merb_user, nil
|
29
|
+
set :merb_group, nil
|
30
|
+
set :merb_use_sudo, false
|
31
|
+
|
32
|
+
# maybe needed later
|
33
|
+
#set :merb_log_file, nil
|
34
|
+
#set :merb_pid_file, nil
|
35
|
+
#set :merb_prefix, nil
|
36
|
+
|
37
|
+
desc "(Re)Start the app servers"
|
38
|
+
remote_task :start_app, :roles => :app do
|
39
|
+
Rake::Task['vlad:stop_app'].invoke
|
40
|
+
cmd = "#{merb_command} -m #{current_path}"
|
41
|
+
cmd << " --adapter #{merb_adapter}" if merb_adapter
|
42
|
+
cmd << " --environment #{merb_environment}"
|
43
|
+
cmd << " --host #{merb_address}"
|
44
|
+
cmd << " --port #{merb_port}"
|
45
|
+
cmd << " --cluster-nodes #{merb_servers}"
|
46
|
+
cmd << " --user #{merb_user}" if merb_user
|
47
|
+
cmd << " --group #{merb_group}" if merb_group
|
48
|
+
Vlad::Merb.maybe_sudo cmd
|
49
|
+
end
|
50
|
+
|
51
|
+
desc "Stop the app servers"
|
52
|
+
remote_task :stop_app, :roles => :app do
|
53
|
+
cmd = "#{merb_command} -m #{current_path} -K all"
|
54
|
+
Vlad::Merb.maybe_sudo cmd
|
55
|
+
end
|
56
|
+
end
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vlad-merb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kevin R. Bullock
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDOjCCAiKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBDMREwDwYDVQQDDAhrYnVs
|
14
|
+
bG9jazEZMBcGCgmSJomT8ixkARkWCXJpbmd3b3JsZDETMBEGCgmSJomT8ixkARkW
|
15
|
+
A29yZzAeFw0wOTA4MjAwNDEwMjdaFw0xMDA4Mj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+
5V3Udl4ET3bsEOJ+8xs=
|
31
|
+
-----END CERTIFICATE-----
|
32
|
+
|
33
|
+
date: 2009-09-05 00:00:00 -05:00
|
34
|
+
default_executable:
|
35
|
+
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: vlad
|
38
|
+
type: :runtime
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "2.0"
|
45
|
+
version:
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: hoe
|
48
|
+
type: :development
|
49
|
+
version_requirement:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.3.3
|
55
|
+
version:
|
56
|
+
description: |-
|
57
|
+
Merb support for Vlad. Prior to 2.0.0, Vlad included support to make vlad:start
|
58
|
+
and vlad:stop work with Merb; this plugin adds Merb support back in, and makes
|
59
|
+
it a bit more robust.
|
60
|
+
email:
|
61
|
+
- kbullock@ringworld.org
|
62
|
+
executables: []
|
63
|
+
|
64
|
+
extensions: []
|
65
|
+
|
66
|
+
extra_rdoc_files:
|
67
|
+
- History.txt
|
68
|
+
- Manifest.txt
|
69
|
+
- README.txt
|
70
|
+
files:
|
71
|
+
- .autotest
|
72
|
+
- History.txt
|
73
|
+
- Manifest.txt
|
74
|
+
- README.txt
|
75
|
+
- Rakefile
|
76
|
+
- lib/vlad/merb.rb
|
77
|
+
- test/test_vlad_merb.rb
|
78
|
+
has_rdoc: true
|
79
|
+
homepage: http://hitsquad.rubyforge.org/vlad-merb/
|
80
|
+
licenses: []
|
81
|
+
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options:
|
84
|
+
- --main
|
85
|
+
- README.txt
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: "0"
|
93
|
+
version:
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: "0"
|
99
|
+
version:
|
100
|
+
requirements: []
|
101
|
+
|
102
|
+
rubyforge_project: hitsquad
|
103
|
+
rubygems_version: 1.3.5
|
104
|
+
signing_key:
|
105
|
+
specification_version: 3
|
106
|
+
summary: Merb support for Vlad
|
107
|
+
test_files:
|
108
|
+
- test/test_vlad_merb.rb
|
metadata.gz.sig
ADDED
Binary file
|