Permalink
Browse files

import setting

  • Loading branch information...
1 parent bd8b993 commit f595a436c7d89a871f0170e81160d12ef8f159cb @xdite committed Oct 7, 2012
@@ -59,6 +59,13 @@ def create_database
bundle_command 'exec rake db:create'
end
+ def build_settings_from_config
+ # seo_helper initialize setting
+ template 'setting.rb', 'app/models/setting.rb',:force => true
+ template 'seo_helper.rb', 'config/initializers/seo_helper.rb',:force => true
+ template 'config_yml.erb', 'config/config.yml',:force => true
+ end
+
def setup_stylesheets
copy_file 'app/assets/stylesheets/application.css', 'app/assets/stylesheets/application.css.scss'
remove_file 'app/assets/stylesheets/application.css'
@@ -67,7 +74,6 @@ def setup_stylesheets
def setup_root_route
template 'welcome.html.erb', 'app/views/pages/welcome.html.erb',:force => true
-
route "root :to => 'high_voltage/pages#show', :id => 'welcome'"
end
@@ -21,7 +21,7 @@ def bootstrapers_customization
invoke :add_jquery_ui
invoke :customize_gemfile
invoke :setup_database
- #invoke :configure_app
+ invoke :configure_app
invoke :setup_stylesheets
invoke :remove_routes_comment_lines
invoke :setup_root_route
@@ -1,5 +1,8 @@
+gem 'seo_helper', '~> 1.0'
+
gem "settingslogic"
+
gem 'anjlab-bootstrap-rails', '>= 2.1', :require => 'bootstrap-rails'
gem 'high_voltage'
gem 'airbrake'
View
@@ -0,0 +1,18 @@
+defaults: &defaults
+ app_name: "<%= app_name %>"
+ domain: "http://<%= app_name %>.dev"
+ facebook_app_id:
+ facebook_secret:
+ admin_emails:
+ - ""
+ google_analytics_key: ""
+ default_logo_url: "/logo.png"
+
+development:
+ <<: *defaults
+
+test:
+ <<: *defaults
+
+production:
+ <<: *defaults
View
@@ -0,0 +1,11 @@
+# -*- encoding : utf-8 -*-
+SeoHelper.configure do |config|
+ config.skip_blank = false
+ config.site_name = Setting.app_name
+ config.default_page_description = "The easiest way to keep like stuff on facebook"
+ config.default_page_keywords = "Facebook Likes Stuff"
+ config.default_page_image = Setting.domain + Setting.default_logo_url
+ config.site_name_formatter = lambda { |title, site_name| "#{title} « #{site_name}".html_safe }
+ config.pagination_formatter = lambda { |title, page_number| "#{title} - Page No.#{page_number}" }
+
+end
View
@@ -0,0 +1,5 @@
+# -*- encoding : utf-8 -*-
+class Setting < Settingslogic
+ source "#{Rails.root}/config/config.yml"
+ namespace Rails.env
+end

0 comments on commit f595a43

Please sign in to comment.