Sha256: 542db9de703af8d46074e83d361f566de085b22f70141a5ce358b0e2df3087cb
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
require 'bundler' Bundler::GemHelper.install_tasks require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) task :test => :spec namespace :cache do require 'mlb' desc 'Update the teams file cache' task :update do json = MLB::Team.results_from_freebase file = File.new('cache/teams.json', 'w+') tempfile = Tempfile.new('teams.json') tempfile.write(JSON.dump(json)) if system("python -mjson.tool #{tempfile.path} #{file.path}") puts "File sucessfully written to #{file.path}" tempfile.delete else abort "Error parsing #{tempfile.path}" end end end begin require 'rubocop/rake_task' Rubocop::RakeTask.new rescue LoadError task :rubocop do $stderr.puts 'Rubocop is disabled' end end require 'yard' YARD::Rake::YardocTask.new require 'yardstick/rake/measurement' Yardstick::Rake::Measurement.new do |measurement| measurement.output = 'measurement/report.txt' end require 'yardstick/rake/verify' Yardstick::Rake::Verify.new do |verify| verify.threshold = 56.2 end task :default => [:spec, :rubocop, :verify_measurements]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mlb-0.7.0 | Rakefile |