Skip to content
Browse files

Cleanup whitespaces

  • Loading branch information...
1 parent 5a138fd commit 04094b6f55ac0c1d9d48cb7f04edeab431328ef0 @sikachu sikachu committed Jun 15, 2012
View
6 features/step_definitions/web_steps.rb
@@ -181,7 +181,7 @@ def with_scope(locator)
end
end
end
-
+
Then /^(?:|I )should be on (.+)$/ do |page_name|
current_path = URI.parse(current_url).path
if current_path.respond_to? :should
@@ -195,8 +195,8 @@ def with_scope(locator)
query = URI.parse(current_url).query
actual_params = query ? CGI.parse(query) : {}
expected_params = {}
- expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
-
+ expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
+
if actual_params.respond_to? :should
actual_params.should == expected_params
else
View
BIN features/support/fixtures/.boot_config.rb.swo
Binary file not shown.
View
4 lib/paperclip/matchers.rb
@@ -41,7 +41,7 @@ module Shoulda
#
# class ActiveSupport::TestCase
# extend Paperclip::Shoulda::Matchers
- #
+ #
# #...other initializers...#
# end
#
@@ -57,7 +57,7 @@ module Shoulda
# should validate_attachment_size(:avatar).
# less_than(2.megabytes)
# end
- #
+ #
module Matchers
end
end
View
8 lib/paperclip/matchers/validate_attachment_content_type_matcher.rb
@@ -51,7 +51,7 @@ def description
end
protected
-
+
def accepted_types_and_failures
if @allowed_types.present?
"Accept content types: #{@allowed_types.join(", ")}\n".tap do |message|
@@ -61,7 +61,7 @@ def accepted_types_and_failures
message << " All were accepted successfully."
end
end
- end
+ end
end
def rejected_types_and_failures
if @rejected_types.present?
@@ -74,10 +74,10 @@ def rejected_types_and_failures
end
end
end
-
+
def expected_attachment
"Expected #{@attachment_name}:\n"
- end
+ end
def type_allowed?(type)
@subject.send("#{@attachment_name}_content_type=", type)
View
2 lib/paperclip/storage/fog.rb
@@ -197,7 +197,7 @@ def directory
else
@options[:fog_directory]
end
-
+
@directory ||= connection.directories.new(:key => dir)
end
end
View
2 lib/paperclip/storage/s3.rb
@@ -61,7 +61,7 @@ module Storage
# Normally, this won't matter in the slightest and you can leave the default (which is
# path-style, or :s3_path_url). But in some cases paths don't work and you need to use
# the domain-style (:s3_domain_url). Anything else here will be treated like path-style.
- #
+ #
# Notes:
# * The value of this option is a string, not a symbol.
# <b>right:</b> <tt>":s3_domain_url"</tt>
View
4 lib/paperclip/style.rb
@@ -52,12 +52,12 @@ def whiny?
end
def convert_options
- @convert_options.respond_to?(:call) ? @convert_options.call(attachment.instance) :
+ @convert_options.respond_to?(:call) ? @convert_options.call(attachment.instance) :
(@convert_options || attachment.send(:extra_options_for, name))
end
def source_file_options
- @source_file_options.respond_to?(:call) ? @source_file_options.call(attachment.instance) :
+ @source_file_options.respond_to?(:call) ? @source_file_options.call(attachment.instance) :
(@source_file_options || attachment.send(:extra_source_file_options_for, name))
end
View
10 test/attachment_test.rb
@@ -744,15 +744,15 @@ def do_after_all; end
rebuild_model
@file = Tempfile.new(["filename","png"])
end
-
+
teardown do
@file.unlink
end
context "with default configuration" do
"&$+,/:;=?@<>[]{}|\^~%# ".split(//).each do |character|
context "with character #{character}" do
-
+
context "at beginning of filename" do
setup do
@file.stubs(:original_filename).returns("#{character}filename.png")
@@ -762,9 +762,9 @@ def do_after_all; end
should "convert special character into underscore" do
assert_equal "_filename.png", @dummy.avatar.original_filename
- end
+ end
end
-
+
context "at end of filename" do
setup do
@file.stubs(:original_filename).returns("filename.png#{character}")
@@ -776,7 +776,7 @@ def do_after_all; end
assert_equal "filename.png_", @dummy.avatar.original_filename
end
end
-
+
context "in the middle of filename" do
setup do
@file.stubs(:original_filename).returns("file#{character}name.png")

0 comments on commit 04094b6

Please sign in to comment.
Something went wrong with that request. Please try again.