postfix-xforward 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,8 @@
1
+ = 0.1.1, release 2010-08-26
2
+
3
+ * fixed #xtext to allow non-string arguments (returns nil)
4
+ * fixed it so XFORWARD attribute values explicitly set, but set to nil or the empty string will instead send '[UNAVAILABLE]' for the value
5
+
1
6
  = 0.1.0, release 2010-08-19
2
7
 
3
8
  * Initial Release
@@ -248,6 +248,7 @@ module PostfixXForward
248
248
  cap = capable_xforward_attrs
249
249
  @xforward_attrs.each do |attr, value|
250
250
  if cap.include?(attr)
251
+ attr = '[UNAVAILABLE]' if value.nil? or value.empty?
251
252
  tmp = " #{attr}=#{Utils.xtext(value)}"
252
253
  if cmd.length + tmp.length > MAXLEN
253
254
  getok(cmd)
@@ -2,6 +2,7 @@ module PostfixXForward
2
2
  class Utils
3
3
  # Convert the txt string to "xtext" as defined in RFC 1891
4
4
  def Utils.xtext(txt)
5
+ return nil unless txt.respond_to?(:gsub)
5
6
  txt.gsub(/[+=\x00-\x20\x7f-\xff]/) do |c|
6
7
  "+#{c.unpack('H2').first.upcase}"
7
8
  end
@@ -2,7 +2,7 @@ module PostfixXForward
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
  STRING = [MAJOR, MINOR, TINY].join('.')
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postfix-xforward
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kendall Gifford
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-20 00:00:00 -06:00
18
+ date: 2010-08-26 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  version: 1.3.6
70
70
  requirements: []
71
71
 
72
- rubyforge_project:
72
+ rubyforge_project: postfix-xforward
73
73
  rubygems_version: 1.3.7
74
74
  signing_key:
75
75
  specification_version: 3