quiver_note 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fad8440b224b95c00dbacf4c2deac100aac75243
4
- data.tar.gz: 3f0d541e199d22a1bdcf39ba1bc9b35bcee27930
3
+ metadata.gz: e5a3b1c2f72a6fbf31e86682f1005b9014fadc93
4
+ data.tar.gz: 648a1f55a2210aebc9c5fad4cd52ccd8cc312b04
5
5
  SHA512:
6
- metadata.gz: d1d7f9ab4b7963208701f086363a71944ff9044e81bab0080b5c9b367d541555107a084a501adf88c8f5a19948f858912db6736645f5ecc911e2c280d62f808f
7
- data.tar.gz: 11630c85924bf322febef734a21e5c3cc08d74d37995512d6bede660ae68cb1b94d8f963dc6bf6ba7de401e6ff6a5c0a7be25c3744cfaf29c550239ae42b3a01
6
+ metadata.gz: b80982e4f622db1d654242aea75a6d8c91784f91ea298b895f1bc39965090e64a87aa704cb1787b8725ab9c31fbc24b829d85805b3129b85ef8ab3e8ce9b1940
7
+ data.tar.gz: f20ef3bd34e774e12486002084116c6f7d18863de31ccf7d46974b0a449127fe4b2bd3c62579e5a63896bf312b8512d1290bb785e5b4484409b1f0de129b17bb
@@ -1,3 +1,5 @@
1
+ require 'dropbox_api' rescue nil
2
+
1
3
  if defined? ::DropboxApi
2
4
 
3
5
  module Quiver
@@ -14,7 +16,7 @@ module Quiver
14
16
  # Don't include this url direct on your site. Use via cdn.
15
17
  def image_url(path)
16
18
  @@image_url_cache ||= {}
17
- @@image_url_cache[path] ||= client.get_temporary_link(normalize_path(path))
19
+ @@image_url_cache[path] ||= client.get_temporary_link(normalize_path(path)).link
18
20
  end
19
21
  def each(path)
20
22
  dir_metadata = client.get_metadata(normalize_path(path))
@@ -24,7 +26,11 @@ module Quiver
24
26
  end
25
27
  end
26
28
  def load(path)
27
- client.download normalize_path(path)
29
+ content = nil
30
+ meta = client.download(normalize_path(path)) do |con|
31
+ content = con
32
+ end
33
+ [content, meta]
28
34
  end
29
35
  def save(path, content)
30
36
  client.upload normalize_path(path), content
data/lib/quiver/note.rb CHANGED
@@ -22,7 +22,8 @@ module Quiver
22
22
  end
23
23
  def content
24
24
  @content ||= begin
25
- JSON.parse(@adapter.load(@path + 'content.json'))
25
+ json, meta = @adapter.load(@path + 'content.json')
26
+ JSON.parse(json)
26
27
  end
27
28
  end
28
29
  def cells
@@ -1,3 +1,3 @@
1
1
  module Quiver
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quiver_note
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - kuboon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-30 00:00:00.000000000 Z
11
+ date: 2017-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport