# frozen_string_literal: true require "faker" module NeetoCommonsBackend module SampleData module Common class Base def organization @_organization ||= Organization.find_by(subdomain: "spinkart") end def admin organization.users.find_by(email: "oliver@example.com") end def skip? !heroku_or_development_env? end def print_description Rails.logger.debug format("%-80s", description) end def print_success Rails.logger.debug "[DONE]\n" end def description self.class.name end def heroku_or_development_env? Rails.env.heroku? || Rails.env.development? end def app_secrets @_app_secrets ||= Rails.application.secrets end def load! print_description process! print_success end end end end end