heroics 0.0.11 → 0.0.12
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 +4 -4
- data/lib/heroics/version.rb +1 -1
- data/lib/heroics/views/client.erb +3 -2
- 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: ecdb1c591d9352b73ba1b720cead8bcd9c690b49
|
|
4
|
+
data.tar.gz: be82ea121fecbcf6bf9761521518a999d888fe33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ac51fd3d654d02de41058362d324cac0835974d3b602c1845ab56b1563a40f6c1a995409e74ae1b9ec6b4496eef02feabe82f8068cb7eb3c1b4f8094e9d942c
|
|
7
|
+
data.tar.gz: 8ef27a5f558e7e09c1cad67f46971db41b8cbf0ba0c777305d6c05e86761522514345cc4a2ecbce0755bbb6cec1ba1644bebabf9ec897ae2014cc9db2bf29458
|
data/lib/heroics/version.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
12
|
+
date: 2014-07-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|