daddy 0.5.16 → 0.5.17

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: 0bb76215406b7530b3655cd133994c330b290aca
4
- data.tar.gz: d696bbc27b93e262c04c1be646111fe4dd641b72
3
+ metadata.gz: adebf94afd27d89f889ea11223950555d34a33c5
4
+ data.tar.gz: 7242fa1f7bb280e389ac351f9af2b43d5a2448af
5
5
  SHA512:
6
- metadata.gz: 0237c217d406c327f5e2869f41b69619a8b499345c1393c5da126ac1b68d6938b1a1cf969aaf46f6b8d75dddd289ac60327ea52bd2113d71fe8f1340315996f8
7
- data.tar.gz: c512a727686dd5eae3e74f300f108f45081d0848bc11fcd947a2c3c290aa26de479518362299bb9e07b693d56836324ee015c5e660b96e41bc61767d351417c0
6
+ metadata.gz: 5f29678c5d49c00800672439c38dbcc07a32db0f3be094009786e12cdfc9d9005883261cb422a91db3dd082ac8c20bf0c4d4e656ac70e4c3d6e6fe4c93ed4d34
7
+ data.tar.gz: 5c690f51b37b6fa374f158b2220710dcabf82c632c3e3869ff4bc0f0edf00da414b0c7ec206878f4dae158168c450ad7aece8a84c65f56a4cd742dfdcb5727e3
@@ -1,9 +1,7 @@
1
1
  require 'daddy/itamae'
2
2
 
3
3
  template 'config/unicorn.rb' do
4
- variables :rails_root => ENV['RAILS_ROOT'],
5
- :worker_processes => ENV['RAILS_ROOT'] == 'production' ? 2 : 1,
6
- :timeout => 300
4
+ variables :timeout => 300
7
5
  end
8
6
 
9
7
  case os_version
@@ -16,7 +14,8 @@ when /rhel-6\.(.*?)/
16
14
  mode '755'
17
15
  variables :app_name => ENV['APP_NAME'],
18
16
  :rails_env => ENV['RAILS_ENV'],
19
- :rails_root => ENV['RAILS_ROOT']
17
+ :rails_root => ENV['RAILS_ROOT'],
18
+ :worker_processes => ENV['RAILS_ROOT'] == 'production' ? 2 : 1
20
19
  end
21
20
  when /rhel-7\.(.*?)/
22
21
  template "/etc/systemd/system/#{ENV['APP_NAME']}.service" do
@@ -29,7 +28,7 @@ when /rhel-7\.(.*?)/
29
28
  :rails_env => ENV['RAILS_ENV'],
30
29
  :rails_root => ENV['RAILS_ROOT'],
31
30
  :user => ENV['USER'],
32
- :timeout => 305
31
+ :worker_processes => ENV['RAILS_ROOT'] == 'production' ? 2 : 1
33
32
  end
34
33
 
35
34
  execute 'systemctl daemon-reload' do
@@ -13,6 +13,7 @@ PID=${RAILS_ROOT}/tmp/pids/unicorn.pid
13
13
  CONFIG=${RAILS_ROOT}/config/unicorn.rb
14
14
 
15
15
  export PATH="${PATH}":/usr/local/bin
16
+ export WORKER_PROCESSES=<%= @worker_processes %>
16
17
 
17
18
  start() {
18
19
  echo -n 'Starting <%= @app_name %>: '
@@ -8,6 +8,7 @@ User = <%= @user %>
8
8
  WorkingDirectory = <%= @rails_root %>
9
9
  SyslogIdentifier = <%= @app_name %>
10
10
  PIDFile = <%= @rails_root %>/tmp/pids/unicorn.pid
11
+ Environment="WORKER_PROCESSES=<%= @worker_processes %>"
11
12
  ExecStart = /usr/local/bin/bundle exec unicorn_rails -c <%= @rails_root %>/config/unicorn.rb -E <%= @rails_env %> -D
12
13
  ExecStop = <%= `which kill`.strip %> -s QUIT $MAINPID
13
14
 
@@ -1,6 +1,6 @@
1
1
  rails_root = "#{File.expand_path(File.dirname(File.dirname(__FILE__)))}"
2
2
 
3
- worker_processes <%= @worker_processes %>
3
+ worker_processes ENV['WORKER_PROCESSES'] || 1
4
4
  working_directory rails_root
5
5
 
6
6
  listen "#{rails_root}/tmp/sockets/unicorn.sock"
@@ -11,7 +11,12 @@ if ENV["COVERAGE"]
11
11
  end
12
12
 
13
13
  SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
14
- SimpleCov.start 'rails'
14
+ SimpleCov.start do
15
+ add_filter '/features/'
16
+ add_filter '/test/'
17
+ add_filter '/user_stories/'
18
+ add_filter '/vendor/'
19
+ end
15
20
  end
16
21
 
17
22
  case ENV['FORMAT'].to_s.downcase
data/lib/daddy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Daddy
2
- VERSION = '0.5.16'
2
+ VERSION = '0.5.17'
3
3
  end
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.5.16
4
+ version: 0.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-23 00:00:00.000000000 Z
11
+ date: 2016-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara