Sha256: f5f75bd15c3d4ebc472bb260e094c5901f36afbbbfdf7f4322f1390599efc685

Contents?: true

Size: 1.71 KB

Versions: 1

Compression:

Stored size: 1.71 KB

Contents

require 'rubygems'
require 'spec/rake/spectask'
require 'rake/gempackagetask'
  

namespace :twog do
  desc "Generate .twog.yaml file"
  task :conf_create do
    AUTH_FILE_NAME = "#{ENV['HOME']}/.twog.yaml"
    
    AUTH_CONFIG_FILE = <<-EOS
  rss_feed: 'http://url.com/feed.rss'
  consumer_key: 'consumer key'
  consumer_secret: 'consumer secret'
  access_token: 'access token'
  access_secret: 'access secret'
  bitly_username: 'username'
  bitly_api_key: 'api key'
  last_blog_post_tweeted:
    EOS

    abort "#{ENV['HOME']}/.twog.yaml already exists" if File.exists?(AUTH_FILE_NAME)

    File.open(AUTH_FILE_NAME, 'w') {|f| f.write(AUTH_CONFIG_FILE) } 
  end
  
  desc "Clean out the coverage and the pkg"
  task :clean do
    rm_rf 'coverage'
    rm_rf 'pkg'
  end
end

desc "Run all specs in spec directory"
Spec::Rake::SpecTask.new(:spec) do |t|
  t.spec_files = FileList['spec/**/*_spec.rb']
  t.spec_opts = ['--color']
end

namespace :spec do  
  desc "Run rcov on the spec files"
  Spec::Rake::SpecTask.new(:coverage) do |t|
    t.spec_files = FileList['spec/**/*_spec.rb']
    t.spec_opts = ['--color']
    t.rcov = true
    t.rcov_opts = ['--exclude', 'spec']
  end
end

begin
  gem 'jeweler', '>= 0.11.0'
  require 'jeweler'
  Jeweler::Tasks.new do |s|
    s.name = "twog"
    s.summary = %Q{Tool to tweet blog posts}
    s.email = "jmeridth@gmail.com"
    s.homepage = "http://github.com/armmer/twog"
    s.description = "Tool to tweet blog posts"
    s.authors = ["Jason Meridth"]
    s.rubyforge_project = "twog"
    s.add_dependency('twitter_oauth', '>= 0.3.3')
    s.add_dependency('bitly', '>= 0.4.0')
  end
rescue LoadError
  puts "Jeweler not available. Install it with: sudo gem install jeweler --version '>= 0.11.0'"
  exit(1)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twog-0.2.0 Rakefile