Class: VagrantPlugins::VagrantNotifyForwarder::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::VagrantNotifyForwarder::Config
- Defined in:
- lib/vagrant-notify-forwarder/config.rb
Constant Summary collapse
- NOTIFY_FORWARDER_VERSION =
'v1.1.0'.freeze
- NOTIFY_FORWARDER_BASE_URL =
"https://github.com/christhomas/notify-forwarder/releases/download/#{NOTIFY_FORWARDER_VERSION}".freeze
- DEFAULT_BINARIES =
sha256 placeholders are replaced at gem-build time by the release workflow
{ [:linux, :x86_64] => [ "#{NOTIFY_FORWARDER_BASE_URL}/notify-forwarder-linux_x86_64", '8fe1b79e2673187319044595b485fded2fc79a8dc886e9d3616b6bbe15e398dc' ], [:linux, :arm64] => [ "#{NOTIFY_FORWARDER_BASE_URL}/notify-forwarder-linux_arm64", '5ee81f9bc7ed888351e78c6015a49e42847b5d29b87ed828721cbf2ce452f876' ], [:linux, :armv7l] => [ "#{NOTIFY_FORWARDER_BASE_URL}/notify-forwarder-linux_armv7l", '9ef5130e050cd47af29c7358e7bd63cffee185185ca32ec77597c0bfeb3d38a6' ], [:darwin, :x86_64] => [ "#{NOTIFY_FORWARDER_BASE_URL}/notify-forwarder-darwin_x86_64", '0160e13cad8b3b91c0d5dbfe7b2f013a1c0362538056aa69dcfd26596b96bddb' ], [:darwin, :arm64] => [ "#{NOTIFY_FORWARDER_BASE_URL}/notify-forwarder-darwin_arm64", '33dd00bf392c71e94238b2cfbf793f9ff2e987c37837634fabc1e04f242ef9a8' ], }.freeze
Instance Attribute Summary collapse
-
#binaries ⇒ Object
Returns the value of attribute binaries.
-
#enable ⇒ Object
Returns the value of attribute enable.
-
#port ⇒ Object
Returns the value of attribute port.
-
#run_as_root ⇒ Object
Returns the value of attribute run_as_root.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
36 37 38 39 40 41 |
# File 'lib/vagrant-notify-forwarder/config.rb', line 36 def initialize @port = UNSET_VALUE @enable = UNSET_VALUE @run_as_root = UNSET_VALUE @binaries = UNSET_VALUE end |
Instance Attribute Details
#binaries ⇒ Object
Returns the value of attribute binaries.
7 8 9 |
# File 'lib/vagrant-notify-forwarder/config.rb', line 7 def binaries @binaries end |
#enable ⇒ Object
Returns the value of attribute enable.
5 6 7 |
# File 'lib/vagrant-notify-forwarder/config.rb', line 5 def enable @enable end |
#port ⇒ Object
Returns the value of attribute port.
4 5 6 |
# File 'lib/vagrant-notify-forwarder/config.rb', line 4 def port @port end |
#run_as_root ⇒ Object
Returns the value of attribute run_as_root.
6 7 8 |
# File 'lib/vagrant-notify-forwarder/config.rb', line 6 def run_as_root @run_as_root end |
Instance Method Details
#finalize! ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/vagrant-notify-forwarder/config.rb', line 43 def finalize! @port = 29324 if @port == UNSET_VALUE @port = auto_correct_port(@port) @enable = true if @enable == UNSET_VALUE @run_as_root = true if @run_as_root == UNSET_VALUE @binaries = prepare_binaries(@binaries) end |