pixelforce_cms 0.9.4 → 0.9.5

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: c7a50054c3ded412854d7c54102bc732ebe3b9d5
4
- data.tar.gz: 3722cf5a1510f79f4a086b421534023a01287722
3
+ metadata.gz: a80ad1a79fa391c3f45e0834ec7ae74a3bbac2ca
4
+ data.tar.gz: 2de3055d3bf5668f58c79eb950e971caf5b51569
5
5
  SHA512:
6
- metadata.gz: 892c114f06f7de0013b5e84ba578d1e469828799d0b6fc73fbee8c96b6c1f592e3b321963083a82256bf2add70fa96af82d98c74552baede825992885faef5e7
7
- data.tar.gz: 5cbcb1399471365e756a2f801e56682c5717a5167023463f35df581a49f28a973ed0de36fc027c67192fa1a8dd738e400613dbffaa9152415061eee7757bc264
6
+ metadata.gz: 8d0f4c591d7e744384b2382429f551ad12121f4c122406768ed621f97955089d25751a966c51c2782523351b5f18bb60dc917cce4329d89cebb26bb4645c8d11
7
+ data.tar.gz: 0059cc47e8c8aa954b27b1e5187f4c62f0eaacb3b08b6d849a998bf01b867c01dc34af7ddf6e6677668f93fdc5ed46610aeaa4cc1caafc05885a348b77904b43
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 new [name] _3.2.16_ -d mysql
7
+ rails _3.2.16_ new [name] -d mysql
8
8
 
9
9
  ## Installation
10
10
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PixelforceCms
2
- VERSION = "0.9.4"
2
+ VERSION = "0.9.5"
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.4
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-01-13 00:00:00.000000000 Z
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