thredded_create_app 0.1.8 → 0.1.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0320eaed1055342d79e18093c4cb6393d3e635b6
|
4
|
+
data.tar.gz: fec864bb99b382618de5848ed53ef0bbb7e6c5dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7f2ba1c0485a54093041bbe9365152cac6a239f5a51776c5e4f0a832b3d642f32632c48f29ea4a41a4072006e125ac7a8777d8050a0f8358889b27ca2cbbeb2
|
7
|
+
data.tar.gz: 68903386fa73e7a367bbf39609ddc041ea2378ec1ecba6e9944cc959e189475dc351cd1de1c3578e9b66a5216fcae13ff580caea224c0bc0e714aefe4d3fb543
|
data/README.md
CHANGED
@@ -183,6 +183,10 @@ 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
|
+
## Deploying to a VPS or a bare-metal Ubuntu 16.04 server
|
187
|
+
|
188
|
+
See: https://github.com/thredded/thredded-ansible.
|
189
|
+
|
186
190
|
## Development
|
187
191
|
|
188
192
|
The instructions below are for developing and contributing to
|
@@ -10,6 +10,7 @@ require 'thredded_create_app/tasks/add_display_name_to_users'
|
|
10
10
|
require 'thredded_create_app/tasks/setup_database'
|
11
11
|
require 'thredded_create_app/tasks/setup_app_skeleton'
|
12
12
|
require 'thredded_create_app/tasks/production_configs'
|
13
|
+
require 'thredded_create_app/tasks/add_memcached_support'
|
13
14
|
require 'thredded_create_app/tasks/docker'
|
14
15
|
module ThreddedCreateApp
|
15
16
|
class Generator < Tasks::Base
|
@@ -65,6 +66,7 @@ module ThreddedCreateApp
|
|
65
66
|
Tasks::AddDisplayNameToUsers,
|
66
67
|
Tasks::SetupAppSkeleton,
|
67
68
|
Tasks::ProductionConfigs,
|
69
|
+
Tasks::AddMemcachedSupport,
|
68
70
|
(Tasks::Docker if @options[:database] == :postgresql),
|
69
71
|
Tasks::SetupDatabase
|
70
72
|
].compact.map { |task_class| task_class.new(@options) }
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'thredded_create_app/tasks/base'
|
3
|
+
module ThreddedCreateApp
|
4
|
+
module Tasks
|
5
|
+
class AddMemcachedSupport < Base
|
6
|
+
def summary
|
7
|
+
'Add memcached support via the dalli memcached client'
|
8
|
+
end
|
9
|
+
|
10
|
+
def before_bundle
|
11
|
+
add_gem 'dalli'
|
12
|
+
add_gem 'connection_pool'
|
13
|
+
end
|
14
|
+
|
15
|
+
def after_bundle
|
16
|
+
inject_into_file 'config/environments/production.rb',
|
17
|
+
before: /end\n\z/,
|
18
|
+
content: dalli_config
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def dalli_config
|
24
|
+
<<-RUBY
|
25
|
+
|
26
|
+
# Configure memcached as the cache store
|
27
|
+
if ENV['MEMCACHE_SERVERS']
|
28
|
+
config.cache_store = :dalli_store,
|
29
|
+
ENV['MEMCACHE_SERVERS'].split(','), {
|
30
|
+
namespace: '#{app_name}',
|
31
|
+
socket_timeout: 1.5,
|
32
|
+
socket_failure_delay: 0.2,
|
33
|
+
down_retry_delay: 60,
|
34
|
+
pool_size: [2, ENV.fetch('WEB_CONCURRENCY', 3).to_i *
|
35
|
+
ENV.fetch('MAX_THREADS', 5).to_i].max
|
36
|
+
}
|
37
|
+
elsif ENV['MEMCACHEDCLOUD_SERVERS']
|
38
|
+
config.cache_store = :dalli_store,
|
39
|
+
ENV['MEMCACHEDCLOUD_SERVERS'].split(','), {
|
40
|
+
username: ENV['MEMCACHEDCLOUD_USERNAME'],
|
41
|
+
password: ENV['MEMCACHEDCLOUD_PASSWORD'],
|
42
|
+
pool_size: [2, ENV.fetch('WEB_CONCURRENCY', 3).to_i *
|
43
|
+
ENV.fetch('MAX_THREADS', 5).to_i].max
|
44
|
+
}
|
45
|
+
end
|
46
|
+
RUBY
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
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.
|
4
|
+
version: 0.1.9
|
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-
|
11
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|
@@ -113,6 +113,7 @@ files:
|
|
113
113
|
- lib/thredded_create_app/tasks/add_devise.rb
|
114
114
|
- lib/thredded_create_app/tasks/add_display_name_to_users.rb
|
115
115
|
- lib/thredded_create_app/tasks/add_display_name_to_users/add_display_name_to_users.rb
|
116
|
+
- lib/thredded_create_app/tasks/add_memcached_support.rb
|
116
117
|
- lib/thredded_create_app/tasks/add_simple_form.rb
|
117
118
|
- lib/thredded_create_app/tasks/add_thredded.rb
|
118
119
|
- lib/thredded_create_app/tasks/add_thredded/_myapp-thredded.scss
|