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 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
- dropbox_user: user_email
28
- dropbox_password: user_password
33
+ dropbox_user: user_email
34
+ dropbox_password: user_password
29
35
 
30
36
  test:
31
37
  ...
@@ -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("create new Dropbox Session")
75
- @dropboxsession = Dropbox::Session.new(@dropbox_key, @dropbox_secret)
76
- @dropboxsession.mode = :dropbox
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
@@ -1,3 +1,3 @@
1
1
  module Paperclipdropbox
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
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.5
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-04 00:00:00.000000000Z
12
+ date: 2011-07-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: paperclip
16
- requirement: &9524100 !ruby/object:Gem::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: *9524100
24
+ version_requirements: *9276120
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: dropbox
27
- requirement: &9523836 !ruby/object:Gem::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: *9523836
35
+ version_requirements: *9275856
36
36
  description: Dropbox storage support for paperclip file attachment
37
37
  email:
38
38
  - paul@ketelle.com