dewey 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/README.md +4 -0
- data/lib/dewey/mime.rb +1 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
Dewey allows you to simply upload, download and delete files from your Google
|
2
2
|
Docs account. Let Google do all of the hard work of converting your documents!
|
3
3
|
|
4
|
+
# Note
|
5
|
+
|
6
|
+
Dewey is in alpha. It is not recommended you use this in production code.
|
7
|
+
|
4
8
|
## Usage
|
5
9
|
|
6
10
|
First, create a new Dewey::Document instance using your google docs account and
|
data/lib/dewey/mime.rb
CHANGED
@@ -36,7 +36,7 @@ module Dewey
|
|
36
36
|
# types, when gathered from +file+ require extra coercion and will be handled
|
37
37
|
# automatically.
|
38
38
|
def self.mime_type(file)
|
39
|
-
type = (file.path.match(/\.(\w+)/)[1]).downcase
|
39
|
+
type = (file.path.match(/\.(\w+)/)[1] rescue '').downcase
|
40
40
|
case type
|
41
41
|
when /csv/ then SPREADSHEET_MIMETYPES[:csv]
|
42
42
|
when /doc$/ then DOCUMENT_MIMETYPES[:doc]
|