blobstache 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/lib/blobstache/client.rb +13 -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: 4a11d740b3586c3827f3e00f9b9ff1138702770c
|
|
4
|
+
data.tar.gz: 24063df294e2f19b450472271856f009a890fb83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2795bc46db61c688be0468c021d7369aaf91d7e72129af92a5c41862c45b3f41086b641a066ea6dfa31537a561df172ae78ecd94e0aeff4c04204e80c9d72fd8
|
|
7
|
+
data.tar.gz: 6b1fef7c2df95325782f21b8dd02337ddfc3c61c5484cb86f5b8f1d3417813525900d730a37c6debe8f3d9d830da2b88ef4d51bec580224a67007bbaf1756a23
|
data/lib/blobstache/client.rb
CHANGED
|
@@ -3,7 +3,7 @@ require 'faraday'
|
|
|
3
3
|
|
|
4
4
|
module Blobstache
|
|
5
5
|
class Client
|
|
6
|
-
VERSION = '0.0.
|
|
6
|
+
VERSION = '0.0.2'
|
|
7
7
|
attr_accessor :host, :port, :user_id, :key
|
|
8
8
|
|
|
9
9
|
def initialize(host: 'localhost', port: 1234, user_id: 'id', key: "key")
|
|
@@ -76,6 +76,18 @@ module Blobstache
|
|
|
76
76
|
end)
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
+
def set_object_public(bucket, id)
|
|
80
|
+
respond(connection.put("public/objects/#{id}") do |req|
|
|
81
|
+
req.headers['Bucketid'] = bucket
|
|
82
|
+
end)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def get_object_info(bucket, id)
|
|
86
|
+
respond(connection.get("info/objects/#{id}") do |req|
|
|
87
|
+
req.headers['Bucketid'] = bucket
|
|
88
|
+
end)
|
|
89
|
+
end
|
|
90
|
+
|
|
79
91
|
def get_object_size(bucket, id)
|
|
80
92
|
r = connection.head("objects/#{id}") do |req|
|
|
81
93
|
req.headers['Bucketid'] = bucket
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: blobstache
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lyon Hill
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|