boxview 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/boxview.rb +6 -4
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7b43ea3c7c05be13835d22409eff28be35fb0ce
4
- data.tar.gz: 1dde25202cdb33597e9a548317f6044a58cdb020
3
+ metadata.gz: 7435dea926cea2b7dc3c06afcc32feed764737a8
4
+ data.tar.gz: 52f26dae70d99ac0f86e4f533d17fc64d23d1993
5
5
  SHA512:
6
- metadata.gz: e40c8c3b2b5c5539be5d603c37cb00076437c6a05157774f456b123e8473e6ef0cd86458eb47171b048f9a994bfd90c33a303a014704fbdd5f2e6f8d43a7ffb5
7
- data.tar.gz: b90a33e22ba8690e94abffb8ad1bc2852d549c60b7e066ec3457f0f912e093220035d613b90da7b16996a3470586b2b2a93f0f12d07804068fa05491863ca8b3
6
+ metadata.gz: 616581970e5a5e194a51454855201361c2f98727c97ad508bbc46c8d5d852e736d67008f6fb20fbcc36ec14f43984b85288778dc7f3214b93631e8783e0b4d35
7
+ data.tar.gz: 031543cbd2acb6efec7393d1177f4aa6468b8e12bf081f9c430fecfad62f67de6b001c3ec5d6463e7ec6e6c9d51d2489b251069248e698cf87075c79215ed994
data/lib/boxview.rb CHANGED
@@ -20,13 +20,14 @@ module BoxView
20
20
  end
21
21
 
22
22
  module Documents
23
- # attributes: a hash with url (required), name, and thumbnails
23
+ # attributes: "url" "name" "thumbnails" and "non_svg"
24
24
  # url: string with url of a document in the cloud
25
+ # name: name of document
25
26
  # thumbnails: string with widthxheight dimensions "128x128,256x256"
27
+ # non_svg: false by default, true if you want to support < ie9 aka non svg browsers
26
28
  def self.create attributes
27
29
  BoxView.connection.post do |request|
28
30
  request.url "documents"
29
- attributes = { "url" => attributes[:url], "thumbnails" => attributes[:thumbnails] }
30
31
  request.body = attributes.to_json
31
32
  end
32
33
  end
@@ -52,10 +53,11 @@ module BoxView
52
53
 
53
54
  module Sessions
54
55
  def self.create document_id
55
- BoxView.connection.post do |request|
56
+ response = BoxView.connection.post do |request|
56
57
  request.url "sessions"
57
- request.body = '{"document_id": "' + document_id + '"}'
58
+ request.body = '{"document_id": "' + document_id.to_s + '"}'
58
59
  end
60
+ re
59
61
  end
60
62
  end
61
63
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyrus Karbassiyoon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-16 00:00:00.000000000 Z
11
+ date: 2014-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Wrapper for box view api
42
- email: ckarbass@gmail.com
42
+ email: cyrus@cycleio.com
43
43
  executables: []
44
44
  extensions: []
45
45
  extra_rdoc_files: []
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project:
67
- rubygems_version: 2.0.2
67
+ rubygems_version: 2.2.2
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: Wrapper for box view api