astrotrain 0.5.4 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/Gemfile +8 -0
  2. data/LICENSE +18 -17
  3. data/Rakefile +118 -103
  4. data/astrotrain.gemspec +87 -136
  5. data/lib/astrotrain.rb +47 -51
  6. data/lib/astrotrain/attachment.rb +55 -0
  7. data/lib/astrotrain/message.rb +221 -235
  8. data/lib/astrotrain/transports/http_post.rb +67 -0
  9. data/lib/astrotrain/transports/resque.rb +63 -0
  10. data/test/fixtures/bad_email_format.txt +15 -0
  11. data/test/fixtures/basic.txt +4 -1
  12. data/test/fixtures/iso-8859-1.txt +1 -0
  13. data/test/message_test.rb +146 -457
  14. data/test/test_helper.rb +20 -42
  15. data/test/transport_test.rb +98 -100
  16. metadata +100 -243
  17. data/.gitignore +0 -26
  18. data/README +0 -47
  19. data/VERSION +0 -1
  20. data/config/sample.rb +0 -12
  21. data/lib/astrotrain/api.rb +0 -52
  22. data/lib/astrotrain/logged_mail.rb +0 -48
  23. data/lib/astrotrain/mapping.rb +0 -162
  24. data/lib/astrotrain/mapping/http_post.rb +0 -18
  25. data/lib/astrotrain/mapping/jabber.rb +0 -28
  26. data/lib/astrotrain/mapping/transport.rb +0 -55
  27. data/lib/astrotrain/tmail.rb +0 -58
  28. data/lib/astrotrain/worker.rb +0 -65
  29. data/lib/vendor/rest-client/README.rdoc +0 -104
  30. data/lib/vendor/rest-client/Rakefile +0 -84
  31. data/lib/vendor/rest-client/bin/restclient +0 -65
  32. data/lib/vendor/rest-client/foo.diff +0 -66
  33. data/lib/vendor/rest-client/lib/rest_client.rb +0 -188
  34. data/lib/vendor/rest-client/lib/rest_client/net_http_ext.rb +0 -23
  35. data/lib/vendor/rest-client/lib/rest_client/payload.rb +0 -185
  36. data/lib/vendor/rest-client/lib/rest_client/request_errors.rb +0 -75
  37. data/lib/vendor/rest-client/lib/rest_client/resource.rb +0 -103
  38. data/lib/vendor/rest-client/rest-client.gemspec +0 -18
  39. data/lib/vendor/rest-client/spec/base.rb +0 -5
  40. data/lib/vendor/rest-client/spec/master_shake.jpg +0 -0
  41. data/lib/vendor/rest-client/spec/payload_spec.rb +0 -71
  42. data/lib/vendor/rest-client/spec/request_errors_spec.rb +0 -44
  43. data/lib/vendor/rest-client/spec/resource_spec.rb +0 -52
  44. data/lib/vendor/rest-client/spec/rest_client_spec.rb +0 -219
  45. data/test/api_test.rb +0 -32
  46. data/test/logged_mail_test.rb +0 -67
  47. data/test/mapping_test.rb +0 -129
data/test/test_helper.rb CHANGED
@@ -1,51 +1,29 @@
1
- $testing = true
2
1
  $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
2
 
4
- require "rubygems"
5
- require "context"
6
- require 'rr'
3
+ require 'rubygems'
7
4
  require 'astrotrain'
8
- require 'astrotrain/api'
9
- require 'rack/test'
10
-
11
- module Astrotrain
12
- load File.dirname(__FILE__) do
13
- DataMapper.setup(:default, 'sqlite3::memory:')
5
+ require 'test/unit'
6
+
7
+ class Test::Unit::TestCase
8
+ ##
9
+ # test/spec/mini
10
+ # http://gist.github.com/307649
11
+ # chris@ozmm.org
12
+ #
13
+ def self.test(name, &block)
14
+ define_method("test_#{name.gsub(/\W/,'_')}", &block)
14
15
  end
16
+ def self.xtest(*args) end
17
+ def self.setup(&block) define_method(:setup, &block) end
18
+ def self.teardown(&block) define_method(:teardown, &block) end
15
19
 
16
- LoggedMail.auto_migrate!
17
- Mapping.auto_migrate!
18
-
19
- LoggedMail.log_path = Astrotrain.root / 'messages'
20
- FileUtils.rm_rf LoggedMail.log_path
21
- FileUtils.mkdir_p LoggedMail.log_path
22
-
23
- Message.queue_path = root / 'fixtures' / 'queue'
24
- FileUtils.rm_rf Message.queue_path
25
- FileUtils.mkdir_p Message.queue_path
26
-
27
- class TestCase < Test::Unit::TestCase
28
- include RR::Adapters::RRMethods
29
-
30
- before do
31
- RR.reset
32
- end
33
-
34
- after do
35
- RR.verify
36
- end
37
-
38
- def mail(filename)
39
- IO.read(File.join(File.dirname(__FILE__), 'fixtures', "#{filename}.txt"))
40
- end
20
+ def mail(filename)
21
+ File.join(File.dirname(__FILE__), 'fixtures', "#{filename}.txt")
41
22
  end
42
23
 
43
- class ApiTestCase < TestCase
44
- def app
45
- Sinatra::Application
46
- end
47
-
48
- include Rack::Test::Methods
24
+ PARSED = {}
25
+ def astrotrain(filename)
26
+ PARSED[filename] ||= Astrotrain::Message.read(mail(filename))
49
27
  end
50
28
  end
51
29
 
@@ -53,4 +31,4 @@ begin
53
31
  require 'ruby-debug'
54
32
  Debugger.start
55
33
  rescue LoadError
56
- end
34
+ end
@@ -1,113 +1,111 @@
1
- require File.join(File.dirname(__FILE__), "test_helper")
1
+ require File.expand_path(File.join(File.dirname(__FILE__), "test_helper"))
2
2
 
3
- class Astrotrain::TransportTest < Astrotrain::TestCase
4
- describe "HttpPost" do
5
- before :all do
6
- @post = 'http://example.com'
7
- @message = Astrotrain::Message.parse(mail(:custom))
8
- @mapping = Astrotrain::Mapping.new(:destination => @post, :transport => 'http_post')
9
- end
3
+ Astrotrain::Transports.load :http
4
+ Astrotrain::Transports.load :resque
10
5
 
11
- before do
12
- @trans = Astrotrain::Mapping::HttpPost.new(@message, @mapping, @message.recipients(%w(delivered_to)).first)
13
- @expected_fields = @trans.fields.merge(:emails => @message.recipients(%w(original_to to)) * ",")
14
- end
15
-
16
- it "sets #fields" do
17
- expected = {:subject => @message.subject, :from => @message.sender, :to => @message.recipients(%w(delivered_to)).first, :body => @message.body, :html => @message.html, :emails => @message.recipients(%w(original_to to)),
18
- "headers[reply-to]" => "reply-to-me@example.com", 'headers[message-id]' => '<a16be7390810161014n52b603e9k1aa6bb803c6735aa@mail.gmail.com>', 'headers[to]' => "processor@astrotrain.com",
19
- "headers[mime-version]"=>"1.0", "headers[content-type]"=>"text/plain; charset=ISO-8859-1", "headers[content-disposition]"=>"inline", "headers[content-transfer-encoding]"=>"7bit"}
20
- assert_equal expected, @trans.fields
21
- end
22
-
23
- it "adds attachments to #fields" do
24
- @multipart = Astrotrain::Message.parse(mail(:multipart))
25
- @trans = Astrotrain::Mapping::HttpPost.new(@multipart, @mapping, @multipart.recipients.first)
26
- assert_equal @multipart.attachments.first, @trans.fields[:attachments_0]
27
- end
28
-
29
- it "sets fields with mapping separator set" do
30
- @message = Astrotrain::Message.parse(mail(:reply))
31
- @mapping.separator = "=" * 5
32
- @trans = Astrotrain::Mapping::HttpPost.new(@message, @mapping, @message.recipients.first)
33
- assert_equal "blah blah", @trans.fields[:body]
34
- end
35
-
36
- describe "when processing" do
37
- before do
38
- stub(Astrotrain::Mapping::HttpPost).new {@trans}
39
- end
40
-
41
- it "makes http post request" do
42
- mock(RestClient).post(@mapping.destination, @expected_fields)
43
- @trans.process
44
- end
45
-
46
- it "makes http post request from Transport" do
47
- mock(RestClient).post(@mapping.destination, @expected_fields)
48
- Astrotrain::Mapping::Transport.process(@message, @mapping, @message.recipients.first)
49
- end
50
-
51
- before :all do
52
- Astrotrain::Mapping::Transport.processing = true
53
- end
54
-
55
- after :all do
56
- Astrotrain::Mapping::Transport.processing = false
57
- end
58
- end
6
+ class TransportTest < Test::Unit::TestCase
7
+ class Job
59
8
  end
