daddy 0.3.20 → 0.3.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5e8dd983e1179051e585b3ac7ed0ea38d70fff4
4
- data.tar.gz: 5649a648bee817b0efaa3e95a31c04871e8f47c5
3
+ metadata.gz: a69facadf20ce56a143d6bf7df4d1f965334563e
4
+ data.tar.gz: 579f1a44d83f46cefd7a0de75d2c0d537d191e17
5
5
  SHA512:
6
- metadata.gz: de63a0e8518b99343af0a7e98615e815c5af4d5e42df8b4c04da1e71da2510434507e6903fb44a8b74ab9c45bd06702054844786caead7c20c770f2e0a3250d8
7
- data.tar.gz: 78881695c5e0838d904084364567dc684890130677d46e605a7daf5a8d02a8e093091868c9dae03efbb5dcf5725b86eb193558832f08bf185b6501db3236fb3a
6
+ metadata.gz: 72e0f4e7264fcb6ce60bc955375ef4cb0ba5ef9dd0aaadd6b8ef4a6440e0255e688ead5539fc7705bbdb25bf9c10fcba51719829c75e126974d6374ccbeee53d
7
+ data.tar.gz: 5b995517b3c8b63945109bc2544c90d6461c46a4125d2181b2008198840ec38122b010d3061709e83b61119ae6993769ec097abaad24b9c98f20737b40019344
@@ -6,7 +6,7 @@
6
6
  .ui-datepicker {
7
7
  select.ui-datepicker-year {
8
8
  margin-right: 0.5em;
9
- width: 4em;
9
+ width: auto;
10
10
  }
11
11
  select.ui-datepicker-month {
12
12
  margin-left: 1em;
@@ -1,3 +1,3 @@
1
1
  module Daddy
2
- VERSION = '0.3.20'.freeze
2
+ VERSION = '0.3.21'.freeze
3
3
  end
@@ -71,6 +71,8 @@ def self.ask(prompt, options = {})
71
71
  end
72
72
 
73
73
  def self.run(*commands)
74
+ return if dry_run?
75
+
74
76
  commands.each do |c|
75
77
  puts c
76
78
  fail unless system(c)
@@ -1,28 +1,21 @@
1
- require 'rake'
1
+ require_relative 'task_helper'
2
2
 
3
3
  namespace :dad do
4
4
  namespace :unicorn do
5
5
 
6
- desc 'Unicornをインストールします。'
7
- task :install => :environment do
8
- rails_env = ENV['RAILS_ENV'] || Rails.env
9
- rails_root = ENV['RAILS_ROOT'] || Rails.root
10
- init_script = 'unicorn_' + YAML.load_file("config/database.yml")[Rails.env]['database']
6
+ desc 'Unicornの設定を行います。'
7
+ task :config => :environment do
8
+ config = File.join('tmp', 'unicorn', 'unicorn.rb')
9
+ render File.join(File.dirname(__FILE__), 'unicorn', 'unicorn.rb.erb'), :to => config
10
+ run "cp -f #{config} config/"
11
11
 
12
- commands = [
13
- "RAILS_ENV=#{rails_env} RAILS_ROOT=#{rails_root} erb -T - #{File.dirname(__FILE__)}/unicorn.erb > tmp/#{init_script}",
14
- "RAILS_ENV=#{rails_env} RAILS_ROOT=#{rails_root} erb -T - #{File.dirname(__FILE__)}/unicorn.rb.erb > config/unicorn.rb",
12
+ init_script = File.join('tmp', 'unicorn', "unicorn_#{app_name}")
13
+ render File.join(File.dirname(__FILE__), 'unicorn', 'unicorn.erb'), :to => init_script
15
14
 
16
- "sudo cp -f tmp/#{init_script} /etc/init.d/#{init_script}",
17
- "sudo chown root:root /etc/init.d/#{init_script}",
18
- "sudo chmod 755 /etc/init.d/#{init_script}",
19
- "sudo /sbin/chkconfig #{init_script} on",
20
- ]
21
-
22
- commands.each do |c|
23
- puts c
24
- fail unless system(c)
25
- end
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"
26
19
  end
27
20
 
28
21
  end
@@ -1,5 +1,3 @@
1
- # coding: UTF-8
2
-
3
1
  require 'yaml'
4
2
 
5
3
  rails_root = "#{File.dirname(File.expand_path(__FILE__))}/.."
@@ -10,6 +8,7 @@ working_directory rails_root
10
8
 
11
9
  database = YAML.load_file("#{File.dirname(__FILE__)}/database.yml")[rails_env]['database']
12
10
  listen "/tmp/#{database}.sock"
11
+ timeout 300
13
12
 
14
13
  stdout_path rails_root + '/log/unicorn.log'
15
14
  stderr_path rails_root + '/log/unicorn.log'
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.20
4
+ version: 0.3.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-10 00:00:00.000000000 Z
11
+ date: 2015-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -359,9 +359,9 @@ files:
359
359
  - lib/tasks/task_helper.rb
360
360
  - lib/tasks/tesseract.rake
361
361
  - lib/tasks/test.rake
362
- - lib/tasks/unicorn.erb
363
362
  - lib/tasks/unicorn.rake
364
- - lib/tasks/unicorn.rb.erb
363
+ - lib/tasks/unicorn/unicorn.erb
364
+ - lib/tasks/unicorn/unicorn.rb.erb
365
365
  - ssl/cert.pem
366
366
  - templates/Gemfile.erb
367
367
  - templates/app/controllers/controller.rb.erb