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,
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/services/forest_liana/apimap_sorter.rb,
app/services/forest_liana/login_handler.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/permissions_checker.rb,
app/services/forest_liana/user_secret_creator.rb,
lib/generators/forest_liana/install_generator.rb,
app/controllers/forest_liana/devise_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/serializers/forest_liana/session_serializer.rb,
app/services/forest_liana/objective_stat_getter.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/controllers/forest_liana/sessions_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/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/services/forest_liana/mixpanel_last_events_getter.rb,
app/services/forest_liana/stripe_subscriptions_getter.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/intercom_conversations_getter.rb,
app/services/forest_liana/operator_date_interval_parser.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/services/forest_liana/two_factor_registration_confirmer.rb,
app/serializers/forest_liana/intercom_conversation_serializer.rb

Defined Under Namespace

Modules: AdapterHelper, ApplicationHelper, Collection, DecorationHelper, JsonPrinter, QueryHelper, SchemaHelper, UserSpace Classes: ActionsController, ApimapSorter, ApimapsController, ApplicationController, AssociationsController, 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, LoginHandler, MixpanelController, MixpanelEvent, MixpanelEventSerializer, MixpanelLastEventsGetter, ObjectiveStatGetter, OperatorDateIntervalParser, PermissionsChecker, PermissionsGetter, PieStatGetter, QueryStatGetter, ResourceCreator, ResourceDeserializer, ResourceGetter, ResourceUpdater, ResourcesController, ResourcesGetter, Router, SchemaAdapter, SchemaFileUpdater, SchemaSerializer, SchemaUtils, SearchQueryBuilder, SerializerFactory, SessionSerializer, SessionsController, StatGetter, StatSerializer, StatsController, StripeBankAccountSerializer, StripeBaseGetter, StripeCardSerializer, StripeController, StripeInvoiceGetter, StripeInvoiceSerializer, StripeInvoicesGetter, StripePaymentGetter, StripePaymentRefunder, StripePaymentSerializer, StripePaymentsGetter, StripeSourceGetter, StripeSourcesGetter, StripeSubscriptionGetter, StripeSubscriptionSerializer, StripeSubscriptionsGetter, TwoFactorRegistrationConfirmer, UserSecretCreator, ValueStatGetter

Constant Summary collapse

VERSION =
"4.1.2"

Class Method Summary collapse

Class Method Details

.component_prefix(model) ⇒ Object



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

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

.config_dirObject



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

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

.config_dir=(config_dir) ⇒ Object



45
46
47
# File 'lib/forest_liana.rb', line 45

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

.name_for(model) ⇒ Object



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

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.



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

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

.schema_for_resource(resource) ⇒ Object



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

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