Sha256: 67612b3034d41a215f0bc326ae42583169acfb59ea420cce408e65d890b1e046
Contents?: true
Size: 909 Bytes
Versions: 21
Compression:
Stored size: 909 Bytes
Contents
# frozen_string_literal: true require "securerandom" module NeetoCommonsBackend module SampleData module Common class OrganizationBase < Common::Base attr_reader :organization_name, :organization def initialize @organization_name = self.class::ORGANIZATION_NAME end def process! create_organization! end private def create_organization! auth_app = app_secrets.auth_app @organization = Organization.create! \ name: organization_name, subdomain: organization_name.parameterize, auth_app_url: auth_app[:url], auth_app_id: auth_app[:id], auth_app_secret: auth_app[:secret], api_key: SecureRandom.alphanumeric, widget_api_key: SecureRandom.alphanumeric end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems