heroku_development_email_enabling 0.0.1
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.
- data/.gitignore +9 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/heroku_development_email_enabling.gemspec +22 -0
- data/lib/heroku_development_email_enabling.rb +46 -0
- data/lib/heroku_development_email_enabling/version.rb +3 -0
- metadata +62 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "heroku_development_email_enabling/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "heroku_development_email_enabling"
|
7
|
+
s.version = HerokuDevelopmentEmailEnabling::VERSION
|
8
|
+
s.authors = ["femto"]
|
9
|
+
s.email = ["femtowin@gmail.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{heroku_development_email_enabling}
|
12
|
+
s.description = %q{heroku_development_email_enabling}
|
13
|
+
|
14
|
+
s.rubyforge_project = "heroku_development_email_enabling"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
s.add_runtime_dependency "heroku"
|
22
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require "heroku_development_email_enabling/version"
|
2
|
+
|
3
|
+
module HerokuDevelopmentEmailEnabling
|
4
|
+
str = `heroku config`
|
5
|
+
puts str
|
6
|
+
str.split("\n").each do |line|
|
7
|
+
if line =~/SENDGRID_USERNAME\s+\=\>\s(.+)$/
|
8
|
+
ENV["SENDGRID_USERNAME"] ||= $1
|
9
|
+
elsif line=~/SENDGRID_PASSWORD\s+\=\>\s(.+)$/
|
10
|
+
ENV["SENDGRID_PASSWORD"] ||= $1
|
11
|
+
end
|
12
|
+
end
|
13
|
+
puts ENV["SENDGRID_USERNAME"]
|
14
|
+
puts ENV["SENDGRID_PASSWORD"]
|
15
|
+
if Rails.env == "development"
|
16
|
+
config = Rails.configuration
|
17
|
+
|
18
|
+
config.action_mailer.default_url_options = {:host => 'www.pushsurvey.com'}
|
19
|
+
config.action_mailer.delivery_method = :smtp
|
20
|
+
config.action_mailer.raise_delivery_errors = true
|
21
|
+
config.action_mailer.perform_deliveries = true
|
22
|
+
#config.action_mailer.default_charset = 'utf-8'
|
23
|
+
|
24
|
+
|
25
|
+
if ENV['SENDGRID_USERNAME'] #in heroku environment
|
26
|
+
config.action_mailer.smtp_settings = {
|
27
|
+
:address => 'smtp.sendgrid.net',
|
28
|
+
:port => '25',
|
29
|
+
:domain =>ENV['SENDGRID_DOMAIN'],
|
30
|
+
:authentication => :plain,
|
31
|
+
:user_name => ENV['SENDGRID_USERNAME'],
|
32
|
+
:password => ENV['SENDGRID_PASSWORD'],
|
33
|
+
}
|
34
|
+
else
|
35
|
+
config.action_mailer.smtp_settings = {
|
36
|
+
:address => 'smtp.sendgrid.net',
|
37
|
+
:port => '25',
|
38
|
+
:user_name => 'app2686805@heroku.com',
|
39
|
+
:password => "j0sqe0yf",
|
40
|
+
:authentication => :plain, # :plain, :login, :cram_md5, no auth by default
|
41
|
+
:domain => "heroku.com" # the HELO domain provided by the client to the server
|
42
|
+
}
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: heroku_development_email_enabling
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- femto
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-02-05 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: heroku
|
16
|
+
requirement: &13908288 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *13908288
|
25
|
+
description: heroku_development_email_enabling
|
26
|
+
email:
|
27
|
+
- femtowin@gmail.com
|
28
|
+
executables: []
|
29
|
+
extensions: []
|
30
|
+
extra_rdoc_files: []
|
31
|
+
files:
|
32
|
+
- .gitignore
|
33
|
+
- Gemfile
|
34
|
+
- Rakefile
|
35
|
+
- heroku_development_email_enabling.gemspec
|
36
|
+
- lib/heroku_development_email_enabling.rb
|
37
|
+
- lib/heroku_development_email_enabling/version.rb
|
38
|
+
homepage: ''
|
39
|
+
licenses: []
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options: []
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
46
|
+
requirements:
|
47
|
+
- - ! '>='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
requirements: []
|
57
|
+
rubyforge_project: heroku_development_email_enabling
|
58
|
+
rubygems_version: 1.7.2
|
59
|
+
signing_key:
|
60
|
+
specification_version: 3
|
61
|
+
summary: heroku_development_email_enabling
|
62
|
+
test_files: []
|