diff options
author | icebaker <113217272+icebaker@users.noreply.github.com> | 2023-11-29 07:53:19 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 07:53:19 -0300 |
commit | 9f79a161905f5af8e331930cc77c7be10703596f (patch) | |
tree | b2ab75665e42de79f22cca82bf03cfc49759f485 /controllers/cartridges.rb | |
parent | e1ab6853262b83f483060961f17bf895989a19c0 (diff) | |
parent | 154aa68caf50a18af5c0dff1d368fc639314e0ba (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.rb | 2 |
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/, |