nifty_settings 1.0.0 → 1.0.1

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: f966a5e5af3ead20201cfc215e5154cf0969f42e
4
- data.tar.gz: baa6d5a012e6b4b3b100e9d6a2662a106e97579a
3
+ metadata.gz: afe17f45b901676afd6eda08c0523130f180af55
4
+ data.tar.gz: 394d6c9f4fcd34dd355d748e63bc6475ffb68d85
5
5
  SHA512:
6
- metadata.gz: 97cd32b0a622cf22dd173b5335a82743b96114943674d129cac4734918fa44fb83c2288b5e101d4f20d967a53861fe5f7d0a87c888e0d922bf413b2d6f1eee2a
7
- data.tar.gz: 0ee70c1cc0c164d2905aef9aec9eec3d221016af5dda8cd56f9dbd3e55900c56778dc3943c3da0ce061742584ffffb2147f6906e9d2bb0230f605a6255d841f2
6
+ metadata.gz: 610084ce9b84259a353e11b449d1c41e1233c24d02f30258864d43320abbb1a7df9453ecca6eddd31748f8ddad785f626c578ffd6767dfa8e4bd144e19d991cb
7
+ data.tar.gz: 6c5f996ce61be1a6c843bdcdda9b3afd588bfedc807cf98c30bda1a027aa190dcc1193c49883df6259850ef3adea02623ae94790b478923cce5251796044a02b
@@ -87,7 +87,6 @@ module NiftySettings
87
87
  def reset!
88
88
  @@default = nil
89
89
  default # Force us to reload the settings
90
- NiftySettings::Settings.setup_mailer! if defined?(ActionMailer)
91
90
  # If a setup block is defined, call it post configuration.
92
91
  @setup_callback.call if defined?(@setup_callback) && @setup_callback
93
92
  true
@@ -108,38 +107,6 @@ module NiftySettings
108
107
  def env
109
108
  @env ||= defined?(Rails) ? Rails.env : ENV['RACK_ENV']
110
109
  end
111
-
112
- def ssl?
113
- !disable_ssl? && (force_ssl? || env == 'production')
114
- end
115
-
116
- def ssl_protocol
117
- ssl? ? "https" : "http"
118
- end
119
-
120
- # Sets up ActionMailer to use settings from Settings.
121
- def setup_mailer!
122
- return unless mailer?
123
- s = mailer
124
- ActionMailer::Base.default_url_options[:host] = s.host
125
- ActionMailer::Base.delivery_method = s.delivery_method.to_sym
126
- ActionMailer::Base.smtp_settings = s.smtp_settings.to_hash if s.smtp_settings?
127
- ActionMailer::Base.sendmail_settings = s.sendmail_settings.to_hash if s.sendmail_settings?
128
- ActionMailer::Base.default :from => s.from
129
-
130
- # Setup sendgrid if present, sort of a faux-sendgrid helper.
131
- if s.delivery_method.to_sym == :sendgrid
132
- ActionMailer::Base.delivery_method = :smtp
133
- ActionMailer::Base.smtp_settings = {
134
- :address => "smtp.sendgrid.net",
135
- :port => "25",
136
- :authentication => :plain,
137
- :user_name => s.sendgrid.username,
138
- :password => s.sendgrid.password,
139
- :domain => s.sendgrid.domain
140
- }
141
- end
142
- end
143
110
  end
144
111
 
145
112
  private
@@ -1,3 +1,3 @@
1
1
  module NiftySettings
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nifty_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Meurer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-08 00:00:00.000000000 Z
11
+ date: 2013-07-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Settings
14
14
  email: manuel.meurer@gmail.com