mail_builder 0.2 → 0.3

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.
Files changed (3) hide show
  1. data/Rakefile +2 -1
  2. data/lib/mail_builder.rb +2 -6
  3. metadata +12 -2
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ require "rake/gempackagetask"
24
24
 
25
25
  NAME = "mail_builder"
26
26
  SUMMARY = "MailBuilder is a simple library for building RFC compliant MIME emails."
27
- GEM_VERSION = "0.2"
27
+ GEM_VERSION = "0.3"
28
28
 
29
29
  spec = Gem::Specification.new do |s|
30
30
  s.name = NAME
@@ -37,6 +37,7 @@ spec = Gem::Specification.new do |s|
37
37
  s.require_path = 'lib'
38
38
  s.files = %w(Rakefile) + Dir.glob("lib/**/*")
39
39
  s.add_dependency 'mime-types'
40
+ s.add_dependency 'uuidtools'
40
41
  end
41
42
 
42
43
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -6,6 +6,7 @@ require 'enumerator' unless ''.respond_to?(:enum_for)
6
6
 
7
7
  require 'rubygems'
8
8
  require 'mime/types'
9
+ require 'uuidtools'
9
10
 
10
11
  require 'rubygems'
11
12
 
@@ -45,11 +46,6 @@ class MailBuilder
45
46
  ##
46
47
  BOUNDARY_CHARS = ((39..58).to_a + (65..90).to_a + (97..122).to_a).map { |_| _.chr }.freeze
47
48
 
48
- ##
49
- # Valid characters for an envelope_id
50
- ##
51
- ENVELOPE_CHARS = BOUNDARY_CHARS - ["+"]
52
-
53
49
  CHARSET = 'utf-8'.freeze
54
50
 
55
51
  ##
@@ -130,7 +126,7 @@ class MailBuilder
130
126
  # various states -- including bounces -- allowing it to be tracked.
131
127
  ##
132
128
  def envelope_id
133
- @envelope_id ||= (1..25).to_a.map { ENVELOPE_CHARS[rand(ENVELOPE_CHARS.size)] }.join
129
+ @envelope_id ||= UUIDTools::UUID.random_create.to_s
134
130
  end
135
131
 
136
132
  ##
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ version: "0.3"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernerd Schaefer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-22 00:00:00 -06:00
12
+ date: 2009-12-23 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,6 +22,16 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0"
24
24
  version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: uuidtools
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
25
35
  description: MailBuilder is a simple library for building RFC compliant MIME emails.
26
36
  email: bernerd@wieck.com
27
37
  executables: []