carrierwave_direct 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -374,3 +374,4 @@ You should now be able to run the tests
374
374
 
375
375
  * cblunt (Chris Blunt) - Support for passing html options
376
376
  * robyurkowski (Rob Yurkowski) - Fix deprecation warnings for Rails 3.2
377
+ * tylr (Tyler Love) - Bug fix
@@ -24,7 +24,7 @@ module CarrierWaveDirect
24
24
  if options[:with_path]
25
25
  uri = URI.parse(fog_uri)
26
26
  path = "/#{key}"
27
- uri.path = path
27
+ uri.path = URI.escape(path)
28
28
  fog_uri = uri.to_s
29
29
  end
30
30
  fog_uri
@@ -135,4 +135,3 @@ module CarrierWaveDirect
135
135
  end
136
136
  end
137
137
  end
138
-
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module CarrierwaveDirect
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
 
@@ -8,6 +8,7 @@ describe CarrierWaveDirect::Uploader do
8
8
 
9
9
  SAMPLE_DATA = {
10
10
  :path => "upload_dir/bliind.exe",
11
+ :path_with_special_chars => "upload_dir/some file & blah.exe",
11
12
  :key => "some key",
12
13
  :guid => "guid",
13
14
  :store_dir => "store_dir",
@@ -215,6 +216,15 @@ describe CarrierWaveDirect::Uploader do
215
216
  end
216
217
 
217
218
  context ":with_path => true" do
219
+
220
+ context "#key is set to '#{sample(:path_with_special_chars)}'" do
221
+ before { subject.key = sample(:path_with_special_chars) }
222
+
223
+ it "should return the full url with '/#{URI.escape(sample(:path_with_special_chars))}' as the path" do
224
+ URI.parse(subject.direct_fog_url(:with_path => true)).path.should == "/#{URI.escape(sample(:path_with_special_chars))}"
225
+ end
226
+ end
227
+
218
228
  context "#key is set to '#{sample(:path)}'" do
219
229
  before { subject.key = sample(:path) }
220
230
 
@@ -454,4 +464,3 @@ describe CarrierWaveDirect::Uploader do
454
464
  end
455
465
  end
456
466
  end
457
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave_direct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-06 00:00:00.000000000Z
12
+ date: 2012-02-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: carrierwave
16
- requirement: &85732130 !ruby/object:Gem::Requirement
16
+ requirement: &72575860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *85732130
24
+ version_requirements: *72575860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: uuid
27
- requirement: &85731800 !ruby/object:Gem::Requirement
27
+ requirement: &72575510 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *85731800
35
+ version_requirements: *72575510
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: fog
38
- requirement: &85731490 !ruby/object:Gem::Requirement
38
+ requirement: &72575190 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *85731490
46
+ version_requirements: *72575190
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &85731170 !ruby/object:Gem::Requirement
49
+ requirement: &72574880 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *85731170
57
+ version_requirements: *72574880
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: timecop
60
- requirement: &85730900 !ruby/object:Gem::Requirement
60
+ requirement: &72574590 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *85730900
68
+ version_requirements: *72574590
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails
71
- requirement: &85730610 !ruby/object:Gem::Requirement
71
+ requirement: &72574320 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *85730610
79
+ version_requirements: *72574320
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sqlite3
82
- requirement: &85730290 !ruby/object:Gem::Requirement
82
+ requirement: &72574040 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *85730290
90
+ version_requirements: *72574040
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: capybara
93
- requirement: &85729900 !ruby/object:Gem::Requirement
93
+ requirement: &72573710 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *85729900
101
+ version_requirements: *72573710
102
102
  description: Process your uploads in the background by uploading directly to S3
103
103
  email:
104
104
  - dwilkie@gmail.com
@@ -156,7 +156,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
156
156
  version: '0'
157
157
  segments:
158
158
  - 0
159
- hash: -831805485
159
+ hash: 386717071
160
160
  required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  segments:
167
167
  - 0
168
- hash: -831805485
168
+ hash: 386717071
169
169
  requirements: []
170
170
  rubyforge_project: carrierwave_direct
171
171
  rubygems_version: 1.8.10