paperclipdropbox 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +8 -2
- data/lib/paperclipdropbox.rb +3 -7
- data/lib/paperclipdropbox/version.rb +1 -1
- metadata +6 -6
data/README.rdoc
CHANGED
@@ -18,14 +18,20 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
gem install paperclipdropbox
|
20
20
|
|
21
|
+
Then run the authotization rake task
|
22
|
+
|
23
|
+
rake paperclipdropbox:authorize
|
24
|
+
|
25
|
+
you'll then be given a url to login to dropbox to authorize this plugin access to your dropbox account.
|
26
|
+
Then once logged in run the rake task again.
|
21
27
|
|
22
28
|
== Usage
|
23
29
|
|
24
30
|
Create the file config/paperclipdropbox.yml:
|
25
31
|
|
26
32
|
development:
|
27
|
-
|
28
|
-
|
33
|
+
dropbox_user: user_email
|
34
|
+
dropbox_password: user_password
|
29
35
|
|
30
36
|
test:
|
31
37
|
...
|
data/lib/paperclipdropbox.rb
CHANGED
@@ -71,13 +71,9 @@ module Paperclip
|
|
71
71
|
def dropbox_session
|
72
72
|
unless Rails.cache.exist?('DropboxSession')
|
73
73
|
if @dropboxsession.blank?
|
74
|
-
log("
|
75
|
-
|
76
|
-
|
77
|
-
@dropboxsession.authorizing_user = @dropbox_user
|
78
|
-
@dropboxsession.authorizing_password = @dropbox_password
|
79
|
-
@dropboxsession.authorize!
|
80
|
-
Rails.cache.write('DropboxSession', dropboxsession)
|
74
|
+
log("loading session from yaml");
|
75
|
+
if File.exists?("#{Rails.root}/config/dropboxsession.yml")
|
76
|
+
@dropboxsession = Dropbox::Session.deserialize(File.read("#{Rails.root}/config/dropboxsession.yml"))
|
81
77
|
end
|
82
78
|
@dropboxsession
|
83
79
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclipdropbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
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: 2011-07-
|
12
|
+
date: 2011-07-18 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: paperclip
|
16
|
-
requirement: &
|
16
|
+
requirement: &9276120 !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: *
|
24
|
+
version_requirements: *9276120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: dropbox
|
27
|
-
requirement: &
|
27
|
+
requirement: &9275856 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *9275856
|
36
36
|
description: Dropbox storage support for paperclip file attachment
|
37
37
|
email:
|
38
38
|
- paul@ketelle.com
|