slining 1.1.0 → 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.
@@ -1,21 +0,0 @@
1
- before_install:
2
- - "echo '--colour' > ~/.rspec"
3
- - "echo 'gem: --no-document' > ~/.gemrc"
4
- - export DISPLAY=:99.0
5
- - sh -e /etc/init.d/xvfb start
6
- install:
7
- - bin/setup
8
- branches:
9
- only:
10
- - master
11
- cache:
12
- - bundler
13
- language:
14
- - ruby
15
- notifications:
16
- email: false
17
- rvm:
18
- - <%= Slining::RUBY_VERSION %>
19
- addons:
20
- postgresql: "9.3"
21
- sudo: false
@@ -1,30 +0,0 @@
1
- # https://devcenter.heroku.com/articles/rails-unicorn
2
-
3
- worker_processes (ENV["UNICORN_WORKERS"] || 3).to_i
4
- timeout (ENV["UNICORN_TIMEOUT"] || 15).to_i
5
- preload_app true
6
-
7
- before_fork do |_server, _worker|
8
- Signal.trap "TERM" do
9
- puts "Unicorn master intercepting TERM, sending myself QUIT instead"
10
- Process.kill "QUIT", Process.pid
11
- end
12
-
13
- if defined? ActiveRecord::Base
14
- ActiveRecord::Base.connection.disconnect!
15
- end
16
- end
17
-
18
- after_fork do |_server, _worker|
19
- Signal.trap "TERM" do
20
- puts "Unicorn worker intercepting TERM, waiting for master to send QUIT"
21
- end
22
-
23
- if defined? ActiveRecord::Base
24
- config = ActiveRecord::Base.configurations[Rails.env] ||
25
- Rails.application.config.database_configuration[Rails.env]
26
- config["reaping_frequency"] = (ENV["DB_REAPING_FREQUENCY"] || 10).to_i
27
- config["pool"] = (ENV["DB_POOL"] || 2).to_i
28
- ActiveRecord::Base.establish_connection(config)
29
- end
30
- end