60
9
 
61
- if Astrotrain::Mapping.const_defined?(:Jabber)
62
- describe "jabber" do
63
- before :all do
64
- @dest = 'foo@bar.com'
65
- @message = Astrotrain::Message.parse(mail(:custom))
66
- @mapping = Astrotrain::Mapping.new(:destination => @dest, :transport => 'jabber')
67
- end
68
-
69
- before do
70
- @trans = Astrotrain::Mapping::Jabber.new(@message, @mapping, @message.recipients(%w(delivered_to)).first)
71
- end
72
-
73
- it "sets #content" do
74
- expected = "From: %s\nTo: %s\nSubject: %s\nEmails: %s\n%s" % [@message.sender, @message.recipients(%w(delivered_to)).first, @message.subject, @message.recipients(%w(original_to to)) * ", ", @message.body]
75
- assert_equal expected, @trans.content
76
- end
10
+ def teardown
11
+ Astrotrain::Transports::HttpPost.connection = nil
12
+ end
77
13
 
78
- it "sets content with mapping separator set" do
79
- @message = Astrotrain::Message.parse(mail(:reply))
80
- @mapping.separator = "=" * 5
81
- @trans = Astrotrain::Mapping::Jabber.new(@message, @mapping, @message.recipients(%w(delivered_to)).first)
82
- expected = "From: %s\nTo: %s\nSubject: %s\nEmails: %s\n%s" % [@message.sender, @message.recipients(%w(delivered_to)).first, @message.subject, '', "blah blah"]
83
- assert_equal expected, @trans.content
84
- end
14
+ test "posts email to webhook" do
15
+ msg = astrotrain(:multipart)
16
+
17
+ stub_http
18
+ Astrotrain.deliver(msg, "http://localhost/foo",
19
+ :payload => {:a => 1})
20
+ params = @last_http_env[:body]
21
+ assert_equal 1, params[:a]
22
+ assert_equal 'foo@example.com', params[:to][0][:address]
23
+ assert_equal 'rick@example.com', params[:from][0][:address]
24
+ assert_equal 'Rick Olson', params[:from][0][:name]
25
+ assert_equal msg.subject, params[:subject]
26
+ assert_equal msg.body, params[:body]
27
+ assert_equal msg.recipients.first, params[:emails]
28
+ assert_equal 'bandit.jpg', params[:attachments][0].filename
29
+ assert_match 'image/jpeg', params[:attachments][0].content_type
30
+ assert_equal '<ddf0a08f0812091503x4696425eid0fa5910ad39bce1@mail.examle.com>', params[:headers]['message-id']
31
+ end
85
32
 
86
- describe "when processing" do
87
- before do
88
- @conn = Object.new
89
- stub(@trans).connection { @conn }
90
- stub(Astrotrain::Mapping::Jabber).new { @trans }
91
- end
33
+ test "queues email in resque" do
34
+ queue = "astrotrain-test"
35
+ klass = "TransportTest::Job"
36
+ msg = astrotrain(:basic)
37
+ Astrotrain.deliver(msg, "resque://#{queue}/#{klass}", :payload => {:a => 1})
38
+ job = Resque.reserve(queue)
39
+ assert_equal TransportTest::Job, job.payload_class
40
+ payload = job.args[0]
41
+ assert_equal 1, payload['a']
42
+ assert_equal 'processor@astrotrain.com', payload['to'][0]['address']
43
+ assert_equal 'Processor', payload['to'][0]['name']
44
+ assert_equal 'user@example.com', payload['from'][0]['address']
45
+ assert_equal 'Bob', payload['from'][0]['name']
46
+ assert_equal 'fred@example.com', payload['cc'][0]['address']
47
+ assert_equal 'Fred', payload['cc'][0]['name']
48
+ assert_equal msg.subject, payload['subject']
49
+ assert_equal msg.body, payload['body']
50
+ assert_equal msg.recipients.first, payload['emails']
51
+ end
92
52
 
