-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from clajiness/v0.8
V0.8
- Loading branch information
Showing
11 changed files
with
96 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'faraday', '~> 2.12', '>= 2.12.2' | ||
gem 'json', '~> 2.9', '>= 2.9.1' | ||
gem 'logger', '~> 1.6', '>= 1.6.4' | ||
gem 'open3', '~> 0.2.1' | ||
gem 'rubocop', '~> 1.69', '>= 1.69.2', require: false | ||
gem 'uri', '~> 1.0', '>= 1.0.2' | ||
gem 'yaml', '~> 0.4.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module Service | ||
# the Helpers class provides methods for setting environment variables and the script version | ||
class Helpers | ||
def initialize | ||
@env_variables = env_variables | ||
@version = version | ||
end | ||
|
||
def env_variables # rubocop:disable Metrics/MethodLength | ||
{ | ||
loop_freq: ENV['LOOP_FREQ'] || 45, | ||
proton_gateway: ENV['PROTON_GATEWAY'], | ||
opnsense_interface_addr: ENV['OPN_INTERFACE_ADDR'], | ||
opnsense_api_key: ENV['OPN_API_KEY'], | ||
opnsense_api_secret: ENV['OPN_API_SECRET'], | ||
opnsense_alias_name: ENV['OPN_PROTON_ALIAS_NAME'], | ||
qbit_skip: ENV['QBIT_SKIP'], | ||
qbit_addr: ENV['QBIT_ADDR'], | ||
qbit_user: ENV['QBIT_USER'], | ||
qbit_pass: ENV['QBIT_PASS'] | ||
} | ||
end | ||
|
||
def version | ||
return unless File.exist?('version.yml') | ||
|
||
YAML.safe_load(File.read('version.yml'))['version'] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
version: 0.7.0 | ||
version: 0.8.0 |