command_line_email 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.homepage = "https://github.com/JamesLavin/command_line_email"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
+ gem.add_dependency 'mail'
16
17
  gem.add_development_dependency 'rspec'
17
18
  gem.add_development_dependency 'fakefs'
18
19
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -3,13 +3,14 @@ module CommandLineEmail
3
3
  class DeliverEmail
4
4
 
5
5
  def self.deliver(user_config={}, mail_attrs={})
6
+ body_text = mail_attrs[:body] ? grab_text_from_filename_if_file_exists(mail_attrs[:body]) : ''
6
7
 
7
8
  mail = Mail.new do
8
9
  from mail_attrs[:from] || user_config.defaults[:from]
9
10
  to mail_attrs[:to] || user_config.defaults[:to]
10
11
  cc mail_attrs[:cc] || (user_config.defaults && user_config.defaults[:cc]) || nil
11
12
  subject mail_attrs[:subject] || (user.config.defaults && user_config.defaults[:subject]) || ''
12
- body mail_attrs[:body] ? grab_text_from_filename_if_file_exists(mail_attrs[:body]) : ''
13
+ body body_text
13
14
  if mail_attrs[:files]
14
15
  attach_selected(mail_attrs[:files], mail_attrs[:directory] || '')
15
16
  elsif mail_attrs[:directory]
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module CommandLineEmail
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.7"
5
5
  end
metadata CHANGED
@@ -1,52 +1,64 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: command_line_email
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.0.6
4
+ version: 0.0.7
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Lavin
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-19 00:00:00.000000000 Z
12
+ date: 2014-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rspec
16
- version_requirements: !ruby/object:Gem::Requirement
15
+ name: mail
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
17
18
  requirements:
18
- - - ">="
19
+ - - ! '>='
19
20
  - !ruby/object:Gem::Version
20
- version: !binary |-
21
- MA==
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
22
25
  none: false
23
- requirement: !ruby/object:Gem::Requirement
24
26
  requirements:
25
- - - ">="
27
+ - - ! '>='
26
28
  - !ruby/object:Gem::Version
27
- version: !binary |-
28
- MA==
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
29
33
  none: false
30
- prerelease: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
31
38
  type: :development
32
- - !ruby/object:Gem::Dependency
33
- name: fakefs
39
+ prerelease: false
34
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
35
42
  requirements:
36
- - - ">="
43
+ - - ! '>='
37
44
  - !ruby/object:Gem::Version
38
- version: !binary |-
39
- MA==
40
- none: false
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: fakefs
41
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
42
50
  requirements:
43
- - - ">="
51
+ - - ! '>='
44
52
  - !ruby/object:Gem::Version
45
- version: !binary |-
46
- MA==
47
- none: false
48
- prerelease: false
53
+ version: '0'
49
54
  type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
50
62
  description: Send email from the Linux or Mac command line
51
63
  email:
52
64
  - command_line_email@futureresearch.com
@@ -55,7 +67,7 @@ executables:
55
67
  extensions: []
56
68
  extra_rdoc_files: []
57
69
  files:
58
- - ".gitignore"
70
+ - .gitignore
59
71
  - Gemfile
60
72
  - LICENSE.txt
61
73
  - README.md
@@ -76,33 +88,33 @@ files:
76
88
  - spec/spec_helper.rb
77
89
  homepage: https://github.com/JamesLavin/command_line_email
78
90
  licenses: []
79
- post_install_message:
91
+ post_install_message:
80
92
  rdoc_options: []
81
93
  require_paths:
82
94
  - lib
83
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
+ none: false
84
97
  requirements:
85
- - - ">="
98
+ - - ! '>='
86
99
  - !ruby/object:Gem::Version
87
- version: !binary |-
88
- MA==
89
- none: false
100
+ version: '0'
90
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
+ none: false
91
103
  requirements:
92
- - - ">="
104
+ - - ! '>='
93
105
  - !ruby/object:Gem::Version
94
- version: !binary |-
95
- MA==
96
- none: false
106
+ version: '0'
97
107
  requirements: []
98
- rubyforge_project:
99
- rubygems_version: 1.8.24
100
- signing_key:
108
+ rubyforge_project:
109
+ rubygems_version: 1.8.23
110
+ signing_key:
101
111
  specification_version: 3
102
- summary: Send email from the Linux or Mac command line. Can attach specific files or all files in a directory. Can load email body from a file.
112
+ summary: Send email from the Linux or Mac command line. Can attach specific files
113
+ or all files in a directory. Can load email body from a file.
103
114
  test_files:
104
115
  - spec/command_line_email/cle_optparse_spec.rb
105
116
  - spec/command_line_email/command_line_email_spec.rb
106
117
  - spec/command_line_email/deliver_email_spec.rb
107
118
  - spec/command_line_email/send_email_setup_spec.rb
108
119
  - spec/spec_helper.rb
120
+ has_rdoc: