dbox 0.7.4 → 0.7.5

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.
@@ -1,3 +1,7 @@
1
+ == 0.7.4 / 2013-09-11
2
+ * Minor Enhancements
3
+ * Added API call & command to retrieve metadata about a remote folder.
4
+
1
5
  == 0.7.3 / 2012-12-23
2
6
  * Minor Enhancements
3
7
  * Added retry on all failed operations, not just rate limiting, to be more resilient with API errors.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.4
1
+ 0.7.5
data/bin/dbox CHANGED
@@ -89,6 +89,10 @@ when "delete"
89
89
  local_path = args[1] || remote_path.split("/").last
90
90
 
91
91
  Dbox.send(command, remote_path, local_path)
92
+ when "metadata"
93
+ remote_path = args[0]
94
+ res = Dbox.metadata(remote_path)
95
+ puts res.inspect
92
96
  else
93
97
  print_usage_and_quit
94
98
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dbox"
8
- s.version = "0.7.4"
8
+ s.version = "0.7.5"
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-04-10"
12
+ s.date = "2013-09-11"
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"]
@@ -95,6 +95,12 @@ module Dbox
95
95
  end
96
96
  end
97
97
 
98
+ def self.metadata(remote_path)
99
+ log.debug "Getting metadata for #{remote_path}"
100
+ remote_path = clean_remote_path(remote_path)
101
+ Dbox::Syncer.api.metadata(remote_path)
102
+ end
103
+
98
104
  private
99
105
 
100
106
  def self.clean_remote_path(path)
@@ -212,7 +212,7 @@ module Dbox
212
212
  url = URI.parse(url)
213
213
  http = Net::HTTP.new(url.host, url.port)
214
214
  http.use_ssl = true
215
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
215
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
216
216
  http.ca_file = Dropbox::TRUSTED_CERT_FILE
217
217
 
218
218
  req = Net::HTTP::Get.new(url.request_uri)
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: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 4
10
- version: 0.7.4
9
+ - 5
10
+ version: 0.7.5
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: 2013-04-10 00:00:00 Z
18
+ date: 2013-09-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: multipart-post