Merge pull request #107 from clowder/order-options-dig
Avoid `[ActiveSupport::OrderedOptions#dig]`
This commit is contained in:
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -8,12 +8,15 @@ jobs:
|
|||||||
- "2.7"
|
- "2.7"
|
||||||
- "3.1"
|
- "3.1"
|
||||||
- "3.2"
|
- "3.2"
|
||||||
|
gemfile:
|
||||||
|
- Gemfile
|
||||||
|
- gemfiles/rails_edge.gemfile
|
||||||
continue-on-error: [false]
|
continue-on-error: [false]
|
||||||
|
|
||||||
name: ${{ format('Tests (Ruby {0})', matrix.ruby-version) }}
|
name: ${{ format('Tests (Ruby {0})', matrix.ruby-version) }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: ${{ matrix.continue-on-error }}
|
continue-on-error: ${{ matrix.continue-on-error }}
|
||||||
|
env:
|
||||||
|
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
.byebug_history
|
.byebug_history
|
||||||
*.gem
|
*.gem
|
||||||
coverage/*
|
coverage/*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
gemfiles/*.lock
|
||||||
|
|||||||
4
Gemfile
4
Gemfile
@@ -2,7 +2,3 @@ source 'https://rubygems.org'
|
|||||||
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
||||||
|
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
gem "debug"
|
|
||||||
gem "mocha"
|
|
||||||
gem "railties"
|
|
||||||
|
|||||||
9
gemfiles/rails_edge.gemfile
Normal file
9
gemfiles/rails_edge.gemfile
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
source 'https://rubygems.org'
|
||||||
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
||||||
|
|
||||||
|
git "https://github.com/rails/rails.git" do
|
||||||
|
gem "railties"
|
||||||
|
gem "activesupport"
|
||||||
|
end
|
||||||
|
|
||||||
|
gemspec path: "../"
|
||||||
@@ -55,7 +55,7 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
|
|||||||
|
|
||||||
private
|
private
|
||||||
def cmd_option_args
|
def cmd_option_args
|
||||||
if args = config.raw_config.dig(:traefik, "args")
|
if args = config.traefik["args"]
|
||||||
optionize args
|
optionize args
|
||||||
else
|
else
|
||||||
[]
|
[]
|
||||||
@@ -63,6 +63,6 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def host_port
|
def host_port
|
||||||
config.raw_config.dig(:traefik, "host_port") || CONTAINER_PORT
|
config.traefik["host_port"] || CONTAINER_PORT
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -165,6 +165,9 @@ class Mrsk::Configuration
|
|||||||
}.compact
|
}.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def traefik
|
||||||
|
raw_config.traefik || {}
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
# Will raise ArgumentError if any required config keys are missing
|
# Will raise ArgumentError if any required config keys are missing
|
||||||
|
|||||||
@@ -19,4 +19,8 @@ Gem::Specification.new do |spec|
|
|||||||
spec.add_dependency "zeitwerk", "~> 2.5"
|
spec.add_dependency "zeitwerk", "~> 2.5"
|
||||||
spec.add_dependency "ed25519", "~> 1.2"
|
spec.add_dependency "ed25519", "~> 1.2"
|
||||||
spec.add_dependency "bcrypt_pbkdf", "~> 1.0"
|
spec.add_dependency "bcrypt_pbkdf", "~> 1.0"
|
||||||
|
|
||||||
|
spec.add_development_dependency "debug"
|
||||||
|
spec.add_development_dependency "mocha"
|
||||||
|
spec.add_development_dependency "railties"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user