dsturnbull-carrierwave 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -125,7 +125,8 @@ module CarrierWave
125
125
  File.expand_path(File.join(cache_dir, cache_name), root)
126
126
  end
127
127
 
128
- attr_reader :cache_id, :original_filename
128
+ attr_reader :cache_id
129
+ attr_accessor :original_filename
129
130
 
130
131
  # We can override the full_original_filename method in other modules
131
132
  alias_method :full_original_filename, :original_filename
@@ -135,11 +136,6 @@ module CarrierWave
135
136
  @cache_id = cache_id
136
137
  end
137
138
 
138
- def original_filename=(filename)
139
- raise CarrierWave::InvalidParameter, "invalid filename" unless filename =~ /\A[a-z0-9\.\-\+_]+\z/i
140
- @original_filename = filename
141
- end
142
-
143
139
  end # Cache
144
140
  end # Uploader
145
141
  end # CarrierWave
data/lib/carrierwave.rb CHANGED
@@ -7,7 +7,7 @@ require 'carrierwave/core_ext/inheritable_attributes'
7
7
 
8
8
  module CarrierWave
9
9
 
10
- VERSION = "0.4.5"
10
+ VERSION = "0.4.6"
11
11
 
12
12
  class << self
13
13
  attr_accessor :root
@@ -152,18 +152,6 @@ describe CarrierWave::Uploader do
152
152
  @uploader.cache_name.should be_nil
153
153
  end
154
154
 
155
- it "should raise an error when the original_filename contains invalid characters" do
156
- running {
157
- @uploader.retrieve_from_cache!('20071201-1234-345-2255/te/st.jpeg')
158
- }.should raise_error(CarrierWave::InvalidParameter)
159
- running {
160
- @uploader.retrieve_from_cache!('20071201-1234-345-2255/te??%st.jpeg')
161
- }.should raise_error(CarrierWave::InvalidParameter)
162
-
163
- @uploader.file.should be_nil
164
- @uploader.filename.should be_nil
165
- @uploader.cache_name.should be_nil
166
- end
167
155
  end
168
156
 
169
157
  describe 'with an overridden, reversing, filename' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dsturnbull-carrierwave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas