jt-rails-toolbox 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d914fd68deaf4f8970947acaf31db74a0eb21ead
4
- data.tar.gz: b300bb2a1984b66b2e55ff73a619c5c7003f4098
3
+ metadata.gz: a29986684113cb32a180eadaaf54164811414eda
4
+ data.tar.gz: 4935ab5957a2ab9c9d9eea09e64223d01d22780a
5
5
  SHA512:
6
- metadata.gz: f6c882bf337b13f78e830ea3a1253e35edc770fd203ec82ffbf705c4dcb41a320c686b166c5c05c34c4ef562fd0b820e116b15402be1b443978a56489ac49769
7
- data.tar.gz: d2a747650ac52226df558086d5499c60939bf76f165e0a29c46a9a173b1656a6be7b838289fa4bde05c6cd9d524e2012be0d90bc462b06359b5819cc862132e1
6
+ metadata.gz: 8740e5e78e076481cbd0b3c2d14849257ee2d77c24eddeae41653d6566dab0ffbb4c5c00d4d195ed7ebafba33d1df8e4f0024317d3c70128ad5dbb12ec75f265
7
+ data.tar.gz: 2d26e6b37642f7e8f7c5f24573e0924c57fb001fb0b606c4d177e6fac37f558d5e8ca756128d5fe70f2f21fda69031be148df0a0cd2ae0088b7dd2462ba24558
@@ -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.1'
6
+ s.version = '1.1.2'
7
7
  s.files = `git ls-files`.split("\n")
8
8
  s.require_paths = ['lib']
9
9
  s.authors = ['Jonathan TRIBOUHARET']
@@ -21,12 +21,12 @@ module JTRailsToolbox
21
21
  class Railtie < ::Rails::Railtie
22
22
 
23
23
  initializer "jt-rails-toolbox" do |app|
24
- @params = HashWithIndifferentAccess.new
24
+ @params = {}
25
25
 
26
26
  if ::File.exists?('config/jt-toolbox.yml')
27
27
  yaml = YAML.load_file('config/jt-toolbox.yml')
28
28
  if yaml
29
- @params = HashWithIndifferentAccess.new(yaml[Rails.env.to_s])
29
+ @params = yaml[Rails.env.to_s] || {}
30
30
  end
31
31
  end
32
32
 
@@ -52,11 +52,11 @@ module JTRailsToolbox
52
52
 
53
53
  @params['mail'] ||= {}
54
54
  @params['mail']['delivery_method'] ||= :test
55
-
56
55
  @params['mail']['delivery_method'] = @params['mail']['delivery_method'].to_sym
57
56
 
58
57
  @params['mail']['smtp_settings'] ||= {}
59
58
  settings = @params['mail']['smtp_settings'].dup
59
+ @params['mail']['smtp_settings'] = {}
60
60
  for key, value in settings
61
61
  @params['mail']['smtp_settings'][key.to_sym] = value
62
62
  end
@@ -89,12 +89,6 @@ module JTRailsToolbox
89
89
  ActionMailer::Base.smtp_settings = @params['mail']['smtp_settings']
90
90
  ActionMailer::Base.default_url_options[:host] = @params['hosts']['host']
91
91
  ActionMailer::Base.default from: @params['mail']['from']
92
-
93
- Rails.configuration.action_mailer.delivery_method = ActionMailer::Base.delivery_method
94
- Rails.configuration.action_mailer.smtp_settings = ActionMailer::Base.smtp_settings
95
- Rails.configuration.action_mailer.default_url_options ||= {}
96
- Rails.configuration.action_mailer.default_url_options[:host] = ActionMailer::Base.default_url_options[:host]
97
- Rails.configuration.action_mailer.default = ActionMailer::Base.default
98
92
  end
99
93
 
100
94
  def configure_paperclip(app)
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.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan TRIBOUHARET