-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment.rb
50 lines (41 loc) · 2.38 KB
/
environment.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
require 'mongo_mapper'
require 'rest-client'
require 'json'
require 'resque'
require 'pry'
require 'sinatra'
require 'bcrypt'
require 'sinatra/flash'
require 'sidekiq'
require 'sidekiq/web'
require 'feedzirra'
MongoMapper.connection = Mongo::MongoClient.new("ec2-54-224-26-29.compute-1.amazonaws.com", 27017, :pool_size => 25, :pool_timeout => 60)
# MongoMapper.connection = Mongo::MongoClient.new("localhost", 27017, :pool_size => 25, :pool_timeout => 60)
MongoMapper.database = "news"
class Provider
end
class Provider::Twitter
end
Dir[File.dirname(__FILE__) + '/extensions/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/plugins/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/helpers/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/handlers/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/before_hooks/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/requests/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/article_processors/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/crawlers/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/scorers/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/topic_generators/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/model/embedded_documents/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/model/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/model/edges/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/model/twitter/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/login/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/sidekiq_tasks/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/user_importers/*.rb'].each {|file| require file }
Dir[File.dirname(__FILE__) + '/lib/user_importers/**/*.rb'].each {|file| require file }
set :erb, :layout => :'layouts/main'
enable :sessions
helpers LayoutHelper, ParamsHelper, LoginHelper, AuthenticateHelper
CRAWLERS = [NewYorkTimesCrawl, GuardianCrawl, NPRCrawl, AtlanticWireCrawl, HuffingtonPostCrawl, MotherJonesCrawl, ChristianScienceMonitorCrawl, ReutersCrawl, BBCNewsCrawl, WashingtonPostCrawl, SalonCrawl, WallStreetJournalCrawl, PoliticoCrawl]