Sha256: e84fba4590ec23d4b6384b4fc484cd12cc37be7d7dbc5ed9554aa68e34b1131d

Contents?: true

Size: 779 Bytes

Versions: 26

Compression:

Stored size: 779 Bytes

Contents

module Hobo
  class SubsiteTaglibGenerator < Rails::Generators::NamedBase
    source_root File.expand_path('../templates', __FILE__)
    include Generators::Hobo::InviteOnly
    include Generators::Hobo::Taglib

    class_option :theme, :type => :string, :desc => "Theme", :default => 'clean_admin'
    class_option :ui_theme, :type => :string, :desc => "jQuery-UI Theme", :default => 'flick'

    def self.banner
      "rails generate hobo:subsite_taglib NAME [options]"
    end

    def generate_taglib
      template "taglib.dryml.erb", File.join('app/views/taglibs', "#{file_name}_site.dryml")
      Rails::Generators.invoke('hobo:install_default_plugins', ["--subsite=#{file_name}", "--theme=hobo_#{options[:theme]}", "--ui_theme=#{options[:ui_theme]}"])
    end

  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
hobo-2.0.0.pre6 lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb
hobo-2.0.0.pre5 lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb
hobo-2.0.0.pre4 lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb
hobo-2.0.0.pre3 lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb
hobo-2.0.0.pre2 lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb
hobo-2.0.0.pre1 lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb