Module: ForestLiana

Defined in:
lib/forest_liana.rb,
lib/forest_liana/engine.rb,
lib/forest_liana/version.rb,
lib/forest_liana/bootstrapper.rb,
lib/forest_liana/json_printer.rb,
app/services/forest_liana/token.rb,
lib/forest_liana/mixpanel_event.rb,
lib/forest_liana/base64_string_io.rb,
lib/forest_liana/schema_file_updater.rb,
app/helpers/forest_liana/query_helper.rb,
app/services/forest_liana/base_getter.rb,
app/services/forest_liana/stat_getter.rb,
app/helpers/forest_liana/schema_helper.rb,
app/services/forest_liana/ip_whitelist.rb,
app/services/forest_liana/schema_utils.rb,
app/helpers/forest_liana/adapter_helper.rb,
app/helpers/forest_liana/widgets_helper.rb,
app/services/forest_liana/apimap_sorter.rb,
app/services/forest_liana/scope_manager.rb,
app/services/forest_liana/authentication.rb,
app/services/forest_liana/filters_parser.rb,
app/services/forest_liana/schema_adapter.rb,
app/services/forest_liana/has_many_getter.rb,
app/services/forest_liana/pie_stat_getter.rb,
app/services/forest_liana/resource_getter.rb,
app/helpers/forest_liana/decoration_helper.rb,
app/services/forest_liana/line_stat_getter.rb,
app/services/forest_liana/resource_creator.rb,
app/services/forest_liana/resource_updater.rb,
app/services/forest_liana/resources_getter.rb,
app/helpers/forest_liana/application_helper.rb,
app/services/forest_liana/query_stat_getter.rb,
app/services/forest_liana/value_stat_getter.rb,
app/controllers/forest_liana/base_controller.rb,
app/serializers/forest_liana/stat_serializer.rb,
app/services/forest_liana/belongs_to_updater.rb,
app/services/forest_liana/controller_factory.rb,
app/services/forest_liana/live_query_checker.rb,
app/services/forest_liana/permissions_getter.rb,
app/services/forest_liana/stripe_base_getter.rb,
app/controllers/forest_liana/stats_controller.rb,
app/services/forest_liana/has_many_associator.rb,
app/services/forest_liana/oidc_client_manager.rb,
app/services/forest_liana/permissions_checker.rb,
lib/generators/forest_liana/install_generator.rb,
app/controllers/forest_liana/devise_controller.rb,
app/controllers/forest_liana/scopes_controller.rb,
app/controllers/forest_liana/stripe_controller.rb,
app/services/forest_liana/authorization_getter.rb,
app/services/forest_liana/forest_api_requester.rb,
app/services/forest_liana/has_many_dissociator.rb,
app/services/forest_liana/ip_whitelist_checker.rb,
app/services/forest_liana/search_query_builder.rb,
app/services/forest_liana/stripe_source_getter.rb,
app/controllers/forest_liana/actions_controller.rb,
app/controllers/forest_liana/apimaps_controller.rb,
app/serializers/forest_liana/serializer_factory.rb,
app/services/forest_liana/objective_stat_getter.rb,
app/services/forest_liana/permissions_formatter.rb,
app/services/forest_liana/stripe_invoice_getter.rb,
app/services/forest_liana/stripe_payment_getter.rb,
app/services/forest_liana/stripe_sources_getter.rb,
app/controllers/forest_liana/intercom_controller.rb,
app/controllers/forest_liana/mixpanel_controller.rb,
app/services/forest_liana/stripe_invoices_getter.rb,
app/services/forest_liana/stripe_payments_getter.rb,
app/controllers/forest_liana/resources_controller.rb,
app/services/forest_liana/integration_base_getter.rb,
app/services/forest_liana/leaderboard_stat_getter.rb,
app/services/forest_liana/stripe_payment_refunder.rb,
app/services/forest_liana/utils/beta_schema_utils.rb,
app/controllers/forest_liana/application_controller.rb,
app/serializers/forest_liana/stripe_card_serializer.rb,
app/controllers/forest_liana/associations_controller.rb,
app/deserializers/forest_liana/resource_deserializer.rb,
app/services/forest_liana/intercom_attributes_getter.rb,
app/services/forest_liana/stripe_subscription_getter.rb,
app/controllers/forest_liana/smart_actions_controller.rb,
app/services/forest_liana/mixpanel_last_events_getter.rb,
app/services/forest_liana/stripe_subscriptions_getter.rb,
app/controllers/forest_liana/authentication_controller.rb,
app/serializers/forest_liana/mixpanel_event_serializer.rb,
app/serializers/forest_liana/stripe_invoice_serializer.rb,
app/serializers/forest_liana/stripe_payment_serializer.rb,
app/services/forest_liana/intercom_conversation_getter.rb,
app/services/forest_liana/oidc_configuration_retriever.rb,
app/services/forest_liana/smart_action_field_validator.rb,
app/services/forest_liana/intercom_conversations_getter.rb,
app/services/forest_liana/operator_date_interval_parser.rb,
app/services/forest_liana/oidc_dynamic_client_registrator.rb,
app/serializers/forest_liana/intercom_attribute_serializer.rb,
app/serializers/forest_liana/stripe_bank_account_serializer.rb,
app/serializers/forest_liana/stripe_subscription_serializer.rb,
app/serializers/forest_liana/intercom_conversation_serializer.rb

