Module: Labimotion

Defined in:
lib/labimotion.rb,
lib/labimotion/conf.rb,
lib/labimotion/version.rb,
lib/labimotion/utils/prop.rb,
lib/labimotion/utils/units.rb,
lib/labimotion/utils/utils.rb,
lib/labimotion/utils/search.rb,
lib/labimotion/libs/converter.rb,
lib/labimotion/models/dataset.rb,
lib/labimotion/models/element.rb,
lib/labimotion/models/hub_log.rb,
lib/labimotion/models/segment.rb,
lib/labimotion/libs/nmr_mapper.rb,
lib/labimotion/utils/con_state.rb,
lib/labimotion/apis/segment_api.rb,
lib/labimotion/utils/field_type.rb,
lib/labimotion/utils/serializer.rb,
lib/labimotion/collection/export.rb,
lib/labimotion/collection/import.rb,
lib/labimotion/libs/template_hub.rb,
lib/labimotion/apis/converter_api.rb,
lib/labimotion/utils/export_utils.rb,
lib/labimotion/utils/import_utils.rb,
lib/labimotion/libs/export_dataset.rb,
lib/labimotion/libs/export_element.rb,
lib/labimotion/models/dataset_klass.rb,
lib/labimotion/models/element_klass.rb,
lib/labimotion/models/segment_klass.rb,
lib/labimotion/helpers/param_helpers.rb,
lib/labimotion/apis/generic_klass_api.rb,
lib/labimotion/helpers/search_helpers.rb,
lib/labimotion/models/elements_sample.rb,
lib/labimotion/apis/labimotion_hub_api.rb,
lib/labimotion/entities/dataset_entity.rb,
lib/labimotion/entities/element_entity.rb,
lib/labimotion/entities/generic_entity.rb,
lib/labimotion/entities/segment_entity.rb,
lib/labimotion/helpers/dataset_helpers.rb,
lib/labimotion/helpers/element_helpers.rb,
lib/labimotion/helpers/generic_helpers.rb,
lib/labimotion/helpers/segment_helpers.rb,
lib/labimotion/libs/attachment_handler.rb,
lib/labimotion/libs/properties_handler.rb,
lib/labimotion/libs/sample_association.rb,
lib/labimotion/models/elements_element.rb,
lib/labimotion/apis/generic_dataset_api.rb,
lib/labimotion/apis/generic_element_api.rb,
lib/labimotion/models/concerns/workflow.rb,
lib/labimotion/models/datasets_revision.rb,
lib/labimotion/models/elements_revision.rb,
lib/labimotion/models/segments_revision.rb,
lib/labimotion/helpers/converter_helpers.rb,
lib/labimotion/entities/properties_entity.rb,
lib/labimotion/helpers/repository_helpers.rb,
lib/labimotion/models/collections_element.rb,
lib/labimotion/entities/application_entity.rb,
lib/labimotion/entities/eln_element_entity.rb,
lib/labimotion/models/concerns/datasetable.rb,
lib/labimotion/models/concerns/segmentable.rb,
lib/labimotion/entities/dataset_klass_entity.rb,
lib/labimotion/entities/element_klass_entity.rb,
lib/labimotion/entities/generic_klass_entity.rb,
lib/labimotion/entities/segment_klass_entity.rb,
lib/labimotion/entities/generic_public_entity.rb,
lib/labimotion/entities/klass_revision_entity.rb,
lib/labimotion/models/dataset_klasses_revision.rb,
lib/labimotion/models/element_klasses_revision.rb,
lib/labimotion/models/segment_klasses_revision.rb,
lib/labimotion/entities/element_revision_entity.rb,
lib/labimotion/entities/segment_revision_entity.rb,
lib/labimotion/models/concerns/generic_revisions.rb,
lib/labimotion/models/concerns/linked_properties.rb,
lib/labimotion/helpers/sample_association_helpers.rb,
lib/labimotion/models/concerns/attachment_converter.rb,
lib/labimotion/models/concerns/generic_klass_revisions.rb

Overview

GenericRevisions concern

Defined Under Namespace

Modules: AttachmentConverter, ConverterHelpers, DatasetHelpers, Datasetable, ElementHelpers, GenericHelpers, GenericKlassRevisions, GenericRevisions, LinkedProperties, ParamHelpers, RepositoryHelpers, SampleAssociationHelpers, SearchHelpers, SegmentHelpers, Segmentable, Workflow Classes: ApplicationEntity, AttachmentHandler, CollectionsElement, ConState, Converter, ConverterAPI, Dataset, DatasetEntity, DatasetKlass, DatasetKlassEntity, DatasetKlassesRevision, DatasetsRevision, Element, ElementEntity, ElementKlass, ElementKlassEntity, ElementKlassesRevision, ElementRevisionEntity, ElementsElement, ElementsRevision, ElementsSample, ElnElementEntity, Export, ExportDataset, ExportElement, ExportUtils, FieldType, GenericDatasetAPI, GenericElementAPI, GenericEntity, GenericKlassAPI, GenericKlassEntity, GenericPublicEntity, HubLog, Import, ImportUtils, KlassRevisionEntity, LabimotionHubAPI, NmrMapper, Prop, PropertiesEntity, PropertiesHandler, SampleAssociation, Search, Segment, SegmentAPI, SegmentEntity, SegmentKlass, SegmentKlassEntity, SegmentKlassesRevision, SegmentRevisionEntity, SegmentsRevision, Serializer, TemplateHub, Units, Utils

Constant Summary collapse

KLASSES_JSON =

Rails.root.join(‘app/packs/klasses.json’).to_s.freeze

Rails.root.join('public', 'klasses.json').to_s.freeze
VERSION =
'1.4.1'

Class Method Summary collapse

Class Method Details

.log_exception(exception, current_user = nil) ⇒ Object



11
12
13
14
# File 'lib/labimotion.rb', line 11

def self.log_exception(exception, current_user = nil)
  Labimotion.logger.error("version: #{Labimotion::VERSION}; (#{current_user&.id}) \n Exception: #{exception.message}")
  Labimotion.logger.error(exception.backtrace.join("\n"))
end

.loggerObject



7
8
9
# File 'lib/labimotion.rb', line 7

def self.logger
  @@labimotion_logger ||= Logger.new(Rails.root.join('log/labimotion.log')) # rubocop:disable Style/ClassVars
end