adn_viewer 1.0.0 → 1.0.1
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 +9 -3
- 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: 5ca47a09bdd4bfeba61a3506db04caae43f9e8b6
|
4
|
+
data.tar.gz: 8f7c2da1ac90f9f54751fa224dd7b7d344d8e33a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69977d44dc66d49759307287e98b9f48c93732c9c4f2e2d5adf79e48adaf6435e6bad360f5a0dee56c3f0f3612da823ef34874bf1d1ae420ea28e508864997c4
|
7
|
+
data.tar.gz: 0ef0c97425657f68b77208adf7115e1db57a3c5857900d4401089fb4ccd529e0e49be1551331776096b1af03ac04ebe21ea4c62298da44d31ca8600555e2e544
|
data/lib/adn_viewer.rb
CHANGED
@@ -34,9 +34,15 @@ class Adn_Viewer
|
|
34
34
|
http = Net::HTTP.new(uri.host, uri.port)
|
35
35
|
http.use_ssl = true
|
36
36
|
request = Net::HTTP::Put.new(uri)
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
if filepath.include? "http"
|
38
|
+
request.body_stream=open(filepath)
|
39
|
+
request["content-type"] = 'application/octet-stream'
|
40
|
+
request["Content-Length"] = 1000000
|
41
|
+
else
|
42
|
+
request.body_stream=File.open(filepath)
|
43
|
+
request["content-type"] = 'application/octet-stream'
|
44
|
+
request["Content-Length"] = File.size(filepath)
|
45
|
+
end
|
40
46
|
request["authorization"] = 'Bearer ' + token
|
41
47
|
request.add_field('session', boundary)
|
42
48
|
JSON.parse(http.request(request).read_body)
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
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-08-
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb
|