Sha256: e1b921aeb7f66165079f8396d0656b17c2a493bc333e7406c6272ea3171b57fe

Contents?: true

Size: 1.35 KB

Versions: 11

Compression:

Stored size: 1.35 KB

Contents

require 'rails/generators/erb'

module Erb
  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.erb',              File.join('app/views', class_path, 'oauth_clients', '_form.html.erb')
        template 'new.html.erb',                File.join('app/views', class_path, 'oauth_clients', 'new.html.erb')
        template 'index.html.erb',              File.join('app/views', class_path, 'oauth_clients', 'index.html.erb')
        template 'show.html.erb',               File.join('app/views', class_path, 'oauth_clients', 'show.html.erb')
        template 'edit.html.erb',               File.join('app/views', class_path, 'oauth_clients', 'edit.html.erb')
        template 'authorize.html.erb',          File.join('app/views', class_path, file_name, 'authorize.html.erb')
        template 'oauth2_authorize.html.erb',   File.join('app/views', class_path, file_name, 'oauth2_authorize.html.erb')
        template 'authorize_success.html.erb',  File.join('app/views', class_path, file_name, 'authorize_success.html.erb')
        template 'authorize_failure.html.erb',  File.join('app/views', class_path, file_name, 'authorize_failure.html.erb')
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
houston-oauth-plugin-0.5.1 lib/generators/erb/oauth_provider_generator.rb
panjiva-oauth-plugin-0.4.1 lib/generators/erb/oauth_provider_generator.rb
oauth-plugin-0.5.1 lib/generators/erb/oauth_provider_generator.rb
oauth-plugin-0.5.0 lib/generators/erb/oauth_provider_generator.rb
oauth-provider-0.5.0rc1 lib/generators/erb/oauth_provider_generator.rb
oauth-plugin-0.4.1 lib/generators/erb/oauth_provider_generator.rb
oauth-plugin-0.4.0 lib/generators/erb/oauth_provider_generator.rb
oauth-plugin-0.4.0.rc2 lib/generators/erb/oauth_provider_generator.rb
oauth-plugin-0.4.0.rc1 lib/generators/erb/oauth_provider_generator.rb
oauth-plugin-0.4.0.pre7 lib/generators/erb/oauth_provider_generator.rb
oauth-plugin-0.4.0.pre6 lib/generators/erb/oauth_provider_generator.rb