happi 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/happi/client.rb +4 -3
- data/lib/happi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 815bfa647b5685686424c837a1faafa8ac832cab
|
4
|
+
data.tar.gz: 4b94139ddd0980d3b55ad861144dc329aec74032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cad2b3510bfed96b8a1ac8a6e8ccba620e811ea4ab74e24a84c9a1185bc1eacb0d3f45b302e8b1d8e7c21037aecb3edc700975dc83d6626600bd7eb99de66edc
|
7
|
+
data.tar.gz: 703681dc151cd3bf9cba6597f8a3093517c3bd2e36a367e61cceedd35b7a3f912d0e0ff2a09639f9d6881145c4ccd2a4425ce13ef36b84e6a772dd17a559865f
|
data/lib/happi/client.rb
CHANGED
@@ -4,6 +4,7 @@ require 'active_support/core_ext/string/inflections'
|
|
4
4
|
require 'active_support/core_ext/hash'
|
5
5
|
|
6
6
|
class Happi::Client
|
7
|
+
delegate :config, to: :class
|
7
8
|
|
8
9
|
def self.config
|
9
10
|
@config ||= Happi::Configuration.new
|
@@ -15,7 +16,7 @@ class Happi::Client
|
|
15
16
|
|
16
17
|
def initialize(options = {})
|
17
18
|
options.each do |key, value|
|
18
|
-
|
19
|
+
config.send("#{key}=", value)
|
19
20
|
end
|
20
21
|
end
|
21
22
|
|
@@ -73,9 +74,9 @@ class Happi::Client
|
|
73
74
|
end
|
74
75
|
|
75
76
|
def connection
|
76
|
-
@connection ||= Faraday.new(
|
77
|
+
@connection ||= Faraday.new(config.host) do |f|
|
77
78
|
f.request :multipart
|
78
|
-
f.use FaradayMiddleware::OAuth2,
|
79
|
+
f.use FaradayMiddleware::OAuth2, config.oauth_token
|
79
80
|
f.use FaradayMiddleware::ParseJson, content_type: 'application/json'
|
80
81
|
f.request :url_encoded
|
81
82
|
f.adapter :net_http
|
data/lib/happi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: happi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John D'Agostino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|