Permalink
Browse files

Fix whitespace errors

  • Loading branch information...
1 parent 9d1355b commit 40207c74888bf792471172125a4998d7dd110958 @sikachu sikachu committed Apr 17, 2012
@@ -1,6 +1,5 @@
module Paperclip
class AttachmentAdapter
-
def initialize(target)
@target = target
cache_current_values
@@ -62,7 +61,6 @@ def copy_to_tempfile(src)
end
dest
end
-
end
end
@@ -1,7 +1,6 @@
require 'set'
module Paperclip
-
class << self
attr_accessor :classes_with_attachments
attr_writer :registered_attachments_styles_path
@@ -12,7 +11,6 @@ def registered_attachments_styles_path
self.classes_with_attachments = Set.new
-
# Get list of styles saved on previous deploy (running rake paperclip:refresh:missing_styles)
def self.get_registered_attachments_styles
YAML.load_file(Paperclip.registered_attachments_styles_path)
@@ -49,9 +47,9 @@ def self.current_attachments_styles
current_styles[klass_sym][attachment_name.to_sym] ||= Array.new
current_styles[klass_sym][attachment_name.to_sym] << style_name.to_sym
current_styles[klass_sym][attachment_name.to_sym].map!(&:to_s).sort!.map!(&:to_sym).uniq!
- end
- end
- end
+ end
+ end
+ end
end
end
private_class_method :current_attachments_styles
@@ -71,7 +69,7 @@ def self.missing_attachments_styles
current_styles.each do |klass, attachment_definitions|
attachment_definitions.each do |attachment_name, styles|
registered = registered_styles[klass][attachment_name] || [] rescue []
- missed = styles - registered
+ missed = styles - registered
if missed.present?
klass_sym = klass.to_s.to_sym
missing_styles[klass_sym] ||= Hash.new
@@ -80,8 +78,7 @@ def self.missing_attachments_styles
missing_styles[klass_sym][attachment_name.to_sym].map!(&:to_s).sort!.map!(&:to_sym).uniq!
end
end
- end
+ end
end
end
-
end
@@ -44,5 +44,4 @@ def setup
assert_equal expected.length, actual.length
assert_equal expected, actual
end
-
end
@@ -5,7 +5,6 @@
class FogTest < Test::Unit::TestCase
context "" do
-
context "with credentials provided in a path string" do
setup do
rebuild_model :styles => { :medium => "300x300>", :thumb => "100x100>" },
@@ -3,7 +3,6 @@
unless ENV["S3_BUCKET"].blank?
class S3LiveTest < Test::Unit::TestCase
-
context "when assigning an S3 attachment directly to another model" do
setup do
rebuild_model :styles => { :thumb => "100x100", :square => "32x32#" },

0 comments on commit 40207c7

Please sign in to comment.