gmail-mailer 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # gmail-mailer Changelog
2
2
 
3
+ ### 0.4.2
4
+ * Made error messages for credentials more detailed
5
+
3
6
  ### 0.4.0
4
7
  * Added further validation on the `to` field
5
8
  * Added ability to pass an array into the `to` field which will convert the `to` to a semi-colon delimited string
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  Programatically send emails using a given gmail account. No username/passwords needed, just use your OAUTH credentials
2
2
 
3
+ ## Information
4
+ This has only been tested on ruby 1.9.2
5
+
3
6
  ## Usage
4
7
  ### Creating a message
5
8
  message = GmailMailer::Message.new("to", "Hello Subject", "Hello Body")
@@ -9,6 +12,12 @@ Programatically send emails using a given gmail account. No username/passwords n
9
12
 
10
13
  ### Setting up gmail-mailer
11
14
  You will need to provide mailer with a hashmap containing the ouath details for your account.
15
+ email_credentials =
16
+ {
17
+ :smtp_oauth_token=>"<your outh_token>",
18
+ :smtp_oauth_token_secret=>"<your ouath token secret>",
19
+ :email=>"<your gmail address>"
20
+ }
12
21
 
13
22
  ### Sending a message
14
23
  mailer.send(message)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
data/gmail-mailer.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gmail-mailer}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Daniel Harper"]
data/lib/gmail-mailer.rb CHANGED
@@ -9,7 +9,7 @@ module GmailMailer
9
9
  class Mailer
10
10
  def initialize(credentials)
11
11
  result = validate_credentials(credentials)
12
- raise ArgumentError, result if result.nil? == false
12
+ raise ArgumentError, "ERROR: Email credentials are invalid: -\n\n - #{result}" if result.nil? == false
13
13
  @email_credentials = credentials
14
14
  end
15
15
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 1
9
- version: 0.4.1
8
+ - 2
9
+ version: 0.4.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Harper