Sha256: 5921671d877d51b9bd32a0d13d1c573f5cd63687f397afb1f694cbb4445b8d29

Contents?: true

Size: 1.46 KB

Versions: 19

Compression:

Stored size: 1.46 KB

Contents

require 'rails/generators/erb/controller/controller_generator'

module Haml
  module Generators
    class OauthProviderGenerator < Erb::Generators::Base
      source_root File.expand_path('../oauth_provider_templates', __FILE__)

      argument :name, :type => :string, :default => 'Oauth'

      def copy_view_files
        template '_form.html.haml',              File.join('app/views', class_path, 'oauth_clients', '_form.html.haml')
        template 'new.html.haml',                File.join('app/views', class_path, 'oauth_clients', 'new.html.haml')
        template 'index.html.haml',              File.join('app/views', class_path, 'oauth_clients', 'index.html.haml')
        template 'show.html.haml',               File.join('app/views', class_path, 'oauth_clients', 'show.html.haml')
        template 'edit.html.haml',               File.join('app/views', class_path, 'oauth_clients', 'edit.html.haml')
        template 'authorize.html.haml',          File.join('app/views', class_path, file_name, 'authorize.html.haml')
        template 'oauth2_authorize.html.haml',   File.join('app/views', class_path, file_name, 'oauth2_authorize.html.haml')
        template 'authorize_success.html.haml',  File.join('app/views', class_path, file_name, 'authorize_success.html.haml')
        template 'authorize_failure.html.haml',  File.join('app/views', class_path, file_name, 'authorize_failure.html.haml')
      end

      protected
      def handler
        :haml
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 6 rubygems

Version Path
houston-oauth-plugin-0.5.1 lib/generators/haml/oauth_provider_generator.rb
panjiva-oauth-plugin-0.4.1 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.5.1 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.5.0 lib/generators/haml/oauth_provider_generator.rb
oauth-provider-0.5.0rc1 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.1 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0.rc2 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0.rc1 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0.pre7 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0.pre6 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0.pre5 lib/generators/haml/oauth_provider_generator.rb
insrc-oauth-plugin-0.4.0.pre6 lib/generators/haml/oauth_provider_generator.rb
insrc-oauth-plugin-0.4.0.pre5 lib/generators/haml/oauth_provider_generator.rb
le1t0-oauth-plugin-0.4.0.pre4.001 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0.pre4 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0.pre3 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0.pre2 lib/generators/haml/oauth_provider_generator.rb
oauth-plugin-0.4.0.pre1 lib/generators/haml/oauth_provider_generator.rb