secureshare-ruby 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/secureshare.rb +11 -0
- data/secureshare-ruby.gemspec +1 -1
- metadata +2 -2
data/lib/secureshare.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'rest_client'
|
2
2
|
require 'secureshare/bucket'
|
3
3
|
require 'secureshare/document'
|
4
|
+
require "net/http"
|
4
5
|
|
5
6
|
module SecureShare
|
6
7
|
@@config = {}
|
@@ -16,4 +17,14 @@ module SecureShare
|
|
16
17
|
bucket = Bucket.new(JSON.parse(response.body))
|
17
18
|
end
|
18
19
|
|
20
|
+
def self.available?
|
21
|
+
begin
|
22
|
+
url = URI.parse(@@config[:endpoint])
|
23
|
+
request = Net::HTTP.new(url.host, url.port)
|
24
|
+
request.request_head('/health')
|
25
|
+
true
|
26
|
+
rescue
|
27
|
+
false
|
28
|
+
end
|
29
|
+
end
|
19
30
|
end
|
data/secureshare-ruby.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "secureshare-ruby"
|
7
|
-
gem.version = "0.0.
|
7
|
+
gem.version = "0.0.3"
|
8
8
|
gem.authors = ["Chris Aitchison"]
|
9
9
|
gem.email = ["chris.aitchison@sodalis.com.au"]
|
10
10
|
gem.description = %q{SecureShare Ruby API}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secureshare-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|