dbox 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5d8a90232526be7150638cbd70f5564609c22212
4
+ data.tar.gz: 71fb6bb0a1644bfc432e70e9a708d5f6b3691a4c
5
+ SHA512:
6
+ metadata.gz: b0d5add7dd609ee24bf3d897dc54c88684d5dfdf4ad0845a347e6047418b948a6a47391403c0138a555a1d3875303802c21ace22f49e268bedf2bce24cc374f4
7
+ data.tar.gz: 849b6c3cdddff4982f4dd95212c087dcf690f53c330c261c85bd0ebaa010fd007a6a037754d41a92af3f7bfcf46a5587a2f4247f480c5d819ab41fefabe1b0f2
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'multipart-post', '>= 1.1.2'
4
+ gem 'oauth', '>= 0.4.5'
5
+ gem 'json', '>= 1.5.3'
6
+ gem 'sqlite3', '>= 1.3.3'
7
+ gem 'dropbox-sdk', '>= 1.6.2'
8
+
9
+ group :development do
10
+ gem 'jeweler'
11
+ end
12
+
13
+ group :test do
14
+ gem 'rspec'
15
+ end
data/History.txt CHANGED
@@ -1,6 +1,12 @@
1
- == 0.8.9 / 2013-10.28
2
- * Using the dropbox-sdk from a gem rather than vendoring it.
3
- * Using OAuth2 instead of OAuth1 for authenticating. This means that the environment variables you need are renamed from DROPBOX_AUTH_KEY and DROPBOX_SECRET to DROPBOX_ACCESS_TOKEN.
1
+ == 0.8.1 / 2014-04-16
2
+ * Minor Enhancements
3
+ * Allow CTRL-C to kill process.
4
+
5
+ == 0.8.0 / 2013-10-28
6
+ * Major Enhancements
7
+ * Using OAuth2 instead of OAuth1 for authenticating. This means that the environment variables you need are renamed from DROPBOX_AUTH_KEY and DROPBOX_SECRET to DROPBOX_ACCESS_TOKEN.
8
+ * Minor Enhancements
9
+ * Using the dropbox-sdk from a gem rather than vendoring it.
4
10
 
5
11
  == 0.7.6 / 2013-10-02
6
12
  * Bug Fixes
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ Jeweler::Tasks.new do |gem|
10
10
  gem.homepage = "http://github.com/kenpratt/dbox"
11
11
  gem.license = "MIT"
12
12
  gem.summary = "Dropbox made easy."
13
- gem.description = "An easy-to-use Dropbox client with fine-grained control over syncs."
13
+ gem.description = "An easy-to-use Dropbox client with fine-grained control over syncs. Think of it as halfway point between the developer API and a normal client, which gives you control over what and when Dropbox syncs but handles all the details."
14
14
  gem.email = "ken@kenpratt.net"
15
15
  gem.authors = ["Ken Pratt"]
