Sha256: 99cfb88fc37e732fa0e9616248bd9bf6cc91771037da5b6ad6dc8247f59f99c4

Contents?: true

Size: 1.33 KB

Versions: 12

Compression:

Stored size: 1.33 KB

Contents

class OpenidLoginGenerator < Rails::Generator::NamedBase
  def manifest
    record do |m|
      
      # Login module, controller class, functional test, and helper.
      m.template "openid_login_system.rb", "lib/openid_login_system.rb"
      m.template "controller.rb", File.join("app/controllers", class_path, "#{file_name}_controller.rb")
      m.template "controller_test.rb", File.join("test/functional", class_path, "#{file_name}_controller_test.rb")
      m.template "helper.rb", File.join("app/helpers", class_path, "#{file_name}_helper.rb")

      # Model class, unit test, fixtures, and example schema.
      m.template "user.rb", "app/models/user.rb"
      m.template "user_test.rb", "test/unit/user_test.rb"
      m.template "users.yml", "test/fixtures/users.yml"

      # Layout and stylesheet.
      m.template "scaffold:layout.rhtml", "app/views/layouts/scaffold.rhtml"
      m.template "scaffold:style.css", "public/stylesheets/scaffold.css"

      # Views. 
      m.directory File.join("app/views", class_path, file_name)
      login_views.each do |action|
        m.template "view_#{action}.rhtml",
          File.join("app/views", class_path, file_name, "#{action}.rhtml")
      end

      m.template "README", "README_LOGIN"
    end
  end

  attr_accessor :controller_class_name
  
  def login_views
    %w(welcome login logout)
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
openid_login_generator-0.1 openid_login_generator.rb
ruby-openid-1.0 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-1.1.2 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-1.0.1 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-1.1.1 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-1.0.2 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-1.1.3 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-2.0.1 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-1.1.4 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-2.0.2 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-2.0.4 examples/rails_openid_login_generator/openid_login_generator.rb
ruby-openid-2.0.3 examples/rails_openid_login_generator/openid_login_generator.rb