Method: Macker::Config#initialize

Defined in:
lib/macker/config.rb

#initializeOpenStruct

Initialization with default configuration.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/macker/config.rb', line 8

def initialize
  @config = OpenStruct.new(
    # Full URL of OUI text file
    oui_full_url:    'http://standards-oui.ieee.org/oui.txt',
    # A common user agent
    user_agent:      'Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0',
    # Will expire the vendors in one day
    ttl_in_seconds:  86_400,
    # Can be a string, pathname or proc
    cache:           File.expand_path(File.dirname(__FILE__) + '/../../data/oui_*.txt'),
    # Expiration can be checked manually
    auto_expire:     true,
    # Stale can be checked manually
    auto_stale:      true
  )
end