jreport 0.0.4 → 0.0.5

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: 3e90d044d33399cc0febc3c48ec6e5fd19815f2a
4
- data.tar.gz: c873f6faf7fcbfaae4403df5f990c7f1a4129ee6
3
+ metadata.gz: 89f15a08597c2e346e832875c84c9820ee11df74
4
+ data.tar.gz: 6d7c5369a970bf28d003e7c386b8c3303d42e072
5
5
  SHA512:
6
- metadata.gz: 6fb41a4682255dafc88aa907e3565b9c8a0bcdfc6a43fb03cb5dc511ce53bbc3772772f55a537b6bc3242f9ad1151c04c9c7a73a45f0bfca4dbef350d28e199c
7
- data.tar.gz: 9df2290597bc2b0b2a773463b8e3d40103abeabdf106740039414f69a9293bdae03ed183cfb0b751e2492caad692d3aa000951943355466060197e9da2365c28
6
+ metadata.gz: 1c43510c7dee0515a7d363390d904bc704eb2ae72ac111cd647f1154086429c56c46fa368307de8be86a1d7da464930ce52993d50204b9a2a0e2cbf9a322e544
7
+ data.tar.gz: 798298089c40fd5b126a87f92aa722fd14f73700e940d24eea2670ee2e99e43ea7cb50fbcd2d263671f2d29babeda06708362e431e83455f013e4879bcac23cd
@@ -31,9 +31,14 @@ module Jreport
31
31
  puts "Below is content body\n#{'-'*20}"
32
32
  puts html
33
33
  `echo "#{html}" > "#{ctrl.save_to}"` if ctrl.save_to
34
- ops=ctrl.options.merge('body'=>html,'content-type'=>"text/html;charset=UTF-8")
34
+ ops=ctrl.options.merge!('body'=>html,'content-type'=>"text/html;charset=UTF-8")
35
35
  puts "Sending email for #{m}..."
36
- send_mail ops
36
+ if ctrl.respond_to? :send_mail
37
+ ctrl.send :send_mail,ops
38
+ else
39
+ puts "Send with default mailer"
40
+ send_mail ops
41
+ end
37
42
  rescue=>e
38
43
  puts e
39
44
  puts e.backtrace
@@ -63,6 +68,9 @@ module Jreport
63
68
  body options['body']
64
69
  content_type options['content-type']
65
70
  end
71
+ if options['files']
72
+ options.split(';').each{|f| add_file f }
73
+ end
66
74
  end
67
75
  m.deliver!
68
76
  puts 'Sent!'
@@ -1,3 +1,3 @@
1
1
  module Jreport
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jreport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - qjpcpu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-18 00:00:00.000000000 Z
11
+ date: 2014-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler