Skip to content

Commit b451de0

Browse files
committed
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
1 parent 1590377 commit b451de0

File tree

337 files changed

+2122
-2124
lines changed

Some content is hidden

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

337 files changed

+2122
-2124
lines changed

README.rdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ link:files/vendor/rails/actionpack/README.html.
3434

3535
2. At the command prompt, create a new Rails application:
3636

37-
rails new myapp
37+
rails new myapp
3838

3939
where "myapp" is the application name.
4040

@@ -48,7 +48,7 @@ link:files/vendor/rails/actionpack/README.html.
4848

4949
"Welcome aboard: You're riding Ruby on Rails!"
5050

51-
5. Follow the guidelines to start developing your application. You can find
51+
5. Follow the guidelines to start developing your application. You can find
5252
the following resources handy:
5353

5454
* The README file created within your application.

actionmailer/CHANGELOG

+4-4
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181

182182
* ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, Marcel Molina Jr.]
183183

184-
* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
184+
* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
185185

186186
* Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]
187187

@@ -327,7 +327,7 @@
327327

328328
* Added that deliver_* will now return the email that was sent
329329

330-
* Added that quoting to UTF-8 only happens if the characters used are in that range #955 [Jamis Buck]
330+
* Added that quoting to UTF-8 only happens if the characters used are in that range #955 [Jamis Buck]
331331

332332
* Fixed quoting for all address headers, not just to #955 [Jamis Buck]
333333

@@ -366,7 +366,7 @@
366366
@body = "Nothing to see here."
367367
@charset = "iso-8859-1"
368368
end
369-
369+
370370
def unencoded_subject(recipient)
371371
@recipients = recipient
372372
@subject = "testing unencoded subject"
@@ -375,7 +375,7 @@
375375
@encode_subject = false
376376
@charset = "iso-8859-1"
377377
end
378-
378+
379379

380380
*0.6.1* (January 18th, 2005)
381381

actionmailer/README.rdoc

+11-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ are used to consolidate code for sending out forgotten passwords, welcome
55
wishes on signup, invoices for billing, and any other use case that requires
66
a written notification to either a person or another system.
77

8-
Action Mailer is in essence a wrapper around Action Controller and the
8+
Action Mailer is in essence a wrapper around Action Controller and the
99
Mail gem. It provides a way to make emails using templates in the same
1010
way that Action Controller renders views using templates.
1111

@@ -23,7 +23,7 @@ This can be as simple as:
2323

2424
class Notifier < ActionMailer::Base
2525
delivers_from '[email protected]'
26-
26+
2727
def welcome(recipient)
2828
@recipient = recipient
2929
mail(:to => recipient,
@@ -36,13 +36,13 @@ ERb) that has the instance variables that are declared in the mailer action.
3636

3737
So the corresponding body template for the method above could look like this:
3838

39-
Hello there,
39+
Hello there,
4040

4141
Mr. <%= @recipient %>
4242

4343
Thank you for signing up!
44-
45-
And if the recipient was given as "[email protected]", the email
44+
45+
And if the recipient was given as "[email protected]", the email
4646
generated would look like this:
4747

4848
Date: Mon, 25 Jan 2010 22:48:09 +1100
@@ -55,7 +55,7 @@ generated would look like this:
5555
charset="US-ASCII";
5656
Content-Transfer-Encoding: 7bit
5757

58-
Hello there,
58+
Hello there,
5959

6060
6161

@@ -75,7 +75,7 @@ Or you can just chain the methods together like:
7575
== Receiving emails
7676

7777
To receive emails, you need to implement a public instance method called <tt>receive</tt> that takes a
78-
tmail object as its single parameter. The Action Mailer framework has a corresponding class method,
78+
tmail object as its single parameter. The Action Mailer framework has a corresponding class method,
7979
which is also called <tt>receive</tt>, that accepts a raw, unprocessed email as a string, which it then turns
8080
into the tmail object and calls the receive instance method.
8181

@@ -90,21 +90,21 @@ Example:
9090

9191
if email.has_attachments?
9292
for attachment in email.attachments
93-
page.attachments.create({
93+
page.attachments.create({
9494
:file => attachment, :description => email.subject
9595
})
9696
end
9797
end
9898
end
9999
end
100100

101-
This Mailman can be the target for Postfix or other MTAs. In Rails, you would use the runner in the
101+
This Mailman can be the target for Postfix or other MTAs. In Rails, you would use the runner in the
102102
trivial case like this:
103103

104104
rails runner 'Mailman.receive(STDIN.read)'
105105

106-
However, invoking Rails in the runner for each mail to be received is very resource intensive. A single
107-
instance of Rails should be run within a daemon if it is going to be utilized to process more than just
106+
However, invoking Rails in the runner for each mail to be received is very resource intensive. A single
107+
instance of Rails should be run within a daemon if it is going to be utilized to process more than just
108108
a limited number of email.
109109

110110
== Configuration

actionmailer/lib/action_mailer/base.rb

+11-11
Original file line numberDiff line numberDiff line change
@@ -187,31 +187,31 @@ module ActionMailer #:nodoc:
187187
# with the filename +free_book.pdf+.
188188
#
189189
# = Inline Attachments
190-
#
191-
# You can also specify that a file should be displayed inline with other HTML. This is useful
190+
#
191+
# You can also specify that a file should be displayed inline with other HTML. This is useful
192192
# if you want to display a corporate logo or a photo.
193-
#
193+
#
194194
# class ApplicationMailer < ActionMailer::Base
195195
# def welcome(recipient)
196196
# attachments.inline['photo.png'] = File.read('path/to/photo.png')
197197
# mail(:to => recipient, :subject => "Here is what we look like")
198198
# end
199199
# end
200-
#
200+
#
201201
# And then to reference the image in the view, you create a <tt>welcome.html.erb</tt> file and
202-
# make a call to +image_tag+ passing in the attachment you want to display and then call
202+
# make a call to +image_tag+ passing in the attachment you want to display and then call
203203
# +url+ on the attachment to get the relative content id path for the image source:
204-
#
204+
#
205205
# <h1>Please Don't Cringe</h1>
206-
#
206+
#
207207
# <%= image_tag attachments['photo.png'].url -%>
208-
#
208+
#
209209
# As we are using Action View's +image_tag+ method, you can pass in any other options you want:
210-
#
210+
#
211211
# <h1>Please Don't Cringe</h1>
212-
#
212+
#
213213
# <%= image_tag attachments['photo.png'].url, :alt => 'Our Photo', :class => 'photo' -%>
214-
#
214+
#
215215
# = Observing and Intercepting Mails
216216
#
217217
# Action Mailer provides hooks into the Mail observer and interceptor methods. These allow you to

actionmailer/lib/action_mailer/delivery_methods.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ module ClassMethods
4646
# as alias and the default options supplied:
4747
#
4848
# Example:
49-
#
49+
#
5050
# add_delivery_method :sendmail, Mail::Sendmail,
5151
# :location => '/usr/sbin/sendmail',
5252
# :arguments => '-i -t'
53-
#
53+
#
5454
def add_delivery_method(symbol, klass, default_options={})
5555
class_attribute(:"#{symbol}_settings") unless respond_to?(:"#{symbol}_settings")
5656
send(:"#{symbol}_settings=", default_options)

actionmailer/lib/action_mailer/mail_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def block_format(text)
1515
:columns => 72, :first_indent => 2, :body_indent => 2, :text => paragraph
1616
).format
1717
}.join("\n")
18-
18+
1919
# Make list points stand on their own line
2020
formatted.gsub!(/[ ]*([*]+) ([^*]*)/) { |s| " #{$1} #{$2.strip}\n" }
2121
formatted.gsub!(/[ ]*([#]+) ([^#]*)/) { |s| " #{$1} #{$2.strip}\n" }
22-
22+
2323
formatted
2424
end
2525

actionmailer/lib/action_mailer/old_api.rb

+16-16
Original file line numberDiff line numberDiff line change
@@ -116,36 +116,36 @@ def attachment(params, &block)
116116

117117
def normalize_nonfile_hash(params)
118118
content_disposition = "attachment;"
119-
119+
120120
mime_type = params.delete(:mime_type)
121-
121+
122122
if content_type = params.delete(:content_type)
123123
content_type = "#{mime_type || content_type};"
124124
end
125125

126126
params[:body] = params.delete(:data) if params[:data]
127-
127+
128128
{ :content_type => content_type,
129129
:content_disposition => content_disposition }.merge(params)
130130
end
131-
131+
132132
def normalize_file_hash(params)
133133
filename = File.basename(params.delete(:filename))
134134
content_disposition = "attachment; filename=\"#{File.basename(filename)}\""
135-
135+
136136
mime_type = params.delete(:mime_type)
137-
137+
138138
if (content_type = params.delete(:content_type)) && (content_type !~ /filename=/)
139139
content_type = "#{mime_type || content_type}; filename=\"#{filename}\""
140140
end
141-
141+
142142
params[:body] = params.delete(:data) if params[:data]
143-
143+
144144
{ :content_type => content_type,
145145
:content_disposition => content_disposition }.merge(params)
146146
end
147147

148-
def create_mail
148+
def create_mail
149149
m = @_message
150150

151151
set_fields!({:subject => subject, :to => recipients, :from => from,
@@ -178,14 +178,14 @@ def create_mail
178178

179179
wrap_delivery_behavior!
180180
m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii?
181-
181+
182182
@_message
183183
end
184-
184+
185185
# Set up the default values for the various instance variables of this
186186
# mailer. Subclasses may override this method to provide different
187187
# defaults.
188-
def initialize_defaults(method_name)
188+
def initialize_defaults(method_name)
189189
@charset ||= self.class.default[:charset].try(:dup)
190190
@content_type ||= self.class.default[:content_type].try(:dup)
191191
@implicit_parts_order ||= self.class.default[:parts_order].try(:dup)
@@ -201,7 +201,7 @@ def initialize_defaults(method_name)
201201
@body ||= {}
202202
end
203203

204-
def create_parts
204+
def create_parts
205205
if String === @body
206206
@parts.unshift create_inline_part(@body)
207207
elsif @parts.empty? || @parts.all? { |p| p.content_disposition =~ /^attachment/ }
@@ -220,7 +220,7 @@ def create_parts
220220
end
221221
end
222222

223-
def create_inline_part(body, mime_type=nil)
223+
def create_inline_part(body, mime_type=nil)
224224
ct = mime_type || "text/plain"
225225
main_type, sub_type = split_content_type(ct.to_s)
226226

@@ -242,11 +242,11 @@ def set_fields!(headers, charset) #:nodoc:
242242
m.reply_to ||= headers.delete(:reply_to) if headers[:reply_to]
243243
end
244244

245-
def split_content_type(ct)
245+
def split_content_type(ct)
246246
ct.to_s.split("/")
247247
end
248248

249-
def parse_content_type(defaults=nil)
249+
def parse_content_type(defaults=nil)
250250
if @content_type.blank?
251251
[ nil, {} ]
252252
else

actionmailer/lib/action_mailer/tmail_compat.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module Mail
22
class Message
3-
3+
44
def set_content_type(*args)
55
ActiveSupport::Deprecation.warn('Message#set_content_type is deprecated, please just call ' <<
66
'Message#content_type with the same arguments', caller[0,2])
77
content_type(*args)
88
end
9-
9+
1010
alias :old_transfer_encoding :transfer_encoding
1111
def transfer_encoding(value = nil)
1212
if value
@@ -29,6 +29,6 @@ def original_filename
2929
'please call Message#filename', caller[0,2])
3030
filename
3131
end
32-
32+
3333
end
3434
end

actionmailer/test/base_test.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def teardown
148148
assert_equal("application/pdf", email.parts[1].mime_type)
149149
assert_equal("VGhpcyBpcyB0ZXN0IEZpbGUgY29udGVudA==\r\n", email.parts[1].body.encoded)
150150
end
151-
151+
152152
test "can embed an inline attachment" do
153153
email = BaseMailer.inline_attachment
154154
# Need to call #encoded to force the JIT sort on parts
@@ -413,7 +413,7 @@ def teardown
413413
BaseMailer.welcome.deliver
414414
assert_equal(1, BaseMailer.deliveries.length)
415415
end
416-
416+
417417
test "calling deliver, ActionMailer should yield back to mail to let it call :do_delivery on itself" do
418418
mail = Mail::Message.new
419419
mail.expects(:do_delivery).once
@@ -447,7 +447,7 @@ def teardown
447447
mail = BaseMailer.welcome_from_another_path(['unknown/invalid', 'another.path/base_mailer']).deliver
448448
assert_equal("Welcome from another path", mail.body.encoded)
449449
end
450-
450+
451451
test "assets tags should use ActionMailer's asset_host settings" do
452452
ActionMailer::Base.config.asset_host = "http://global.com"
453453
ActionMailer::Base.config.assets_dir = "global/"
@@ -456,7 +456,7 @@ def teardown
456456

457457
assert_equal(%{<img alt="Dummy" src="http://global.com/images/dummy.png" />}, mail.body.to_s.strip)
458458
end
459-
459+
460460
test "assets tags should use a Mailer's asset_host settings when available" do
461461
ActionMailer::Base.config.asset_host = "global.com"
462462
ActionMailer::Base.config.assets_dir = "global/"
@@ -469,12 +469,12 @@ def teardown
469469
end
470470

471471
# Before and After hooks
472-
472+
473473
class MyObserver
474474
def self.delivered_email(mail)
475475
end
476476
end
477-
477+
478478
test "you can register an observer to the mail object that gets informed on email delivery" do
479479
ActionMailer::Base.register_observer(MyObserver)
480480
mail = BaseMailer.welcome
@@ -493,15 +493,15 @@ def self.delivering_email(mail)
493493
MyInterceptor.expects(:delivering_email).with(mail)
494494
mail.deliver
495495
end
496-
496+
497497
test "being able to put proc's into the defaults hash and they get evaluated on mail sending" do
498498
mail1 = ProcMailer.welcome
499499
yesterday = 1.day.ago
500500
Time.stubs(:now).returns(yesterday)
501501
mail2 = ProcMailer.welcome
502502
assert(mail1['X-Proc-Method'].to_s.to_i > mail2['X-Proc-Method'].to_s.to_i)
503503
end
504-
504+
505505
test "we can call other defined methods on the class as needed" do
506506
mail = ProcMailer.welcome
507507
assert_equal("Thanks for signing up this afternoon", mail.subject)

0 commit comments

Comments
 (0)