93
- it "makes jabber delivery" do
94
- mock(@conn).deliver(@mapping.destination, @trans.content)
95
- @trans.process
96
- end
53
+ test "building http params with attachment" do
54
+ msg = astrotrain(:multipart)
55
+ params = Astrotrain::Transports::HttpPost.create_hash(msg, 'bar@example.com')
56
+
57
+ assert_equal 'foo@example.com', params[:to][0][:address]
58
+ assert_equal 'rick@example.com', params[:from][0][:address]
59
+ assert_equal 'Rick Olson', params[:from][0][:name]
60
+ assert_equal msg.subject, params[:subject]
61
+ assert_equal msg.body, params[:body]
62
+ assert_equal msg.recipients.first, params[:emails]
63
+ assert_equal 'bandit.jpg', params[:attachments][0].filename
64
+ assert_match 'image/jpeg', params[:attachments][0].content_type
65
+ assert_equal '<ddf0a08f0812091503x4696425eid0fa5910ad39bce1@mail.examle.com>', params[:headers]['message-id']
66
+ end
97
67
 
98
- it "makes jabber delivery from Transport" do
99
- mock(@conn).deliver(@mapping.destination, @trans.content)
100
- Astrotrain::Mapping::Transport.process(@message, @mapping, @message.recipients(%w(delivered_to)).first)
101
- end
68
+ test "building http params without attachment" do
69
+ msg = astrotrain(:basic)
70
+ params = Astrotrain::Transports::HttpPost.create_hash(msg, 'bar@example.com')
71
+
72
+ assert_equal 'processor@astrotrain.com', params[:to][0][:address]
73
+ assert_equal 'Processor', params[:to][0][:name]
74
+ assert_equal 'user@example.com', params[:from][0][:address]
75
+ assert_equal 'Bob', params[:from][0][:name]
76
+ assert_equal 'fred@example.com', params[:cc][0][:address]
77
+ assert_equal 'Fred', params[:cc][0][:name]
78
+ assert_equal msg.subject, params[:subject]
79
+ assert_equal msg.body, params[:body]
80
+ assert_equal msg.recipients.first, params[:emails]
81
+ assert !params.key?(:attachments)
82
+ end
102
83
 
103
- before :all do
104
- Astrotrain::Mapping::Transport.processing = true
105
- end
84
+ test "building resque params" do
85
+ msg = astrotrain(:basic)
86
+ params = Astrotrain::Transports::Resque.create_hash(msg, 'bar@example.com')
87
+
88
+ assert_equal 'processor@astrotrain.com', params[:to][0][:address]
89
+ assert_equal 'Processor', params[:to][0][:name]
90
+ assert_equal 'user@example.com', params[:from][0][:address]
91
+ assert_equal 'Bob', params[:from][0][:name]
92
+ assert_equal 'fred@example.com', params[:cc][0][:address]
93
+ assert_equal 'Fred', params[:cc][0][:name]
94
+ assert_equal msg.subject, params[:subject]
95
+ assert_equal msg.body, params[:body]
96
+ assert_equal msg.recipients.first, params[:emails]
97
+ assert !params.key?(:attachments)
98
+ end
106
99
 
107
- after :all do
108
- Astrotrain::Mapping::Transport.processing = false
100
+ def stub_http
101
+ Astrotrain::Transports::HttpPost.connection =
102
+ Faraday::Connection.new do |builder|
103
+ builder.adapter :test do |stub|
104
+ stub.post('/foo') do |env|
105
+ @last_http_env = env.dup
106
+ [200, {}, 'ok']
107
+ end
109
108
  end
110
109
  end
111
- end
112
110
  end
113
- end
111
+ end
metadata CHANGED
@@ -1,243 +1,111 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: astrotrain
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 5
8
- - 4
9
- version: 0.5.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
12
- - technoweenie
7
+ authors:
8
+ - Rick Olson
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-04-01 00:00:00 -07:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: addressable
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 2
29
- - 0
30
- - 2
31
- version: 2.0.2
32
- type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: tmail
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - "="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 1
43
- - 2
44
- - 3
45
- - 1
46
- version: 1.2.3.1
47
- type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: data_objects
51
- prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- requirements:
54
- - - "="
55
- - !ruby/object:Gem::Version
56
- segments:
57
- - 0
58
- - 9
59
- - 11
60
- version: 0.9.11
61
- type: :runtime
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
64
- name: dm-core
65
- prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
67
- requirements:
68
- - - "="
69
- - !ruby/object:Gem::Version
70
- segments:
71
- - 0
72
- - 9
73
- - 11
74
- version: 0.9.11
12
+ date: 2012-04-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: utf8
16
+ requirement: &70356293558240 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.1.8
75
22
  type: :runtime
76
- version_requirements: *id004
77
- - !ruby/object:Gem::Dependency
78
- name: dm-aggregates
79
23
  prerelease: false
80
- requirement: &id005 !ruby/object:Gem::Requirement
81
- requirements:
82
- - - "="
83
- - !ruby/object:Gem::Version
84
- segments:
85
- - 0
86
- - 9
87
- - 11
88
- version: 0.9.11
24
+ version_requirements: *70356293558240
25
+ - !ruby/object:Gem::Dependency
26
+ name: mail
27
+ requirement: &70356293557420 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 2.4.0
89
33
  type: :runtime
90
- version_requirements: *id005
91
- - !ruby/object:Gem::Dependency
92
- name: dm-timestamps
93
34
  prerelease: false
94
- requirement: &id006 !ruby/object:Gem::Requirement
95
- requirements:
96
- - - "="
97
- - !ruby/object:Gem::Version
98
- segments:
99
- - 0
100
- - 9
101
- - 11
102
- version: 0.9.11
35
+ version_requirements: *70356293557420
36
+ - !ruby/object:Gem::Dependency
37
+ name: i18n
38
+ requirement: &70356293547400 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.4.1
103
44
  type: :runtime
104
- version_requirements: *id006
105
- - !ruby/object:Gem::Dependency
106
- name: dm-types
107
45
  prerelease: false
108
- requirement: &id007 !ruby/object:Gem::Requirement
109
- requirements:
110
- - - "="
111
- - !ruby/object:Gem::Version
112
- segments:
113
- - 0
114
- - 9
115
- - 11
116
- version: 0.9.11
46
+ version_requirements: *70356293547400
47
+ - !ruby/object:Gem::Dependency
48
+ name: faraday
49
+ requirement: &70356293546660 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.5.0
117
55
  type: :runtime
118
- version_requirements: *id007
119
- - !ruby/object:Gem::Dependency
120
- name: dm-validations
121
56
  prerelease: false
122
- requirement: &id008 !ruby/object:Gem::Requirement
123
- requirements:
124
- - - "="
125
- - !ruby/object:Gem::Version
126
- segments:
127
- - 0
128
- - 9
129
- - 11
130
- version: 0.9.11
57
+ version_requirements: *70356293546660
58
+ - !ruby/object:Gem::Dependency
59
+ name: addressable
60
+ requirement: &70356293545960 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: 2.2.4
131
66
  type: :runtime
132
- version_requirements: *id008
133
- - !ruby/object:Gem::Dependency
134
- name: context
135
- prerelease: false
136
- requirement: &id009 !ruby/object:Gem::Requirement
137
- requirements:
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- segments:
141
- - 0
142
- version: "0"
143
- type: :development
144
- version_requirements: *id009
145
- - !ruby/object:Gem::Dependency
146
- name: rr
147
67
  prerelease: false
148
- requirement: &id010 !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- segments:
153
- - 0
154
- version: "0"
155
- type: :development
156
- version_requirements: *id010
157
- - !ruby/object:Gem::Dependency
158
- name: sinatra
159
- prerelease: false
160
- requirement: &id011 !ruby/object:Gem::Requirement
161
- requirements:
68
+ version_requirements: *70356293545960
69
+ - !ruby/object:Gem::Dependency
70
+ name: charlock_holmes
71
+ requirement: &70356293544900 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
162
74
  - - ~>
163
- - !ruby/object:Gem::Version
164
- segments:
165
- - 1
166
- - 0
167
- - 0
168
- version: 1.0.0
169
- type: :development
170
- version_requirements: *id011
171
- - !ruby/object:Gem::Dependency
172
- name: rack-test
75
+ - !ruby/object:Gem::Version
76
+ version: 0.6.8
77
+ type: :runtime
173
78
  prerelease: false
174
- requirement: &id012 !ruby/object:Gem::Requirement
175
- requirements:
176
- - - ">="
177
- - !ruby/object:Gem::Version
178
- segments:
179
- - 0
180
- version: "0"
79
+ version_requirements: *70356293544900
80
+ - !ruby/object:Gem::Dependency
81
+ name: resque
82
+ requirement: &70356293544140 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
181
88
  type: :development
182
- version_requirements: *id012
183
- - !ruby/object:Gem::Dependency
184
- name: xmppr4-simple
185
89
  prerelease: false
186
- requirement: &id013 !ruby/object:Gem::Requirement
187
- requirements:
188
- - - ">="
189
- - !ruby/object:Gem::Version
190
- segments:
191
- - 0
192
- version: "0"
193
- type: :development
194
- version_requirements: *id013
195
- description:
90
+ version_requirements: *70356293544140
91
+ description: email => http post
196
92
  email: technoweenie@gmail.com
197
93
  executables: []
198
-
199
94
  extensions: []
