Skip to content

Commit

Permalink
Ignore case on file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlok committed Nov 26, 2012
1 parent c5371a0 commit ccc6766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/carrierwave_direct/uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def filename
end

def key_regexp
/\A#{store_dir}\/[a-f\d\-]+\/.+\.#{extension_regexp}\z/
/\A#{store_dir}\/[a-f\d\-]+\/.+\.(?i)#{extension_regexp}(?-i)\z/
end

def extension_regexp
Expand Down
2 changes: 1 addition & 1 deletion spec/uploader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
end

it "should return /\\A#{sample(:store_dir)}\\/#{GUID_REGEXP}\\/.+\\.#{sample(:extension_regexp)}\\z/" do
subject.key_regexp.should == /\A#{sample(:store_dir)}\/#{GUID_REGEXP}\/.+\.#{sample(:extension_regexp)}\z/
subject.key_regexp.should == /\A#{sample(:store_dir)}\/#{GUID_REGEXP}\/.+\.(?i)#{sample(:extension_regexp)}(?-i)\z/
end
end
end
Expand Down

0 comments on commit ccc6766

Please sign in to comment.