Sha256: a40e4000f97b51198e810cad5b80694f8966762a159511d886157de827b8e733
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
# encoding: utf-8 require 'rubygems' begin require 'bundler/setup' rescue LoadError => e abort e.message end require 'rake' require 'bundler/gem_tasks' require 'rdoc/task' RDoc::Task.new task doc: :rdoc require 'rspec/core/rake_task' RSpec::Core::RakeTask.new require 'rubocop/rake_task' desc 'Run RuboCop on the lib directory' RuboCop::RakeTask.new(:rubocop) do |task| # task.patterns = ['lib/**/*.rb'] # task.formatters = ['files'] task.fail_on_error = true end require 'pry' desc 'Run pry console' task :console do require './lib/eveapi' require './lib/eveapi/console' Pry.start end desc 'Generate method docs' task :methods do Bundler.require require 'awesome_print' EVEApi::Client.new.working_methods.each do |m| p m @client = EVEApi::Client.new @client.key_id = 4_278_167 @client.vcode = 'supersecretstuff' @client.character_id = '95512059' out = '' begin out << @client.api_methods_hash.find { |me| me[:name] == m }[:desc] rescue out << "TODO Description (#{m})" end out << "\n\n" out << "```ruby\n@client = EVEApi::Client.new\n" out << "@client.key_id = 4278167\n" out << "@client.vcode = 'supersecretstuff'\n\n" out << "@client.#{m}\n\n" begin out << @client.send(m).pretty_inspect out << '```' f = File.new("./doc/wiki/#{m}.md", 'w') f.puts out f.close rescue => e puts e.message end end end task c: :console task test: :spec task default: [:spec, :rubocop]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eveapi-0.1.2 | Rakefile |