forked from aaronpk/IndieAuth.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
57 lines (48 loc) · 1.78 KB
/
Rakefile
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
50
51
52
53
54
55
56
def init(env=ENV['RACK_ENV']); end
require File.join('.', 'environment.rb')
namespace :db do
task :bootstrap do
init
DataMapper.auto_migrate!
facebook = Provider.create ({
:code => 'facebook',
:client_id => SiteConfig.facebook.app_id,
:client_secret => SiteConfig.facebook.app_secret,
:regex_username => 'https?:\/\/(?:www\.)?facebook\.com\/([^\/]+)'
})
flickr = Provider.create ({
:code => 'flickr',
:client_id => SiteConfig.flickr.api_key,
:client_secret => SiteConfig.flickr.api_secret,
:regex_username => 'https?:\/\/(?:www\.)?flickr\.com\/(?:photos\/)?([^\/]+)'
})
geoloqi = Provider.create ({
:code => 'geoloqi',
:client_id => SiteConfig.geoloqi.api_key,
:client_secret => SiteConfig.geoloqi.api_secret,
:regex_username => 'https?:\/\/(?:www\.)?geoloqi\.com\/([^\/]+)'
})
github = Provider.create ({
:code => 'github',
:client_id => SiteConfig.github.client_id,
:client_secret => SiteConfig.github.client_secret,
:regex_username => 'https?:\/\/(?:www\.)?github\.com\/([^\/]+)'
})
google = Provider.create ({
:code => 'google',
:client_id => SiteConfig.google.client_id,
:client_secret => SiteConfig.google.client_secret,
:regex_username => 'https?:\/\/(?:www\.)?profiles\.google\.com\/([^\/]+)'
})
twitter = Provider.create ({
:code => 'twitter',
:client_id => SiteConfig.twitter.consumer_key,
:client_secret => SiteConfig.twitter.consumer_secret,
:regex_username => 'https?:\/\/(?:www\.)?twitter\.com\/([^\/]+)'
})
end
task :migrate do
init
DataMapper.auto_upgrade!
end
end