vlad-thin 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +9 -0
- data/Rakefile +19 -0
- data/VERSION +1 -0
- data/lib/vlad/thin.rb +64 -0
- data/vlad-thin.gemspec +48 -0
- metadata +83 -0
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Phil Smith
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
= vlad-thin
|
2
|
+
|
3
|
+
Control thin with vlad.
|
4
|
+
|
5
|
+
This is thin's own <tt>example/vlad.rake</tt> (specifically http://github.com/macournoyer/thin/raw/56c9b3eb2553ef6f6784768a3265d6562ab87b0f/example/vlad.rake) in a gem. Don't ask me why it wasn't already in one..
|
6
|
+
|
7
|
+
== Copyright
|
8
|
+
|
9
|
+
Copyright (c) 2010 Phil Smith. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "vlad-thin"
|
8
|
+
gem.summary = %Q{Control thin with vlad}
|
9
|
+
gem.description = %Q{This is thin's own example/vlad.rake in a gem}
|
10
|
+
gem.email = "phil.h.smith@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/phs/vlad-thin"
|
12
|
+
gem.authors = ["Phil Smith"]
|
13
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
|
+
end
|
16
|
+
Jeweler::GemcutterTasks.new
|
17
|
+
rescue LoadError
|
18
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
19
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.0
|
data/lib/vlad/thin.rb
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# $GEM_HOME/gems/vlad-1.2.0/lib/vlad/thin.rb
|
2
|
+
# Thin tasks for Vlad the Deployer
|
3
|
+
# By cnantais
|
4
|
+
require 'vlad'
|
5
|
+
|
6
|
+
namespace :vlad do
|
7
|
+
##
|
8
|
+
# Thin app server
|
9
|
+
|
10
|
+
set :thin_address, "127.0.0.1"
|
11
|
+
set :thin_command, 'thin'
|
12
|
+
set(:thin_conf) { "#{shared_path}/thin_cluster.conf" }
|
13
|
+
set :thin_environment, "production"
|
14
|
+
set :thin_group, nil
|
15
|
+
set :thin_log_file, nil
|
16
|
+
set :thin_pid_file, nil
|
17
|
+
set :thin_port, nil
|
18
|
+
set :thin_socket, nil
|
19
|
+
set :thin_prefix, nil
|
20
|
+
set :thin_servers, 2
|
21
|
+
set :thin_user, nil
|
22
|
+
|
23
|
+
desc "Prepares application servers for deployment. thin
|
24
|
+
configuration is set via the thin_* variables.".cleanup
|
25
|
+
|
26
|
+
remote_task :setup_app, :roles => :app do
|
27
|
+
|
28
|
+
raise(ArgumentError, "Please provide either thin_socket or thin_port") if thin_port.nil? && thin_socket.nil?
|
29
|
+
|
30
|
+
cmd = [
|
31
|
+
"#{thin_command} config",
|
32
|
+
"-s #{thin_servers}",
|
33
|
+
("-S #{thin_socket}" if thin_socket),
|
34
|
+
"-e #{thin_environment}",
|
35
|
+
"-a #{thin_address}",
|
36
|
+
"-c #{current_path}",
|
37
|
+
"-C #{thin_conf}",
|
38
|
+
("-P #{thin_pid_file}" if thin_pid_file),
|
39
|
+
("-l #{thin_log_file}" if thin_log_file),
|
40
|
+
("--user #{thin_user}" if thin_user),
|
41
|
+
("--group #{thin_group}" if thin_group),
|
42
|
+
("--prefix #{thin_prefix}" if thin_prefix),
|
43
|
+
("-p #{thin_port}" if thin_port),
|
44
|
+
].compact.join ' '
|
45
|
+
|
46
|
+
run cmd
|
47
|
+
end
|
48
|
+
|
49
|
+
def thin(cmd) # :nodoc:
|
50
|
+
"#{thin_command} #{cmd} -C #{thin_conf}"
|
51
|
+
end
|
52
|
+
|
53
|
+
desc "Restart the app servers"
|
54
|
+
|
55
|
+
remote_task :start_app, :roles => :app do
|
56
|
+
run thin("restart -s #{thin_servers}")
|
57
|
+
end
|
58
|
+
|
59
|
+
desc "Stop the app servers"
|
60
|
+
|
61
|
+
remote_task :stop_app, :roles => :app do
|
62
|
+
run thin("stop -s #{thin_servers}")
|
63
|
+
end
|
64
|
+
end
|
data/vlad-thin.gemspec
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{vlad-thin}
|
8
|
+
s.version = "1.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Phil Smith"]
|
12
|
+
s.date = %q{2010-06-23}
|
13
|
+
s.description = %q{This is thin's own example/vlad.rake in a gem}
|
14
|
+
s.email = %q{phil.h.smith@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/vlad/thin.rb",
|
27
|
+
"vlad-thin.gemspec"
|
28
|
+
]
|
29
|
+
s.homepage = %q{http://github.com/phs/vlad-thin}
|
30
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
s.rubygems_version = %q{1.3.6}
|
33
|
+
s.summary = %q{Control thin with vlad}
|
34
|
+
|
35
|
+
if s.respond_to? :specification_version then
|
36
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
37
|
+
s.specification_version = 3
|
38
|
+
|
39
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
40
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
41
|
+
else
|
42
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
43
|
+
end
|
44
|
+
else
|
45
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
metadata
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vlad-thin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
version: 1.0.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Phil Smith
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-06-23 00:00:00 -07:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rspec
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 2
|
30
|
+
- 9
|
31
|
+
version: 1.2.9
|
32
|
+
type: :development
|
33
|
+
version_requirements: *id001
|
34
|
+
description: This is thin's own example/vlad.rake in a gem
|
35
|
+
email: phil.h.smith@gmail.com
|
36
|
+
executables: []
|
37
|
+
|
38
|
+
extensions: []
|
39
|
+
|
40
|
+
extra_rdoc_files:
|
41
|
+
- LICENSE
|
42
|
+
- README.rdoc
|
43
|
+
files:
|
44
|
+
- .document
|
45
|
+
- .gitignore
|
46
|
+
- LICENSE
|
47
|
+
- README.rdoc
|
48
|
+
- Rakefile
|
49
|
+
- VERSION
|
50
|
+
- lib/vlad/thin.rb
|
51
|
+
- vlad-thin.gemspec
|
52
|
+
has_rdoc: true
|
53
|
+
homepage: http://github.com/phs/vlad-thin
|
54
|
+
licenses: []
|
55
|
+
|
56
|
+
post_install_message:
|
57
|
+
rdoc_options:
|
58
|
+
- --charset=UTF-8
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
version: "0"
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
version: "0"
|
75
|
+
requirements: []
|
76
|
+
|
77
|
+
rubyforge_project:
|
78
|
+
rubygems_version: 1.3.6
|
79
|
+
signing_key:
|
80
|
+
specification_version: 3
|
81
|
+
summary: Control thin with vlad
|
82
|
+
test_files: []
|
83
|
+
|