Defined Under Namespace

Modules: AdapterHelper, ApplicationHelper, Collection, DecorationHelper, JsonPrinter, QueryHelper, SchemaHelper, UserSpace, Utils, WidgetsHelper Classes: ActionsController, ApimapSorter, ApimapsController, ApplicationController, AssociationsController, Authentication, AuthenticationController, AuthorizationGetter, Base64StringIO, BaseController, BaseGetter, BelongsToUpdater, Bootstrapper, ControllerFactory, DeviseController, Engine, FiltersParser, ForestApiRequester, HasManyAssociator, HasManyDissociator, HasManyGetter, InstallGenerator, IntegrationBaseGetter, IntercomAttributeSerializer, IntercomAttributesGetter, IntercomController, IntercomConversationGetter, IntercomConversationSerializer, IntercomConversationsGetter, IpWhitelist, IpWhitelistChecker, LeaderboardStatGetter, LineStatGetter, LiveQueryChecker, MixpanelController, MixpanelEvent, MixpanelEventSerializer, MixpanelLastEventsGetter, ObjectiveStatGetter, OidcClientManager, OidcConfigurationRetriever, OidcDynamicClientRegistrator, OperatorDateIntervalParser, PermissionsChecker, PermissionsFormatter, PermissionsGetter, PieStatGetter, QueryStatGetter, ResourceCreator, ResourceDeserializer, ResourceGetter, ResourceUpdater, ResourcesController, ResourcesGetter, Router, SchemaAdapter, SchemaFileUpdater, SchemaSerializer, SchemaUtils, ScopeManager, ScopesController, SearchQueryBuilder, SerializerFactory, SmartActionFieldValidator, SmartActionsController, StatGetter, StatSerializer, StatsController, StripeBankAccountSerializer, StripeBaseGetter, StripeCardSerializer, StripeController, StripeInvoiceGetter, StripeInvoiceSerializer, StripeInvoicesGetter, StripePaymentGetter, StripePaymentRefunder, StripePaymentSerializer, StripePaymentsGetter, StripeSourceGetter, StripeSourcesGetter, StripeSubscriptionGetter, StripeSubscriptionSerializer, StripeSubscriptionsGetter, Token, ValueStatGetter

Constant Summary collapse

VERSION =
"7.2.1"

Class Method Summary collapse

Class Method Details

.component_prefix(model) ⇒ Object



73
74
75
# File 'lib/forest_liana.rb', line 73

def self.component_prefix(model)
  self.name_for(model).classify
end

.config_dirObject



53
54
55
# File 'lib/forest_liana.rb', line 53

def self.config_dir
  Rails.root.join(@config_dir)
end

.config_dir=(config_dir) ⇒ Object



49
50
51
# File 'lib/forest_liana.rb', line 49

def self.config_dir=(config_dir)
  @config_dir = config_dir
end

.name_for(model) ⇒ Object



64
65
66
# File 'lib/forest_liana.rb', line 64

def self.name_for(model)
  self.names_overriden[model] || model.try(:name).gsub('::', '__')
end

.name_old_for(model) ⇒ Object

TODO: Remove once lianas prior to 2.0.0 are not supported anymore.



69
70
71
# File 'lib/forest_liana.rb', line 69

def self.name_old_for(model)
  self.names_old_overriden[model] || model.try(:table_name)
end

.schema_for_resource(resource) ⇒ Object



57
58
59
60
61
62
# File 'lib/forest_liana.rb', line 57

def self.schema_for_resource resource
  self.apimap.find do |collection|
    SchemaUtils.find_model_from_collection_name(collection.name)
      .try(:name) == resource.name
  end
end