Sha256: 7c5a5b2a8ffcda4d0879ee7702461b2fb6f07004d41ae72cf382fe0273b168de
Contents?: true
Size: 468 Bytes
Versions: 1
Compression:
Stored size: 468 Bytes
Contents
require 'open-uri' require 'json' require 'launchy' module Bukkit def self.website(plugin_name) begin plugins_api = JSON.parse(open("http://api.bukget.org/3/plugins/bukkit/#{plugin_name}").read) website = plugins_api["website"] puts "Opening #{plugin_name}'s website in your default browser." Launchy.open(website) rescue OpenURI::HTTPError puts " Plugin not found.\n Make sure you have the name correct." Bukkit::Help.website end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bukkit-0.1.4 | lib/bukkit/website.rb |