horse_power 0.4.1 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf9037cfdf693d11a734e454b6d32789bd3a56e4
4
- data.tar.gz: caed7eba21428affc8207cd2766683e52531f3be
3
+ metadata.gz: 96662981e4412a72cf056405f6841da6a32b3837
4
+ data.tar.gz: 9e7233496d6545fb25b8c90167a699b140aa4c80
5
5
  SHA512:
6
- metadata.gz: 808b5da592431637363f9938a4e4d25ee5f12cd3ba6d45678229b0712595aa413c8992b462fcb21abc5600e95eed31203879226f1e09b543c3228b01ea36860d
7
- data.tar.gz: e3b0731f04c862a4ee1b8cb8b57e7ed59be3c198dcf4211d5701f09abf1e15a4bd576427879a831a2571f575039c0fa9c3135f7a4c26e9c6593f857e9f9720e1
6
+ metadata.gz: 5e5b38615fbc90d71dc6f4dbdf94bfc5df75ea56eb1dc6d73ef7e747e43b2f37d445f4674217095038b87788eb1122f810c2599dcd5d29f5a5d7c9b1d906abaf
7
+ data.tar.gz: 4aabdcb21fd01c0e151fd16e667946b1d022ef558926433355c9286d23dc0d2ba052f56b56d47325f9458e5175c7b4f2bb4fb949c469c5080f03ec95b9a92469
@@ -8,10 +8,17 @@ module HorsePower
8
8
  createPro
9
9
  addToApplication
10
10
  createSettings
11
+ serverSetup
11
12
  end
12
13
 
13
14
  private
14
15
 
16
+ def serverSetup
17
+ copy_file "procfile.rb", "Procfile"
18
+ copy_file "puma.rb", "config/puma.rb"
19
+ copy_file "timeout.rb", "config/initializers/timeout.rb"
20
+ end
21
+
15
22
  def createSettings
16
23
  copy_file "identity_cache.rb", "config/initializers/identity_cache.rb"
17
24
  run "rails g rails_config:install"
@@ -0,0 +1 @@
1
+ web: bundle exec puma -C config/puma.rb
@@ -0,0 +1,15 @@
1
+ workers Integer(ENV['WEB_CONCURRENCY'] || 2)
2
+ threads_count = Integer(ENV['MAX_THREADS'] || 5)
3
+ threads threads_count, threads_count
4
+
5
+ preload_app!
6
+
7
+ rackup DefaultRackup
8
+ port ENV['PORT'] || 3000
9
+ environment ENV['RACK_ENV'] || 'development'
10
+
11
+ on_worker_boot do
12
+ # Worker specific setup for Rails 4.1+
13
+ # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
14
+ ActiveRecord::Base.establish_connection
15
+ end
@@ -0,0 +1 @@
1
+ Rack::Timeout.timeout = 20 #seconds
@@ -155,6 +155,11 @@ module HorsePower
155
155
  gem 'paperclip', '~> 4.2'
156
156
  gem 'aws-sdk', '~> 1.5.7'
157
157
  gem 'rails_config', '~> 0.4.2'
158
+ gem_group :production do
159
+ gem 'rails_12factor'
160
+ end
161
+ gem 'rack-timeout'
162
+ gem 'puma'
158
163
  gem 'identity_cache'
159
164
  gem 'cityhash' # optional, for faster hashing (C-Ruby only)
160
165
  #gem 'websocket-rails'
@@ -1,3 +1,3 @@
1
1
  module HorsePower
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: horse_power
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cleophus Robinson IV
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-02 00:00:00.000000000 Z
11
+ date: 2015-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -59,6 +59,9 @@ files:
59
59
  - lib/generators/horse_power/app_environment/USAGE
60
60
  - lib/generators/horse_power/app_environment/app_environment_generator.rb
61
61
  - lib/generators/horse_power/app_environment/templates/identity_cache.rb
62
+ - lib/generators/horse_power/app_environment/templates/procfile.rb
63
+ - lib/generators/horse_power/app_environment/templates/puma.rb
64
+ - lib/generators/horse_power/app_environment/templates/timeout.rb
62
65
  - lib/generators/horse_power/authorization/USAGE
63
66
  - lib/generators/horse_power/authorization/authorization_generator.rb
64
67
  - lib/generators/horse_power/authorization/templates/auth_file.rb.erb