Skip to content

Commit 9a0c676

Browse files
committed
Removing the use of the FileStore altogether - only using the FileCache, as it's more straightforward
1 parent c651822 commit 9a0c676

3 files changed

Lines changed: 2 additions & 243 deletions

File tree

chef/lib/chef/client.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ def register
163163
end
164164

165165
if @registration
166-
reg = Chef::FileStore.load("registration", @safe_name)
167-
@secret = reg["secret"]
166+
@secret = Chef::FileCache.load(File.join("registration", @safe_name))
168167
else
169168
create_registration
170169
end
@@ -178,7 +177,7 @@ def register
178177
# true:: Always returns true
179178
def create_registration
180179
@secret = random_password(500)
181-
Chef::FileStore.store("registration", @safe_name, { "secret" => @secret })
180+
Chef::FileCache.store(File.join("registration", @safe_name), @secret)
182181
@rest.post_rest("registrations", { :id => @safe_name, :password => @secret, :validation_token => @validation_token })
183182
true
184183
end

chef/lib/chef/file_store.rb

Lines changed: 0 additions & 135 deletions
This file was deleted.

chef/spec/unit/file_store_spec.rb

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)