vlad-thin 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/lib/vlad/thin.rb +27 -22
- data/vlad-thin.gemspec +10 -9
- metadata +8 -13
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/lib/vlad/thin.rb
CHANGED
@@ -7,8 +7,8 @@ namespace :vlad do
|
|
7
7
|
##
|
8
8
|
# Thin app server
|
9
9
|
|
10
|
-
set :thin_address,
|
11
|
-
set :thin_command,
|
10
|
+
set :thin_address, nil
|
11
|
+
set :thin_command, "thin"
|
12
12
|
set(:thin_conf) { "#{shared_path}/thin_cluster.conf" }
|
13
13
|
set :thin_environment, "production"
|
14
14
|
set :thin_group, nil
|
@@ -19,46 +19,51 @@ namespace :vlad do
|
|
19
19
|
set :thin_prefix, nil
|
20
20
|
set :thin_servers, 2
|
21
21
|
set :thin_user, nil
|
22
|
+
|
23
|
+
set :thin_uses_bundler, true
|
22
24
|
|
23
25
|
desc "Prepares application servers for deployment. thin
|
24
26
|
configuration is set via the thin_* variables.".cleanup
|
25
27
|
|
26
28
|
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
29
|
cmd = [
|
31
|
-
"
|
32
|
-
|
33
|
-
(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
(
|
39
|
-
(
|
40
|
-
(
|
41
|
-
(
|
42
|
-
(
|
43
|
-
(
|
30
|
+
"config",
|
31
|
+
(%(-s "#{thin_servers}") if thin_servers),
|
32
|
+
(%(-S "#{thin_socket}") if thin_socket),
|
33
|
+
(%(-e "#{thin_environment}") if thin_environment),
|
34
|
+
(%(-a "#{thin_address}") if thin_address),
|
35
|
+
%(-c "#{current_path}"),
|
36
|
+
(%(-C "#{thin_conf}") if thin_conf),
|
37
|
+
(%(-P "#{thin_pid_file}") if thin_pid_file),
|
38
|
+
(%(-l "#{thin_log_file}") if thin_log_file),
|
39
|
+
(%(--user "#{thin_user}") if thin_user),
|
40
|
+
(%(--group "#{thin_group}") if thin_group),
|
41
|
+
(%(--prefix "#{thin_prefix}") if thin_prefix),
|
42
|
+
(%(-p "#{thin_port}") if thin_port),
|
44
43
|
].compact.join ' '
|
45
44
|
|
46
|
-
|
45
|
+
thin(cmd)
|
47
46
|
end
|
48
47
|
|
49
48
|
def thin(cmd) # :nodoc:
|
50
|
-
|
49
|
+
command = if thin_uses_bundler
|
50
|
+
%(BUNDLE_GEMFILE="#{current_path}/Gemfile" bundle exec #{thin_command} #{cmd} -C "#{thin_conf}")
|
51
|
+
else
|
52
|
+
%(#{thin_command} #{cmd} -C "#{thin_conf}")
|
53
|
+
end
|
54
|
+
|
55
|
+
%(cd "#{current_path}" && #{command})
|
51
56
|
end
|
52
57
|
|
53
58
|
desc "Restart the app servers"
|
54
59
|
|
55
60
|
remote_task :start_app, :roles => :app do
|
56
|
-
run thin(
|
61
|
+
run thin(%(restart -O -s "#{thin_servers}"))
|
57
62
|
end
|
58
63
|
|
59
64
|
desc "Stop the app servers"
|
60
65
|
|
61
66
|
remote_task :stop_app, :roles => :app do
|
62
|
-
run thin(
|
67
|
+
run thin(%(stop -s "#{thin_servers}"))
|
63
68
|
end
|
64
69
|
end
|
data/vlad-thin.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "1.
|
7
|
+
s.name = %q{vlad-thin}
|
8
|
+
s.version = "1.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Phil Smith"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = %q{2013-02-06}
|
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
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
17
|
"README.rdoc"
|
@@ -25,15 +25,16 @@ Gem::Specification.new do |s|
|
|
25
25
|
"lib/vlad/thin.rb",
|
26
26
|
"vlad-thin.gemspec"
|
27
27
|
]
|
28
|
-
s.homepage =
|
28
|
+
s.homepage = %q{http://github.com/phs/vlad-thin}
|
29
29
|
s.require_paths = ["lib"]
|
30
|
-
s.rubygems_version =
|
31
|
-
s.summary =
|
30
|
+
s.rubygems_version = %q{1.3.6}
|
31
|
+
s.summary = %q{Control thin with vlad}
|
32
32
|
|
33
33
|
if s.respond_to? :specification_version then
|
34
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
34
35
|
s.specification_version = 3
|
35
36
|
|
36
|
-
if Gem::Version.new(Gem::
|
37
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
37
38
|
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
38
39
|
else
|
39
40
|
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vlad-thin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 1.2.0
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Phil Smith
|
@@ -15,17 +14,16 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date:
|
17
|
+
date: 2013-02-06 00:00:00 -08:00
|
18
|
+
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rspec
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
24
|
requirements:
|
26
25
|
- - ">="
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 13
|
29
27
|
segments:
|
30
28
|
- 1
|
31
29
|
- 2
|
@@ -50,6 +48,7 @@ files:
|
|
50
48
|
- VERSION
|
51
49
|
- lib/vlad/thin.rb
|
52
50
|
- vlad-thin.gemspec
|
51
|
+
has_rdoc: true
|
53
52
|
homepage: http://github.com/phs/vlad-thin
|
54
53
|
licenses: []
|
55
54
|
|
@@ -59,27 +58,23 @@ rdoc_options: []
|
|
59
58
|
require_paths:
|
60
59
|
- lib
|
61
60
|
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
-
none: false
|
63
61
|
requirements:
|
64
62
|
- - ">="
|
65
63
|
- !ruby/object:Gem::Version
|
66
|
-
hash: 3
|
67
64
|
segments:
|
68
65
|
- 0
|
69
66
|
version: "0"
|
70
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
68
|
requirements:
|
73
69
|
- - ">="
|
74
70
|
- !ruby/object:Gem::Version
|
75
|
-
hash: 3
|
76
71
|
segments:
|
77
72
|
- 0
|
78
73
|
version: "0"
|
79
74
|
requirements: []
|
80
75
|
|
81
76
|
rubyforge_project:
|
82
|
-
rubygems_version: 1.
|
77
|
+
rubygems_version: 1.3.6
|
83
78
|
signing_key:
|
84
79
|
specification_version: 3
|
85
80
|
summary: Control thin with vlad
|