pixelforce_cms 0.9.2 → 0.9.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7a50054c3ded412854d7c54102bc732ebe3b9d5
|
4
|
+
data.tar.gz: 3722cf5a1510f79f4a086b421534023a01287722
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 892c114f06f7de0013b5e84ba578d1e469828799d0b6fc73fbee8c96b6c1f592e3b321963083a82256bf2add70fa96af82d98c74552baede825992885faef5e7
|
7
|
+
data.tar.gz: 5cbcb1399471365e756a2f801e56682c5717a5167023463f35df581a49f28a973ed0de36fc027c67192fa1a8dd738e400613dbffaa9152415061eee7757bc264
|
data/README.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
TODO: Write a gem description
|
4
4
|
|
5
|
+
## Create a new project
|
6
|
+
|
7
|
+
rails new [name] _3.2.16_ -d mysql
|
8
|
+
|
5
9
|
## Installation
|
6
10
|
|
7
11
|
Add this line to your application's Gemfile:
|
@@ -22,9 +26,13 @@ Generate templates
|
|
22
26
|
|
23
27
|
$ rails g pixelforce_cms:install
|
24
28
|
|
29
|
+
There are 3 options you can customise, assets, controllers, and config. For example if you don't want to generate config settings you can
|
30
|
+
|
31
|
+
$ rails g pixelforce_cms:install --skip-config
|
25
32
|
|
33
|
+
Add a new admin controller
|
26
34
|
|
27
|
-
|
35
|
+
$ rails g pixelforce_cms:controller [name]
|
28
36
|
|
29
37
|
## Contributing
|
30
38
|
|
@@ -4,22 +4,23 @@ module PixelforceCms
|
|
4
4
|
module Generators
|
5
5
|
class InstallGenerator < Rails::Generators::Base
|
6
6
|
source_root File.expand_path("../templates", __FILE__)
|
7
|
+
class_option :assets, :type => :boolean, :default => true, :description => "Include assets files"
|
8
|
+
class_option :controllers, :type => :boolean, :default => true, :description => "Include controller files"
|
9
|
+
class_option :config, :type => :boolean, :default => true, :description => "Include config files"
|
7
10
|
|
8
11
|
def copy_assets
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
def copy_gemfile
|
22
|
-
copy_file "Gemfile", 'Gemfile'
|
12
|
+
if options.assets?
|
13
|
+
copy_file "javascripts/application.js", "app/assets/javascripts/application.js"
|
14
|
+
copy_file "css/style.css.scss", 'app/assets/stylesheets/style.css.scss'
|
15
|
+
copy_file "css/style.responsive.css.scss", 'app/assets/stylesheets/style.responsive.css.scss'
|
16
|
+
copy_file "css/application/application.css", "app/assets/stylesheets/application/application.css"
|
17
|
+
copy_file "css/application/chromeframe.css.scss", 'app/assets/stylesheets/application/chromeframe.css.scss'
|
18
|
+
copy_file "css/application/document.css.scss", 'app/assets/stylesheets/application/document.css.scss'
|
19
|
+
copy_file "css/application/html5.css.scss", 'app/assets/stylesheets/application/html5.css.scss'
|
20
|
+
copy_file "css/application/index.css.scss", 'app/assets/stylesheets/application/index.css.scss'
|
21
|
+
copy_file "css/application/variables.css.scss", "app/assets/stylesheets/application/variables.css.scss"
|
22
|
+
copy_file "css/pages/home.css.scss", "app/assets/stylesheets/pages/home.css.scss"
|
23
|
+
end
|
23
24
|
end
|
24
25
|
|
25
26
|
def copy_receipt
|
@@ -30,25 +31,29 @@ module PixelforceCms
|
|
30
31
|
end
|
31
32
|
|
32
33
|
def copy_controller_files
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
34
|
+
if options.controllers?
|
35
|
+
copy_file "pages_controller.rb", 'app/controllers/pages_controller.rb'
|
36
|
+
copy_file "application.html.haml", 'app/views/layouts/application.html.haml'
|
37
|
+
copy_file "application/_chromeframe.html.haml", 'app/views/application/_chromeframe.html.haml'
|
38
|
+
copy_file "application/_footer.html.haml", 'app/views/application/_footer.html.haml'
|
39
|
+
copy_file "application/_head.html.haml", 'app/views/application/_head.html.haml'
|
40
|
+
copy_file "application/_header.html.haml", 'app/views/application/_header.html.haml'
|
41
|
+
copy_file 'Capfile', 'Capfile'
|
42
|
+
remove_file 'app/views/layouts/application.html.erb'
|
43
|
+
create_file 'app/views/pages/index.html.haml'
|
44
|
+
@application_name = application_name
|
45
|
+
template 'deploy.rb', 'config/deploy.rb'
|
46
|
+
in_root do
|
47
|
+
inject_into_file 'config/routes.rb', "\n root :to => 'pages#index'\n", { :after => 'do', :verbose => false }
|
48
|
+
inject_into_file 'config/routes.rb', "\n get '/:id' => 'pages#show'\n", { :after => 'do', :verbose => false }
|
49
|
+
end
|
47
50
|
end
|
48
51
|
end
|
49
52
|
|
50
53
|
def config_application
|
51
|
-
|
54
|
+
if options.config?
|
55
|
+
copy_file "Gemfile", 'Gemfile'
|
56
|
+
email_config = %q(
|
52
57
|
config.action_mailer.delivery_method = :smtp
|
53
58
|
config.action_mailer.smtp_settings = {
|
54
59
|
:address => "smtp.gmail.com",
|
@@ -57,8 +62,9 @@ module PixelforceCms
|
|
57
62
|
:password => "plus5261",
|
58
63
|
:authentication => :plain
|
59
64
|
})
|
60
|
-
|
61
|
-
|
65
|
+
sentinel = "config.assets.version = '1.0'"
|
66
|
+
inject_into_file 'config/application.rb', "\n#{email_config}\n", { :after => sentinel, :verbose => false }
|
67
|
+
end
|
62
68
|
end
|
63
69
|
|
64
70
|
def application_name
|
@@ -1,6 +1,6 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gem 'rails', '3.2.
|
3
|
+
gem 'rails', '3.2.16'
|
4
4
|
|
5
5
|
# Bundle edge Rails instead:
|
6
6
|
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
@@ -74,7 +74,7 @@ gem 'haml-rails', '~> 0.4'
|
|
74
74
|
# gem 'jbuilder'
|
75
75
|
|
76
76
|
# Use unicorn as the app server
|
77
|
-
|
77
|
+
gem 'unicorn'
|
78
78
|
|
79
79
|
# Deploy with Capistrano
|
80
80
|
# gem 'capistrano'
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Zhang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|