Class: CmisServer::Configuration
- Inherits:
-
Object
- Object
- CmisServer::Configuration
- Defined in:
- lib/cmis_server/configuration.rb
Instance Attribute Summary collapse
- #arguments_for_root_folder ⇒ Object
-
#connector_class ⇒ Object
Returns the value of attribute connector_class.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#default_page_size ⇒ Object
Returns the value of attribute default_page_size.
-
#http_basic_auth_procedure ⇒ Object
Returns the value of attribute http_basic_auth_procedure.
-
#optimizations ⇒ Object
Returns the value of attribute optimizations.
-
#repository_info ⇒ Object
Returns the value of attribute repository_info.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/cmis_server/configuration.rb', line 16 def initialize #defines default values @http_basic_auth_procedure = Proc.new do |user, password| puts "Set your identification procedure in the CmisServer gem configuration with key http_basic_auth_procedure." puts "example : config.http_basic_auth_procedure = Proc.new{|user,password| User.find_by(username: user)&.valid_password?(password)}" raise "http_basic_auth_procedure configuration not set" end @arguments_for_root_folder_lazy = Proc.new { { type: defined?(FolderType) ? FolderType.base : nil, properties:{ cmis_object_id: 'root_folder', cmis_name: "Espaces favoris", cmis_description: "Vos espaces favoris dans Core", cmis_last_modification_date: DateTime.now, cmis_creation_date: DateTime.now, cmis_created_by: 'Core System' } } } @default_page_size = 10 @debug=false @repository_info = {} @optimizations = {} @connector_class = 'CmisServer::Connectors::BaseConnector' end |
Instance Attribute Details
#arguments_for_root_folder ⇒ Object
12 13 14 |
# File 'lib/cmis_server/configuration.rb', line 12 def arguments_for_root_folder @arguments_for_root_folder || @arguments_for_root_folder_lazy&.call end |
#connector_class ⇒ Object
Returns the value of attribute connector_class.
10 11 12 |
# File 'lib/cmis_server/configuration.rb', line 10 def connector_class @connector_class end |
#debug ⇒ Object
Returns the value of attribute debug.
7 8 9 |
# File 'lib/cmis_server/configuration.rb', line 7 def debug @debug end |
#default_page_size ⇒ Object
Returns the value of attribute default_page_size.
6 7 8 |
# File 'lib/cmis_server/configuration.rb', line 6 def default_page_size @default_page_size end |
#http_basic_auth_procedure ⇒ Object
Returns the value of attribute http_basic_auth_procedure.
4 5 6 |
# File 'lib/cmis_server/configuration.rb', line 4 def http_basic_auth_procedure @http_basic_auth_procedure end |
#optimizations ⇒ Object
Returns the value of attribute optimizations.
9 10 11 |
# File 'lib/cmis_server/configuration.rb', line 9 def optimizations @optimizations end |
#repository_info ⇒ Object
Returns the value of attribute repository_info.
8 9 10 |
# File 'lib/cmis_server/configuration.rb', line 8 def repository_info @repository_info end |