Class: Puma::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/puma/acme/dsl.rb

Overview

Extend the ::Puma::DSL module with the configuration options we want

Instance Method Summary collapse

Instance Method Details

#acme_algorithm(algo = nil) ⇒ Object



6
7
8
9
# File 'lib/puma/acme/dsl.rb', line 6

def acme_algorithm(algo = nil)
  @options[:acme_algorithm] = algo if algo
  @options[:acme_algorithm]
end

#acme_cache(cache = nil) ⇒ Object



11
12
13
14
# File 'lib/puma/acme/dsl.rb', line 11

def acme_cache(cache = nil)
  @options[:acme_cache] = cache if cache
  @options[:acme_cache]
end

#acme_cache_dir(dir = nil) ⇒ Object



16
17
18
19
# File 'lib/puma/acme/dsl.rb', line 16

def acme_cache_dir(dir = nil)
  @options[:acme_cache_dir] = dir if dir
  @options[:acme_cache_dir]
end

#acme_contact(contact = nil) ⇒ Object



21
22
23
24
# File 'lib/puma/acme/dsl.rb', line 21

def acme_contact(contact = nil)
  @options[:acme_contact] = contact if contact
  @options[:acme_contact]
end

#acme_directory(url = nil) ⇒ Object



26
27
28
29
# File 'lib/puma/acme/dsl.rb', line 26

def acme_directory(url = nil)
  @options[:acme_directory] = url if url
  @options[:acme_directory]
end

#acme_eab_hmac_key(hmac_key = nil) ⇒ Object



36
37
38
39
# File 'lib/puma/acme/dsl.rb', line 36

def acme_eab_hmac_key(hmac_key = nil)
  @options[:acme_eab_hmac_key] = hmac_key if hmac_key
  @options[:acme_eab_hmac_key]
end

#acme_eab_kid(kid = nil) ⇒ Object



31
32
33
34
# File 'lib/puma/acme/dsl.rb', line 31

def acme_eab_kid(kid = nil)
  @options[:acme_eab_kid] = kid if kid
  @options[:acme_eab_kid]
end

#acme_mode(mode = nil) ⇒ Object



41
42
43
44
# File 'lib/puma/acme/dsl.rb', line 41

def acme_mode(mode = nil)
  @options[:acme_mode] = mode if mode
  @options[:acme_mode]
end

#acme_poll_interval(interval = nil) ⇒ Object



46
47
48
49
# File 'lib/puma/acme/dsl.rb', line 46

def acme_poll_interval(interval = nil)
  @options[:acme_poll_interval] = interval if interval
  @options[:acme_poll_interval]
end

#acme_renew_at(duration = nil) ⇒ Object



51
52
53
54
# File 'lib/puma/acme/dsl.rb', line 51

def acme_renew_at(duration = nil)
  @options[:acme_renew_at] = duration if duration
  @options[:acme_renew_at]
end

#acme_renew_interval(duration = nil) ⇒ Object



56
57
58
59
# File 'lib/puma/acme/dsl.rb', line 56

def acme_renew_interval(duration = nil)
  @options[:acme_renew_interval] = duration if duration
  @options[:acme_renew_interval]
end

#acme_server_name(name) ⇒ Object



61
62
63
# File 'lib/puma/acme/dsl.rb', line 61

def acme_server_name(name)
  (@options[:acme_server_names] ||= []) << name
end

#acme_server_names(*names) ⇒ Object



65
66
67
68
# File 'lib/puma/acme/dsl.rb', line 65

def acme_server_names(*names)
  (@options[:acme_server_names] ||= []).unshift(*names)
  @options[:acme_server_names]
end

#acme_tos_agreed(agreed) ⇒ Object



70
71
72
73
# File 'lib/puma/acme/dsl.rb', line 70

def acme_tos_agreed(agreed)
  (@options[:acme_tos_agreed] = agreed) unless agreed.nil?
  @options[:acme_to_agreed]
end