Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only supported Rails, rubies supporting 1.9 mode

Also upgrade hash syntax
  • Loading branch information...
commit f48963fc1a2976f73de8d41f619a32fad9920de0 1 parent 88a4d66
Justin Campbell justincampbell authored
19 .travis.yml
View
@@ -1,25 +1,18 @@
env:
- RAILS_VERSION=none
- - RAILS_VERSION=2.3
- - RAILS_VERSION=3.0
- - RAILS_VERSION=3.1
- RAILS_VERSION=3.2
+ - RAILS_VERSION=4.0
rvm:
- - 1.8.7
- - 1.9.2
- 1.9.3
- - jruby
- - rbx
- - ree
+ - 2.0.0
+ - jruby-19mode
+ - rbx-19mode
+ - jruby-head
- ruby-head
matrix:
allow_failures:
- - rvm: jruby
- - rvm: rbx
- rvm: ruby-head
- exclude:
- - rvm: ruby-head
- env: RAILS_VERSION=2.3
+ - rvm: jruby-head
notifications:
email:
- sysadmin@cramerdev.com
10 Gemfile
View
@@ -2,12 +2,4 @@ source 'https://rubygems.org'
gemspec
-group :development, :test do
- gem 'rake'
-
- group :darwin do
- gem 'rb-fsevent'
- gem 'growl'
- end
-end
-
+gem 'guard-rspec'
10 capistrano-notifier.gemspec
View
@@ -16,14 +16,10 @@ Gem::Specification.new do |gem|
gem.version = Capistrano::Notifier::VERSION
case ENV['RAILS_VERSION']
- when '2.3'
- gem.add_dependency 'actionmailer', '~> 2.3.0'
- when '3.0'
- gem.add_dependency 'actionmailer', '~> 3.0.0'
- when '3.1'
- gem.add_dependency 'actionmailer', '~> 3.1.0'
when '3.2'
gem.add_dependency 'actionmailer', '~> 3.2.0'
+ when '4.0'
+ gem.add_dependency 'actionmailer', '~> 4.0.0'
else
gem.add_dependency 'actionmailer'
end
@@ -31,7 +27,7 @@ Gem::Specification.new do |gem|
gem.add_dependency 'activesupport'
gem.add_dependency 'capistrano', '>= 2', '< 3'
- gem.add_development_dependency 'guard-rspec'
+ gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec'
gem.add_development_dependency 'timecop'
end
10 lib/capistrano/notifier/mail.rb
View
@@ -11,11 +11,11 @@ class Capistrano::Notifier::Mailer < ActionMailer::Base
if ActionMailer::Base.respond_to?(:mail)
def notice(text, from, subject, to, delivery_method)
mail({
- :body => text,
- :delivery_method => delivery_method,
- :from => from,
- :subject => subject,
- :to => to
+ body: text,
+ delivery_method: delivery_method,
+ from: from,
+ subject: subject,
+ to: to
})
end
else
2  lib/capistrano/notifier/statsd.rb
View
@@ -2,7 +2,7 @@
require 'socket'
class Capistrano::Notifier::StatsD < Capistrano::Notifier::Base
- DEFAULTS = { :host => "127.0.0.1", :port => "8125", :with => :counter }
+ DEFAULTS = { host: "127.0.0.1", port: "8125", with: :counter }
def self.load_into(configuration)
configuration.load do
60 spec/capistrano/notifier/mail_spec.rb
View
@@ -8,10 +8,10 @@
before :each do
configuration.load do |configuration|
set :notifier_mail_options, {
- :github => 'example/example',
- :method => :sendmail,
- :from => 'sender@example.com',
- :to => 'example@example.com'
+ github: 'example/example',
+ method: :sendmail,
+ from: 'sender@example.com',
+ to: 'example@example.com'
}
set :application, 'example'
@@ -32,10 +32,10 @@
it 'delivers mail' do
configuration.load do |configuration|
set :notifier_mail_options, {
- :github => 'example/example',
- :method => :test,
- :from => 'sender@example.com',
- :to => 'example@example.com'
+ github: 'example/example',
+ method: :test,
+ from: 'sender@example.com',
+ to: 'example@example.com'
}
end
@@ -58,18 +58,18 @@
it 'delivers smtp mail' do
configuration.load do |configuration|
set :notifier_mail_options, {
- :github => 'example/example',
- :method => :test,
- :from => 'sender@example.com',
- :to => 'example@example.com',
- :smtp_settings => {
- :address => "smtp.gmail.com",
- :port => 587,
- :domain => "gmail.com",
- :authentication => "plain",
- :enable_starttls_auto => true,
- :user_name => "USERNAME",
- :password => "PASSWORD"
+ github: 'example/example',
+ method: :test,
+ from: 'sender@example.com',
+ to: 'example@example.com',
+ smtp_settings: {
+ address: "smtp.gmail.com",
+ port: 587,
+ domain: "gmail.com",
+ authentication: "plain",
+ enable_starttls_auto: true,
+ user_name: "USERNAME",
+ password: "PASSWORD"
}
}
end
@@ -77,13 +77,13 @@
subject.perform
subject.send(:smtp_settings).should == {
- :address => "smtp.gmail.com",
- :port => 587,
- :domain => "gmail.com",
- :authentication => "plain",
- :enable_starttls_auto => true,
- :user_name => "USERNAME",
- :password => "PASSWORD"
+ address: "smtp.gmail.com",
+ port: 587,
+ domain: "gmail.com",
+ authentication: "plain",
+ enable_starttls_auto: true,
+ user_name: "USERNAME",
+ password: "PASSWORD"
}
last_delivery = ActionMailer::Base.deliveries.last
@@ -101,7 +101,7 @@
it 'should work with gitlab' do
configuration.load do |configuration|
set :notifier_mail_options, {
- :giturl => 'https://my.gitlab.url/',
+ giturl: 'https://my.gitlab.url/',
}
end
@@ -111,8 +111,8 @@
it 'should default to whatever was specified in giturl' do
configuration.load do |configuration|
set :notifier_mail_options, {
- :giturl => 'https://my.gitlab.url/',
- :github => 'example/example'
+ giturl: 'https://my.gitlab.url/',
+ github: 'example/example'
}
end
6 spec/capistrano/notifier/statsd_spec.rb
View
@@ -41,8 +41,8 @@
before :each do
configuration.load do
set :notifier_statsd_options, {
- :host => '10.0.0.1',
- :port => '1234'
+ host: '10.0.0.1',
+ port: '1234'
}
set :application, 'example'
@@ -59,7 +59,7 @@
before :each do
configuration.load do
set :notifier_statsd_options, {
- :with => :gauge
+ with: :gauge
}
set :application, 'example'
Please sign in to comment.
Something went wrong with that request. Please try again.