components/storage.rb in nano-bots-0.0.2 vs components/storage.rb in nano-bots-0.0.3

- old
+ new

@@ -17,10 +17,10 @@ path = "#{user_home!.sub(%r{/$}, '')}/.local/state/nano-bots" if path.nil? path = "#{path.sub(%r{/$}, '')}/ruby-nano-bots/#{cartridge[:meta][:author].to_slug.normalize}" path = "#{path}/#{cartridge[:meta][:name].to_slug.normalize}" - path = "#{path}/#{cartridge[:meta][:version].to_s.gsub('.', '-').to_slug.normalize}/#{key.to_slug.normalize}" + path = "#{path}/#{cartridge[:meta][:version].to_s.gsub('.', '-').to_slug.normalize}/#{key}" path = "#{path}/state.json" FileUtils.mkdir_p(File.dirname(path)) File.write(path, JSON.generate({ key:, history: [] })) unless File.exist?(path)