pixelforce_cms 0.4 → 0.6

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: 1e08e9ba960cae5854ee728d278cf700117b04c9
4
- data.tar.gz: 83bb59b9582eafe5287a32a046c23ab58389015b
3
+ metadata.gz: e9e22cd37d1df7b8fcfed4ba40ffb04a5b63b4b5
4
+ data.tar.gz: 6895c299fd90edf63fc009a7731cef616fc0933e
5
5
  SHA512:
6
- metadata.gz: 1673487876227c569694e4f5d434070934796efc0ba33efc0fdedc2e8d0981454cf4f859cbde77cc85d753ce528e429ca09291b06fa2a5c297fecc8b191ce660
7
- data.tar.gz: c715d67df56a5c791d739602b5863b490168b896340361422322dca1f3dab48829ff09604c28cd540241a382a765f501d2304444332d6fbd2fb279c4705c39d7
6
+ metadata.gz: 602e6828b965a1e4e1c61a4c17d0bc3aad3a1f2b1bf261fe9e82bb14f9590357958518907b9cb6d9600de2db047454c3187618b284707c64bd2157048ecfa388
7
+ data.tar.gz: 7ad9e371c0c67812ae3a6590834f4a2449e49208d9e7a5e1cf1f75edac05bf9b936f6a67e455847253227abd794b2d4ce506e410849dae9bc4979734f6425cfc
@@ -23,10 +23,14 @@ module PixelforceCms
23
23
  end
24
24
 
25
25
  def copy_controller_files
26
- copy_file "application.html.haml", 'app/views/layouts/application.html.haml'
26
+ copy_file "pages_controller.rb", 'app/controllers/pages_controller.rb'
27
+ copy_file "application.html.haml", 'app/views/layouts/application.html.haml'
28
+ copy_file 'Capfile', 'Capfile'
27
29
  create_file 'app/views/pages/index.html.haml'
30
+ template 'deploy.rb', 'config/deploy.rb'
28
31
  in_root do
29
32
  inject_into_file 'config/routes.rb', "\n root :to => 'pages#index'\n", { :after => 'do', :verbose => false }
33
+ inject_into_file 'config/routes.rb', "\n get '/:id' => 'pages#show'\n", { :after => 'do', :verbose => false }
30
34
  end
31
35
  end
32
36
 
@@ -0,0 +1,4 @@
1
+ load 'deploy'
2
+ load 'deploy/assets'
3
+ Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
4
+ load 'config/deploy' # remove this line to skip loading any of the default tasks
@@ -0,0 +1,31 @@
1
+ require 'bundler/capistrano'
2
+ set :rvm_ruby_string, '1.9.3'
3
+ require "rvm/capistrano"
4
+
5
+ set :application, '<%= application_name %>'
6
+ set :repository, 'git@bisplug.com:<%= application_name %>.git'
7
+ set :scm, :git
8
+
9
+ set :deploy_to, '/home/deploy/<%= application_name %>'
10
+ set :user, 'deploy'
11
+ set :branch, 'master'
12
+ set :rails_env, 'production'
13
+ set :migrate_env, 'production'
14
+ set :use_sudo, false
15
+ set :deploy_via, :remote_cache
16
+
17
+ # server "<%= application_name %>.com.au", :app, :web, :db, :primary => true
18
+ server "119.9.13.249", :app, :web, :db, :primary => true
19
+
20
+ # if you want to clean up old releases on each deploy uncomment this:
21
+ # after "deploy:restart", "deploy:cleanup"
22
+
23
+ # If you are using Passenger mod_rails uncomment this:
24
+ namespace :deploy do
25
+ task :start do ; end
26
+ task :stop do ; end
27
+ task :restart, :roles => :app, :except => { :no_release => true } do
28
+ run "cd '/home/deploy/<%= application_name %>/current' ; bundle exec rake db:migrate db:seed RAILS_ENV=production"
29
+ run "touch #{File.join('/home/deploy/<%= application_name %>/current','tmp','restart.txt')}"
30
+ end
31
+ end
@@ -0,0 +1,12 @@
1
+ class PagesController < ApplicationController
2
+
3
+ def show
4
+ @page = Page.find params[:id]
5
+ if @page.nil?
6
+ redirect_to root_path
7
+ return
8
+ end
9
+ render params[:id].underscore if lookup_context.template_exists?(params[:id].underscore, "pages", false)
10
+ end
11
+
12
+ end
@@ -1,3 +1,3 @@
1
1
  module PixelforceCms
2
- VERSION = "0.4"
2
+ VERSION = "0.6"
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.4'
4
+ version: '0.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Zhang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-19 00:00:00.000000000 Z
11
+ date: 2013-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,7 @@ files:
52
52
  - Rakefile
53
53
  - lib/generators/pixelforce_cms/controller_generator.rb
54
54
  - lib/generators/pixelforce_cms/install_generator.rb
55
+ - lib/generators/pixelforce_cms/templates/Capfile
55
56
  - lib/generators/pixelforce_cms/templates/Gemfile
56
57
  - lib/generators/pixelforce_cms/templates/_form.erb
57
58
  - lib/generators/pixelforce_cms/templates/admin_controller.rb
@@ -67,11 +68,13 @@ files:
67
68
  - lib/generators/pixelforce_cms/templates/css/jasny-bootstrap.css
68
69
  - lib/generators/pixelforce_cms/templates/css/style.css.scss
69
70
  - lib/generators/pixelforce_cms/templates/css/style.responsive.css.scss
71
+ - lib/generators/pixelforce_cms/templates/deploy.rb
70
72
  - lib/generators/pixelforce_cms/templates/edit.html.haml
71
73
  - lib/generators/pixelforce_cms/templates/index.html.haml
72
74
  - lib/generators/pixelforce_cms/templates/javascripts/application.js
73
75
  - lib/generators/pixelforce_cms/templates/javascripts/jasny-bootstrap.js
74
76
  - lib/generators/pixelforce_cms/templates/new.html.haml
77
+ - lib/generators/pixelforce_cms/templates/pages_controller.rb
75
78
  - lib/pixelforce_cms.rb
76
79
  - lib/pixelforce_cms/version.rb
77
80
  - pixelforce_cms.gemspec