pixelforce_cms 0.9.9.7 → 0.9.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f870fbdb99dc25c7ec6b41f90b0908f24d2190a
4
- data.tar.gz: 8ee15cbe584bb94f4c537d1d42b47b105d2cce9f
3
+ metadata.gz: 2e2ac0fa42d3c43f6f2926c9c91fda5579c6dbd9
4
+ data.tar.gz: 4bcac06799a8756ecf71a4ccb61773dd41de6b0d
5
5
  SHA512:
6
- metadata.gz: 89a61c0d19fd86f5fbd94ba5ed5decca61381651a3f5ee7e83ee6fbd2c9c9b9a37d2a7113d9e458d86061d143811b166824c85fefe877d85d03be2f3224bb495
7
- data.tar.gz: 7ed908a8fc0b49162fed76a12fdcc6e3caf94fc04b8d82ef5a6f41220a3570266a8e2ded38f64de1261df8808dfe4a809e80362941d7bc4c14dd7020faaaced0
6
+ metadata.gz: 9b4aa6dff349c3f3173c12346b5140dc1d7dedb64f57d28ad92cba0161a8b4d6ec8c75461df07a750bfb4564b80109aebbe194ebd9affb12f09788f5c7d62640
7
+ data.tar.gz: 607cc1e7857877c9937a769048bcc401403398437c91a2b062135858528aecda87351e96b3ad7c8f63ec180c5511b90d3ca4b8d0d38e9e1952c6f7ba3347e547
data/README.md CHANGED
@@ -4,7 +4,7 @@ TODO: Write a gem description
4
4
 
5
5
  ## Create a new project
6
6
 
7
- rails _3.2.17_ new [name] -d mysql
7
+ rails _3.2.18_ new [name] -d mysql
8
8
 
9
9
  ## Installation
10
10
 
@@ -30,9 +30,11 @@ module PixelforceCms
30
30
  copy_file "recipes/base.rb", "config/recipes/base.rb"
31
31
  copy_file "recipes/unicorn.rb", "config/recipes/unicorn.rb"
32
32
  copy_file "recipes/sphinx.rb", "config/recipes/sphinx.rb"
33
+ copy_file "recipes/delayed_job.rb", "config/recipes/delayed_job.rb"
33
34
  copy_file "recipes/templates/nginx_config.erb", "config/recipes/templates/nginx_config.erb"
34
35
  copy_file "recipes/templates/unicorn_init.erb", "config/recipes/templates/unicorn_init.erb"
35
36
  copy_file "recipes/templates/sphinx_init.erb", "config/recipes/templates/sphinx_init.erb"
37
+ copy_file "recipes/templates/delayed_job_init.erb", "config/recipes/templates/delayed_job_init.erb"
36
38
  end
37
39
 
38
40
  def copy_controller_files
@@ -0,0 +1,19 @@
1
+ namespace :delayed_job do
2
+ desc "Setup delayed job"
3
+
4
+ desc "Setup delayed configuration for this application"
5
+ task :setup, roles: :web do
6
+ template "delayed_job_init.erb", "/tmp/delayed"
7
+ run "#{sudo} mv /tmp/delayed /etc/init.d/#{application}_delayed"
8
+ run "#{sudo} chmod +x /etc/init.d/#{application}_delayed"
9
+ run "#{sudo} update-rc.d #{application}_delayed defaults"
10
+ end
11
+ # after "deploy:setup", "nginx:setup"
12
+
13
+ %w[start stop reindex].each do |command|
14
+ desc "#{command} delayed"
15
+ task command, roles: :web do
16
+ run "/etc/init.d/#{application}_delayed #{command}"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,44 @@
1
+ #!/bin/bash
2
+
3
+ USER="deploy"
4
+ PROJECT_PATH="<%= deploy_to %>"
5
+ NAME=delayed_job
6
+ DESC="Unicorn app for $USER"
7
+ export RAILS_ENV=production
8
+ PID="$PROJECT_PATH/shared/pids/delayed_job.pid"
9
+
10
+ case "$1" in
11
+ start)
12
+ CD_TO_APP_DIR="cd $PROJECT_PATH/current"
13
+ START_DAEMON_PROCESS="bundle exec ./script/delayed_job -n 1 start"
14
+
15
+ echo -n "Starting $DESC: "
16
+ if [ `whoami` = 'root' ]; then
17
+ su - $USER -c "$CD_TO_APP_DIR > /dev/null 2>&1 && $START_DAEMON_PROCESS"
18
+ else
19
+ $CD_TO_APP_DIR > /dev/null 2>&1 && $START_DAEMON_PROCESS
20
+ fi
21
+ echo "$NAME."
22
+ ;;
23
+ stop)
24
+ echo -n "Stopping $DESC: "
25
+ kill -QUIT `cat $PID`
26
+ echo "$NAME."
27
+ ;;
28
+ restart)
29
+ echo -n "Restarting $DESC: "
30
+ kill -USR2 `cat $PID`
31
+ echo "$NAME."
32
+ ;;
33
+ reload)
34
+ echo -n "Reloading $DESC configuration: "
35
+ kill -HUP `cat $PID`
36
+ echo "$NAME."
37
+ ;;
38
+ *)
39
+ echo "Usage: $NAME {start|stop|restart|reload}" >&2
40
+ exit 1
41
+ ;;
42
+ esac
43
+
44
+ exit 0
@@ -1,3 +1,3 @@
1
1
  module PixelforceCms
2
- VERSION = "0.9.9.7"
2
+ VERSION = "0.9.9.8"
3
3
  end
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.9.7
4
+ version: 0.9.9.8
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-08-17 00:00:00.000000000 Z
11
+ date: 2014-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,7 +84,9 @@ files:
84
84
  - lib/generators/pixelforce_cms/templates/pages_controller.rb
85
85
  - lib/generators/pixelforce_cms/templates/pretty_url.rb
86
86
  - lib/generators/pixelforce_cms/templates/recipes/base.rb
87
+ - lib/generators/pixelforce_cms/templates/recipes/delayed_job.rb
87
88
  - lib/generators/pixelforce_cms/templates/recipes/sphinx.rb
89
+ - lib/generators/pixelforce_cms/templates/recipes/templates/delayed_job_init.erb
88
90
  - lib/generators/pixelforce_cms/templates/recipes/templates/nginx_config.erb
89
91
  - lib/generators/pixelforce_cms/templates/recipes/templates/sphinx_init.erb
90
92
  - lib/generators/pixelforce_cms/templates/recipes/templates/unicorn_init.erb