Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Commit

Permalink
omg! it's 4:42 am and I've recognised - again - how dangerous rm -rf …
Browse files Browse the repository at this point in the history
…can be...

I've almost deleted all changes of the last days, but luckily, I just
installed the code it as gem, so I had the files. Unfortunately, all
commit(message)s are gone, so here are the main changes:

* restructure directory/code/project structure & layout
* runs with 1.9.2 (except jabberbot), drop 1.8 support
* port fetch.rb to eventmachine

All changes were tested only basically, hope I didn't break anything ;)
  • Loading branch information
janlelis committed May 4, 2011
1 parent b236303 commit 335e07e
Show file tree
Hide file tree
Showing 33 changed files with 674 additions and 655 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*~
*.swp
*.rbc
html
pkg
harvester.yaml
1 change: 1 addition & 0 deletions .rvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rvm use 1.9.2
69 changes: 0 additions & 69 deletions README

This file was deleted.

28 changes: 28 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
require 'fileutils'
GEMSPEC = 'harvester.gemspec'

def gemspec
@gemspec ||= eval(File.read( GEMSPEC ), binding, GEMSPEC)
end

desc "Build the gem"
task :gem => :gemspec do
sh "gem build #{GEMSPEC}"
FileUtils.mkdir_p 'pkg'
FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg'
end

desc "Install the gem locally (without docs)"
task :install => :gem do
sh %{gem install pkg/#{gemspec.name}-#{gemspec.version} --no-rdoc --no-ri}
end

desc "Generate the gemspec"
task :generate do
puts gemspec.to_ruby
end

desc "Validate the gemspec"
task :gemspec do
gemspec.validate
end
17 changes: 17 additions & 0 deletions bin/harvester
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env ruby
# encoding: utf-8

if sub_command = ARGV.shift
path = File.expand_path( File.dirname(__FILE__) ) # TODO remove absolute path when packaged as gem + check for options first
exec "#{path}/harvester-#{sub_command}", *ARGV
end

# default:
require_relative '../lib/harvester/fetch'
require_relative '../lib/harvester/generate'
require_relative '../lib/harvester/chart'

harve = Harvester.new_from_argv
harve.fetch!
harve.generate!
harve.chart!
5 changes: 5 additions & 0 deletions bin/harvester-chart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby
# encoding: utf-8

require_relative '../lib/harvester/chart'
Harvester.new_from_argv.chart!
5 changes: 5 additions & 0 deletions bin/harvester-fetch
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby
# encoding: utf-8

require_relative '../lib/harvester/fetch'
Harvester.new_from_argv.fetch!
5 changes: 5 additions & 0 deletions bin/harvester-generate
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby
# encoding: utf-8

require_relative '../lib/harvester/generate'
Harvester.new_from_argv.generate!
6 changes: 6 additions & 0 deletions bin/harvester-jabber
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env ruby
# encoding: utf-8

# TODO: pass differnet username as ARGV
require_relative '../lib/harvester/jabber'
Harvester.new_from_argv.jabber!
60 changes: 0 additions & 60 deletions chart.rb

This file was deleted.

85 changes: 0 additions & 85 deletions config.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 335e07e

Please sign in to comment.