Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix generate refinery blog Automatically create demo user Clean template : require once 'execjs' and remove end script message
- Loading branch information
Brice Sanchez
committed
Mar 9, 2015
1 parent
0002226
commit 04cba0b
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
require 'rbconfig' | ||
|
||
# We want to ensure that you have an ExecJS runtime available! | ||
begin | ||
require 'execjs' | ||
::ExecJS::RuntimeUnavailable | ||
rescue LoadError | ||
abort "ExecJS is not installed. Please re-start the installer after running:\ngem install execjs" | ||
end | ||
|
||
if File.read("#{destination_root}/Gemfile") !~ /assets.+coffee-rails/m | ||
gem "coffee-rails", :group => :assets | ||
end | ||
|
||
append_file 'Gemfile' do | ||
" | ||
gem 'refinerycms', git: 'https://github.com/refinery/refinerycms', branch: 'master' | ||
gem 'quiet_assets', :group => :development | ||
# Add support for refinerycms-acts-as-indexed | ||
gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.0'] | ||
# Add support for refinerycms-wymeditor | ||
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.6'] | ||
gem 'seo_meta', git: 'https://github.com/parndt/seo_meta', branch: 'master' | ||
gem 'paper_trail', git: 'https://github.com/airblade/paper_trail', branch: 'master' | ||
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master' | ||
gem 'refinerycms-inquiries', git: 'https://github.com/refinery/refinerycms-inquiries', branch: 'master' | ||
gem 'refinerycms-news', git: 'https://github.com/refinery/refinerycms-news', branch: 'master' | ||
gem 'refinerycms-page-images', git: 'https://github.com/refinery/refinerycms-page-images', branch: 'master' | ||
gem 'refinerycms-portfolio', git: 'https://github.com/refinery/refinerycms-portfolio', branch: 'master' | ||
gem 'refinerycms-settings', git: 'https://github.com/refinery/refinerycms-settings', branch: 'master' | ||
gem 'refinerycms-search', git: 'https://github.com/refinery/refinerycms-search', branch: 'master' | ||
" | ||
end | ||
|
||
run 'bundle install' | ||
|
||
rake 'db:create' | ||
generate "refinery:cms --fresh-installation #{ARGV.join(' ')}" | ||
|
||
run 'rails generate refinery:blog' | ||
run 'rails generate refinery:inquiries' | ||
run 'rails generate refinery:news' | ||
run 'rails generate refinery:page_images' | ||
run 'rails generate refinery:portfolio' | ||
run 'rails generate refinery:settings' | ||
run 'rails generate refinery:search' | ||
|
||
rake 'db:migrate' | ||
rake 'db:seed' | ||
|
||
run "bin/rails runner \"Refinery::User.new(:username => 'demo', :password => 'demo', :email => 'demo@example.org').create_first\"" |