lib/html2rss.rb in html2rss-0.2.2 vs lib/html2rss.rb in html2rss-0.3.0
- old
+ new
@@ -3,10 +3,14 @@
require 'html2rss/version'
require 'yaml'
module Html2rss
def self.feed_from_yaml_config(file, name)
- config = Config.new(YAML.load(File.open(file)).freeze, name)
+ yaml = YAML.load(File.open(file))
+ feed_config = yaml['feeds'][name]
+ global_config = yaml.reject { |k| k == 'feeds' }
+
+ config = Config.new(feed_config, global_config)
feed(config)
end
def self.feed(config)
feed = FeedBuilder.new config