summaryrefslogtreecommitdiff
path: root/controllers/cartridges.rb
diff options
context:
space:
mode:
authoricebaker <113217272+icebaker@users.noreply.github.com>2023-11-29 07:53:19 -0300
committerGitHub <noreply@github.com>2023-11-29 07:53:19 -0300
commit9f79a161905f5af8e331930cc77c7be10703596f (patch)
treeb2ab75665e42de79f22cca82bf03cfc49759f485 /controllers/cartridges.rb
parente1ab6853262b83f483060961f17bf895989a19c0 (diff)
parent154aa68caf50a18af5c0dff1d368fc639314e0ba (diff)
Merge pull request #5 from icebaker/ib-tools
Adding support for Spec 1.0.0: Tools (Functions)
Diffstat (limited to 'controllers/cartridges.rb')
-rw-r--r--controllers/cartridges.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/controllers/cartridges.rb b/controllers/cartridges.rb
index fe0d56e..df474a9 100644
--- a/controllers/cartridges.rb
+++ b/controllers/cartridges.rb
@@ -23,7 +23,7 @@ module NanoBot
files.values.uniq.map do |file|
cartridge = Logic::Helpers::Hash.symbolize_keys(
- YAML.safe_load(File.read(file[:path]), permitted_classes: [Symbol])
+ YAML.safe_load_file(file[:path], permitted_classes: [Symbol])
).merge({
system: {
id: file[:path].to_s.sub(/^#{Regexp.escape(file[:base])}/, '').sub(%r{^/}, '').sub(/\.[^.]+\z/,