jt-rails-toolbox 1.1.5 → 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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/jt-rails-toolbox.gemspec +1 -1
- data/lib/jt-rails-toolbox.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8c7b556572f0ead543b1ebe81791b7d5fb5e14b
|
4
|
+
data.tar.gz: 4a2987c8738419f42401efb7bbc9fe29459ed283
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 304295a2c68c9bb0a46ee85719b9ea9ca17e935c1e8ceac1468a9427efd3ae0e3411efee2cfff6836265d3709808024fc7f06cd57231dd01cd2d66527e63997f
|
7
|
+
data.tar.gz: ebb2a7316574f0810107cff975d4bbe1274812717ccebabe7e42773104e8b81c02510c2c167a79c4e93ef2910803dff70d61d9f85025341e41689d35bf3d5ac0
|
data/README.md
CHANGED
@@ -47,13 +47,13 @@ In addition to the default ignored exceptions, the following exceptions are also
|
|
47
47
|
|
48
48
|
- configured for `ActiveJob`
|
49
49
|
- configured to send notification error with Exception Notification
|
50
|
-
- redis url is by default `
|
50
|
+
- redis url is by default `redis://localhost:6379/0` and the namespace is `#{name of your application}` for production and `#{name of your application}-{environment}` for others.
|
51
51
|
|
52
52
|
#### Warning
|
53
53
|
|
54
54
|
Don't forget to install redis server and to launch sidekiq with:
|
55
55
|
|
56
|
-
`bundle exec sidekiq -q default -q mailers`
|
56
|
+
`bundle exec sidekiq -e $RAILS_ENV -q default -q mailers -d -L log/sidekiq.log -P tmp/pids/sidekiq.pid`
|
57
57
|
|
58
58
|
### Hostname
|
59
59
|
|
data/jt-rails-toolbox.gemspec
CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
|
|
3
3
|
s.summary = "Common libs used for Ruby On Rails development."
|
4
4
|
s.description = "JTRailsToolbox contains a list of common libs used for Ruby On Rails development."
|
5
5
|
s.homepage = 'https://github.com/jonathantribouharet/jt-rails-toolbox'
|
6
|
-
s.version = '1.
|
6
|
+
s.version = '1.2.0'
|
7
7
|
s.files = `git ls-files`.split("\n")
|
8
8
|
s.require_paths = ['lib']
|
9
9
|
s.authors = ['Jonathan TRIBOUHARET']
|
data/lib/jt-rails-toolbox.rb
CHANGED
@@ -67,7 +67,8 @@ module JTRailsToolbox
|
|
67
67
|
@params['hosts']['cdn_host'] ||= @params['hosts']['asset_host']
|
68
68
|
|
69
69
|
@params['sidekiq'] ||= {}
|
70
|
-
@params['sidekiq']['redis_url'] ||= "redis://localhost:6379
|
70
|
+
@params['sidekiq']['redis_url'] ||= "redis://localhost:6379/0"
|
71
|
+
@params['sidekiq']['namespace'] ||= "#{Rails.application.class.parent_name.parameterize}#{Rails.env.production? ? '' : "-#{Rails.env.to_s}"}"
|
71
72
|
end
|
72
73
|
|
73
74
|
def configure_exception_notification(app)
|
@@ -108,13 +109,13 @@ module JTRailsToolbox
|
|
108
109
|
|
109
110
|
def configure_sidekiq(app)
|
110
111
|
Sidekiq.configure_server do |config|
|
111
|
-
config.redis = { url: @params['sidekiq']['redis_url'] }
|
112
|
+
config.redis = { url: @params['sidekiq']['redis_url'], namespace: @params['sidekiq']['namespace'] }
|
112
113
|
|
113
114
|
config.error_handlers << Proc.new {|ex, ctx_hash| ExceptionNotifier.notify_exception(ex, data: ctx_hash) }
|
114
115
|
end
|
115
116
|
|
116
117
|
Sidekiq.configure_client do |config|
|
117
|
-
config.redis = { url: @params['sidekiq']['redis_url'] }
|
118
|
+
config.redis = { url: @params['sidekiq']['redis_url'], namespace: @params['sidekiq']['namespace'] }
|
118
119
|
end
|
119
120
|
|
120
121
|
ActiveJob::Base.queue_adapter = :sidekiq
|