Sha256: 03058717fc6adeadebba41277f7c113876da9dd659cb562d85ee4529bcc3dfe3

Contents?: true

Size: 1.34 KB

Versions: 6

Compression:

Stored size: 1.34 KB

Contents

require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "./lib/wlog/domain/static_configurations"
require 'yard'

RSpec::Core::RakeTask.new(:spec)

# note: rake yard
YARD::Rake::YardocTask.new do |t|
  t.options = ['--title', 'Wlog: the friendly worktime logger!', '-o', 'doc/']
end

# Anything that has to do with the stuff of this gem in .config/wlog
namespace :data do
  desc "Remove all configuration data of wlog"
  task :rm do 
    include Wlog::StaticConfigurations
    print "You sure you want to remove #{AppDirectory}? [y/n] :"
    FileUtils.rm_rf AppDirectory if $stdin.gets.match(/^y/i)
  end
end

namespace :db do
  # Remove data directory. This will remove all your data
  desc "Remove All the databases"
  task :rm do 
    include Wlog::StaticConfigurations
    puts "Removing data directories from #{DataDirectory}"
    print "You sure you want to remove it? [y/n] "
    FileUtils.rm_rf AppDirectory if $stdin.gets.match(/^y/i)
  end

  desc "Run the sqlite3 console with the default database"
  task :c do 
    include Wlog::StaticConfigurations
    sh "sqlite3 #{DataDirectory}#{DefaultDb}"
  end
end

namespace :reek do
  desc "Run reek at lib/"
  task :all do
    sh "reek lib/"
  end

  desc "Grep long parameter list" 
  task :lparam do
    sh "reek 2>&1 lib/ | grep -i param"
  end

end

namespace :test do 
  task :all => :spec
end 


Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wlog-1.2.2 Rakefile
wlog-1.2.1 Rakefile
wlog-1.2.0 Rakefile
wlog-1.1.7 Rakefile
wlog-1.1.6 Rakefile
wlog-1.1.5 Rakefile