xmlconv 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/bin/xmlconvd +15 -4
- data/lib/xmlconv/util/mail.rb +2 -19
- data/lib/xmlconv/version.rb +1 -1
- data/readme.md +14 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4976e15c3eb44fd7e1e31c9503a49d929a83b79
|
4
|
+
data.tar.gz: 251ef9c9450150f7a548c2525adc3f7ce214846b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d7658887226d0ab9454fa2c58cf30188c40d5e75fdadbce8c34bef8bfa1053c9600550f595c5e0283dcb0a1ce7efdd0b0afa87566eadbc804c3a84ce5b04ffa
|
7
|
+
data.tar.gz: 14df94d39537bae76704a80ea4b11c8d5315815186d3736a16a28c82e6e2288e9fbfa4386e674eda1a7a7c641d4b70fffa6f551888ba6078d37ee09c86a89a31
|
data/History.txt
CHANGED
data/bin/xmlconvd
CHANGED
@@ -19,11 +19,22 @@ if(log_file.is_a?(String))
|
|
19
19
|
end
|
20
20
|
logger = Logger.new(log_file)
|
21
21
|
logger.level = Logger.const_get(config.log_level)
|
22
|
-
logger.info(config.program_name) do
|
23
|
-
require 'pp'
|
24
|
-
config.pretty_inspect
|
25
|
-
end
|
26
22
|
XmlConv::LOGGER = logger
|
23
|
+
if config.respond_to? :mail_suppress_sending
|
24
|
+
::Mail.defaults do delivery_method :test end
|
25
|
+
puts "Mail.mail_suppress_sending"
|
26
|
+
elsif config.respond_to?(:smtp_server)
|
27
|
+
options = {}
|
28
|
+
options[:address] = config.smtp_server
|
29
|
+
options[:port] = config.smtp_port
|
30
|
+
options[:domain] = config.smtp_domain
|
31
|
+
options[:user_name] = config.smtp_user
|
32
|
+
options[:password] = config.smtp_pass
|
33
|
+
options[:authentication] = 'plain'
|
34
|
+
options[:enable_starttls_auto] = true
|
35
|
+
puts "Mail.defaults set to :smpt #{options}"
|
36
|
+
::Mail.defaults do delivery_method :smtp, options end
|
37
|
+
end
|
27
38
|
|
28
39
|
XmlConv::Util.autoload(config.plugin_dir, 'plugin')
|
29
40
|
XmlConv::Util.autoload(config.postproc_dir, 'postproc')
|
data/lib/xmlconv/util/mail.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# encoding: utf-8
|
3
2
|
# Util::Mail -- XmlConv -- 23.04.2009 -- hwyss@ywesee.com
|
4
3
|
|
5
4
|
require 'mail'
|
@@ -10,29 +9,13 @@ module XmlConv
|
|
10
9
|
module Mail
|
11
10
|
SMTP_HANDLER = Net::SMTP
|
12
11
|
def Mail.notify recipients, my_subject, my_body
|
13
|
-
config = XmlConv::CONFIG
|
14
|
-
if config.mail_suppress_sending
|
15
|
-
puts "#{__FILE__}:#{__LINE__} Suppress sending mail with subject: #{my_subject}"
|
16
|
-
::Mail.defaults do delivery_method :test end
|
17
|
-
else
|
18
|
-
puts "Mail.sendmail #{config.smtp_server} #{config.smtp_port} smtp_user: #{config.smtp_user} subject #{my_subject}"
|
19
|
-
::Mail.defaults do
|
20
|
-
options = { :address => config.smtp_server,
|
21
|
-
:port => config.smtp_port,
|
22
|
-
:domain => config.smtp_domain,
|
23
|
-
:user_name => config.smtp_user,
|
24
|
-
:password => config.smtp_pass,
|
25
|
-
:authentication => 'plain',
|
26
|
-
:enable_starttls_auto => true }
|
27
|
-
delivery_method :smtp, options
|
28
|
-
end
|
29
|
-
end
|
30
12
|
recipients.flatten!
|
31
13
|
recipients.compact!
|
32
14
|
recipients.uniq!
|
33
15
|
return if(recipients.empty?)
|
16
|
+
puts "XmlConv::Util::Mail.notify #{ XmlConv::CONFIG.mail_from} -> #{recipients} subject: #{my_subject}"
|
34
17
|
mail = ::Mail.deliver do
|
35
|
-
from
|
18
|
+
from XmlConv::CONFIG.mail_from
|
36
19
|
to recipients
|
37
20
|
subject my_subject
|
38
21
|
body my_body
|
data/lib/xmlconv/version.rb
CHANGED
data/readme.md
CHANGED
@@ -14,11 +14,23 @@ xmlconverter, convert XML to flat files.
|
|
14
14
|
|
15
15
|
* sudo gem install xmlconv
|
16
16
|
|
17
|
+
|
18
|
+
## DEVELOPERS:
|
19
|
+
|
20
|
+
* Zeno R.R. Davatz
|
21
|
+
* Masaomi Hatakeyama
|
22
|
+
* Hannes Wyss (up to Version 1.0)
|
23
|
+
* Niklaus Giger (Ported to Ruby 2.3.1)
|
24
|
+
|
25
|
+
## LICENSE:
|
26
|
+
|
27
|
+
GPLv2.0
|
28
|
+
|
17
29
|
## Debugging
|
18
30
|
|
19
31
|
Use the `bin/xmlconv_admin config=/path/to/your/config.yml`. There you may call stuff like
|
20
32
|
|
21
|
-
|
33
|
+
````transactions.size
|
22
34
|
transactions.last.status
|
23
35
|
transactions.last.output[0..120]
|
24
36
|
transactions.last.uri
|
@@ -31,16 +43,5 @@ transactions.last.response
|
|
31
43
|
transactions.last.output_model
|
32
44
|
transactions.last.partner
|
33
45
|
transactions.last.reader
|
34
|
-
transactions.last.writer
|
46
|
+
transactions.last.writer````
|
35
47
|
|
36
|
-
|
37
|
-
## DEVELOPERS:
|
38
|
-
|
39
|
-
* Zeno R.R. Davatz
|
40
|
-
* Masaomi Hatakeyama
|
41
|
-
* Hannes Wyss (up to Version 1.0)
|
42
|
-
* Niklaus Giger (Ported to Ruby 2.3.1)
|
43
|
-
|
44
|
-
## LICENSE:
|
45
|
-
|
46
|
-
GPLv2.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xmlconv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz, Niklaus Giger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: odba
|