astrotrain 0.5.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +8 -0
- data/LICENSE +18 -17
- data/Rakefile +118 -103
- data/astrotrain.gemspec +87 -136
- data/lib/astrotrain.rb +47 -51
- data/lib/astrotrain/attachment.rb +55 -0
- data/lib/astrotrain/message.rb +221 -235
- data/lib/astrotrain/transports/http_post.rb +67 -0
- data/lib/astrotrain/transports/resque.rb +63 -0
- data/test/fixtures/bad_email_format.txt +15 -0
- data/test/fixtures/basic.txt +4 -1
- data/test/fixtures/iso-8859-1.txt +1 -0
- data/test/message_test.rb +146 -457
- data/test/test_helper.rb +20 -42
- data/test/transport_test.rb +98 -100
- metadata +100 -243
- data/.gitignore +0 -26
- data/README +0 -47
- data/VERSION +0 -1
- data/config/sample.rb +0 -12
- data/lib/astrotrain/api.rb +0 -52
- data/lib/astrotrain/logged_mail.rb +0 -48
- data/lib/astrotrain/mapping.rb +0 -162
- data/lib/astrotrain/mapping/http_post.rb +0 -18
- data/lib/astrotrain/mapping/jabber.rb +0 -28
- data/lib/astrotrain/mapping/transport.rb +0 -55
- data/lib/astrotrain/tmail.rb +0 -58
- data/lib/astrotrain/worker.rb +0 -65
- data/lib/vendor/rest-client/README.rdoc +0 -104
- data/lib/vendor/rest-client/Rakefile +0 -84
- data/lib/vendor/rest-client/bin/restclient +0 -65
- data/lib/vendor/rest-client/foo.diff +0 -66
- data/lib/vendor/rest-client/lib/rest_client.rb +0 -188
- data/lib/vendor/rest-client/lib/rest_client/net_http_ext.rb +0 -23
- data/lib/vendor/rest-client/lib/rest_client/payload.rb +0 -185
- data/lib/vendor/rest-client/lib/rest_client/request_errors.rb +0 -75
- data/lib/vendor/rest-client/lib/rest_client/resource.rb +0 -103
- data/lib/vendor/rest-client/rest-client.gemspec +0 -18
- data/lib/vendor/rest-client/spec/base.rb +0 -5
- data/lib/vendor/rest-client/spec/master_shake.jpg +0 -0
- data/lib/vendor/rest-client/spec/payload_spec.rb +0 -71
- data/lib/vendor/rest-client/spec/request_errors_spec.rb +0 -44
- data/lib/vendor/rest-client/spec/resource_spec.rb +0 -52
- data/lib/vendor/rest-client/spec/rest_client_spec.rb +0 -219
- data/test/api_test.rb +0 -32
- data/test/logged_mail_test.rb +0 -67
- 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
|
5
|
-
require "context"
|
6
|
-
require 'rr'
|
3
|
+
require 'rubygems'
|
7
4
|
require 'astrotrain'
|
8
|
-
require '
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
17
|
-
|
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
|
-
|
44
|
-
|
45
|
-
|
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
|
data/test/transport_test.rb
CHANGED
@@ -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
|
-
|
4
|
-
|
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
|
-
|
12
|
-
|
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
|
-
|
62
|
-
|
63
|
-
|
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
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
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
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
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
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
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
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
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
|
-
|
104
|
-
|
105
|
-
|
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
|
-
|
108
|
-
|
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
|
-
|
5
|
-
|
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
|
-
-
|
7
|
+
authors:
|
8
|
+
- Rick Olson
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
version:
|
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
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
version: 0.
|
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
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
version: 0.
|
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
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
version:
|
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
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
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
|
-
|
165
|
-
|
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
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
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
|
-
|
187
|
-
|
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
|
-
|
202
|
-
-
|
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/
|
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/
|
221
|
-
- lib/astrotrain/
|
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
|
-
|
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
|
-
|
270
|
-
require_paths:
|
132
|
+
rdoc_options: []
|
133
|
+
require_paths:
|
271
134
|
- lib
|
272
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
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
|
-
|
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
|
-
|
289
|
-
rubygems_version: 1.3.6
|
151
|
+
rubyforge_project: astrotrain
|
152
|
+
rubygems_version: 1.8.11
|
290
153
|
signing_key:
|
291
|
-
specification_version:
|
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: []
|