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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddcc1a299d62f5d6236c3737303b57f47fe69101
4
- data.tar.gz: 813bf1c9f10fc4b2cf8fc221205e385c56c4df88
3
+ metadata.gz: 37fe86d40f2eca316456d3138a883de98c7345da
4
+ data.tar.gz: e000efb6059bdd26b0a593469ee9034a2fafcb38
5
5
  SHA512:
6
- metadata.gz: 1edaf332c854b8ad4af1b491c2998a65e9e46392bcd0ebed7904ff6516a88e5b2b073027900052b004bb63fbe10ab970968dbd2eaf545586d8edb8e2e79689b4
7
- data.tar.gz: 7d9cae5f76a36b40751b5062a536b8b5d40d72da35dabe649d535144c96065af19a0964734bedf95635f05ed9563b67daca8ac484d83c8e2f547fdfa65607035
6
+ metadata.gz: e29e0872c6f7e00e03fe63a540cdbc9416dbed0073a58da5bcb6bf67debea7e4091e41853d10b5f3181913a5b9b5a4fdf14a27a26597dd82af2ef7e5a1d0ed65
7
+ data.tar.gz: 46e9a63d5d4c51ee212da4bec0f5eaca289183e6380958a30b859083ebb4b1eee13e06ad5d533d6a84f051d1b1fba3c3a9d7e11883ef8acbd73bfd31ed9a61c5
@@ -1,3 +1,3 @@
1
1
  module Daddy
2
- VERSION = '0.3.27'.freeze
2
+ VERSION = '0.3.28'.freeze
3
3
  end
@@ -4,18 +4,30 @@ namespace :dad do
4
4
  namespace :unicorn do
5
5
 
6
6
  desc 'Unicornの設定を行います。'
7
- task :config => :environment do
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
- run "sudo cp -f #{init_script} /etc/init.d/",
16
- "sudo chown root:root /etc/init.d/#{File.basename(init_script)}",
17
- "sudo chmod 755 /etc/init.d/#{File.basename(init_script)}",
18
- "sudo /sbin/chkconfig #{File.basename(init_script)} on"
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 unicorn_rails -c ${CONFIG} -E ${RAILS_ENV} -D
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.27
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-03-20 00:00:00.000000000 Z
11
+ date: 2015-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara