nebula_ruby 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/nebula/client.rb +6 -1
- data/lib/nebula/version.rb +1 -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: d04bf7843cd93dd2d1166db278831e65fc8fff71
|
4
|
+
data.tar.gz: 9532c2d906b4effc3d646f980509dd8de74fe528
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25e9d8f355a2c0af3268ddd2f46a917a10fb8a386a792f494046c7c7476779b1917135b3408032e2d492f3114e2e6715c84d8249b593b42c9621b99d95fd7610
|
7
|
+
data.tar.gz: 9e110b979dc62c3c0c369077fa1d7128a07c173e21d57eb17213befb5be25a0981624fbfb8b5f688945e5e4346c62da9c49627194f2ff9a8439ae60f3e5d6881
|
data/README.md
CHANGED
data/lib/nebula/client.rb
CHANGED
@@ -8,11 +8,12 @@ module Nebula
|
|
8
8
|
def initialize(options={})
|
9
9
|
@token = options[:token]
|
10
10
|
@url = options[:url]
|
11
|
+
@base_path = options[:base_path]
|
11
12
|
end
|
12
13
|
|
13
14
|
def request(type, path, params={})
|
14
15
|
block = Proc.new do |request|
|
15
|
-
request.url path
|
16
|
+
request.url "#{base_path}#{path}"
|
16
17
|
request.headers['Authorization'] = "Token #{token}"
|
17
18
|
request.headers['Content-Type'] = 'application/json'
|
18
19
|
end
|
@@ -53,6 +54,10 @@ module Nebula
|
|
53
54
|
@url
|
54
55
|
end
|
55
56
|
|
57
|
+
def base_path
|
58
|
+
@base_path
|
59
|
+
end
|
60
|
+
|
56
61
|
def connection
|
57
62
|
@connection ||= Faraday.new(url: url) do |b|
|
58
63
|
b.adapter Faraday.default_adapter
|
data/lib/nebula/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nebula_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amed Rodriguez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|