diff --git a/Rakefile b/Rakefile index 138c2eb..729b0d5 100644 --- a/Rakefile +++ b/Rakefile @@ -25,7 +25,6 @@ spec = Gem::Specification.new do |s| s.homepage = HOMEPAGE s.add_dependency("merb-slices", ">= 1.0.12") s.add_dependency("builder", ">= 2.1.2") - s.add_dependency("mlb", ">= 0.0.3") s.require_path = "lib" s.files = %w(LICENSE README.markdown Rakefile) + Dir.glob("{app,lib,public,schema,spec,stubs}/**/*") s.post_install_message = <<-POST_INSTALL_MESSAGE diff --git a/lib/merb-admin/slicetasks.rb b/lib/merb-admin/slicetasks.rb index 5b42a3a..ebbeb76 100644 --- a/lib/merb-admin/slicetasks.rb +++ b/lib/merb-admin/slicetasks.rb @@ -1,5 +1,4 @@ require 'abstract_model' -require 'mlb' namespace :slices do namespace :"merb-admin" do @@ -66,6 +65,14 @@ private def load_data + begin + require "mlb" + rescue Exception => e + puts "MLB Gem Required" + puts "gem install mlb --source=http://gemcutter.org" + return + end + puts "Loading current MLB leagues, divisions, teams, and players" MLB.teams.each do |mlb_team| unless league = MerbAdmin::AbstractModel.new("League").first(:conditions => ["name = ?", mlb_team.league])