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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e04eacd57c18034b0a9635332c08f78d02f4c16
4
- data.tar.gz: 89dec346bf68e809ef68b75b87d43db8df8c7356
3
+ metadata.gz: d4976e15c3eb44fd7e1e31c9503a49d929a83b79
4
+ data.tar.gz: 251ef9c9450150f7a548c2525adc3f7ce214846b
5
5
  SHA512:
6
- metadata.gz: 179f49cf4fc1ccd42c41b52eafa7b23123123f549743082571478cd941347cf3f59fc6c3f81733f116db4d25ebdd1d1882c817c1b827c96ae9da6df0b69d1695
7
- data.tar.gz: 3a74403af4a1e440c32cd09006960013fa5b2054c0205e287c31cae3ab859acea6a88dfd44186ba3f1c772a0c096ac72da4152a696072b83e6f74f7ea3799de7
6
+ metadata.gz: 0d7658887226d0ab9454fa2c58cf30188c40d5e75fdadbce8c34bef8bfa1053c9600550f595c5e0283dcb0a1ce7efdd0b0afa87566eadbc804c3a84ce5b04ffa
7
+ data.tar.gz: 14df94d39537bae76704a80ea4b11c8d5315815186d3736a16a28c82e6e2288e9fbfa4386e674eda1a7a7c641d4b70fffa6f551888ba6078d37ee09c86a89a31
@@ -1,3 +1,7 @@
1
+ === 1.0.4 / 20.06.2016
2
+
3
+ * setup correct smtp delivery if config.smtp_server is given. Works with smtp.gmail.com
4
+
1
5
  === 1.0.3 / 20.06.2016
2
6
 
3
7
  * Remove some fields from config.rb
@@ -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')
@@ -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 config.mail_from
18
+ from XmlConv::CONFIG.mail_from
36
19
  to recipients
37
20
  subject my_subject
38
21
  body my_body
@@ -1,3 +1,3 @@
1
1
  module XmlConv
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
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
- ```transactions.size
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.3
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-20 00:00:00.000000000 Z
11
+ date: 2016-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: odba