Sha256: 57ba1f0d73e4b3fa6b46fdef543c9df1e7ade664c56aa09c4edd0c97bcdfa963

Contents?: true

Size: 1.18 KB

Versions: 19

Compression:

Stored size: 1.18 KB

Contents

require 'fileutils'

class HoboAdminSiteGenerator < HoboSubsiteGenerator
  
  default_options :rapid => true
  
  def manifest
    m = super
    
    m.template "admin.css", File.join('public/stylesheets/admin.css') 
    if invite_only?
      m.dependency "hobo_model_controller", ["admin/user"]
      m.template "users_index.dryml", "app/views/admin/users/index.dryml"
    end
    m
  end
  
  def invite_only?
    options[:invite_only]
  end

  protected

    def banner
      "Usage: #{$0} #{spec.name} [--make-front-site | --no-front-site] [--invite-only]"
    end

    def add_options!(opt)
      opt.separator ''
      opt.separator 'Options:'
      opt.on("--make-front-site", "rename application.dryml to front_site.dryml") do |v|
        options[:make_front_site] = true
      end
      opt.on("--no-front-site", "do not rename application.dryml to front_site.dryml ") do |v|
        options[:make_front_site] = false
      end
      opt.on("--no-rapid", "don't include Rapid features in the subsite taglib") do |v|
        options[:rapid] = false
      end
      opt.on("--invite-only", "Add features for an invite only website") do |v|
        options[:invite_only] = true
      end
    end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
hobo-1.1.0 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-1.0.3 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-1.1.0.pre4 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-1.1.0.pre3 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-1.1.0.pre2 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-1.1.0.pre0 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-1.0.2 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-1.0.1 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-1.0.0 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.9.106 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.9.105 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.9.104 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.9.103 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.9.102 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.9.101 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.9.100 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.9.0 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.8.10 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
hobo-0.8.9 rails_generators/hobo_admin_site/hobo_admin_site_generator.rb