Class: SolrMakr::Commands::WriteYaml Private

Inherits:
Object
  • Object
show all
Includes:
Shared
Defined in:
lib/solr_makr/commands/write_yaml.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes included from Shared

#args, #core, #options, #solr_config

Instance Method Summary collapse

Methods included from Shared

#run!, #with_message

Instance Method Details

#build_config{String => {String => {String => Object}}}

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • ({String => {String => {String => Object}}})


17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/solr_makr/commands/write_yaml.rb', line 17

def build_config
  {
    options.env => {
      "solr" => {
        "hostname"  => solr_host,
        "port"      => solr_port,
        "log_level" => options.log_level,
        "path"      => "/solr/#{core.name}"
      }
    }
  }
end

#runObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
13
14
# File 'lib/solr_makr/commands/write_yaml.rb', line 8

def run
  options.default log_level: 'WARNING', env: 'production'

  config = build_config

  say config.to_yaml
end