daddy 0.3.27 → 0.3.28
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.
- checksums.yaml +4 -4
- data/lib/daddy/version.rb +1 -1
- data/lib/tasks/unicorn.rake +18 -6
- data/lib/tasks/unicorn/unicorn.erb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37fe86d40f2eca316456d3138a883de98c7345da
|
4
|
+
data.tar.gz: e000efb6059bdd26b0a593469ee9034a2fafcb38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e29e0872c6f7e00e03fe63a540cdbc9416dbed0073a58da5bcb6bf67debea7e4091e41853d10b5f3181913a5b9b5a4fdf14a27a26597dd82af2ef7e5a1d0ed65
|
7
|
+
data.tar.gz: 46e9a63d5d4c51ee212da4bec0f5eaca289183e6380958a30b859083ebb4b1eee13e06ad5d533d6a84f051d1b1fba3c3a9d7e11883ef8acbd73bfd31ed9a61c5
|
data/lib/daddy/version.rb
CHANGED
data/lib/tasks/unicorn.rake
CHANGED
@@ -4,18 +4,30 @@ namespace :dad do
|
|
4
4
|
namespace :unicorn do
|
5
5
|
|
6
6
|
desc 'Unicornの設定を行います。'
|
7
|
-
task :config
|
7
|
+
task :config do
|
8
8
|
config = File.join('tmp', 'unicorn', 'unicorn.rb')
|
9
9
|
render File.join(File.dirname(__FILE__), 'unicorn', 'unicorn.rb.erb'), :to => config
|
10
|
-
run "cp -f #{config} config/"
|
11
10
|
|
12
11
|
init_script = File.join('tmp', 'unicorn', "unicorn_#{app_name}")
|
13
12
|
render File.join(File.dirname(__FILE__), 'unicorn', 'unicorn.erb'), :to => init_script
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
if dry_run?
|
15
|
+
puts "----------------------------------------"
|
16
|
+
puts config
|
17
|
+
puts "----------------------------------------"
|
18
|
+
puts File.read(config)
|
19
|
+
puts "----------------------------------------"
|
20
|
+
puts init_script
|
21
|
+
puts "----------------------------------------"
|
22
|
+
puts File.read(init_script)
|
23
|
+
puts "----------------------------------------"
|
24
|
+
else
|
25
|
+
run "cp -f #{config} config/",
|
26
|
+
"sudo cp -f #{init_script} /etc/init.d/",
|
27
|
+
"sudo chown root:root /etc/init.d/#{File.basename(init_script)}",
|
28
|
+
"sudo chmod 755 /etc/init.d/#{File.basename(init_script)}",
|
29
|
+
"sudo /sbin/chkconfig #{File.basename(init_script)} on"
|
30
|
+
end
|
19
31
|
end
|
20
32
|
|
21
33
|
end
|
@@ -6,8 +6,8 @@
|
|
6
6
|
. /etc/rc.d/init.d/functions
|
7
7
|
|
8
8
|
RAILS_USER=<%= ENV['USER'] %>
|
9
|
-
RAILS_ENV=<%= ENV['RAILS_ENV'] %>
|
10
|
-
RAILS_ROOT=<%= ENV['RAILS_ROOT'] %>
|
9
|
+
RAILS_ENV=<%= ENV['RAILS_ENV'] || 'development' %>
|
10
|
+
RAILS_ROOT=<%= ENV['RAILS_ROOT'] || Rails.root %>
|
11
11
|
|
12
12
|
PID=${RAILS_ROOT}/tmp/pids/unicorn.pid
|
13
13
|
CONFIG=${RAILS_ROOT}/config/unicorn.rb
|
@@ -15,7 +15,7 @@ CONFIG=${RAILS_ROOT}/config/unicorn.rb
|
|
15
15
|
export PATH="${PATH}":/usr/local/bin
|
16
16
|
|
17
17
|
start() {
|
18
|
-
daemon --user=${RAILS_USER} --pidfile=$PID bundle exec
|
18
|
+
daemon --user=${RAILS_USER} --pidfile=$PID bundle exec unicorn -c ${CONFIG} -E ${RAILS_ENV} -D
|
19
19
|
}
|
20
20
|
|
21
21
|
stop() {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ichy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|