Sha256: 2f0557f824e3b06a2e71079102ff27335a2a0f65ce53da9ba7b42cfb44cc930f

Contents?: true

Size: 703 Bytes

Versions: 1

Compression:

Stored size: 703 Bytes

Contents

require_relative "super_scaffold_base"

class OauthProviderGenerator < Rails::Generators::Base
  include SuperScaffoldBase

  source_root File.expand_path("templates", __dir__)

  namespace "super_scaffold:oauth_provider"

  argument :omniauth_gem
  argument :gems_provider_name
  argument :our_provider_name
  argument :PROVIDER_API_KEY_ENV_VAR_NAME
  argument :PROVIDER_API_SECRET_ENV_VAR_NAME

  class_option :icon, type: :string, desc: "Specify an icon."

  def generate
    # We add the name of the specific super_scaffolding command that we want to
    # invoke to the beginning of the argument string.
    ARGV.unshift "oauth-provider"
    BulletTrain::SuperScaffolding::Runner.new.run
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bullet_train-super_scaffolding-1.6.12 lib/generators/super_scaffold/oauth_provider/oauth_provider_generator.rb