forked from MarsBased/marsman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.rb
53 lines (47 loc) · 1.29 KB
/
config.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
50
51
52
53
require "lib/helpers"
helpers Helpers
activate :sprockets
activate :autoprefixer
activate :pry
activate :directory_indexes
activate :sprockets3_sassc
configure :development do
activate :livereload, no_swf: true
end
ready do
@pages = sitemap.resources.find_all{|p| p.source_file.match(/\.html/) }
@pages.each do |r|
@versions = []
if @data = r.data['versions']
@data.split(/[\s,']/).reject(&:empty?).each do |d|
@versions.push(d)
end
end
@versions.each do |version|
@path = r.destination_path.gsub 'index.html', "_#{version}.html"
proxy @path, r.path, :locals => { :versions => version }
end
end
end
configure :build do
ignore 'shapes/*'
activate :asset_hash
set :environment, 'production'
end
activate :deploy do |deploy|
deploy.deploy_method = :rsync
deploy.host = 'marsman.marsbased.com'
deploy.path = '/home/deploy/apps/marsman'
deploy.user = 'deploy'
deploy.flags = '-avzp --chmod=+r'
end
# activate :email do |email|
# email.user = '[email protected]'
# email.password = 'smtp_pass'
# email.emails_path= 'emails'
# email.to_email = '[email protected]'
# email.from_email = '[email protected]'
# email.port = 587
# email.domain = 'mg.marsbased.com'
# email.address = 'smtp.mailgun.org'
# end