FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
documentcloud/lib/tasks/app.rake at diffdocs · documentcloud/documentcloud · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Mar 11, 2021. It is now read-only.
documentcloud
/
documentcloud
Public archive
Notifications
You must be signed in to change notification settings
Fork
157
Star
425
Code
Issues
194
Pull requests
16
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
documentcloud
/
lib
/
tasks
/
app.rake
Copy path
More file actions
More file actions
Latest commit
History
History
History
84 lines (63 loc) · 2.01 KB
Breadcrumbs
documentcloud
/
lib
/
tasks
/
app.rake
Copy path
File metadata and controls
84 lines (63 loc) · 2.01 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
namespace
:app
do
task
:start
do
sh
"sudo /etc/init.d/nginx start"
end
task
:devstart
do
sh
"rake crowd:server:start && rake crowd:node:start && rake sunspot:solr:start && sudo nginx"
end
task
:restart_solr
do
sh
"rake
#{
RAILS_ENV
}
sunspot:solr:stop sunspot:solr:start"
end
task
:stop
do
sh
"sudo /etc/init.d/nginx stop"
end
task
:restart
do
sh
"touch tmp/restart.txt"
end
task
:warm
do
secrets
=
YAML
.
load_file
(
"
#{
Rails
.
root
}
/secrets/secrets.yml"
)
[
RAILS_ENV
]
sh
"curl -s -u
#{
secrets
[
'guest_username'
]
}
:
#{
secrets
[
'guest_password'
]
}
http://localhost:80 > /dev/null"
end
task
:console
do
exec
"script/console
#{
RAILS_ENV
}
"
end
desc
"Update the Rails application"
task
:update
do
sh
'git pull'
sleep
0.2
end
desc
"Repackage static assets"
task
:jammit
do
config
=
YAML
.
load_file
(
"
#{
Rails
.
root
}
/config/document_cloud.yml"
)
[
RAILS_ENV
]
sh
"sudo su www-data -c
\"
jammit -u http://
#{
config
[
'server_root'
]
}
\"
"
end
desc
"Publish all documents with expired publish_at timestamps"
task
:publish
,
:needs
=>
:environment
do
Document
.
publish_due_documents
end
namespace
:clearcache
do
desc
"Clears out cached document JS files."
task
:docs
do
sh
"rm -f ./public/documents/*.js"
invoke
'app:clearcache:notes'
end
desc
"Clears out cached annotation JS files."
task
:notes
do
sh
"rm -f ./public/documents/*/annotations/*.js"
end
desc
"Purges cached search embeds."
task
:search
do
sh
"rm -rf ./public/search/embed/*"
end
end
end
namespace
:openoffice
do
task
:start
do
utility
=
RUBY_PLATFORM
.
match
(
/darwin/
)
?
"/Applications/OpenOffice.org.app/Contents/MacOS/soffice.bin"
:
"soffice"
sh
"
#{
utility
}
-headless -accept=
\"
socket,host=127.0.0.1,port=8100;urp;
\"
-nofirststartwizard"
end
end
# def nginx_pid
# pid_locations = ['/var/run/nginx.pid', '/usr/local/nginx/logs/nginx.pid', '/opt/nginx/logs/nginx.pid']
# @nginx_pid ||= pid_locations.detect {|pid| File.exists?(pid) }
# end
Back
|
FazBrowse Home
|
New Git URL