Class: ChefVault
- Inherits:
-
Object
- Object
- ChefVault
- Defined in:
- lib/chef-vault/user.rb,
lib/chef-vault.rb,
lib/chef-vault/item.rb,
lib/chef-vault/mixins.rb,
lib/chef-vault/version.rb,
lib/chef-vault/item_keys.rb,
lib/chef-vault/exceptions.rb,
lib/chef-vault/certificate.rb,
lib/chef/knife/mixin/compat.rb,
lib/chef/knife/mixin/helper.rb,
lib/chef-vault/chef_patch/user.rb,
lib/chef-vault/chef_patch/api_client.rb
Overview
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Defined Under Namespace
Modules: ChefPatch, Mixin, Mixins Classes: Certificate, Exceptions, Item, ItemKeys, User
Constant Summary collapse
- VERSION =
"2.9.1"
Instance Attribute Summary collapse
-
#vault ⇒ Object
Returns the value of attribute vault.
Class Method Summary collapse
Instance Method Summary collapse
- #certificate(name) ⇒ Object
-
#initialize(vault, chef_config_file = nil) ⇒ ChefVault
constructor
A new instance of ChefVault.
- #user(username) ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(vault, chef_config_file = nil) ⇒ ChefVault
Returns a new instance of ChefVault.
38 39 40 41 |
# File 'lib/chef-vault.rb', line 38 def initialize(vault, chef_config_file = nil) @vault = vault ChefVault.load_config(chef_config_file) if chef_config_file end |
Instance Attribute Details
#vault ⇒ Object
Returns the value of attribute vault.
36 37 38 |
# File 'lib/chef-vault.rb', line 36 def vault @vault end |
Class Method Details
.load_config(chef_config_file) ⇒ Object
55 56 57 |
# File 'lib/chef-vault.rb', line 55 def self.load_config(chef_config_file) Chef::Config.from_file(chef_config_file) end |
Instance Method Details
#certificate(name) ⇒ Object
51 52 53 |
# File 'lib/chef-vault.rb', line 51 def certificate(name) ChefVault::Certificate.new(vault, name) end |
#user(username) ⇒ Object
47 48 49 |
# File 'lib/chef-vault.rb', line 47 def user(username) ChefVault::User.new(vault, username) end |
#version ⇒ Object
43 44 45 |
# File 'lib/chef-vault.rb', line 43 def version VERSION end |