Permalink
Browse files

Fixed broken dependencies, added usage to populator script.

  • Loading branch information...
1 parent 1df8769 commit a6f089fc753abe2f24dfa62bce60aeaaac8e8aad @pwnall committed Jul 17, 2010
Showing with 40 additions and 20 deletions.
  1. +2 −2 Gemfile
  2. +22 −17 Gemfile.lock
  3. +16 −1 script/populator.rb
View
@@ -1,9 +1,9 @@
source 'http://rubygems.org'
-gem 'rails', '3.0.0.beta4'
+# gem 'rails', '3.0.0.beta4'
# Bundle edge Rails instead:
-# gem 'rails', :git => 'git://github.com/rails/rails.git'
+gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql'
View
@@ -1,7 +1,7 @@
-GEM
- remote: http://rubygems.org/
+GIT
+ remote: git://github.com/rails/rails.git
+ revision: 631b956
specs:
- abstract (1.0.0)
actionmailer (3.0.0.beta4)
actionpack (= 3.0.0.beta4)
mail (~> 2.2.5)
@@ -28,6 +28,24 @@ GEM
activemodel (= 3.0.0.beta4)
activesupport (= 3.0.0.beta4)
activesupport (3.0.0.beta4)
+ rails (3.0.0.beta4)
+ actionmailer (= 3.0.0.beta4)
+ actionpack (= 3.0.0.beta4)
+ activerecord (= 3.0.0.beta4)
+ activeresource (= 3.0.0.beta4)
+ activesupport (= 3.0.0.beta4)
+ bundler (>= 1.0.0.beta.5)
+ railties (= 3.0.0.beta4)
+ railties (3.0.0.beta4)
+ actionpack (= 3.0.0.beta4)
+ activesupport (= 3.0.0.beta4)
+ rake (>= 0.8.3)
+ thor (~> 0.13.7)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
arel (0.4.0)
activesupport (>= 3.0.0.beta)
builder (2.1.2)
@@ -50,19 +68,6 @@ GEM
rack (>= 1.0.0)
rack-test (0.5.4)
rack (>= 1.0)
- rails (3.0.0.beta4)
- actionmailer (= 3.0.0.beta4)
- actionpack (= 3.0.0.beta4)
- activerecord (= 3.0.0.beta4)
- activeresource (= 3.0.0.beta4)
- activesupport (= 3.0.0.beta4)
- bundler (>= 1.0.0.beta.2)
- railties (= 3.0.0.beta4)
- railties (3.0.0.beta4)
- actionpack (= 3.0.0.beta4)
- activesupport (= 3.0.0.beta4)
- rake (>= 0.8.3)
- thor (~> 0.13.7)
rake (0.8.7)
thor (0.13.8)
treetop (1.4.8)
@@ -77,4 +82,4 @@ DEPENDENCIES
mechanize
mysql
nokogiri
- rails (= 3.0.0.beta4)
+ rails!
View
@@ -1,6 +1,21 @@
#!/usr/bin/env ruby
+if ARGV.length < 1 || ARGV.length > 2
+ puts <<END_USAGE
+Usage: #{$0} page_url [page_limit]
+ page_url: the address of the main Craigslist page containing the housing
+ listings to be imported
+ page_limit: number of listing pages to look for (100 postings / page)
+ (optional, defaults to 20)
+
+Example:
+ #{$0} http://boston.craigslist.org/gbs/aap/ 20
+END_USAGE
+ exit
+end
+
ENV['RAILS_ENV'] ||= 'development'
page_url = ARGV[0]
+page_limit = ARGV[1] && ARGV[1].to_i
require File.expand_path('../../config/environment.rb', __FILE__)
-ListingPopulator.new.run page_url
+ListingPopulator.new.run page_url, page_limit || 20

0 comments on commit a6f089f

Please sign in to comment.