email_nugget_rb 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ Jeweler::Tasks.new do |gem|
21
21
  gem.description = %Q{Save email envelope and message in a single data format.}
22
22
  gem.email = "development@greenviewdata.com"
23
23
  gem.authors = ["Jon Durbin"]
24
- gem.version = "0.0.3"
24
+ gem.version = "0.0.4"
25
25
  # dependencies defined in Gemfile
26
26
  end
27
27
  Jeweler::RubygemsDotOrgTasks.new
@@ -0,0 +1,72 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{email_nugget_rb}
8
+ s.version = "0.0.4"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Jon Durbin"]
12
+ s.date = %q{2013-06-05}
13
+ s.description = %q{Save email envelope and message in a single data format.}
14
+ s.email = %q{development@greenviewdata.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "email_nugget_rb.gemspec",
28
+ "lib/email_nugget.rb",
29
+ "lib/email_nugget/envelope.rb",
30
+ "lib/email_nugget/message.rb",
31
+ "lib/email_nugget_rb.rb",
32
+ "spec/fixtures/test1.nugget",
33
+ "spec/fixtures/test2.nugget",
34
+ "spec/lib/email_nugget/envelope_spec.rb",
35
+ "spec/lib/email_nugget/message_spec.rb",
36
+ "spec/lib/email_nugget_spec.rb",
37
+ "spec/spec_helper.rb"
38
+ ]
39
+ s.homepage = %q{http://github.com/gdi/email_nugget_rb}
40
+ s.licenses = ["MIT"]
41
+ s.require_paths = ["lib"]
42
+ s.rubygems_version = %q{1.6.2}
43
+ s.summary = %q{Save email envelope and message in single data format.}
44
+
45
+ if s.respond_to? :specification_version then
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_runtime_dependency(%q<uuid>, [">= 0"])
50
+ s.add_runtime_dependency(%q<json>, [">= 0"])
51
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
52
+ s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
53
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
54
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
55
+ else
56
+ s.add_dependency(%q<uuid>, [">= 0"])
57
+ s.add_dependency(%q<json>, [">= 0"])
58
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
59
+ s.add_dependency(%q<yard>, ["~> 0.6.0"])
60
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
61
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
62
+ end
63
+ else
64
+ s.add_dependency(%q<uuid>, [">= 0"])
65
+ s.add_dependency(%q<json>, [">= 0"])
66
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
67
+ s.add_dependency(%q<yard>, ["~> 0.6.0"])
68
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
69
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
70
+ end
71
+ end
72
+
@@ -44,7 +44,7 @@ class EmailNugget
44
44
  # Save the checksum in the second line.
45
45
  nugget_file.syswrite(self.message.checksum + "\n")
46
46
  # Save the message contents after the second line.
47
- nugget_file.syswrite(self.message.data + "\n")
47
+ nugget_file.syswrite(self.message.data)
48
48
  rescue => e
49
49
  # Unable to save email nugget to file_path
50
50
  #puts "Error saving email nugget to #{file_path}: #{e.to_s}"
@@ -1,3 +1,3 @@
1
- {"ip":"127.0.0.1","helo":"test.com","mail_from":"test@test.com","rcpt_to":["test@test.com"],"date":"2012-03-26 16:29:26 -0400","context":"inbound","misc":{}}
1
+ {"context":"inbound","date":"Wed Jun 05 10:52:37 -0400 2013","mail_from":"test@test.com","misc":{"message_id":"123456"},"ip":"127.0.0.1","helo":"test.com","rcpt_to":["test@test.com"]}
2
2
  7df477726f7d2673a018d1789af53e24
3
- Test write nugget.
3
+ Test write nugget.
@@ -57,6 +57,11 @@ describe EmailNugget do
57
57
  it "should return false if write failed" do
58
58
  @nugget.write_to("/a/a/a/a/bad_path_to.nugget").should == false
59
59
  end
60
+ it "should have the same checksum as the original" do
61
+ @nugget.write_to(File.dirname(__FILE__) + '/..fixtures/test2.nugget')
62
+ from_write = EmailNugget.new_from(File.dirname(__FILE__) + '/../fixtures/test2.nugget')
63
+ from_write.message.checksum.should == @nugget.message.checksum
64
+ end
60
65
  end
61
66
 
62
67
  describe '.new_from()' do
metadata CHANGED
@@ -1,90 +1,125 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: email_nugget_rb
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 4
10
+ version: 0.0.4
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Jon Durbin
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-04-24 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: uuid
16
- requirement: &70342398812280 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
17
+
18
+ date: 2013-06-05 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
22
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70342398812280
25
- - !ruby/object:Gem::Dependency
26
- name: json
27
- requirement: &70342398811640 !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
28
24
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ name: uuid
33
+ version_requirements: *id001
34
+ prerelease: false
35
+ - !ruby/object:Gem::Dependency
33
36
  type: :runtime
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ name: json
47
+ version_requirements: *id002
34
48
  prerelease: false
35
- version_requirements: *70342398811640
36
- - !ruby/object:Gem::Dependency
37
- name: rspec
38
- requirement: &70342398810880 !ruby/object:Gem::Requirement
49
+ - !ruby/object:Gem::Dependency
50
+ type: :development
51
+ requirement: &id003 !ruby/object:Gem::Requirement
39
52
  none: false
40
- requirements:
53
+ requirements:
41
54
  - - ~>
42
- - !ruby/object:Gem::Version
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 2
59
+ - 3
60
+ - 0
43
61
  version: 2.3.0
44
- type: :development
62
+ name: rspec
63
+ version_requirements: *id003
45
64
  prerelease: false
46
- version_requirements: *70342398810880
47
- - !ruby/object:Gem::Dependency
48
- name: yard
49
- requirement: &70342398810160 !ruby/object:Gem::Requirement
65
+ - !ruby/object:Gem::Dependency
66
+ type: :development
67
+ requirement: &id004 !ruby/object:Gem::Requirement
50
68
  none: false
51
- requirements:
69
+ requirements:
52
70
  - - ~>
53
- - !ruby/object:Gem::Version
71
+ - !ruby/object:Gem::Version
72
+ hash: 7
73
+ segments:
74
+ - 0
75
+ - 6
76
+ - 0
54
77
  version: 0.6.0
55
- type: :development
78
+ name: yard
79
+ version_requirements: *id004
56
80
  prerelease: false
57
- version_requirements: *70342398810160
58
- - !ruby/object:Gem::Dependency
59
- name: bundler
60
- requirement: &70342398809420 !ruby/object:Gem::Requirement
81
+ - !ruby/object:Gem::Dependency
82
+ type: :development
83
+ requirement: &id005 !ruby/object:Gem::Requirement
61
84
  none: false
62
- requirements:
85
+ requirements:
63
86
  - - ~>
64
- - !ruby/object:Gem::Version
87
+ - !ruby/object:Gem::Version
88
+ hash: 23
89
+ segments:
90
+ - 1
91
+ - 0
92
+ - 0
65
93
  version: 1.0.0
66
- type: :development
94
+ name: bundler
95
+ version_requirements: *id005
67
96
  prerelease: false
68
- version_requirements: *70342398809420
69
- - !ruby/object:Gem::Dependency
70
- name: jeweler
71
- requirement: &70342398829440 !ruby/object:Gem::Requirement
97
+ - !ruby/object:Gem::Dependency
98
+ type: :development
99
+ requirement: &id006 !ruby/object:Gem::Requirement
72
100
  none: false
73
- requirements:
101
+ requirements:
74
102
  - - ~>
75
- - !ruby/object:Gem::Version
103
+ - !ruby/object:Gem::Version
104
+ hash: 7
105
+ segments:
106
+ - 1
107
+ - 6
108
+ - 4
76
109
  version: 1.6.4
77
- type: :development
110
+ name: jeweler
111
+ version_requirements: *id006
78
112
  prerelease: false
79
- version_requirements: *70342398829440
80
113
  description: Save email envelope and message in a single data format.
81
114
  email: development@greenviewdata.com
82
115
  executables: []
116
+
83
117
  extensions: []
84
- extra_rdoc_files:
118
+
119
+ extra_rdoc_files:
85
120
  - LICENSE.txt
86
121
  - README.rdoc
87
- files:
122
+ files:
88
123
  - .document
89
124
  - .rspec
90
125
  - Gemfile
@@ -92,6 +127,7 @@ files:
92
127
  - LICENSE.txt
93
128
  - README.rdoc
94
129
  - Rakefile
130
+ - email_nugget_rb.gemspec
95
131
  - lib/email_nugget.rb
96
132
  - lib/email_nugget/envelope.rb
97
133
  - lib/email_nugget/message.rb
@@ -102,32 +138,39 @@ files:
102
138
  - spec/lib/email_nugget/message_spec.rb
103
139
  - spec/lib/email_nugget_spec.rb
104
140
  - spec/spec_helper.rb
141
+ has_rdoc: true
105
142
  homepage: http://github.com/gdi/email_nugget_rb
106
- licenses:
143
+ licenses:
107
144
  - MIT
108
145
  post_install_message:
109
146
  rdoc_options: []
110
- require_paths:
147
+
148
+ require_paths:
111
149
  - lib
112
- required_ruby_version: !ruby/object:Gem::Requirement
150
+ required_ruby_version: !ruby/object:Gem::Requirement
113
151
  none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- segments:
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ hash: 3
156
+ segments:
119
157
  - 0
120
- hash: 3983421339398493086
121
- required_rubygems_version: !ruby/object:Gem::Requirement
158
+ version: "0"
159
+ required_rubygems_version: !ruby/object:Gem::Requirement
122
160
  none: false
123
- requirements:
124
- - - ! '>='
125
- - !ruby/object:Gem::Version
126
- version: '0'
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ hash: 3
165
+ segments:
166
+ - 0
167
+ version: "0"
127
168
  requirements: []
169
+
128
170
  rubyforge_project:
129
- rubygems_version: 1.8.10
171
+ rubygems_version: 1.6.2
130
172
  signing_key:
131
173
  specification_version: 3
132
174
  summary: Save email envelope and message in single data format.
133
175
  test_files: []
176
+