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

- old
+ new

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