relevance-cap_gun 0.0.8.1 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.0.9 Ruby 1.8.7 support via a small change to the Net::SMTP SSL hack
2
+
1
3
  v0.0.8. Fix failing spec on runcoderun that depended on timezone; add redgreen to specs
2
4
 
3
5
  v0.0.7. Pick up changelog and gemspec
data/README.rdoc CHANGED
@@ -62,10 +62,10 @@ Just include a comment in the cap command like so, and CapGun will add the comme
62
62
 
63
63
  == URLS
64
64
 
65
- * Log bugs, issues, and suggestions on Trac: http://opensource.thinkrelevance.com/wiki/cap_gun
66
- * View source: http://github.com/relevance/cap_gun/tree/master
65
+ * Log bugs, issues, and suggestions at Lighthouse: http://relevance.lighthouseapp.com/projects/18547-cap-gun/overview
66
+ * View source: http://github.com/relevance/cap_gun
67
67
  * Git: git clone git://github.com/relevance/cap_gun.git
68
- * RDocs: http://thinkrelevance.rubyforge.org/cap_gun/
68
+ * RDocs: http://thinkrelevance.rubyforge.org/cap_gun
69
69
 
70
70
  == LICENSE
71
71
 
data/Rakefile CHANGED
@@ -1,13 +1,5 @@
1
- # begin
2
- # gem 'technicalpickles-echoe'
3
- # rescue LoadError => e
4
- # puts "couldn't find the correct version of echoe - please install from forked version on github: http://github.com/technicalpickles/echoe/"
5
- # puts "gem sources -a http://gems.github.com"
6
- # puts "sudo gem install technicalpickles-echoe"
7
- # end
8
-
9
- gem 'echoe', '~> 3.0.1'
10
1
  require 'rubygems'
2
+ gem 'echoe', '~> 3.0.1'
11
3
  require 'echoe'
12
4
  require './lib/cap_gun.rb'
13
5
 
data/cap_gun.gemspec CHANGED
@@ -1,18 +1,18 @@
1
1
 
2
- # Gem::Specification for Cap_gun-0.0.8.1
2
+ # Gem::Specification for Cap_gun-0.0.9
3
3
  # Originally generated by Echoe
4
4
 
5
5
  --- !ruby/object:Gem::Specification
6
6
  name: cap_gun
7
7
  version: !ruby/object:Gem::Version
8
- version: 0.0.8.1
8
+ version: 0.0.9
9
9
  platform: ruby
10
10
  authors:
11
11
  - Rob Sanheim, Relevance
12
12
  autorequire:
13
13
  bindir: bin
14
14
 
15
- date: 2008-10-03 00:00:00 -04:00
15
+ date: 2008-10-05 00:00:00 -04:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  requirements: []
81
81
 
82
82
  rubyforge_project: thinkrelevance
83
- rubygems_version: 1.3.0
83
+ rubygems_version: 1.2.0
84
84
  specification_version: 2
85
85
  summary: Bang! You're deployed!
86
86
  test_files:
data/lib/cap_gun.rb CHANGED
@@ -26,7 +26,7 @@ require File.join(File.dirname(__FILE__), *%w[.. vendor action_mailer_tls lib sm
26
26
  #
27
27
  # See README for full install/config instructions.
28
28
  module CapGun
29
- VERSION = '0.0.8.1'
29
+ VERSION = '0.0.9'
30
30
 
31
31
  module Helper
32
32
 
data/spec/cap_gun_spec.rb CHANGED
@@ -87,7 +87,21 @@ describe "CapGun" do
87
87
  capistrano = { :current_release => "/data/foo", :previous_release => "/data/foo", :cap_gun_email_envelope => {:recipients => ["joe@example.com"]} }
88
88
  CapGun::Mailer.any_instance.expects(:create_body).with(capistrano).returns("foo")
89
89
  CapGun::Mailer.create_deployment_notification capistrano
90
+ end
91
+
92
+ it "calls Net::SMTP to send the mail correctly (we test this because SMTP internals changed between 1.8.6 and newer versions of Ruby)" do
93
+ ActionMailer::Base.smtp_settings = {
94
+ :address => "smtp.gmail.com",
95
+ :port => 587,
96
+ :domain => "foo.com",
97
+ :authentication => :plain,
98
+ :user_name => "username",
99
+ :password => "password"
100
+ }
90
101
 
102
+ capistrano = { :current_release => "/data/foo", :previous_release => "/data/foo", :cap_gun_email_envelope => {:recipients => ["joe@example.com"]} }
103
+ Net::SMTP.expects(:start)
104
+ CapGun::Mailer.deliver_deployment_notification capistrano
91
105
  end
92
106
  end
93
107
 
@@ -5,7 +5,13 @@ Net::SMTP.class_eval do
5
5
  private
6
6
  def do_start(helodomain, user, secret, authtype)
7
7
  raise IOError, 'SMTP session already started' if @started
8
- check_auth_args user, secret, authtype if user or secret
8
+ if user or secret
9
+ if RUBY_VERSION == "1.8.7"
10
+ check_auth_args user, secret
11
+ else
12
+ check_auth_args user, secret, authtype
13
+ end
14
+ end
9
15
 
10
16
  sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }
11
17
  @socket = Net::InternetMessageIO.new(sock)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relevance-cap_gun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8.1
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Sanheim, Relevance
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
- date: 2008-10-02 21:00:00 -07:00
11
+ date: 2008-10-04 21:00:00 -07:00
12
12
  default_executable:
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency