pony 1.4 → 1.4.1

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 (7) hide show
  1. checksums.yaml +15 -0
  2. data/README.rdoc +37 -21
  3. data/Rakefile +5 -13
  4. data/lib/pony.rb +1 -1
  5. data/pony.gemspec +1 -1
  6. metadata +51 -72
  7. data/lib/foo +0 -97
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YzcwMWViNjdkOTEwNjQ5NTAzYzAzMjRjYmM4MzI3ZjQwZDFiNTBjNA==
5
+ data.tar.gz: !binary |-
6
+ OTZkOGJhZDlkYzhjOTg3N2RiYzI5ZmExODdlNmUwOWViZjhmNGYzOA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MDMxNDE0MDM1MDE4MzU0ZTJkMGNjNGMxMmFiY2RjNDFkNTlhMWY1YzFmNjlj
10
+ MTU2MTAzNWM3ZDkyNmQ4ZmY5MWEyNzE1MDllOGE4MDFkYjg2NjQzNzM3NDJk
11
+ ODY3YjQyMDZmNzFhY2ZlNDk1MTA2Y2UxZTBkYTNkNmViNWFlZGY=
12
+ data.tar.gz: !binary |-
13
+ NTVlZTc0N2FkY2M0NzUwNzJhMWJlNjVjMDQ2MTVlZjY4M2U4NjI1ZjMxNGNh
14
+ ZjUxMDU4MmIyYWVjOWQwMmRlNWNkZWY1MTZkNjQ4MjBmMjIxNDc5MTA2MWRi
15
+ NGVlZGZjMTEzZTk1NDBiYjM2ZjdiMjA2ZGM5MzY3YmVlOGQzOGM=
data/README.rdoc CHANGED
@@ -23,33 +23,47 @@ This can be over-ridden if you specify a via option:
23
23
 
24
24
  You can also specify options for SMTP:
25
25
 
26
- Pony.mail(:to => 'you@example.com', :via => :smtp, :via_options => {
27
- :address => 'smtp.yourserver.com',
28
- :port => '25',
29
- :user_name => 'user',
30
- :password => 'password',
31
- :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
32
- :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
33
- }
26
+ Pony.mail({
27
+ :to => 'you@example.com',
28
+ :via => :smtp,
29
+ :via_options => {
30
+ :address => 'smtp.yourserver.com',
31
+ :port => '25',
32
+ :user_name => 'user',
33
+ :password => 'password',
34
+ :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
35
+ :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
36
+ }
37
+ })
34
38
 
35
39
  Gmail example (with TLS/SSL)
36
40
 
37
- Pony.mail(:to => 'you@example.com', :via => :smtp, :via_options => {
38
- :address => 'smtp.gmail.com',
39
- :port => '587',
40
- :enable_starttls_auto => true,
41
- :user_name => 'user',
42
- :password => 'password',
43
- :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
44
- :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
41
+ Pony.mail({
42
+ :to => 'you@example.com',
43
+ :via => :smtp,
44
+ :via_options => {
45
+ :address => 'smtp.gmail.com',
46
+ :port => '587',
47
+ :enable_starttls_auto => true,
48
+ :user_name => 'user',
49
+ :password => 'password',
50
+ :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
51
+ :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
52
+ }
45
53
  })
46
54
 
47
55
  And options for Sendmail:
48
56
 
49
- Pony.mail(:to => 'you@example.com', :via => :smtp, :via_options => {
50
- :location => '/path/to/sendmail' # this defaults to 'which sendmail' or '/usr/sbin/sendmail' if 'which' fails
51
- :arguments => '-t' # -t and -i are the defaults
52
- }
57
+ Pony.mail({
58
+ :to => 'you@example.com',
59
+ :via => :sendmail,
60
+ :via_options => {
61
+ :location => '/path/to/sendmail', # defaults to 'which sendmail' or '/usr/sbin/sendmail' if 'which' fails
62
+ :arguments => '-t' # -t and -i are the defaults
63
+ }
64
+ })
65
+
66
+ If you're using <tt>ssmtp</tt>, set <tt>:arguments => ''</tt>.
53
67
 
54
68
  == Attachments
55
69
 
@@ -135,6 +149,9 @@ mailing list: ponyrb@googlegroups.com
135
149
 
136
150
  == Releases
137
151
 
152
+ 1.4.1
153
+ * Update gemfile
154
+
138
155
  1.4
139
156
  * Updated docs
140
157
 
@@ -182,4 +199,3 @@ mailing list: ponyrb@googlegroups.com
182
199
  0.4
183
200
  * Implemented file attachments option
184
201
  * use TLS if :tls => true
185
-
data/Rakefile CHANGED
@@ -2,20 +2,19 @@ require 'rake'
2
2
  require 'rspec/core/rake_task'
3
3
 
4
4
  desc "Run all specs"
5
- RSpec::Core::RakeTask.new() do |t|
6
- end
5
+ RSpec::Core::RakeTask.new(:test)
7
6
 
8
- task :default => :spec
7
+ task :default => :test
9
8
 
10
9
  ######################################################
11
10
 
12
11
  require 'rake'
13
- require 'rake/testtask'
14
12
  require 'rake/clean'
15
- require 'rake/gempackagetask'
13
+ require 'rubygems'
14
+ require 'rubygems/package_task'
16
15
  require 'fileutils'
17
16
 
18
- Rake::GemPackageTask.new(eval File.read('pony.gemspec')) do |p|
17
+ Gem::PackageTask.new(eval File.read('pony.gemspec')) do |p|
19
18
  p.need_tar = true if RUBY_PLATFORM !~ /mswin/
20
19
  end
21
20
 
@@ -27,11 +26,4 @@ task :uninstall => [ :clean ] do
27
26
  sh %{sudo gem uninstall #{name}}
28
27
  end
29
28
 
30
- Rake::TestTask.new do |t|
31
- t.libs << "spec"
32
- t.test_files = FileList['spec/*_spec.rb']
33
- t.verbose = true
34
- end
35
-
36
29
  CLEAN.include [ 'pkg', '*.gem', '.config' ]
37
-
data/lib/pony.rb CHANGED
@@ -49,7 +49,7 @@ require 'base64'
49
49
  #
50
50
  # And options for Sendmail:
51
51
  #
52
- # Pony.mail(:to => 'you@example.com', :via => :smtp, :via_options => {
52
+ # Pony.mail(:to => 'you@example.com', :via => :sendmail, :via_options => {
53
53
  # :location => '/path/to/sendmail' # this defaults to 'which sendmail' or '/usr/sbin/sendmail' if 'which' fails
54
54
  # :arguments => '-t' # -t and -i are the defaults
55
55
  # }
data/pony.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{pony}
5
- s.version = "1.4"
5
+ s.version = "1.4.1"
6
6
 
7
7
  s.description = "Send email in one command: Pony.mail(:to => 'someone@example.com', :body => 'hello')"
8
8
  s.summary = s.description
metadata CHANGED
@@ -1,102 +1,81 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: pony
3
- version: !ruby/object:Gem::Version
4
- hash: 7
5
- prerelease:
6
- segments:
7
- - 1
8
- - 4
9
- version: "1.4"
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.4.1
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Adam Wiggins
13
- - "maint: Ben Prew"
8
+ - ! 'maint: Ben Prew'
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-11-29 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-05-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ type: :runtime
16
+ prerelease: false
17
+ version_requirements: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ! '>'
20
+ - !ruby/object:Gem::Version
21
+ version: '2.0'
21
22
  name: mail
23
+ requirement: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ! '>'
26
+ - !ruby/object:Gem::Version
27
+ version: '2.0'
28
+ - !ruby/object:Gem::Dependency
29
+ type: :development
22
30
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">"
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 2
31
- - 0
32
- version: "2.0"
33
- type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
31
+ version_requirements: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: 2.0.0
36
36
  name: rspec
37
- prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 15
44
- segments:
45
- - 2
46
- - 0
47
- - 0
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
48
41
  version: 2.0.0
49
- type: :development
50
- version_requirements: *id002
51
- description: "Send email in one command: Pony.mail(:to => 'someone@example.com', :body => 'hello')"
42
+ description: ! 'Send email in one command: Pony.mail(:to => ''someone@example.com'',
43
+ :body => ''hello'')'
52
44
  email: ben.prew@gmail.com
53
45
  executables: []
54
-
55
46
  extensions: []
56
-
57
47
  extra_rdoc_files: []
58
-
59
- files:
48
+ files:
60
49
  - README.rdoc
61
50
  - Rakefile
62
51
  - pony.gemspec
63
- - lib/foo
64
52
  - lib/pony.rb
65
53
  - spec/base.rb
66
54
  - spec/pony_spec.rb
67
55
  homepage: http://github.com/benprew/pony
68
56
  licenses: []
69
-
57
+ metadata: {}
70
58
  post_install_message:
71
- rdoc_options:
59
+ rdoc_options:
72
60
  - --inline-source
73
61
  - --charset=UTF-8
74
- require_paths:
62
+ require_paths:
75
63
  - lib
76
- required_ruby_version: !ruby/object:Gem::Requirement
77
- none: false
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- hash: 3
82
- segments:
83
- - 0
84
- version: "0"
85
- required_rubygems_version: !ruby/object:Gem::Requirement
86
- none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- hash: 3
91
- segments:
92
- - 0
93
- version: "0"
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
94
74
  requirements: []
95
-
96
75
  rubyforge_project: pony
97
- rubygems_version: 1.8.5
76
+ rubygems_version: 2.0.3
98
77
  signing_key:
99
- specification_version: 3
100
- summary: "Send email in one command: Pony.mail(:to => 'someone@example.com', :body => 'hello')"
78
+ specification_version: 4
79
+ summary: ! 'Send email in one command: Pony.mail(:to => ''someone@example.com'', :body
80
+ => ''hello'')'
101
81
  test_files: []
102
-
data/lib/foo DELETED
@@ -1,97 +0,0 @@
1
- = The express way to send email in Ruby
2
-
3
- == Overview
4
-
5
- Ruby no longer has to be jealous of PHP's mail() function, which can send an email in a single command.
6
-
7
- Pony.mail(:to => 'you@example.com', :from => 'me@example.com', :subject => 'hi', :body => 'Hello there.')
8
- Pony.mail(:to => 'you@example.com', :html_body => '<h1>Hello there!</h1>', :body => "In case you can't read html, Hello there.")
9
- Pony.mail(:to => 'you@example.com', :cc => 'him@example.com', :from => 'me@example.com', :subject => 'hi', :body => 'Howsit!')
10
-
11
- Any option key may be omitted except for :to. For a complete list of options, see List Of Options section below.
12
-
13
-
14
- == Transport
15
-
16
- Pony uses /usr/sbin/sendmail to send mail if it is available, otherwise it uses SMTP to localhost.
17
-
18
- This can be over-ridden if you specify a via option:
19
-
20
- Pony.mail(:to => 'you@example.com', :via => :smtp) # sends via SMTP
21
-
22
- Pony.mail(:to => 'you@example.com', :via => :sendmail) # sends via sendmail
23
-
24
- You can also specify options for SMTP:
25
-
26
- Pony.mail(:to => 'you@example.com', :via => :smtp, :via_options => {
27
- :address => 'smtp.yourserver.com',
28
- :port => '25',
29
- :user_name => 'user',
30
- :password => 'password',
31
- :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
32
- :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
33
- }
34
-
35
- Gmail example (with TLS/SSL)
36
-
37
- Pony.mail(:to => 'you@example.com', :via => :smtp, :via_options => {
38
- :address => 'smtp.gmail.com',
39
- :port => '587',
40
- :enable_starttls_auto => true,
41
- :user_name => 'user',
42
- :password => 'password',
43
- :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
44
- :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
45
- })
46
-
47
- And options for Sendmail:
48
-
49
- Pony.mail(:to => 'you@example.com', :via => :smtp, :via_options => {
50
- :location => '/path/to/sendmail' # this defaults to 'which sendmail' or '/usr/sbin/sendmail' if 'which' fails
51
- :arguments => '-t' # -t and -i are the defaults
52
- }
53
-
54
- == Attachments
55
-
56
- You can attach a file or two with the :attachments option:
57
-
58
- Pony.mail(..., :attachments => {"foo.zip" => File.read("path/to/foo.zip"), "hello.txt" => "hello!"})
59
-
60
- Note: An attachment's mime-type is set based on the filename (as dictated by the ruby gem mime-types). So 'foo.pdf' has a mime-type of 'application/pdf'
61
-
62
- == Custom Headers
63
-
64
- Pony allows you to specify custom mail headers
65
- Pony.mail(
66
- :to => 'me@example.com',
67
- :headers => { "List-ID" => "...", "X-My-Custom-Header" => "what a cool custom header" }
68
- )
69
-
70
- == List Of Options
71
-
72
- Options passed pretty much directly to Mail
73
- to
74
- cc
75
- bcc
76
- from
77
- body # the plain text body
78
- html_body # for sending html-formatted email
79
- subject
80
- charset # In case you need to send in utf-8 or similar
81
- attachments # see Attachments section above
82
- headers # see Custom headers section above
83
- message_id
84
- sender # Sets "envelope from" (and the Sender header)
85
- reply_to
86
-
87
- Other options
88
- via # :smtp or :sendmail, see Transport section above
89
- via_options # specify transport options, see Transport section above
90
-
91
- == Set default options
92
-
93
- Default options can be set so that they don't have to be repeated. The default options you set will be overriden by any options you pass in to Pony.mail()
94
-
95
- Pony.options = { :from => 'noreply@example.com', :via => :smtp, :via_options => { :host => 'smtp.yourserver.com' } }
96
- Pony.mail(:to => 'foo@bar') # Sends mail to foo@bar from noreply@example.com using smtp
97
- Pony.mail(:from => 'pony@example.com', :to => 'foo@bar') # Sends mail to foo@bar from pony@example.com using smtp