file_uploader 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.rdoc +5 -0
- data/file_uploader.gemspec +2 -2
- data/lib/file_uploader/file_stream.rb +2 -1
- metadata +4 -4
data/.gitignore
CHANGED
data/README.rdoc
CHANGED
@@ -36,4 +36,9 @@ Upload to a different directory
|
|
36
36
|
== More
|
37
37
|
|
38
38
|
Uploaded filename is sanitized and will have a random prefix automatically to prevent duplication.
|
39
|
+
|
39
40
|
FileUploader.save accept a block with path to the uploaded file.
|
41
|
+
|
42
|
+
== Sinatra?
|
43
|
+
|
44
|
+
https://gist.github.com/799695
|
data/file_uploader.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "file_uploader"
|
3
|
-
s.version = "0.2.
|
3
|
+
s.version = "0.2.1"
|
4
4
|
# s.platform = Gem::Platform::RUBY
|
5
5
|
|
6
6
|
# s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
7
|
-
s.date = %q{2011-
|
7
|
+
s.date = %q{2011-04-09}
|
8
8
|
|
9
9
|
s.authors = ["InSTEDD"]
|
10
10
|
s.email = "chanmannlim@gmail.com"
|
@@ -10,7 +10,8 @@ class FileStream
|
|
10
10
|
def write(stream, dir, filename)
|
11
11
|
file = FileMaker.create_file(dir, filename)
|
12
12
|
file_stream = FileStream.new(file)
|
13
|
-
file_stream.write stream
|
13
|
+
file_stream.write stream
|
14
|
+
file_stream.close
|
14
15
|
file.path
|
15
16
|
end
|
16
17
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file_uploader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- InSTEDD
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-04-09 00:00:00 +07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|