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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52293199589ad1e233725390c0077c937eb517d9
4
- data.tar.gz: c06cf45a104ddc8a5c45e9f46cc2153a105ebbbd
3
+ metadata.gz: c8c7b556572f0ead543b1ebe81791b7d5fb5e14b
4
+ data.tar.gz: 4a2987c8738419f42401efb7bbc9fe29459ed283
5
5
  SHA512:
6
- metadata.gz: d8f4db2ad0e9d50d8c919570b4626d0caeae20a9fc86a961912393e9282a31c6fbfa1caf32ddafcce043eaf9cb6c72a8178282da253b07c1f8d18ec355c05f9c
7
- data.tar.gz: 95bb942ab9e5e1793f394a16b5e411f6dee58ed1ad33c60ad43b342547370bb74f25280949219701a722d7d317c969ebaf74e93cafc10fa5d26d95bb5d892e88
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 `"redis://localhost:6379/#{name of your application}"` for production and `"redis://localhost:6379/#{name of your application}-{environment}"` for others.
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
 
@@ -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.1.5'
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']
@@ -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/#{Rails.application.class.parent_name.parameterize}#{Rails.env.production? ? '' : "-#{Rails.env.to_s}"}"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jt-rails-toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan TRIBOUHARET