pixelforce_cms 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/generators/pixelforce_cms/install_generator.rb +2 -0
- data/lib/generators/pixelforce_cms/templates/recipes/sphinx.rb +19 -0
- data/lib/generators/pixelforce_cms/templates/recipes/templates/sphinx_init.erb +63 -0
- data/lib/pixelforce_cms/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a80ad1a79fa391c3f45e0834ec7ae74a3bbac2ca
|
4
|
+
data.tar.gz: 2de3055d3bf5668f58c79eb950e971caf5b51569
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d0f4c591d7e744384b2382429f551ad12121f4c122406768ed621f97955089d25751a966c51c2782523351b5f18bb60dc917cce4329d89cebb26bb4645c8d11
|
7
|
+
data.tar.gz: 0059cc47e8c8aa954b27b1e5187f4c62f0eaacb3b08b6d849a998bf01b867c01dc34af7ddf6e6677668f93fdc5ed46610aeaa4cc1caafc05885a348b77904b43
|
data/README.md
CHANGED
@@ -26,8 +26,10 @@ module PixelforceCms
|
|
26
26
|
def copy_receipt
|
27
27
|
copy_file "recipes/base.rb", "config/recipes/base.rb"
|
28
28
|
copy_file "recipes/unicorn.rb", "config/recipes/unicorn.rb"
|
29
|
+
copy_file "recipes/sphinx.rb", "config/recipes/sphinx.rb"
|
29
30
|
copy_file "recipes/templates/nginx_config.erb", "config/recipes/templates/nginx_config.erb"
|
30
31
|
copy_file "recipes/templates/unicorn_init.erb", "config/recipes/templates/unicorn_init.erb"
|
32
|
+
copy_file "recipes/templates/sphinx_init.erb", "config/recipes/templates/sphinx_init.erb"
|
31
33
|
end
|
32
34
|
|
33
35
|
def copy_controller_files
|
@@ -0,0 +1,19 @@
|
|
1
|
+
namespace :sphinx do
|
2
|
+
desc "Setup sphinx"
|
3
|
+
|
4
|
+
desc "Setup sphinx configuration for this application"
|
5
|
+
task :setup, roles: :web do
|
6
|
+
template "sphinx_init.erb", "/tmp/sphinx"
|
7
|
+
run "#{sudo} mv /tmp/sphinx /etc/init.d/#{application}_sphinx"
|
8
|
+
run "#{sudo} chmod +x /etc/init.d/#{application}_sphinx"
|
9
|
+
run "#{sudo} update-rc.d #{application}_sphinx defaults"
|
10
|
+
end
|
11
|
+
# after "deploy:setup", "nginx:setup"
|
12
|
+
|
13
|
+
%w[start stop reindex].each do |command|
|
14
|
+
desc "#{command} sphinx"
|
15
|
+
task command, roles: :web do
|
16
|
+
run "/etc/init.d/#{application}_sphinx #{command}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
#! /bin/bash
|
2
|
+
|
3
|
+
### BEGIN INIT INFO
|
4
|
+
# Provides: delayed job
|
5
|
+
# Required-Start: $local_fs $remote_fs $network $syslog
|
6
|
+
# Required-Stop: $local_fs $remote_fs $network $syslog
|
7
|
+
# Default-Start: 2 3 4 5
|
8
|
+
# Default-Stop: 0 1 6
|
9
|
+
# Short-Description: starts the delayed job service
|
10
|
+
# Description: starts delayed job
|
11
|
+
### END INIT INFO
|
12
|
+
|
13
|
+
USER="deploy"
|
14
|
+
DAEMON=sphinx
|
15
|
+
PROJECT_PATH="<%= deploy_to %>/current"
|
16
|
+
DESC="Sphinx job app for $USER"
|
17
|
+
|
18
|
+
export RAILS_ENV=production
|
19
|
+
CD_TO_APP_DIR="cd $PROJECT_PATH"
|
20
|
+
case "$1" in
|
21
|
+
start)
|
22
|
+
echo -n "Starting $DESC: "
|
23
|
+
if [ `whoami` = root ]; then
|
24
|
+
su - $USER -c "$CD_TO_APP_DIR > /dev/null 2>&1 && bundle exec rake ts:start"
|
25
|
+
else
|
26
|
+
$CD_TO_APP_DIR > /dev/null 2>&1 && bundle exec rake ts:start
|
27
|
+
fi
|
28
|
+
echo "$NAME."
|
29
|
+
;;
|
30
|
+
stop)
|
31
|
+
echo -n "Stopping $DESC: "
|
32
|
+
if [ `whoami` = root ]; then
|
33
|
+
su - $USER -c "$CD_TO_APP_DIR > /dev/null 2>&1 && bundle exec rake ts:stop"
|
34
|
+
else
|
35
|
+
$CD_TO_APP_DIR > /dev/null 2>&1 && bundle exec rake ts:stop
|
36
|
+
fi
|
37
|
+
echo "$NAME."
|
38
|
+
;;
|
39
|
+
restart)
|
40
|
+
echo -n "Restarting $DESC: "
|
41
|
+
if [ `whoami` = root ]; then
|
42
|
+
su - $USER -c "$CD_TO_APP_DIR > /dev/null 2>&1 && bundle exec rake ts:restart"
|
43
|
+
else
|
44
|
+
$CD_TO_APP_DIR > /dev/null 2>&1 && bundle exec rake ts:restart
|
45
|
+
fi
|
46
|
+
echo "$NAME."
|
47
|
+
;;
|
48
|
+
reindex)
|
49
|
+
echo -n "Reloading $DESC configuration: "
|
50
|
+
if [ `whoami` = root ]; then
|
51
|
+
su - $USER -c "$CD_TO_APP_DIR > /dev/null 2>&1 && bundle exec rake ts:index"
|
52
|
+
else
|
53
|
+
$CD_TO_APP_DIR > /dev/null 2>&1 && bundle exec rake ts:index
|
54
|
+
fi
|
55
|
+
echo "$NAME."
|
56
|
+
;;
|
57
|
+
*)
|
58
|
+
echo "Usage: $NAME {start|stop|restart|reindex}" >&2
|
59
|
+
exit 1
|
60
|
+
;;
|
61
|
+
esac
|
62
|
+
|
63
|
+
exit 0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixelforce_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Zhang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,7 +78,9 @@ files:
|
|
78
78
|
- lib/generators/pixelforce_cms/templates/new.html.haml
|
79
79
|
- lib/generators/pixelforce_cms/templates/pages_controller.rb
|
80
80
|
- lib/generators/pixelforce_cms/templates/recipes/base.rb
|
81
|
+
- lib/generators/pixelforce_cms/templates/recipes/sphinx.rb
|
81
82
|
- lib/generators/pixelforce_cms/templates/recipes/templates/nginx_config.erb
|
83
|
+
- lib/generators/pixelforce_cms/templates/recipes/templates/sphinx_init.erb
|
82
84
|
- lib/generators/pixelforce_cms/templates/recipes/templates/unicorn_init.erb
|
83
85
|
- lib/generators/pixelforce_cms/templates/recipes/unicorn.rb
|
84
86
|
- lib/pixelforce_cms.rb
|