happi 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: af8ba21871ab04a2984602e9d6abc4a50c015f5f
4
- data.tar.gz: 23a6a877deca390eb84cce281e3c0401d964fa74
3
+ metadata.gz: 815bfa647b5685686424c837a1faafa8ac832cab
4
+ data.tar.gz: 4b94139ddd0980d3b55ad861144dc329aec74032
5
5
  SHA512:
6
- metadata.gz: 508d29a0c2bfafbf3482a5ecefe8ead014d21103636fc4ccd3d6e669ce597c5cd0aa302739ee7b39253d1e4de91004277d0511ddcac45519675531bf51ebaf3c
7
- data.tar.gz: 4c655fd218d1e52ba81c9cb489eabca25a801b81cd782bcf804608f69fe93ade21f36a69670acbcd409a22fd44bc749d03df36a004997914eab00dedeeb9f044
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
- self.config.send("#{key}=", value)
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(self.config.host) do |f|
77
+ @connection ||= Faraday.new(config.host) do |f|
77
78
  f.request :multipart
78
- f.use FaradayMiddleware::OAuth2, self.config.oauth_token
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
@@ -1,3 +1,3 @@
1
1
  module Happi
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
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.2
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-28 00:00:00.000000000 Z
11
+ date: 2014-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday