config/initializers/clwiki.rb in clwiki-2.4.0 vs config/initializers/clwiki.rb in clwiki-3.0.0
- old
+ new
@@ -1,8 +1,9 @@
-require 'cl_wiki/configuration'
+# frozen_string_literal: true
+require_dependency 'cl_wiki/configuration'
+
filename = File.join(File.dirname(__FILE__), '..', '..', 'config', 'clwiki.yml')
-conf_hash = YAML::load(::File.open(filename))[Rails.env]
+conf_hash = YAML.safe_load(::File.open(filename))[Rails.env]
conf_hash['wiki_path'] = ::File.expand_path(conf_hash['wiki_path'], Rails.root)
$wiki_conf = ClWiki::Configuration.new(conf_hash)
-$wiki_path = $wiki_conf.wiki_path