thredded_create_app 0.1.10 → 0.1.11

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: fa39764d4b542e8ce867bbf2f99bf0bd2faefc50
4
- data.tar.gz: bde9bab6d0b4f77c3a983eab632fac1df20cb54b
3
+ metadata.gz: 2284ab111024646a880d29a4a6e1f201d4a0f51e
4
+ data.tar.gz: e17c9d44ce2a7057d78d9b259b5d96e4c52b9b80
5
5
  SHA512:
6
- metadata.gz: 9b46de2ff013f3fa6bd27d5bc0b15f1709a50fd30f8b97494df0c17619b7f06c149e2df31dd2f36c72d9e910b092b1b31ff44a5ddc2eb6f8a6cce97da197c6dd
7
- data.tar.gz: 856ca0d0fdde0abad62e58f33cb6fc2a9e3bcd390cb15f1824c4c3a76e944968826f77f2b9a1b3d137eaa5c7489d7801d55fe30e4f6884ffa5367fd65ab359a7
6
+ metadata.gz: ffdaa145bfb1ed4507d84264a6e85b953cf2fb297a369854f3549cfea2900acbc3949a2e34c6c2f7a32f6684a525e16f2e196289433ce0e72ca0741b15250fc7
7
+ data.tar.gz: dbfa8dfcdba2fb1f2b0463a2f2421394c6a58a4fcb2101efe6e3bfbd0c932146b6ed15eb1d939a2af0b7dbb9b261df9e7ede961e6daa1df09cd760dc9fb3724c
data/README.md CHANGED
@@ -183,6 +183,30 @@ The app is now deployed, but you'll also need to set up emailing, either by
183
183
  using one of the Heroku add-ons (there are some free ones), or by
184
184
  [configuring it yourself](http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration).
185
185
 
186
+ You may also want to set the Ruby GC variables for maximum performance.
187
+ You can either do so by profiling the app with the
188
+ [TuneMyGC Heroku add-on](https://elements.heroku.com/addons/tunemygc), or set
189
+ these values obtained from profiling the Thredded Demo App:
190
+
191
+ ```bash
192
+ # https://tunemygc.com/configs/e2cb38dac2fd4ff9fd9f32036e5e2688
193
+ heroku config:set \
194
+ RUBY_GC_HEAP_INIT_SLOTS=308851 \
195
+ RUBY_GC_HEAP_FREE_SLOTS=1382037 \
196
+ RUBY_GC_HEAP_GROWTH_FACTOR=1.03 \
197
+ RUBY_GC_HEAP_GROWTH_MAX_SLOTS=44771 \
198
+ RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.2 \
199
+ RUBY_GC_MALLOC_LIMIT=29939911 \
200
+ RUBY_GC_MALLOC_LIMIT_MAX=53891840 \
201
+ RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR=1.32 \
202
+ RUBY_GC_OLDMALLOC_LIMIT=24159191 \
203
+ RUBY_GC_OLDMALLOC_LIMIT_MAX=43486544 \
204
+ RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR=1.2
205
+ ```
206
+
207
+ In production, an app created with vanilla thredded_create_app will use around
208
+ ~220 MiB of RAM per puma worker under load.
209
+
186
210
  ## Deploying to a VPS or a bare-metal Ubuntu 16.04 server
187
211
 
188
212
  See: https://github.com/thredded/thredded-ansible.
@@ -40,11 +40,11 @@ module ThreddedCreateApp
40
40
  end
41
41
 
42
42
  def after_sign_out_path_for(resource)
43
- stored_location_for(:user) || root_path
43
+ stored_location_for(:user) || (respond_to?(:root_path) ? root_path : thredded.root_path)
44
44
  end
45
45
 
46
46
  def back_url
47
- session[:user_return_to] || root_path
47
+ session[:user_return_to] || (respond_to?(:root_path) ? root_path : thredded.root_path)
48
48
  end
49
49
  RUBY
50
50
  end
@@ -21,7 +21,7 @@ environment ENV.fetch('RACK_ENV', 'development')
21
21
 
22
22
  before_fork do
23
23
  ::ActiveRecord::Base.connection_pool.disconnect!
24
- ::I18n.backend.send(:init_translations)
24
+ ::I18n.backend.send(:init_translations) unless ::I18n.backend.initialized?
25
25
  end
26
26
 
27
27
  on_worker_boot do
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ThreddedCreateApp
3
- VERSION = '0.1.10'
3
+ VERSION = '0.1.11'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thredded_create_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-07 00:00:00.000000000 Z
11
+ date: 2017-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor