Skip to content

Commit 94026e7

Browse files
committed
Replace Ruby#Hash syntax from 1.8 to 1.9
Every Hash rocket {:key => value} is now written as {key: value}
1 parent eafa1c4 commit 94026e7

File tree

864 files changed

+12568
-12568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

864 files changed

+12568
-12568
lines changed

Gemfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
33
gemspec
44

55
if ENV['AREL']
6-
gem 'arel', :path => ENV['AREL']
6+
gem 'arel', path: ENV['AREL']
77
else
88
gem 'arel'
99
end
@@ -12,14 +12,14 @@ gem 'bcrypt-ruby', '~> 3.0.0'
1212
gem 'jquery-rails'
1313

1414
if ENV['JOURNEY']
15-
gem 'journey', :path => ENV['JOURNEY']
15+
gem 'journey', path: ENV['JOURNEY']
1616
else
17-
gem 'journey', :git => "git://github.com/rails/journey"
17+
gem 'journey', git: "git://github.com/rails/journey"
1818
end
1919

2020
# This needs to be with require false to avoid
2121
# it being automatically loaded by sprockets
22-
gem 'uglifier', '>= 1.0.3', :require => false
22+
gem 'uglifier', '>= 1.0.3', require: false
2323

2424
gem 'rake', '>= 0.8.7'
2525
gem 'mocha', '>= 0.9.8'
@@ -29,7 +29,7 @@ group :doc do
2929
# to a bug, but the PR that fixes it has been there
3030
# for some weeks unapplied. As a temporary solution
3131
# this is our own fork with the fix.
32-
gem 'sdoc', :git => 'git://github.com/fxn/sdoc.git'
32+
gem 'sdoc', git: 'git://github.com/fxn/sdoc.git'
3333
gem 'RedCloth', '~> 4.2'
3434
gem 'w3c_validators'
3535
end
@@ -83,9 +83,9 @@ if ENV['ORACLE_ENHANCED_PATH'] || ENV['ORACLE_ENHANCED']
8383
gem 'ruby-oci8', '>= 2.0.4'
8484
end
8585
if ENV['ORACLE_ENHANCED_PATH']
86-
gem 'activerecord-oracle_enhanced-adapter', :path => ENV['ORACLE_ENHANCED_PATH']
86+
gem 'activerecord-oracle_enhanced-adapter', path: ENV['ORACLE_ENHANCED_PATH']
8787
else
88-
gem 'activerecord-oracle_enhanced-adapter', :git => 'git://github.com/rsim/oracle-enhanced.git'
88+
gem 'activerecord-oracle_enhanced-adapter', git: 'git://github.com/rsim/oracle-enhanced.git'
8989
end
9090
end
9191

Rakefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ $:.unshift File.expand_path('..', __FILE__)
88
require "tasks/release"
99

1010
desc "Build gem files for all projects"
11-
task :build => "all:build"
11+
task build: "all:build"
1212

1313
desc "Release all gems to gemcutter and create a tag"
14-
task :release => "all:release"
14+
task release: "all:release"
1515

1616
PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties)
1717

1818
desc 'Run all tests by default'
19-
task :default => %w(test test:isolated)
19+
task default: %w(test test:isolated)
2020

2121
%w(test test:isolated package gem).each do |task_name|
2222
desc "Run #{task_name} task for all projects"
@@ -38,7 +38,7 @@ task :smoke do
3838
end
3939

4040
desc "Install gems for all projects."
41-
task :install => :gem do
41+
task install: :gem do
4242
version = File.read("RAILS_VERSION").strip
4343
(PROJECTS - ["railties"]).each do |project|
4444
puts "INSTALLING #{project}"

actionmailer/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166

167167
# Assert number of emails delivered within a block:
168168
assert_emails 1 do
169-
post :signup, :name => 'Jonathan'
169+
post :signup, name: 'Jonathan'
170170
end
171171

172172

actionmailer/README.rdoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ This can be as simple as:
2626

2727
def welcome(recipient)
2828
@recipient = recipient
29-
mail(:to => recipient,
30-
:subject => "[Signed up] Welcome #{recipient}")
29+
mail(to: recipient,
30+
subject: "[Signed up] Welcome #{recipient}")
3131
end
3232
end
3333

@@ -83,7 +83,7 @@ Note that every value you set with this method will get over written if you use
8383
Example:
8484

8585
class Authenticationmailer < ActionMailer::Base
86-
default :from => "[email protected]", :subject => Proc.new { "E-mail was generated at #{Time.now}" }
86+
default from: "[email protected]", subject: Proc.new { "E-mail was generated at #{Time.now}" }
8787
.....
8888
end
8989

@@ -100,13 +100,13 @@ Example:
100100
def receive(email)
101101
page = Page.find_by_address(email.to.first)
102102
page.emails.create(
103-
:subject => email.subject, :body => email.body
103+
subject: email.subject, body: email.body
104104
)
105105

106106
if email.has_attachments?
107107
email.attachments.each do |attachment|
108108
page.attachments.create({
109-
:file => attachment, :description => email.subject
109+
file: attachment, description: email.subject
110110
})
111111
end
112112
end
@@ -127,11 +127,11 @@ a limited number of email.
127127
The Base class has the full list of configuration options. Here's an example:
128128

129129
ActionMailer::Base.smtp_settings = {
130-
:address => 'smtp.yourserver.com', # default: localhost
131-
:port => '25', # default: 25
132-
:user_name => 'user',
133-
:password => 'pass',
134-
:authentication => :plain # :plain, :login or :cram_md5
130+
address: 'smtp.yourserver.com', # default: localhost
131+
port: '25', # default: 25
132+
user_name: 'user',
133+
password: 'pass',
134+
authentication: :plain # :plain, :login or :cram_md5
135135
}
136136

137137

actionmailer/Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require 'rake/packagetask'
44
require 'rubygems/package_task'
55

66
desc "Default Task"
7-
task :default => [ :test ]
7+
task default: [ :test ]
88

99
# Run the unit tests
1010
Rake::TestTask.new { |t|
@@ -29,7 +29,7 @@ Gem::PackageTask.new(spec) do |p|
2929
end
3030

3131
desc "Release to gemcutter"
32-
task :release => :package do
32+
task release: :package do
3333
require 'rake/gemcutter'
3434
Rake::Gemcutter::Tasks.new(spec).define
3535
Rake::Task['gem:push'].invoke

0 commit comments

Comments
 (0)