Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use solo_legacy_mode fully #242

Merged
merged 1 commit into from
Nov 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/chef-vault/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def save(item_id = @raw_data["id"])
encrypt! unless @encrypted

# Now save the encrypted data
if Chef::Config[:solo]
if Chef::Config[:solo_legacy_mode]
save_solo(item_id)
else
begin
Expand Down Expand Up @@ -257,7 +257,7 @@ def to_json(*a)
def destroy
keys.destroy

if Chef::Config[:solo]
if Chef::Config[:solo_legacy_mode]
data_bag_path = File.join(Chef::Config[:data_bag_path],
data_bag)
data_bag_item_path = File.join(data_bag_path, @raw_data["id"])
Expand Down
4 changes: 2 additions & 2 deletions lib/chef-vault/item_keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def admins
end

def save(item_id = @raw_data["id"])
if Chef::Config[:solo]
if Chef::Config[:solo_legacy_mode]
save_solo(item_id)
else
begin
Expand All @@ -85,7 +85,7 @@ def save(item_id = @raw_data["id"])
end

def destroy
if Chef::Config[:solo]
if Chef::Config[:solo_legacy_mode]
data_bag_path = File.join(Chef::Config[:data_bag_path],
data_bag)
data_bag_item_path = File.join(data_bag_path, @raw_data["id"])
Expand Down
2 changes: 1 addition & 1 deletion spec/chef-vault/item_keys_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
describe "#save" do
let(:data_bag_path) { Dir.mktmpdir("vault_item_keys") }
before do
Chef::Config[:solo] = true
Chef::Config[:solo_legacy_mode] = true
Chef::Config[:data_bag_path] = data_bag_path
end

Expand Down