16
16
  gem.executables = ["dbox"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
data/dbox.gemspec CHANGED
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dbox"
8
- s.version = "0.8.0"
8
+ s.version = "0.8.1"
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 = "2013-10-30"
13
- s.description = "An easy-to-use Dropbox client with fine-grained control over syncs."
12
+ s.date = "2014-04-16"
13
+ s.description = "An easy-to-use Dropbox client with fine-grained control over syncs. Think of it as halfway point between the developer API and a normal client, which gives you control over what and when Dropbox syncs but handles all the details."
14
14
  s.email = "ken@kenpratt.net"
15
15
  s.executables = ["dbox"]
16
16
  s.extra_rdoc_files = [
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  ]
20
20
  s.files = [
21
21
  ".document",
22
+ "Gemfile",
22
23
  "History.txt",
23
24
  "LICENSE.txt",
24
25
  "README.md",
@@ -42,11 +43,11 @@ Gem::Specification.new do |s|
42
43
  s.homepage = "http://github.com/kenpratt/dbox"
43
44
  s.licenses = ["MIT"]
44
45
  s.require_paths = ["lib"]
45
- s.rubygems_version = "1.8.23"
46
+ s.rubygems_version = "2.0.14"
46
47
  s.summary = "Dropbox made easy."
47
48
 
48
49
  if s.respond_to? :specification_version then
49
- s.specification_version = 3
50
+ s.specification_version = 4
50
51
 
51
52
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
53
  s.add_runtime_dependency(%q<multipart-post>, [">= 1.1.2"])
@@ -54,12 +55,24 @@ Gem::Specification.new do |s|
54
55
  s.add_runtime_dependency(%q<json>, [">= 1.5.3"])
55
56
  s.add_runtime_dependency(%q<sqlite3>, [">= 1.3.3"])
56
57
  s.add_runtime_dependency(%q<dropbox-sdk>, [">= 1.6.2"])
58
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
59
+ s.add_runtime_dependency(%q<multipart-post>, [">= 1.1.2"])
60
+ s.add_runtime_dependency(%q<oauth>, [">= 0.4.5"])
61
+ s.add_runtime_dependency(%q<json>, [">= 1.5.3"])
62
+ s.add_runtime_dependency(%q<sqlite3>, [">= 1.3.3"])
63
+ s.add_runtime_dependency(%q<dropbox-sdk>, [">= 1.6.2"])
57
64
  else
58
65
  s.add_dependency(%q<multipart-post>, [">= 1.1.2"])
59
66
  s.add_dependency(%q<oauth>, [">= 0.4.5"])
60
67
  s.add_dependency(%q<json>, [">= 1.5.3"])
61
68
  s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
62
69
  s.add_dependency(%q<dropbox-sdk>, [">= 1.6.2"])
70
+ s.add_dependency(%q<jeweler>, [">= 0"])
71
+ s.add_dependency(%q<multipart-post>, [">= 1.1.2"])
72
+ s.add_dependency(%q<oauth>, [">= 0.4.5"])
73
+ s.add_dependency(%q<json>, [">= 1.5.3"])
74
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
75
+ s.add_dependency(%q<dropbox-sdk>, [">= 1.6.2"])
63
76
  end
64
77
  else
65
78
  s.add_dependency(%q<multipart-post>, [">= 1.1.2"])
@@ -67,6 +80,12 @@ Gem::Specification.new do |s|
67
80
  s.add_dependency(%q<json>, [">= 1.5.3"])
68
81
  s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
69
82
  s.add_dependency(%q<dropbox-sdk>, [">= 1.6.2"])
83
+ s.add_dependency(%q<jeweler>, [">= 0"])
84
+ s.add_dependency(%q<multipart-post>, [">= 1.1.2"])
85
+ s.add_dependency(%q<oauth>, [">= 0.4.5"])
86
+ s.add_dependency(%q<json>, [">= 1.5.3"])
87
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
88
+ s.add_dependency(%q<dropbox-sdk>, [">= 1.6.2"])
70
89
  end
71
90
  end
72
91
 
data/lib/dbox.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__), ".."))
2
2
  $:.unshift File.join(ROOT_PATH, "lib")
3
3
  $:.unshift File.join(ROOT_PATH, "vendor")
4
- $:.unshift File.join(ROOT_PATH, "vendor", "dropbox-ruby-sdk", "lib")
5
4
 
6
5
  require "dropbox_sdk"
7
6
  require "fileutils"
data/lib/dbox/api.rb CHANGED
@@ -90,7 +90,7 @@ module Dbox
90
90
  else
91
91
  handle_response(path, e.http_response) { raise ServerError, "Server error -- might be a hiccup, please try your request again (#{e.message})" }
92
92
  end
93
- rescue Exception => e
93
+ rescue => e
94
94
  if tries > 0
95
95
  log.info "Encounted an unknown error. Sleeping #{TIME_BETWEEN_TRIES}s and trying again. Error: #{e.inspect}"
96
96
  sleep TIME_BETWEEN_TRIES
data/lib/dbox/syncer.rb CHANGED
@@ -203,7 +203,7 @@ module Dbox
203
203
  changelist[:conflicts] ||= []
204
204
  changelist[:conflicts] << res[1]
205
205
  end
206
- rescue Exception => e
206
+ rescue => e
207
207
  log.error "Error while downloading #{c[:path]}: #{e.inspect}\n#{e.backtrace.join("\n")}"
208
208
  parent_ids_of_failed_entries << c[:parent_id]
209
209
  changelist[:failed] << { :operation => :create, :path => c[:path], :error => e }
@@ -226,7 +226,7 @@ module Dbox
226
226
  changelist[:conflicts] ||= []
227
227
  changelist[:conflicts] << res[1]
228
228
  end
229
- rescue Exception => e
229
+ rescue => e
230
230
  log.error "Error while downloading #{c[:path]}: #{e.inspect}\n#{e.backtrace.join("\n")}"
231
231
  parent_ids_of_failed_entries << c[:parent_id]
232
232
  changelist[:failed] << { :operation => :create, :path => c[:path], :error => e }
@@ -316,7 +316,7 @@ module Dbox
316
316
  recur_dirs.each do |operation, dir|
317
317
  begin
318
318
  out += calculate_changes(dir, operation)
319
- rescue Exception => e
319
+ rescue => e
320
320
  log.error "Error while caclulating changes for #{operation} on #{dir[:path]}: #{e.inspect}\n#{e.backtrace.join("\n")}"
321
321
  out += [[:failed, dir.merge({ :operation => operation, :error => e })]]
322
322
  end
@@ -457,7 +457,7 @@ module Dbox
457
457
  changelist[:conflicts] ||= []
458
458
  changelist[:conflicts] << { :original => c[:path], :renamed => res[:path] }
459
459
  end
460
- rescue Exception => e
460
+ rescue => e
461
461
  log.error "Error while uploading #{c[:path]}: #{e.inspect}\n#{e.backtrace.join("\n")}"
462
462
  changelist[:failed] << { :operation => :create, :path => c[:path], :error => e }
463
463
  end
@@ -483,7 +483,7 @@ module Dbox
483
483
  changelist[:conflicts] ||= []
484
484
  changelist[:conflicts] << { :original => c[:path], :renamed => res[:path] }
485
485
  end
486
- rescue Exception => e
486
+ rescue => e
487
487
  log.error "Error while uploading #{c[:path]}: #{e.inspect}\n#{e.backtrace.join("\n")}"
488
488
  changelist[:failed] << { :operation => :update, :path => c[:path], :error => e }
489
489
  end
@@ -502,7 +502,7 @@ module Dbox
502
502
  end
503
503
  database.delete_entry_by_path(c[:path])
504
504
  changelist[:deleted] << c[:path]
505
- rescue Exception => e
505
+ rescue => e
506
506
  log.error "Error while deleting #{c[:path]}: #{e.inspect}\n#{e.backtrace.join("\n")}"
507
507
  changelist[:failed] << { :operation => :delete, :path => c[:path], :error => e }
508
508
  end
metadata CHANGED
@@ -1,97 +1,172 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
5
- prerelease:
4
+ version: 0.8.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ken Pratt
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-30 00:00:00.000000000 Z
11
+ date: 2014-04-16 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: multipart-post
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.1.2
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 1.1.2
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: oauth
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.4.5
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 0.4.5
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: json
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: 1.5.3
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: 1.5.3
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: sqlite3
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: 1.3.3
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: 1.3.3
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: dropbox-sdk
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: 1.6.2
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: 1.6.2
94
- description: An easy-to-use Dropbox client with fine-grained control over syncs.
83
+ - !ruby/object:Gem::Dependency
84
+ name: jeweler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: multipart-post
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: 1.1.2
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: 1.1.2
111
+ - !ruby/object:Gem::Dependency
112
+ name: oauth
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: 0.4.5
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: 0.4.5
125
+ - !ruby/object:Gem::Dependency
126
+ name: json
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: 1.5.3
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: 1.5.3
139
+ - !ruby/object:Gem::Dependency
140
+ name: sqlite3
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: 1.3.3
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: 1.3.3
153
+ - !ruby/object:Gem::Dependency
154
+ name: dropbox-sdk
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '>='
158
+ - !ruby/object:Gem::Version
159
+ version: 1.6.2
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '>='
165
+ - !ruby/object:Gem::Version
166
+ version: 1.6.2
167
+ description: An easy-to-use Dropbox client with fine-grained control over syncs. Think
168
+ of it as halfway point between the developer API and a normal client, which gives
169
+ you control over what and when Dropbox syncs but handles all the details.
95
170
  email: ken@kenpratt.net
96
171
  executables:
97
172
  - dbox
@@ -101,6 +176,7 @@ extra_rdoc_files:
101
176
  - README.md
102
177
  files:
103
178
  - .document
179
+ - Gemfile
104
180
  - History.txt
105
181
  - LICENSE.txt
106
182
  - README.md
@@ -123,26 +199,25 @@ files:
123
199
  homepage: http://github.com/kenpratt/dbox
124
200
  licenses:
125
201
  - MIT
202
+ metadata: {}
126
203
  post_install_message:
127
204
  rdoc_options: []
128
205
  require_paths:
129
206
  - lib
130
207
  required_ruby_version: !ruby/object:Gem::Requirement
131
- none: false
132
208
  requirements:
133
- - - ! '>='
209
+ - - '>='
134
210
  - !ruby/object:Gem::Version
135
211
  version: '0'
136
212
  required_rubygems_version: !ruby/object:Gem::Requirement
137
- none: false
138
213
  requirements:
139
- - - ! '>='
214
+ - - '>='
140
215
  - !ruby/object:Gem::Version
141
216
  version: '0'
142
217
  requirements: []
143
218
  rubyforge_project:
144
- rubygems_version: 1.8.23
219
+ rubygems_version: 2.0.14
145
220
  signing_key:
146
- specification_version: 3
221
+ specification_version: 4
147
222
  summary: Dropbox made easy.
148
223
  test_files: []