adn_viewer 0.0.6 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/adn_viewer.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f703f9b80a50bbca4bd05f9f6730cda7598d90a5
|
4
|
+
data.tar.gz: 53ea579e1a4be5cb00e350f384acf777be50aabf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: babc8d0b25c4a097063babb7638e45ef5a10baf2723e485bc5dbf44a0c6cb1976822a9bdf3c7a195ae8bfd7c7ea1b3df51d1805e9ab957f870d28b2e14820f6e
|
7
|
+
data.tar.gz: 1b2caaec06c035e297d09bec0dd9415fcc9643845bb74371e4fa88d965ff01d75602546d06ce9c8e2881c06e4e9b5e3ee109f5a812b87142cd92eb311a12aacc
|
data/lib/adn_viewer.rb
CHANGED
@@ -29,7 +29,14 @@ class Adn_Viewer
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.upload_file(token, name, file)
|
32
|
-
|
32
|
+
url = URI("https://developer.api.autodesk.com/oss/v1/buckets/" + name + "/objects/" + file)
|
33
|
+
http = Net::HTTP.new(url.host, url.port)
|
34
|
+
http.use_ssl = true
|
35
|
+
request = Net::HTTP::Put.new(url)
|
36
|
+
request["content-type"] = 'application/octet-stream'
|
37
|
+
request["Content-Length"] = 308331
|
38
|
+
request["authorization"] = 'Bearer ' + token
|
39
|
+
puts JSON.parse(http.request(request, file).read_body)
|
33
40
|
end
|
34
41
|
|
35
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adn_viewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pratham Makhni Alag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb
|