foreman_api 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/foreman_api/base.rb +9 -7
- data/lib/foreman_api/version.rb +1 -1
- metadata +2 -2
data/lib/foreman_api/base.rb
CHANGED
@@ -9,13 +9,15 @@ module ForemanApi
|
|
9
9
|
|
10
10
|
attr_reader :client, :config
|
11
11
|
|
12
|
-
def initialize(config, options = {
|
13
|
-
@client = RestClient::Resource.new
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
def initialize(config, options = {})
|
13
|
+
@client = RestClient::Resource.new(
|
14
|
+
config[:base_url],
|
15
|
+
{ :user => config[:username],
|
16
|
+
:password => config[:password],
|
17
|
+
:oauth => config[:oauth],
|
18
|
+
:headers => { :content_type => 'application/json',
|
19
|
+
:accept => "application/json;version=#{API_VERSION}" }
|
20
|
+
}.merge(options))
|
19
21
|
@config = config
|
20
22
|
end
|
21
23
|
|
data/lib/foreman_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|