Skip to content

Commit

Permalink
bundled u p
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Morrison committed Nov 4, 2010
1 parent 794dffd commit c52b5c5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .bundle/config
@@ -0,0 +1,2 @@
---
BUNDLE_DISABLE_SHARED_GEMS: "1"
20 changes: 20 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,20 @@
GEM
remote: http://rubygems.org/
specs:
highline (1.6.1)
mechanize (1.0.0)
nokogiri (>= 1.2.1)
nokogiri (1.4.3.1)
rack (1.2.1)
sinatra (1.1.0)
rack (~> 1.1)
tilt (~> 1.1)
tilt (1.1)

PLATFORMS
ruby

DEPENDENCIES
highline
mechanize
sinatra
10 changes: 9 additions & 1 deletion app.rb
Expand Up @@ -7,6 +7,14 @@
post '/' do
term = params[:term]

@results = "search for #{term}"

username = ENV['CF_USERNAME']
password = ENV['CF_PASSWORD']
term = term

cfwhat = CfWhat.new(username, password, term)
cfwhat.search
@results = cfwhat.results

erb :results
end
4 changes: 2 additions & 2 deletions cfwhat.rb
Expand Up @@ -2,7 +2,7 @@
require 'mechanize'
require 'highline/import'

class CampfireWhat
class CfWhat
START_URL = "https://thoughtbot.campfirenow.com"

attr_reader :results
Expand Down Expand Up @@ -75,7 +75,7 @@ def record(rooms, people, excerpts)
password = ENV['CF_PASSWORD'] || ask("Enter your password (or export ENV['CF_PASSWORD']): (will be masked) " ) { |q| q.echo = "*" }
term = ENV['CF_TERM'] || ask("What term to search for? (or export ENV['CF_TERM']): " )

cfwhat = CampfireWhat.new(username, password, term)
cfwhat = CfWhat.new(username, password, term)
cfwhat.search
p cfwhat.results
end

0 comments on commit c52b5c5

Please sign in to comment.