smitty 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99a212ff5d842c723fc6c7065735ea067f36d3ce
4
- data.tar.gz: 5b32ed4266e57f252b2d1216789802922fa5b30b
3
+ metadata.gz: 7c9eccd42d2751fddd8885debe2f6a911bda1a40
4
+ data.tar.gz: 6d0d2dbc1d5e147790a26298622810828106d3f4
5
5
  SHA512:
6
- metadata.gz: 23ce6b70ed7750b1d2de87156f77fa527417b29b5a3f787312d23473d6a16b236a1867b0dbddc46eea2fd3c25a71b3bdb2ac580b0996eb23029b59f51fff9a16
7
- data.tar.gz: a5b08ff840a51a341e6f6657659d040f0274bd6fcc4f4a0c3a4f0f8a755f7e4e9159f7e92cc6db9bad44c0fc89f180e63750f476aee6c6851c99935862ef9b98
6
+ metadata.gz: 9c8aa474de311d2ebf6461b48a5bfa5879a5462db01fe22928db2afe4ea17b0de17684ed6649c9d2257887e1771f2d6977271732404c67e8f47c0e08941c2fca
7
+ data.tar.gz: 1c5a143f7d6f22eec58300d8a6b32c4055d8fc0d073ba07cef4a7b0411ec2b015b2246ad20fa333b3e0f956aa066188cf2a8be847bc1e3e5d6f828b48a80f808
data/bin/smitty CHANGED
@@ -74,17 +74,22 @@ to_addresses.each do |to_address|
74
74
  mail.cc = args['--cc'] unless args['--cc'].nil?
75
75
  mail.subject = subject_copy
76
76
  mail.message_id = "<#{SecureRandom.hex(8)}.#{SecureRandom.hex(8)}@#{message_id_fqdn}>"
77
- mail.text_part do
78
- body Nokogiri::HTML(template_copy).text
79
- end
80
- mail.html_part do
81
- content_type 'text/html; charset=UTF-8'
82
- body template_copy
77
+
78
+ bodypart = Mail::Part.new do
79
+ text_part do
80
+ body Nokogiri::HTML(template_copy).text
81
+ end
82
+ html_part do
83
+ content_type 'text/html; charset=UTF-8'
84
+ body template_copy
85
+ end
83
86
  end
87
+ mail.add_part bodypart
88
+
84
89
  # Attach each file to the message
85
90
  begin
86
- attachments.each { |file|
87
- mail.add_file(file)
91
+ attachments.each { |file|
92
+ mail.add_file(file)
88
93
  if args['--cid']
89
94
  file.sub!(/.*?\/(\w+\.\w{3})$/, '\1')
90
95
  image = mail.attachments[file]
@@ -12,4 +12,4 @@ module Smitty
12
12
  end
13
13
  {replace_string: pairs[0], with: with_content }
14
14
  end
15
- end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module Smitty
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smitty
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Steele
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-28 00:00:00.000000000 Z
11
+ date: 2015-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt