lib/spigoter/plugins.rb in spigoter-0.2.2 vs lib/spigoter/plugins.rb in spigoter-0.3.0

- old
+ new

@@ -1,18 +1,17 @@ module Spigoter module Plugins def self.get_plugin(name, data) + f = nil case data['type'] when 'curse' - f = Spigoter::PluginCurse.new(data['url']).download - hash = {:name => "#{name}.jar", :file => f} - return hash + f = Spigoter::PluginCurse.new(data['url']).file when 'devbukkit' - f = Spigoter::PluginBukkit.new(data['url']).download - hash = {:name => "#{name}.jar", :file => f} - return hash + f = Spigoter::PluginBukkit.new(data['url']).file else raise "Unkown source" end + hash = {:name => "#{name}.jar", :file => f} + return hash end end end \ No newline at end of file