Sha256: 085e1c88ab44e90ca8631e9e1c2c931ef1a25ad31da8989f1c47274d18a6e6f7

Contents?: true

Size: 473 Bytes

Versions: 3

Compression:

Stored size: 473 Bytes

Contents

class GdsSsoSetupGenerator < Rails::Generators::Base

  def create_initializer_file
    create_file "config/initializers/gds_sso.rb", <<-FILE
GDS::SSO.config do |config|
  config.user_model   = "User"
  config.oauth_id     = 'set_me'
  config.oauth_secret = 'set_me'
  config.oauth_root_url = Plek.current.find("authentication")
end

    FILE
  end

  def create_model
    create_file "app/models/user.rb", <<-FILE
class User
  include GDS::SSO::User
end
    FILE
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gds-sso-0.4.2 lib/gds-sso/generators/gds_sso_setup.rb
gds-sso-0.4.1 lib/gds-sso/generators/gds_sso_setup.rb
gds-sso-0.4.0 lib/gds-sso/generators/gds_sso_setup.rb