astrotrain 0.5.4 → 0.6.0

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 (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/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
4
+ gem 'rake', '~> 0.9.2'
5
+
6
+ group :development do
7
+ gem 'resque'
8
+ end
data/LICENSE CHANGED
@@ -1,20 +1,21 @@
1
- Copyright (c) 2008-* ENTP
1
+ The MIT License
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
3
+ Copyright (c) rick
10
4
 
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
13
11
 
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/Rakefile CHANGED
@@ -1,124 +1,139 @@
1
+ require 'rubygems'
1
2
  require 'rake'
3
+ require 'date'
2
4
 
3
- begin
4
- require 'jeweler'
5
- Jeweler::Tasks.new do |gem|
6
- gem.name = "astrotrain"
7
- gem.summary = %Q{email => http post}
8
- gem.email = "technoweenie@gmail.com"
9
- gem.homepage = "http://github.com/entp/astrotrain"
10
- gem.authors = ["technoweenie"]
11
-
12
- dm_ver = "0.9.11"
13
- gem.add_runtime_dependency 'addressable', '2.0.2'
14
- gem.add_runtime_dependency "tmail", "1.2.3.1"
15
- gem.add_runtime_dependency "data_objects", dm_ver
16
- gem.add_runtime_dependency "dm-core", dm_ver # The datamapper ORM
17
- gem.add_runtime_dependency "dm-aggregates", dm_ver # Provides your DM models with count, sum, avg, min, max, etc.
18
- gem.add_runtime_dependency "dm-timestamps", dm_ver # Automatically populate created_at, created_on, etc. when those properties are present.
19
- gem.add_runtime_dependency "dm-types", dm_ver # Provides additional types, including csv, json, yaml.
20
- gem.add_runtime_dependency "dm-validations", dm_ver # Validation framework
21
- gem.add_development_dependency "context"
22
- gem.add_development_dependency "rr"
23
- gem.add_development_dependency "sinatra", "~> 1.0.0"
24
- gem.add_development_dependency "rack-test"
25
- gem.add_development_dependency "xmppr4-simple"
26
- end
5
+ #############################################################################
6
+ #
7
+ # Helper functions
8
+ #
9
+ #############################################################################
27
10
 
28
- rescue LoadError
29
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
11
+ def name
12
+ @name ||= Dir['*.gemspec'].first.split('.').first
30
13
  end
31
14
 
32
- namespace :at do
33
- task :init do
34
- $LOAD_PATH.unshift File.expand_path(ENV['LIB']) if ENV['LIB']
35
- require ENV['CONFIG'] if ENV['CONFIG']
36
-
37
- if !Object.const_defined?(:Astrotrain)
38
- require 'astrotrain'
39
- Astrotrain.load
40
- end
41
-
42
- Astrotrain::Message.queue_path = ENV['QUEUE'] if ENV['QUEUE']
43
- if !File.exist?(Astrotrain::Message.queue_path)
44
- puts "No Queue: #{Astrotrain.queue_path.inspect}"
45
- exit
46
- end
47
- end
15
+ def version
16
+ line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
17
+ line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
18
+ end
48
19
 
49
- desc "List Mappings"
50
- task :mappings => :init do
51
- Astrotrain::Mapping.all.each do |map|
52
- puts "##{map.id}: #{map.full_email} => #{map.destination}"
53
- puts "Separated by: #{map.separator.inspect}" if !map.separator.blank?
54
- puts
55
- end
56
- end
20
+ def date
21
+ Date.today.to_s
22
+ end
57
23
 
58
- desc "Add mapping EMAIL=ticket*@foo.com DEST=http://foo.com/email [TRANS=(http_post|jabber)] [SEP=REPLYABOVEHERE] [HEADERS=delivered_to,to,original_to]"
59
- task :map => :init do
60
- map = Astrotrain::Mapping.new
61
- map.email_user, map.email_domain = ENV['EMAIL'].to_s.split('@')
62
- map.destination = ENV['DEST']
63
- map.transport = ENV['TRANS'] if ENV['TRANS']
64
- map.separator = ENV['SEP'] if ENV['SEP']
65
- if map.save
66
- puts "Mapping created for #{map.full_email} => #{map.destination}"
67
- Rake::Task['at:mappings'].invoke
68
- else
69
- puts map.inspect
70
- puts map.errors.inspect
71
- end
72
- end
24
+ def rubyforge_project
25
+ name
26
+ end
73
27
 
74
- desc "Remove mapping MAP=123"
75
- task :unmap => :init do
76
- map = Astrotrain::Mapping.get(ENV["MAP"])
77
- map.destroy if map
78
- Rake::Task['at:mappings'].invoke
79
- end
28
+ def gemspec_file
29
+ "#{name}.gemspec"
30
+ end
80
31
 
81
- desc "Start astrotrain DRb server."
82
- task :process => :init do
83
- require 'astrotrain/worker'
84
- Astrotrain::Worker.start
85
- end
32
+ def gem_file
33
+ "#{name}-#{version}.gem"
86
34
  end
87
35
 
36
+ def replace_header(head, header_name)
37
+ head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
38
+ end
39
+
40
+ #############################################################################
41
+ #
42
+ # Standard tasks
43
+ #
44
+ #############################################################################
45
+
46
+ task :default => :test
47
+
88
48
  require 'rake/testtask'
89
- Rake::TestTask.new do |t|
90
- t.test_files = FileList['test/*_test.rb']
91
- t.verbose = true
49
+
50
+ Rake::TestTask.new(:test) do |test|
51
+ test.libs << 'lib' << 'test'
52
+ test.pattern = 'test/**/*_test.rb'
53
+ test.verbose = true
92
54
  end
93
55
 
94
- begin
95
- require 'rcov/rcovtask'
96
- Rcov::RcovTask.new do |test|
97
- test.libs << 'test'
98
- test.pattern = 'test/**/*_test.rb'
99
- test.verbose = true
100
- end
101
- rescue LoadError
102
- task :rcov do
103
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
104
- end
56
+ desc "Generate RCov test coverage and open in your browser"
57
+ task :coverage do
58
+ require 'rcov'
59
+ sh "rm -fr coverage"
60
+ sh "rcov test/*_test.rb"
61
+ sh "open coverage/index.html"
105
62
  end
106
63
 
107
- require 'rake/rdoctask'
108
- Rake::RDocTask.new do |rdoc|
109
- if File.exist?('VERSION.yml')
110
- config = YAML.load(File.read('VERSION.yml'))
111
- version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
112
- else
113
- version = ""
64
+ desc "Open an irb session preloaded with this library"
65
+ task :console do
66
+ sh "irb -rubygems -Ilib -r #{name}.rb"
67
+ end
68
+
69
+ #############################################################################
70
+ #
71
+ # Custom tasks (add your own tasks here)
72
+ #
73
+ #############################################################################
74
+
75
+
76
+
77
+ #############################################################################
78
+ #
79
+ # Packaging tasks
80
+ #
81
+ #############################################################################
82
+
83
+ task :release => :build do
84
+ unless `git branch` =~ /^\* master$/
85
+ puts "You must be on the master branch to release!"
86
+ exit!
114
87
  end
88
+ sh "git commit --allow-empty -a -m 'Release #{version}'"
89
+ sh "git tag v#{version}"
90
+ sh "git push origin master"
91
+ sh "git push v#{version}"
92
+ sh "gem push pkg/#{name}-#{version}.gem"
93
+ end
115
94
 
116
- rdoc.rdoc_dir = 'rdoc'
117
- rdoc.title = "astrotrain #{version}"
118
- rdoc.rdoc_files.include('README*')
119
- rdoc.rdoc_files.include('lib/**/*.rb')
95
+ task :build => :gemspec do
96
+ sh "mkdir -p pkg"
97
+ sh "gem build #{gemspec_file}"
98
+ sh "mv #{gem_file} pkg"
120
99
  end
121
100
 
101
+ task :gemspec => :validate do
102
+ # read spec file and split out manifest section
103
+ spec = File.read(gemspec_file)
104
+ head, manifest, tail = spec.split(" # = MANIFEST =\n")
105
+
106
+ # replace name version and date
107
+ replace_header(head, :name)
108
+ replace_header(head, :version)
109
+ replace_header(head, :date)
110
+ #comment this out if your rubyforge_project has a different name
111
+ replace_header(head, :rubyforge_project)
112
+
113
+ # determine file list from git ls-files
114
+ files = `git ls-files`.
115
+ split("\n").
116
+ sort.
117
+ reject { |file| file =~ /^\./ }.
118
+ reject { |file| file =~ /^(rdoc|pkg)/ }.
119
+ map { |file| " #{file}" }.
120
+ join("\n")
121
+
122
+ # piece file back together and write
123
+ manifest = " s.files = %w[\n#{files}\n ]\n"
124
+ spec = [head, manifest, tail].join(" # = MANIFEST =\n")
125
+ File.open(gemspec_file, 'w') { |io| io.write(spec) }
126
+ puts "Updated #{gemspec_file}"
127
+ end
122
128
 
123
- desc 'Default: run test examples'
124
- task :default => 'test'
129
+ task :validate do
130
+ libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"]
131
+ unless libfiles.empty?
132
+ puts "Directory `lib` should only contain a `#{name}.rb` file and `#{name}` dir."
133
+ exit!
134
+ end
135
+ unless Dir['VERSION*'].empty?
136
+ puts "A `VERSION` file at root level violates Gem best practices."
137
+ exit!
138
+ end
139
+ end
data/astrotrain.gemspec CHANGED
@@ -1,141 +1,92 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
1
+ ## This is the rakegem gemspec template. Make sure you read and understand
2
+ ## all of the comments. Some sections require modification, and others can
3
+ ## be deleted if you don't need them. Once you understand the contents of
4
+ ## this file, feel free to delete any comments that begin with two hash marks.
5
+ ## You can find comprehensive Gem::Specification documentation, at
6
+ ## http://docs.rubygems.org/read/chapter/20
6
7
  Gem::Specification.new do |s|
7
- s.name = %q{astrotrain}
8
- s.version = "0.5.4"
9
-
8
+ s.specification_version = 2 if s.respond_to? :specification_version=
10
9
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["technoweenie"]
12
- s.date = %q{2010-04-01}
13
- s.email = %q{technoweenie@gmail.com}
14
- s.extra_rdoc_files = [
15
- "LICENSE",
16
- "README"
17
- ]
18
- s.files = [
19
- ".gitignore",
20
- "LICENSE",
21
- "README",
22
- "Rakefile",
23
- "VERSION",
24
- "astrotrain.gemspec",
25
- "config/sample.rb",
26
- "lib/astrotrain.rb",
27
- "lib/astrotrain/api.rb",
28
- "lib/astrotrain/logged_mail.rb",
29
- "lib/astrotrain/mapping.rb",
30
- "lib/astrotrain/mapping/http_post.rb",
31
- "lib/astrotrain/mapping/jabber.rb",
32
- "lib/astrotrain/mapping/transport.rb",
33
- "lib/astrotrain/message.rb",
34
- "lib/astrotrain/tmail.rb",
35
- "lib/astrotrain/worker.rb",
36
- "lib/vendor/rest-client/README.rdoc",
37
- "lib/vendor/rest-client/Rakefile",
38
- "lib/vendor/rest-client/bin/restclient",
39
- "lib/vendor/rest-client/foo.diff",
40
- "lib/vendor/rest-client/lib/rest_client.rb",
41
- "lib/vendor/rest-client/lib/rest_client/net_http_ext.rb",
42
- "lib/vendor/rest-client/lib/rest_client/payload.rb",
43
- "lib/vendor/rest-client/lib/rest_client/request_errors.rb",
44
- "lib/vendor/rest-client/lib/rest_client/resource.rb",
45
- "lib/vendor/rest-client/rest-client.gemspec",
46
- "lib/vendor/rest-client/spec/base.rb",
47
- "lib/vendor/rest-client/spec/master_shake.jpg",
48
- "lib/vendor/rest-client/spec/payload_spec.rb",
49
- "lib/vendor/rest-client/spec/request_errors_spec.rb",
50
- "lib/vendor/rest-client/spec/resource_spec.rb",
51
- "lib/vendor/rest-client/spec/rest_client_spec.rb",
52
- "test/api_test.rb",
53
- "test/fixtures/apple_multipart.txt",
54
- "test/fixtures/bad_content_type.txt",
55
- "test/fixtures/basic.txt",
56
- "test/fixtures/custom.txt",
57
- "test/fixtures/fwd.txt",
58
- "test/fixtures/gb2312_encoding.txt",
59
- "test/fixtures/gb2312_encoding_invalid.txt",
60
- "test/fixtures/html.txt",
61
- "test/fixtures/html_multipart.txt",
62
- "test/fixtures/iso-8859-1.txt",
63
- "test/fixtures/mapped.txt",
64
- "test/fixtures/multipart.txt",
65
- "test/fixtures/multipart2.txt",
66
- "test/fixtures/multiple.txt",
67
- "test/fixtures/multiple_delivered_to.txt",
68
- "test/fixtures/multiple_with_body_recipients.txt",
69
- "test/fixtures/reply.txt",
70
- "test/fixtures/undisclosed.txt",
71
- "test/fixtures/utf-8.txt",
72
- "test/logged_mail_test.rb",
73
- "test/mapping_test.rb",
74
- "test/message_test.rb",
75
- "test/test_helper.rb",
76
- "test/transport_test.rb"
77
- ]
78
- s.homepage = %q{http://github.com/entp/astrotrain}
79
- s.rdoc_options = ["--charset=UTF-8"]
80
- s.require_paths = ["lib"]
81
- s.rubygems_version = %q{1.3.6}
82
- s.summary = %q{email => http post}
83
- s.test_files = [
84
- "test/api_test.rb",
85
- "test/logged_mail_test.rb",
86
- "test/mapping_test.rb",
87
- "test/message_test.rb",
88
- "test/test_helper.rb",
89
- "test/transport_test.rb"
90
- ]
10
+ s.rubygems_version = '1.3.5'
91
11
 
92
- if s.respond_to? :specification_version then
93
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
94
- s.specification_version = 3
12
+ ## Leave these as is they will be modified for you by the rake gemspec task.
13
+ ## If your rubyforge_project name is different, then edit it and comment out
14
+ ## the sub! line in the Rakefile
15
+ s.name = 'astrotrain'
16
+ s.version = '0.6.0'
17
+ s.date = '2012-04-13'
18
+ s.rubyforge_project = 'astrotrain'
95
19
 
96
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
97
- s.add_runtime_dependency(%q<addressable>, ["= 2.0.2"])
98
- s.add_runtime_dependency(%q<tmail>, ["= 1.2.3.1"])
99
- s.add_runtime_dependency(%q<data_objects>, ["= 0.9.11"])
100
- s.add_runtime_dependency(%q<dm-core>, ["= 0.9.11"])
101
- s.add_runtime_dependency(%q<dm-aggregates>, ["= 0.9.11"])
102
- s.add_runtime_dependency(%q<dm-timestamps>, ["= 0.9.11"])
103
- s.add_runtime_dependency(%q<dm-types>, ["= 0.9.11"])
104
- s.add_runtime_dependency(%q<dm-validations>, ["= 0.9.11"])
105
- s.add_development_dependency(%q<context>, [">= 0"])
106
- s.add_development_dependency(%q<rr>, [">= 0"])
107
- s.add_development_dependency(%q<sinatra>, ["~> 1.0.0"])
108
- s.add_development_dependency(%q<rack-test>, [">= 0"])
109
- s.add_development_dependency(%q<xmppr4-simple>, [">= 0"])
110
- else
111
- s.add_dependency(%q<addressable>, ["= 2.0.2"])
112
- s.add_dependency(%q<tmail>, ["= 1.2.3.1"])
113
- s.add_dependency(%q<data_objects>, ["= 0.9.11"])
114
- s.add_dependency(%q<dm-core>, ["= 0.9.11"])
115
- s.add_dependency(%q<dm-aggregates>, ["= 0.9.11"])
116
- s.add_dependency(%q<dm-timestamps>, ["= 0.9.11"])
117
- s.add_dependency(%q<dm-types>, ["= 0.9.11"])
118
- s.add_dependency(%q<dm-validations>, ["= 0.9.11"])
119
- s.add_dependency(%q<context>, [">= 0"])
120
- s.add_dependency(%q<rr>, [">= 0"])
121
- s.add_dependency(%q<sinatra>, ["~> 1.0.0"])
122
- s.add_dependency(%q<rack-test>, [">= 0"])
123
- s.add_dependency(%q<xmppr4-simple>, [">= 0"])
124
- end
125
- else
126
- s.add_dependency(%q<addressable>, ["= 2.0.2"])
127
- s.add_dependency(%q<tmail>, ["= 1.2.3.1"])
128
- s.add_dependency(%q<data_objects>, ["= 0.9.11"])
129
- s.add_dependency(%q<dm-core>, ["= 0.9.11"])
130
- s.add_dependency(%q<dm-aggregates>, ["= 0.9.11"])
131
- s.add_dependency(%q<dm-timestamps>, ["= 0.9.11"])
132
- s.add_dependency(%q<dm-types>, ["= 0.9.11"])
133
- s.add_dependency(%q<dm-validations>, ["= 0.9.11"])
134
- s.add_dependency(%q<context>, [">= 0"])
135
- s.add_dependency(%q<rr>, [">= 0"])
136
- s.add_dependency(%q<sinatra>, ["~> 1.0.0"])
137
- s.add_dependency(%q<rack-test>, [">= 0"])
138
- s.add_dependency(%q<xmppr4-simple>, [">= 0"])
139
- end
140
- end
20
+ ## Make sure your summary is short. The description may be as long
21
+ ## as you like.
22
+ s.summary = "email => http post"
23
+ s.description = s.summary
24
+
25
+ ## List the primary authors. If there are a bunch of authors, it's probably
26
+ ## better to set the email to an email list or something. If you don't have
27
+ ## a custom homepage, consider using your GitHub URL or the like.
28
+ s.authors = ["Rick Olson"]
29
+ s.email = 'technoweenie@gmail.com'
30
+ s.homepage = 'http://github.com/technoweenie/astrotrain'
141
31
 
32
+ ## This gets added to the $LOAD_PATH so that 'lib/NAME.rb' can be required as
33
+ ## require 'NAME.rb' or'/lib/NAME/file.rb' can be as require 'NAME/file.rb'
34
+ s.require_paths = %w[lib]
35
+
36
+ ## List your runtime dependencies here. Runtime dependencies are those
37
+ ## that are needed for an end user to actually USE your code.
38
+ s.add_dependency('utf8', ["~> 0.1.8"])
39
+ s.add_dependency('mail', ["~> 2.4.0"])
40
+ s.add_dependency('i18n', ["~> 0.4.1"])
41
+ s.add_dependency('faraday', ["~> 0.5.0"])
42
+ s.add_dependency('addressable', ["~> 2.2.4"])
43
+ s.add_dependency('charlock_holmes', ["~> 0.6.8"])
44
+
45
+ ## List your development dependencies here. Development dependencies are
46
+ ## those that are only needed during development
47
+ s.add_development_dependency('resque')
48
+
49
+ ## Leave this section as-is. It will be automatically generated from the
50
+ ## contents of your Git repository via the gemspec task. DO NOT REMOVE
51
+ ## THE MANIFEST COMMENTS, they are used as delimiters by the task.
52
+ # = MANIFEST =
53
+ s.files = %w[
54
+ Gemfile
55
+ LICENSE
56
+ Rakefile
57
+ astrotrain.gemspec
58
+ lib/astrotrain.rb
59
+ lib/astrotrain/attachment.rb
60
+ lib/astrotrain/message.rb
61
+ lib/astrotrain/transports/http_post.rb
62
+ lib/astrotrain/transports/resque.rb
63
+ test/fixtures/apple_multipart.txt
64
+ test/fixtures/bad_content_type.txt
65
+ test/fixtures/bad_email_format.txt
66
+ test/fixtures/basic.txt
67
+ test/fixtures/custom.txt
68
+ test/fixtures/fwd.txt
69
+ test/fixtures/gb2312_encoding.txt
70
+ test/fixtures/gb2312_encoding_invalid.txt
71
+ test/fixtures/html.txt
72
+ test/fixtures/html_multipart.txt
73
+ test/fixtures/iso-8859-1.txt
74
+ test/fixtures/mapped.txt
75
+ test/fixtures/multipart.txt
76
+ test/fixtures/multipart2.txt
77
+ test/fixtures/multiple.txt
78
+ test/fixtures/multiple_delivered_to.txt
79
+ test/fixtures/multiple_with_body_recipients.txt
80
+ test/fixtures/reply.txt
81
+ test/fixtures/undisclosed.txt
82
+ test/fixtures/utf-8.txt
83
+ test/message_test.rb
84
+ test/test_helper.rb
85
+ test/transport_test.rb
86
+ ]
87
+ # = MANIFEST =
88
+
89
+ ## Test files will be grabbed from the file list. Make sure the path glob
90
+ ## matches what you actually use.
91
+ s.test_files = s.files.select { |path| path =~ /^test\/*._test\.rb/ }
92
+ end