200
-
201
- extra_rdoc_files:
202
- - LICENSE
203
- - README
204
- files:
205
- - .gitignore
95
+ extra_rdoc_files: []
96
+ files:
97
+ - Gemfile
206
98
  - LICENSE
207
- - README
208
99
  - Rakefile
209
- - VERSION
210
100
  - astrotrain.gemspec
211
- - config/sample.rb
212
101
  - lib/astrotrain.rb
213
- - lib/astrotrain/api.rb
214
- - lib/astrotrain/logged_mail.rb
215
- - lib/astrotrain/mapping.rb
216
- - lib/astrotrain/mapping/http_post.rb
217
- - lib/astrotrain/mapping/jabber.rb
218
- - lib/astrotrain/mapping/transport.rb
102
+ - lib/astrotrain/attachment.rb
219
103
  - lib/astrotrain/message.rb
220
- - lib/astrotrain/tmail.rb
221
- - lib/astrotrain/worker.rb
222
- - lib/vendor/rest-client/README.rdoc
223
- - lib/vendor/rest-client/Rakefile
224
- - lib/vendor/rest-client/bin/restclient
225
- - lib/vendor/rest-client/foo.diff
226
- - lib/vendor/rest-client/lib/rest_client.rb
227
- - lib/vendor/rest-client/lib/rest_client/net_http_ext.rb
228
- - lib/vendor/rest-client/lib/rest_client/payload.rb
229
- - lib/vendor/rest-client/lib/rest_client/request_errors.rb
230
- - lib/vendor/rest-client/lib/rest_client/resource.rb
231
- - lib/vendor/rest-client/rest-client.gemspec
232
- - lib/vendor/rest-client/spec/base.rb
233
- - lib/vendor/rest-client/spec/master_shake.jpg
234
- - lib/vendor/rest-client/spec/payload_spec.rb
235
- - lib/vendor/rest-client/spec/request_errors_spec.rb
236
- - lib/vendor/rest-client/spec/resource_spec.rb
237
- - lib/vendor/rest-client/spec/rest_client_spec.rb
238
- - test/api_test.rb
104
+ - lib/astrotrain/transports/http_post.rb
105
+ - lib/astrotrain/transports/resque.rb
239
106
  - test/fixtures/apple_multipart.txt
240
107
  - test/fixtures/bad_content_type.txt
108
+ - test/fixtures/bad_email_format.txt
241
109
  - test/fixtures/basic.txt
242
110
  - test/fixtures/custom.txt
243
111
  - test/fixtures/fwd.txt
@@ -255,45 +123,34 @@ files:
255
123
  - test/fixtures/reply.txt
256
124
  - test/fixtures/undisclosed.txt
257
125
  - test/fixtures/utf-8.txt
258
- - test/logged_mail_test.rb
259
- - test/mapping_test.rb
260
126
  - test/message_test.rb
261
127
  - test/test_helper.rb
262
128
  - test/transport_test.rb
263
- has_rdoc: true
264
- homepage: http://github.com/entp/astrotrain
129
+ homepage: http://github.com/technoweenie/astrotrain
265
130
  licenses: []
266
-
267
131
  post_install_message:
268
- rdoc_options:
269
- - --charset=UTF-8
270
- require_paths:
132
+ rdoc_options: []
133
+ require_paths:
271
134
  - lib
272
- required_ruby_version: !ruby/object:Gem::Requirement
273
- requirements:
274
- - - ">="
275
- - !ruby/object:Gem::Version
276
- segments:
277
- - 0
278
- version: "0"
279
- required_rubygems_version: !ruby/object:Gem::Requirement
280
- requirements:
281
- - - ">="
282
- - !ruby/object:Gem::Version
283
- segments:
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ none: false
137
+ requirements:
138
+ - - ! '>='
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
141
+ segments:
284
142
  - 0
285
- version: "0"
143
+ hash: -621490843432909131
144
+ required_rubygems_version: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
286
150
  requirements: []
287
-
288
- rubyforge_project:
289
- rubygems_version: 1.3.6
151
+ rubyforge_project: astrotrain
152
+ rubygems_version: 1.8.11
290
153
  signing_key:
291
- specification_version: 3
154
+ specification_version: 2
292
155
  summary: email => http post
293
- test_files:
294
- - test/api_test.rb
295
- - test/logged_mail_test.rb
296
- - test/mapping_test.rb
297
- - test/message_test.rb
298
- - test/test_helper.rb
299
- - test/transport_test.rb
156
+ test_files: []