Sha256: 2489640cf18fb7653a3882d3c90cbdf3c6106cd7f6354554e25e3e5026090e98

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

require 'digest/sha1'
require 'zena/info'
# This is a rails template to generate a basic zena application

if RUBY_PLATFORM =~ /mswin32/
  run "del public\\index.html"
else
  run "rm public/index.html"
end

gem 'zena', :version => Zena::VERSION
route 'map.zen_routes'

rakefile("zena_tasks.rake") do
<<-TASK
# sync zena tasks to gem version
env = File.read(File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment.rb'))
if env =~ /config.gem.*zena.*version.*'(.*?)'/
  gem 'zena', "= \#{$1}"
end
require 'zena'
require 'tasks/zena'
TASK
end

['development', 'test', 'production'].each do |env|
  environment 'config.action_view.cache_template_loading = false', :env => env
end

inside('app/controllers') do
  app = File.read('application_controller.rb')
  app.gsub!(/class\s+ApplicationController\s+<\s+ActionController::Base/, "class ApplicationController < ActionController::Base\n  include Zena::App")
  app.gsub!(/^(\s+)protect_from_forgery/, '\1# protect_from_forgery')
  File.open('application_controller.rb', 'wb') do |f|
    f.write(app)
  end
end

rake 'zena:assets OVERWRITE_ASSETS=true'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
zena-0.16.8 lib/zena/deploy/template.rb
zena-0.16.7 lib/zena/deploy/template.rb
zena-0.16.6 lib/zena/deploy/template.rb
zena-0.16.5 lib/zena/deploy/template.rb
zena-0.16.4 lib/zena/deploy/template.rb