no_notifier_needed 2.0.13 → 2.0.14

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,7 +4,11 @@ source "http://rubygems.org"
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
  gem 'haml'
6
6
  gem 'rails', '>= 3.2.11'
7
- gem 'metric_fu'
7
+
8
+ group :development, :test do
9
+ gem 'metric_fu'
10
+ end
11
+
8
12
  gem "facets", "~> 2.9.3"
9
13
 
10
14
  group :test do
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.13
1
+ 2.0.14
@@ -2,7 +2,7 @@ class EmailTemplate < ActiveRecord::Base
2
2
  before_save :clean_inputs
3
3
 
4
4
  attr_accessible :body, :subject, :name, :template_type, :sent_to, :when_sent,
5
- :email_template_comments_attributes, :from_name, :from_email, :reply_to
5
+ :email_template_comments_attributes, :from_name, :from_email, :reply_to, :send_via_mandrill
6
6
 
7
7
  def clean_inputs
8
8
  body.strip!
@@ -8,6 +8,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration
8
8
  t.string :reply_to
9
9
  t.string :body
10
10
  t.string :template_type
11
+ t.boolean :send_via_mandrill, :default => false, :null => false
11
12
  end
12
13
  end
13
14
 
@@ -8,7 +8,9 @@ module NoNotifierNeeded
8
8
  :reply_to,
9
9
  :host,
10
10
  :controller,
11
- :action
11
+ :action,
12
+ :mandrill_user_name,
13
+ :mandrill_password
12
14
  ].freeze
13
15
 
14
16
  # @private
@@ -4,6 +4,18 @@ module NoNotifierNeeded
4
4
  @template = EmailTemplate.find_by_name(email_name)
5
5
  raise "Email Template name not found" if @template.nil?
6
6
 
7
+ if @template.send_via_mandrill?
8
+ raise "FUCK OFF"
9
+ self.smtp_settings = {
10
+ :address => "smtp.mandrillapp.com",
11
+ :port => 25, # or 587
12
+ :enable_starttls_auto => true, # detects and uses STARTTLS
13
+ :user_name => NoNotifierNeeded.mandrill_user_name,
14
+ :password => NoNotifierNeeded.mandrill_password,
15
+ :authentication => 'login' # Mandrill supports 'plain' or 'login'
16
+ }
17
+ end
18
+
7
19
  args_to_instance_vars(args)
8
20
 
9
21
  mail_is = mail(get_send_hash) do|format|
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "no_notifier_needed"
8
- s.version = "2.0.13"
8
+ s.version = "2.0.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Robert R. Meyer"]
12
- s.date = "2013-02-04"
12
+ s.date = "2013-02-13"
13
13
  s.description = "A work in progress: Replace ActionMailer::Base class redundency. Temlating using haml or erb."
14
14
  s.email = "Blue.Dog.Archolite@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -93,8 +93,8 @@ Gem::Specification.new do |s|
93
93
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
94
94
  s.add_runtime_dependency(%q<haml>, [">= 0"])
95
95
  s.add_runtime_dependency(%q<rails>, [">= 3.2.11"])
96
- s.add_runtime_dependency(%q<metric_fu>, [">= 0"])
97
96
  s.add_runtime_dependency(%q<facets>, ["~> 2.9.3"])
97
+ s.add_development_dependency(%q<metric_fu>, [">= 0"])
98
98
  s.add_development_dependency(%q<rails-pry>, [">= 0"])
99
99
  s.add_development_dependency(%q<shoulda>, [">= 0"])
100
100
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
@@ -104,8 +104,8 @@ Gem::Specification.new do |s|
104
104
  else
105
105
  s.add_dependency(%q<haml>, [">= 0"])
106
106
  s.add_dependency(%q<rails>, [">= 3.2.11"])
107
- s.add_dependency(%q<metric_fu>, [">= 0"])
108
107
  s.add_dependency(%q<facets>, ["~> 2.9.3"])
108
+ s.add_dependency(%q<metric_fu>, [">= 0"])
109
109
  s.add_dependency(%q<rails-pry>, [">= 0"])
110
110
  s.add_dependency(%q<shoulda>, [">= 0"])
111
111
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
@@ -116,8 +116,8 @@ Gem::Specification.new do |s|
116
116
  else
117
117
  s.add_dependency(%q<haml>, [">= 0"])
118
118
  s.add_dependency(%q<rails>, [">= 3.2.11"])
119
- s.add_dependency(%q<metric_fu>, [">= 0"])
120
119
  s.add_dependency(%q<facets>, ["~> 2.9.3"])
120
+ s.add_dependency(%q<metric_fu>, [">= 0"])
121
121
  s.add_dependency(%q<rails-pry>, [">= 0"])
122
122
  s.add_dependency(%q<shoulda>, [">= 0"])
123
123
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: no_notifier_needed
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.13
5
+ version: 2.0.14
6
6
  platform: ruby
7
7
  authors:
8
8
  - Robert R. Meyer
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-02-04 00:00:00 Z
13
+ date: 2013-02-13 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: haml
@@ -35,25 +35,25 @@ dependencies:
35
35
  prerelease: false
36
36
  version_requirements: *id002
37
37
  - !ruby/object:Gem::Dependency
38
- name: metric_fu
38
+ name: facets
39
39
  requirement: &id003 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
- - - ">="
42
+ - - ~>
43
43
  - !ruby/object:Gem::Version
44
- version: "0"
44
+ version: 2.9.3
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: *id003
48
48
  - !ruby/object:Gem::Dependency
49
- name: facets
49
+ name: metric_fu
50
50
  requirement: &id004 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
- - - ~>
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 2.9.3
56
- type: :runtime
55
+ version: "0"
56
+ type: :development
57
57
  prerelease: false
58
58
  version_requirements: *id004
59
59
  - !ruby/object:Gem::Dependency
@@ -208,7 +208,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
208
208
  requirements:
209
209
  - - ">="
210
210
  - !ruby/object:Gem::Version
211
- hash: -511412368389250678
211
+ hash: -816522051127250190
212
212
  segments:
213
213
  - 0
214
214
  version: "0"