ogre 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.travis.yml +1 -1
- data/README.md +2 -4
- data/bin/ogre +0 -0
- data/lib/ogre/associate.rb +5 -5
- data/lib/ogre/base.rb +3 -3
- data/lib/ogre/config.rb +3 -3
- data/lib/ogre/messages.rb +31 -31
- data/lib/ogre/org-create.rb +5 -5
- data/lib/ogre/org-delete.rb +1 -1
- data/lib/ogre/org-list.rb +1 -1
- data/lib/ogre/org-show.rb +3 -3
- data/lib/ogre/set-private-key.rb +2 -2
- data/lib/ogre/user-create.rb +1 -1
- data/lib/ogre/user-delete.rb +3 -3
- data/lib/ogre/user-list.rb +1 -1
- data/lib/ogre/version.rb +1 -1
- data/spec/ogre/associate_spec.rb +2 -2
- data/spec/ogre/org-create_spec.rb +2 -2
- data/spec/ogre/org-delete_spec.rb +2 -2
- data/spec/ogre/org-list_spec.rb +2 -2
- data/spec/ogre/org-show_spec.rb +2 -2
- data/spec/ogre/user-create_spec.rb +2 -2
- data/spec/ogre/user-delete_spec.rb +2 -2
- data/spec/ogre/user-list_spec.rb +2 -2
- data/spec/spec_helper.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9cbbdc06373a992abab8c292614bf91a563df8c
|
4
|
+
data.tar.gz: 054ba7f55cb4151cb43e7868087b3befab394b48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d7d0f61c79c549adc1aac5ddb45fc9a6d673917c78ae03d69d5f16f380464f009cea8471a8f5e4e3ad990e9705d7281c87eca1c58026bef46b68232b13f8455
|
7
|
+
data.tar.gz: ea7fb48920315c981cd7c4c592c5275872f9d69280438793345d7c7487f13a74a3c47233eea07d9d6427195ce7c4e187218116fb93b3dcd08189707dcd3967e2
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
[![Stories in Ready](https://badge.waffle.io/activenetwork-automation/ogre.svg?label=ready&title=Ready)](http://waffle.io/activenetwork-automation/ogre)
|
2
|
-
|
3
|
-
[![Build Status](https://travis-ci.org/activenetwork-automation/ogre.svg)](https://travis-ci.org/activenetwork-automation/ogre)
|
1
|
+
[![Stories in Ready](https://badge.waffle.io/activenetwork-automation/ogre.svg?label=ready&title=Ready)](http://waffle.io/activenetwork-automation/ogre) [![Build Status](https://travis-ci.org/activenetwork-automation/ogre.svg)](https://travis-ci.org/activenetwork-automation/ogre)
|
4
2
|
[![Coverage Status](https://coveralls.io/repos/activenetwork-automation/ogre/badge.svg)](https://coveralls.io/r/activenetwork-automation/ogre)
|
5
3
|
[![Dependency Status](https://gemnasium.com/activenetwork-automation/ogre.svg)](https://gemnasium.com/activenetwork-automation/ogre)
|
6
4
|
[![Inline docs](http://inch-ci.org/github/activenetwork-automation/ogre.png?branch=master)](http://inch-ci.org/github/activenetwork-automation/ogre)
|
7
|
-
[![Gem Version](https://badge.fury.io/rb/ogre.svg)](http://badge.fury.io/rb/ogre)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/ogre.svg)](http://badge.fury.io/rb/ogre) [![Code Climate](https://codeclimate.com/github/activenetwork-automation/ogre/badges/gpa.svg)](https://codeclimate.com/github/activenetwork-automation/ogre)
|
8
6
|
|
9
7
|
# Ogre
|
10
8
|
|
data/bin/ogre
CHANGED
File without changes
|
data/lib/ogre/associate.rb
CHANGED
@@ -15,11 +15,11 @@ module Ogre
|
|
15
15
|
begin
|
16
16
|
# associate (invite) user
|
17
17
|
request_body = { user: user }
|
18
|
-
response = chef_rest.
|
18
|
+
response = chef_rest.post "organizations/#{org}/association_requests", request_body
|
19
19
|
|
20
20
|
# add (force) user to org
|
21
21
|
association_id = response['uri'].split('/').last
|
22
|
-
chef_rest.
|
22
|
+
chef_rest.put "users/#{user}/association_requests/#{association_id}", response: 'accept'
|
23
23
|
rescue Net::HTTPServerException => e
|
24
24
|
# already exists -- i will allow it
|
25
25
|
if e.response.code == '409'
|
@@ -35,11 +35,11 @@ module Ogre
|
|
35
35
|
|
36
36
|
# add user to group(s)
|
37
37
|
groups.each do |groupname|
|
38
|
-
group = chef_rest.
|
38
|
+
group = chef_rest.get "organizations/#{org}/groups/#{groupname}"
|
39
39
|
# check if user is in group
|
40
40
|
unless group['actors'].include?(user)
|
41
41
|
body_hash = {
|
42
|
-
groupname:
|
42
|
+
groupname: groupname.to_s,
|
43
43
|
actors: {
|
44
44
|
users: group['actors'].concat([user]),
|
45
45
|
groups: group['groups']
|
@@ -47,7 +47,7 @@ module Ogre
|
|
47
47
|
}
|
48
48
|
|
49
49
|
# associate user
|
50
|
-
chef_rest.
|
50
|
+
chef_rest.put "organizations/#{org}/groups/#{groupname}", body_hash
|
51
51
|
puts "Successfully added '#{user}' to '#{groupname}' in the #{org} org"
|
52
52
|
end
|
53
53
|
next
|
data/lib/ogre/base.rb
CHANGED
@@ -13,9 +13,9 @@ module Ogre
|
|
13
13
|
|
14
14
|
# Parameters passed in from cli will take precedence
|
15
15
|
def chef_rest
|
16
|
-
Chef::
|
17
|
-
|
18
|
-
|
16
|
+
Chef::Config.node_name = options[:run_as] || Config.options[:run_as]
|
17
|
+
Chef::Config.client_key = options[:key_path] || Config.options[:key_path]
|
18
|
+
Chef::ServerAPI.new(options[:server_url] || Config.options[:server_url])
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/lib/ogre/config.rb
CHANGED
@@ -4,11 +4,11 @@ require 'fileutils'
|
|
4
4
|
# into an accessible object
|
5
5
|
module Ogre
|
6
6
|
# ogre home
|
7
|
-
OGRE_HOME = "#{ENV['HOME']}/.ogre"
|
7
|
+
OGRE_HOME = "#{ENV['HOME']}/.ogre".freeze
|
8
8
|
# config path
|
9
|
-
CONFIG_PATH = "#{OGRE_HOME}/config.json"
|
9
|
+
CONFIG_PATH = "#{OGRE_HOME}/config.json".freeze
|
10
10
|
# default chef policy repo
|
11
|
-
REPO_URL = 'https://github.com/activenetwork-automation/code_generator'
|
11
|
+
REPO_URL = 'https://github.com/activenetwork-automation/code_generator'.freeze
|
12
12
|
|
13
13
|
# Static method to make config parameters available
|
14
14
|
class Config
|
data/lib/ogre/messages.rb
CHANGED
@@ -2,95 +2,95 @@
|
|
2
2
|
# string constants for interactive messages
|
3
3
|
module Ogre
|
4
4
|
# version
|
5
|
-
DESC_VERSION = 'Display gem version'
|
5
|
+
DESC_VERSION = 'Display gem version'.freeze
|
6
6
|
|
7
7
|
# org create description
|
8
|
-
DESC_CREATE = 'Create an organization in Chef'
|
8
|
+
DESC_CREATE = 'Create an organization in Chef'.freeze
|
9
9
|
|
10
10
|
# org delete description
|
11
|
-
DESC_DELETE = 'Delete an organization in Chef'
|
11
|
+
DESC_DELETE = 'Delete an organization in Chef'.freeze
|
12
12
|
|
13
13
|
# org short name
|
14
|
-
DESC_ORG = 'Organization short name'
|
14
|
+
DESC_ORG = 'Organization short name'.freeze
|
15
15
|
|
16
16
|
# org description
|
17
|
-
DESC_ORG_DESC = 'Organization long name'
|
17
|
+
DESC_ORG_DESC = 'Organization long name'.freeze
|
18
18
|
|
19
19
|
# org list
|
20
|
-
DESC_ORG_LIST = 'List organiations'
|
20
|
+
DESC_ORG_LIST = 'List organiations'.freeze
|
21
21
|
|
22
22
|
# org Show
|
23
|
-
DESC_ORG_SHOW = 'Show organization details'
|
23
|
+
DESC_ORG_SHOW = 'Show organization details'.freeze
|
24
24
|
|
25
25
|
# user list
|
26
|
-
DESC_USER_LIST = 'List users'
|
26
|
+
DESC_USER_LIST = 'List users'.freeze
|
27
27
|
|
28
28
|
# private key path
|
29
|
-
DESC_PRIVATE_KEY = 'Path to private key file'
|
29
|
+
DESC_PRIVATE_KEY = 'Path to private key file'.freeze
|
30
30
|
|
31
31
|
# chef server url
|
32
|
-
DESC_CHEF_SERVER_URL = 'Chef Server URL i.e. https://chef.server.domain'
|
32
|
+
DESC_CHEF_SERVER_URL = 'Chef Server URL i.e. https://chef.server.domain'.freeze
|
33
33
|
|
34
34
|
# associate description
|
35
|
-
DESC_ASSOCIATE_USERS = 'Associate users to an organization'
|
35
|
+
DESC_ASSOCIATE_USERS = 'Associate users to an organization'.freeze
|
36
36
|
|
37
37
|
# user description
|
38
|
-
DESC_USER = 'User name'
|
38
|
+
DESC_USER = 'User name'.freeze
|
39
39
|
|
40
40
|
# associate to admin group description
|
41
|
-
DESC_ASSOCIATE_ADMIN = 'Add user to admin group within organization'
|
41
|
+
DESC_ASSOCIATE_ADMIN = 'Add user to admin group within organization'.freeze
|
42
42
|
|
43
43
|
# chef policy repository license
|
44
|
-
DESC_REPO_LICENSE = 'Chef policy repository license'
|
44
|
+
DESC_REPO_LICENSE = 'Chef policy repository license'.freeze
|
45
45
|
|
46
46
|
# chef policy repository authors
|
47
|
-
DESC_REPO_AUTHORS = 'Chef policy repository authors'
|
47
|
+
DESC_REPO_AUTHORS = 'Chef policy repository authors'.freeze
|
48
48
|
|
49
49
|
# chef policy repository path
|
50
|
-
DESC_REPO_PATH = 'Chef policy repository path'
|
50
|
+
DESC_REPO_PATH = 'Chef policy repository path'.freeze
|
51
51
|
|
52
52
|
# chef policy repository e-mail
|
53
|
-
DESC_REPO_EMAIL = 'Chef policy repository e-mail'
|
53
|
+
DESC_REPO_EMAIL = 'Chef policy repository e-mail'.freeze
|
54
54
|
|
55
55
|
# create Chef policy repository
|
56
|
-
DESC_CREATE_REPO = 'Create Chef policy repository'
|
56
|
+
DESC_CREATE_REPO = 'Create Chef policy repository'.freeze
|
57
57
|
|
58
58
|
# delete without confirmation
|
59
|
-
DESC_FORCE = 'Delete without confirmation'
|
59
|
+
DESC_FORCE = 'Delete without confirmation'.freeze
|
60
60
|
|
61
61
|
# create new chef user
|
62
|
-
DESC_CREATE_USER = 'Create new chef user'
|
62
|
+
DESC_CREATE_USER = 'Create new chef user'.freeze
|
63
63
|
|
64
64
|
# Delete and disassociate chef user
|
65
|
-
DESC_DELETE_USER = 'Delete and disassociate chef user'
|
65
|
+
DESC_DELETE_USER = 'Delete and disassociate chef user'.freeze
|
66
66
|
|
67
67
|
# chef run as user
|
68
|
-
DESC_RUN_AS = 'Chef user'
|
68
|
+
DESC_RUN_AS = 'Chef user'.freeze
|
69
69
|
|
70
70
|
# vCenter Orchestrator URL
|
71
|
-
DESC_VCO_URL = 'vCenter Orchestrator URL'
|
71
|
+
DESC_VCO_URL = 'vCenter Orchestrator URL'.freeze
|
72
72
|
|
73
73
|
# vCenter Orchestrator user
|
74
|
-
DESC_VCO_USER = 'vCenter Orchestrator user'
|
74
|
+
DESC_VCO_USER = 'vCenter Orchestrator user'.freeze
|
75
75
|
|
76
76
|
# vCenter Orchestrator password
|
77
|
-
DESC_VCO_PASSWORD = 'vCenter Orchestrator password'
|
77
|
+
DESC_VCO_PASSWORD = 'vCenter Orchestrator password'.freeze
|
78
78
|
|
79
79
|
# vCenter Orchestrator workflow name
|
80
|
-
DESC_VCO_WF_NAME = 'vCenter Orchestrator workflow name'
|
80
|
+
DESC_VCO_WF_NAME = 'vCenter Orchestrator workflow name'.freeze
|
81
81
|
|
82
82
|
# Set chef validation key for VCO
|
83
|
-
DESC_SET_PRIVATE_KEY = 'Set chef validation key for VCO'
|
83
|
+
DESC_SET_PRIVATE_KEY = 'Set chef validation key for VCO'.freeze
|
84
84
|
|
85
85
|
# Chef hostname
|
86
|
-
DESC_CHEF_HOSTNAME = 'Chef hostname'
|
86
|
+
DESC_CHEF_HOSTNAME = 'Chef hostname'.freeze
|
87
87
|
|
88
88
|
# Chef validator username
|
89
|
-
DESC_CHEF_VALIDATOR = 'Chef validator user name'
|
89
|
+
DESC_CHEF_VALIDATOR = 'Chef validator user name'.freeze
|
90
90
|
|
91
91
|
# vCenter verify ssl param
|
92
|
-
DESC_VCO_VERIFY_SSL = 'vCenter Orchestrator verify ssl'
|
92
|
+
DESC_VCO_VERIFY_SSL = 'vCenter Orchestrator verify ssl'.freeze
|
93
93
|
|
94
94
|
# Chef Policy Repository skeleton url
|
95
|
-
DESC_REPO_URL = 'Chef Policy Repository skeleton url'
|
95
|
+
DESC_REPO_URL = 'Chef Policy Repository skeleton url'.freeze
|
96
96
|
end
|
data/lib/ogre/org-create.rb
CHANGED
@@ -20,8 +20,8 @@ module Ogre
|
|
20
20
|
|
21
21
|
# organization create method
|
22
22
|
def org_create
|
23
|
-
org_json = { name:
|
24
|
-
response = chef_rest.
|
23
|
+
org_json = { name: org.to_s, full_name: org_desc.to_s }
|
24
|
+
response = chef_rest.post('/organizations', org_json)
|
25
25
|
puts "'#{org}' org has been created."
|
26
26
|
|
27
27
|
# use chef repo generate to create a chef policy repo
|
@@ -97,19 +97,19 @@ module Ogre
|
|
97
97
|
# optional license
|
98
98
|
if options[:license]
|
99
99
|
generate_str << '-I'
|
100
|
-
generate_str <<
|
100
|
+
generate_str << options[:license].to_s
|
101
101
|
end
|
102
102
|
|
103
103
|
# optional email
|
104
104
|
if options[:email]
|
105
105
|
generate_str << '-m'
|
106
|
-
generate_str <<
|
106
|
+
generate_str << options[:email].to_s
|
107
107
|
end
|
108
108
|
|
109
109
|
# optional authors
|
110
110
|
if options[:authors]
|
111
111
|
generate_str << '-C'
|
112
|
-
generate_str <<
|
112
|
+
generate_str << options[:authors].to_s
|
113
113
|
end
|
114
114
|
|
115
115
|
generate_str
|
data/lib/ogre/org-delete.rb
CHANGED
@@ -14,7 +14,7 @@ module Ogre
|
|
14
14
|
exit unless options[:force] || HighLine.agree("Deleting '#{org}' is permanent. Do you want to proceed? (y/n)")
|
15
15
|
|
16
16
|
begin
|
17
|
-
chef_rest.
|
17
|
+
chef_rest.delete("/organizations/#{org}")
|
18
18
|
puts "'#{org}' org has been deleted."
|
19
19
|
rescue Net::HTTPServerException => e
|
20
20
|
# does not exist, exit gracefully
|
data/lib/ogre/org-list.rb
CHANGED
data/lib/ogre/org-show.rb
CHANGED
@@ -9,16 +9,16 @@ module Ogre
|
|
9
9
|
# Show org details
|
10
10
|
def org_show
|
11
11
|
# get org details
|
12
|
-
results = chef_rest.
|
12
|
+
results = chef_rest.get("/organizations/#{org}")
|
13
13
|
puts colorize('name:') + " #{results['name']}"
|
14
14
|
puts colorize('description:') + " #{results['full_name']}"
|
15
15
|
puts colorize('guid:') + " #{results['guid']}"
|
16
16
|
|
17
17
|
# get admins
|
18
|
-
admins = chef_rest.
|
18
|
+
admins = chef_rest.get("/organizations/#{org}/groups/admins")
|
19
19
|
|
20
20
|
# get normal users
|
21
|
-
users = chef_rest.
|
21
|
+
users = chef_rest.get("/organizations/#{org}/groups/users")
|
22
22
|
|
23
23
|
# output admins with a '@' prefix
|
24
24
|
admins['users'].each do |admin|
|
data/lib/ogre/set-private-key.rb
CHANGED
@@ -19,13 +19,13 @@ module Ogre
|
|
19
19
|
# Execute vcoworkflows gem to call set private key
|
20
20
|
def set_private_key
|
21
21
|
# get workflow
|
22
|
-
# rubocop:disable AlignParameters
|
22
|
+
# rubocop:disable AlignParameters
|
23
23
|
workflow = VcoWorkflows::Workflow.new(options[:vco_wf_name] || Config.options[:vco_wf_name],
|
24
24
|
url: options[:vco_url] || Config.options[:vco_url],
|
25
25
|
verify_ssl: options[:vco_verify_ssl] || Config.options[:vco_verify_ssl],
|
26
26
|
username: options[:vco_user] || Config.options[:vco_user],
|
27
27
|
password: options[:vco_password] || Config.options[:vco_password])
|
28
|
-
# rubocop:enable AlignParameters
|
28
|
+
# rubocop:enable AlignParameters
|
29
29
|
|
30
30
|
# set parameters
|
31
31
|
workflow.parameter('chefHostname', chef_hostname)
|
data/lib/ogre/user-create.rb
CHANGED
data/lib/ogre/user-delete.rb
CHANGED
@@ -17,14 +17,14 @@ module Ogre
|
|
17
17
|
# rubocop:enable LineLength
|
18
18
|
|
19
19
|
# disassociate from all orgs
|
20
|
-
orgs = chef_rest.
|
20
|
+
orgs = chef_rest.get("users/#{username}/organizations")
|
21
21
|
org_names = orgs.map { |o| o['organization']['name'] }
|
22
22
|
org_names.each do |org|
|
23
|
-
puts chef_rest.
|
23
|
+
puts chef_rest.delete("organizations/#{org}/users/#{username}")
|
24
24
|
end
|
25
25
|
|
26
26
|
# delete user
|
27
|
-
chef_rest.
|
27
|
+
chef_rest.delete("users/#{username}")
|
28
28
|
puts "'#{username}' has been deleted."
|
29
29
|
|
30
30
|
rescue Net::HTTPServerException => e
|
data/lib/ogre/user-list.rb
CHANGED
data/lib/ogre/version.rb
CHANGED
data/spec/ogre/associate_spec.rb
CHANGED
@@ -9,8 +9,8 @@ VCR.configure do |config|
|
|
9
9
|
config.before_record do |interaction|
|
10
10
|
headers = interaction.request.headers
|
11
11
|
headers.keys
|
12
|
-
|
13
|
-
|
12
|
+
.select { |k| k =~ /^X-Ops-(Authorization-|Content-Hash)/ }
|
13
|
+
.each { |header| headers[header] = Array("{{#{header}}}") }
|
14
14
|
headers['X-Ops-Userid'] = 'pivotal'
|
15
15
|
end
|
16
16
|
end
|
@@ -9,8 +9,8 @@ VCR.configure do |config|
|
|
9
9
|
config.before_record do |interaction|
|
10
10
|
headers = interaction.request.headers
|
11
11
|
headers.keys
|
12
|
-
|
13
|
-
|
12
|
+
.select { |k| k =~ /^X-Ops-(Authorization-|Content-Hash)/ }
|
13
|
+
.each { |header| headers[header] = Array("{{#{header}}}") }
|
14
14
|
headers['X-Ops-Userid'] = 'pivotal'
|
15
15
|
end
|
16
16
|
end
|
@@ -9,8 +9,8 @@ VCR.configure do |config|
|
|
9
9
|
config.before_record do |interaction|
|
10
10
|
headers = interaction.request.headers
|
11
11
|
headers.keys
|
12
|
-
|
13
|
-
|
12
|
+
.select { |k| k =~ /^X-Ops-(Authorization-|Content-Hash)/ }
|
13
|
+
.each { |header| headers[header] = Array("{{#{header}}}") }
|
14
14
|
headers['X-Ops-Userid'] = 'pivotal'
|
15
15
|
end
|
16
16
|
end
|
data/spec/ogre/org-list_spec.rb
CHANGED
@@ -9,8 +9,8 @@ VCR.configure do |config|
|
|
9
9
|
config.before_record do |interaction|
|
10
10
|
headers = interaction.request.headers
|
11
11
|
headers.keys
|
12
|
-
|
13
|
-
|
12
|
+
.select { |k| k =~ /^X-Ops-(Authorization-|Content-Hash)/ }
|
13
|
+
.each { |header| headers[header] = Array("{{#{header}}}") }
|
14
14
|
headers['X-Ops-Userid'] = 'pivotal'
|
15
15
|
end
|
16
16
|
end
|
data/spec/ogre/org-show_spec.rb
CHANGED
@@ -9,8 +9,8 @@ VCR.configure do |config|
|
|
9
9
|
config.before_record do |interaction|
|
10
10
|
headers = interaction.request.headers
|
11
11
|
headers.keys
|
12
|
-
|
13
|
-
|
12
|
+
.select { |k| k =~ /^X-Ops-(Authorization-|Content-Hash)/ }
|
13
|
+
.each { |header| headers[header] = Array("{{#{header}}}") }
|
14
14
|
headers['X-Ops-Userid'] = 'pivotal'
|
15
15
|
end
|
16
16
|
end
|
@@ -9,8 +9,8 @@ VCR.configure do |config|
|
|
9
9
|
config.before_record do |interaction|
|
10
10
|
headers = interaction.request.headers
|
11
11
|
headers.keys
|
12
|
-
|
13
|
-
|
12
|
+
.select { |k| k =~ /^X-Ops-(Authorization-|Content-Hash)/ }
|
13
|
+
.each { |header| headers[header] = Array("{{#{header}}}") }
|
14
14
|
headers['X-Ops-Userid'] = 'pivotal'
|
15
15
|
end
|
16
16
|
end
|
@@ -9,8 +9,8 @@ VCR.configure do |config|
|
|
9
9
|
config.before_record do |interaction|
|
10
10
|
headers = interaction.request.headers
|
11
11
|
headers.keys
|
12
|
-
|
13
|
-
|
12
|
+
.select { |k| k =~ /^X-Ops-(Authorization-|Content-Hash)/ }
|
13
|
+
.each { |header| headers[header] = Array("{{#{header}}}") }
|
14
14
|
headers['X-Ops-Userid'] = 'pivotal'
|
15
15
|
end
|
16
16
|
end
|
data/spec/ogre/user-list_spec.rb
CHANGED
@@ -9,8 +9,8 @@ VCR.configure do |config|
|
|
9
9
|
config.before_record do |interaction|
|
10
10
|
headers = interaction.request.headers
|
11
11
|
headers.keys
|
12
|
-
|
13
|
-
|
12
|
+
.select { |k| k =~ /^X-Ops-(Authorization-|Content-Hash)/ }
|
13
|
+
.each { |header| headers[header] = Array("{{#{header}}}") }
|
14
14
|
headers['X-Ops-Userid'] = 'pivotal'
|
15
15
|
end
|
16
16
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -5,12 +5,12 @@ require 'vcr'
|
|
5
5
|
|
6
6
|
DEFAULTS = %w(--run-as pivotal
|
7
7
|
--key-path spec/fixtures/client_key/dummy.pem
|
8
|
-
--server-url https://chef.server)
|
8
|
+
--server-url https://chef.server).freeze
|
9
9
|
VCO_DEFAULTS = %w(--vco-url https://vco.server:8281/
|
10
10
|
--vco-user user
|
11
11
|
--vco-password password
|
12
12
|
--vco-wf-name Set-Private-Key
|
13
|
-
--vco-verify-ssl false)
|
14
|
-
KNIFE_PATH = 'tmp/my-org-name-chef/.chef/knife.rb'
|
13
|
+
--vco-verify-ssl false).freeze
|
14
|
+
KNIFE_PATH = 'tmp/my-org-name-chef/.chef/knife.rb'.freeze
|
15
15
|
|
16
16
|
Coveralls.wear!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ogre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "'Joe"
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-04-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -303,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
303
|
version: '0'
|
304
304
|
requirements: []
|
305
305
|
rubyforge_project:
|
306
|
-
rubygems_version: 2.
|
306
|
+
rubygems_version: 2.5.2
|
307
307
|
signing_key:
|
308
308
|
specification_version: 4
|
309
309
|
summary: Automated generation of enterprise chef organizations
|