dbox 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/History.txt +4 -0
  2. data/VERSION +1 -1
  3. data/bin/dbox +1 -0
  4. data/dbox.gemspec +2 -2
  5. data/lib/dbox/api.rb +3 -1
  6. metadata +4 -4
@@ -1,3 +1,7 @@
1
+ == 0.7.2 / 2012-12-04
2
+ * Minor Enhancements
3
+ * Added configurable Dropbox access type (sandbox or app_folder).
4
+
1
5
  == 0.7.1 / 2012-11-13
2
6
  * Bug Fixes
3
7
  * Resolved issue where push operations would fail when renaming files with spaces to underscores or vice versa.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.2
data/bin/dbox CHANGED
@@ -26,6 +26,7 @@ Environment varables needed for everything:
26
26
  Environment varables needed for everything other than authorize:
27
27
  export DROPBOX_AUTH_KEY=v4d7l1rez1czksn
28
28
  export DROPBOX_AUTH_SECRET=pqej9rmnj0i1gcxr4
29
+ export DROPBOX_ACCESS_TYPE=dropbox || app_folder (defaults to dropbox)
29
30
 
30
31
  See http://github.com/kenpratt/dbox for examples and more information
31
32
  _EOF
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dbox"
8
- s.version = "0.7.1"
8
+ s.version = "0.7.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ken Pratt"]
12
- s.date = "2012-11-13"
12
+ s.date = "2012-12-04"
13
13
  s.description = "An easy-to-use Dropbox client with fine-grained control over syncs."
14
14
  s.email = "ken@kenpratt.net"
15
15
  s.executables = ["dbox"]
@@ -54,15 +54,17 @@ module Dbox
54
54
  app_secret = ENV["DROPBOX_APP_SECRET"]
55
55
  auth_key = ENV["DROPBOX_AUTH_KEY"]
56
56
  auth_secret = ENV["DROPBOX_AUTH_SECRET"]
57
+ access_type = ENV["DROPBOX_ACCESS_TYPE"] || "dropbox" # "app_folder"
57
58
 
58
59
  raise(ConfigurationError, "Please set the DROPBOX_APP_KEY environment variable to a Dropbox application key") unless app_key
59
60
  raise(ConfigurationError, "Please set the DROPBOX_APP_SECRET environment variable to a Dropbox application secret") unless app_secret
60
61
  raise(ConfigurationError, "Please set the DROPBOX_AUTH_KEY environment variable to an authenticated Dropbox session key") unless auth_key
61
62
  raise(ConfigurationError, "Please set the DROPBOX_AUTH_SECRET environment variable to an authenticated Dropbox session secret") unless auth_secret
63
+ raise(ConfigurationError, "Please set the DROPBOX_ACCESS_TYPE environment variable either dropbox (full access) or sandbox (App access)") unless access_type == "dropbox" || access_type == "app_folder"
62
64
 
63
65
  @session = DropboxSession.new(app_key, app_secret)
64
66
  @session.set_access_token(auth_key, auth_secret)
65
- @client = DropboxClient.new(@session, 'dropbox')
67
+ @client = DropboxClient.new(@session, access_type)
66
68
  end
67
69
 
68
70
  def run(path, tries = NUM_TRIES, &proc)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbox
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 1
10
- version: 0.7.1
9
+ - 2
10
+ version: 0.7.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ken Pratt
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-11-13 00:00:00 Z
18
+ date: 2012-12-04 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: multipart-post