jt-rails-toolbox 1.1.1 → 1.1.2
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/jt-rails-toolbox.gemspec +1 -1
- data/lib/jt-rails-toolbox.rb +3 -9
- 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: a29986684113cb32a180eadaaf54164811414eda
|
4
|
+
data.tar.gz: 4935ab5957a2ab9c9d9eea09e64223d01d22780a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8740e5e78e076481cbd0b3c2d14849257ee2d77c24eddeae41653d6566dab0ffbb4c5c00d4d195ed7ebafba33d1df8e4f0024317d3c70128ad5dbb12ec75f265
|
7
|
+
data.tar.gz: 2d26e6b37642f7e8f7c5f24573e0924c57fb001fb0b606c4d177e6fac37f558d5e8ca756128d5fe70f2f21fda69031be148df0a0cd2ae0088b7dd2462ba24558
|
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.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']
|
data/lib/jt-rails-toolbox.rb
CHANGED
@@ -21,12 +21,12 @@ module JTRailsToolbox
|
|
21
21
|
class Railtie < ::Rails::Railtie
|
22
22
|
|
23
23
|
initializer "jt-rails-toolbox" do |app|
|
24
|
-
@params =
|
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 =
|
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)
|