sendgrid_cli_mailer 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -25,14 +25,11 @@ Or install it yourself as:
25
25
 
26
26
  You can send a message with a body specified via arguments:
27
27
 
28
- sg_mailer mail --from 'admin@yourjoint.com' --to 'hank@me.com' --subject 'Testing CLI' --body 'Short Body' --user 'sg@foo.com' --key '1234'"
28
+ sg_cli mail --from 'admin@yourjoint.com' --to 'hank@me.com' --subject 'Testing CLI' --body 'Short Body' --user 'sg@foo.com' --key '1234'"
29
29
 
30
- Or use STDOUT/Redirection to send a message body:
31
-
32
- cat /some/file | sg_mailer mail --from 'admin@yourjoint.com' --to 'hank@me.com' --subject 'Testing CLI' --user 'sg@foo.com' --key '1234'"
33
-
34
- NOTE: if you supply both the STDIN will win.
30
+ OR use your body input in other ways like so:
35
31
 
32
+ sg_cli mail --from 'admin@yourjoint.com' --to 'hank@me.com' --subject 'Testing CLI' --user 'sg@foo.com' --key '1234'" --body `cat /etc/hosts`
36
33
 
37
34
 
38
35
  ## Contributing
data/bin/sg_cli CHANGED
@@ -12,8 +12,7 @@ class SendgridCliMailerCommand < Thor
12
12
  method_option :subject, :aliases => "-s", :desc => "Email 'subject'", :required => true
13
13
  method_option :body, :aliases => "-b", :desc => "Email 'body'", :required => false
14
14
  def mail
15
- stdin_body = $stdin.read if $stdin.stat.size > 0
16
- body = stdin_body || options.body || "No Message Body"
15
+ body = options.body || "No Message Body"
17
16
  SendgridToolkit::Mail.new(options[:user], options[:key]).send_mail :to => options[:to], :from => options[:from],
18
17
  :subject => options[:subject], :text => body
19
18
  end
@@ -1,3 +1,3 @@
1
1
  module SendgridCliMailer
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendgrid_cli_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: