This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'scrubyt' | |
# I installed firewatir on my firefox 3.0 | |
# And running "ruby merb_readme.rb" lauches firefox and then go to the right page. | |
property_data = Scrubyt::Extractor.define :agent => :firefox do | |
fetch 'http://merbivore.com/documentation/current/doc/rdoc/stack/' | |
# There's also another 'files' link in the page. | |
# So I had to write exact location of the link. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'scrubyt' | |
# I installed firewatir on my firefox 3.0 | |
# And running "ruby scrubyt_ajax.rb" lauches firefox and then go to the right page. | |
property_data = Scrubyt::Extractor.define :agent => :firefox do | |
fetch 'http://merbivore.com/documentation/current/doc/rdoc/stack/' | |
# There's also another 'files' link in the page. | |
# So I had to write exact location of the link. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script runs ok with firewatir. | |
require 'rubygems' | |
require 'scrubyt' | |
Scrubyt.logger = Scrubyt::Logger.new | |
property_data = Scrubyt::Extractor.define :agent => :firefox do | |
fetch 'http://merbivore.com/documentation/current/doc/rdoc/stack/index.html?a=F00000098&name=README' | |
doc "//div[@id='rdocContent']" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
gem('twitter4r', '0.3.0') | |
require 'twitter' | |
require 'twitter_search' | |
require 'time' | |
require 'nokogiri' | |
require 'open-uri' | |
array = @wycat_merb_commits = [] | |
@long_messages = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
gem('twitter4r', '0.3.0') | |
require 'twitter' | |
require 'twitter_search' | |
require 'time' | |
require 'nokogiri' | |
require 'open-uri' | |
array = @wycat_merb_commits = [] | |
@long_messages = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merb::Config[:framework] = { | |
:application => Merb.root / "application.rb", | |
:config => [Merb.root / "config", nil], | |
:public => [Merb.root / "public", nil], | |
:model => Merb.root / "models", | |
:view => Merb.root / "views" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# referenced API. | |
# http://merbapi.com/classes/Merb/BootLoader/BuildFramework.html | |
class Tweet | |
include DataMapper::Resource | |
property :id, Serial | |
property :message, Text, :length => 255, :nullable => false, :unique => true | |
property :name, String, :length => 20, :nullable => false | |
property :category, String, :length => 20 | |
property :link, String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_orm :datamapper | |
use_test :rspec | |
use_template_engine :erb | |
merb_gems_version = "1.0.7.1" | |
dm_gems_version = "0.9.8" | |
dependency "merb-action-args", merb_gems_version | |
dependency "merb-assets", merb_gems_version | |
dependency "merb-helpers", merb_gems_version | |
dependency "merb-cache", merb_gems_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
#shows twitter | |
def index | |
render | |
end | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.scrape | |
merb = 'http://github.com/wycats/merb/commits/1.0.x' | |
negotiation = 'http://github.com/wycats/rails/commits/master' | |
blog= 'http://yehudakatz.com' | |
self.get_commits_and_bark(merb, "edgemerb") | |
self.get_commits_and_bark(negotiation, "wycats_rails") | |
self.get_blog_and_bark(blog) | |
end |