heroics 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c15b2dbfd69a0a90de845e61c2bcf8d6fbca977
4
- data.tar.gz: c1ae596e31f13f0c675aa7a2f4415b4aab0113d7
3
+ metadata.gz: ecdb1c591d9352b73ba1b720cead8bcd9c690b49
4
+ data.tar.gz: be82ea121fecbcf6bf9761521518a999d888fe33
5
5
  SHA512:
6
- metadata.gz: 07f65432fcdb7b39850de5ec236757934c11cc1b38531301792bd7fd7abb67c4c28f174dbe57bd61e860b5a07c61f0dd3e94c4abbd136bdf1bf7d07c385a6eca
7
- data.tar.gz: 0334b0aba420505450b8f5843028512729c5ba6ead454b5d3256d2472832bed16c96e5965eccc3dd4c84934b57ed6d008d119685bf9e7dd312924b36fc0db9fe
6
+ metadata.gz: 3ac51fd3d654d02de41058362d324cac0835974d3b602c1845ab56b1563a40f6c1a995409e74ae1b9ec6b4496eef02feabe82f8068cb7eb3c1b4f8094e9d942c
7
+ data.tar.gz: 8ef27a5f558e7e09c1cad67f46971db41b8cbf0ba0c777305d6c05e86761522514345cc4a2ecbce0755bbb6cec1ba1644bebabf9ec897ae2014cc9db2bf29458
@@ -1,3 +1,3 @@
1
1
  module Heroics
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  end
@@ -15,13 +15,13 @@ module <%= @module_name %>
15
15
  # @param api_key [String] The API key to use when connecting.
16
16
  # @param options [Hash<Symbol,String>] Optionally, custom settings
17
17
  # to use with the client. Allowed options are `default_headers`,
18
- # `cache` and `url`.
18
+ # `cache`, `user` and `url`.
19
19
  # @return [Client] A client configured to use the API with HTTP Basic
20
20
  # authentication.
21
21
  def self.connect(api_key, options=nil)
22
22
  options = custom_options(options)
23
23
  uri = URI.parse(options[:url])
24
- uri.user = 'user'
24
+ uri.user = options.fetch(:user, 'user').gsub('@', '%40')
25
25
  uri.password = api_key
26
26
  client = Heroics.client_from_schema(SCHEMA, uri.to_s, options)
27
27
  Client.new(client)
@@ -67,6 +67,7 @@ module <%= @module_name %>
67
67
  end
68
68
  final_options[:cache] = options[:cache] if options[:cache]
69
69
  final_options[:url] = options[:url] if options[:url]
70
+ final_options[:user] = options[:user] if options[:user]
70
71
  final_options
71
72
  end
72
73
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - geemus
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-14 00:00:00.000000000 Z
12
+ date: 2014-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler