youthtree-settings 0.1.1 → 0.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.
@@ -3,7 +3,7 @@ require 'yaml'
3
3
  module YouthTree
4
4
  class Settings
5
5
 
6
- VERSION = "0.1.1".freeze
6
+ VERSION = "0.1.2".freeze
7
7
 
8
8
  cattr_reader :settings_path
9
9
  def self.settings_path
@@ -100,6 +100,19 @@ module YouthTree
100
100
  ActionMailer::Base.smtp_settings = s.smtp_settings.to_hash if s.smtp_settings?
101
101
  ActionMailer::Base.sendmail_settings = s.sendmail_settings.to_hash if s.sendmail_settings?
102
102
  ActionMailer::Base.default :from => s.from
103
+
104
+ # Setup sendgrid if present, sort of a faux-sendgrid helper.
105
+ if s.delivery_method.to_sym == :sendgrid
106
+ ActionMailer::Base.delivery_method = :smttp
107
+ ActionMailer::Base.smtp_settings = {
108
+ :address => "smtp.sendgrid.net",
109
+ :port => "25",
110
+ :authentication => :plain,
111
+ :user_name => s.sendgrid.username,
112
+ :password => s.sendgrid.password,
113
+ :domain => s.sendgrid.domain
114
+ }
115
+ end
103
116
  end
104
117
 
105
118
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{youthtree-settings}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Darcy Laycock"]
12
- s.date = %q{2010-07-10}
12
+ s.date = %q{2010-08-25}
13
13
  s.description = %q{Lets you use config/settings.yml in a rails application to manage settings on a per-env basis.}
14
14
  s.email = %q{sutto@sutto.net}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youthtree-settings
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Darcy Laycock
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-10 00:00:00 +08:00
18
+ date: 2010-08-25 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency