Skip to content

Commit

Permalink
(CONT-935) Additional RuboCop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chelnak committed May 25, 2023
1 parent b9dfa0c commit 6584844
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/pdk/cli/exec/interactive_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module PDK
module CLI
module Exec
class InteractiveCommand < Command
# rubocop :disable Lint/MissingSuper
def initialize(*argv)
@argv = argv

Expand All @@ -13,6 +14,7 @@ def initialize(*argv)
# Extra environment vars to add to base set.
@environment = {}
end
# rubocop :enable Lint/MissingSuper

def register_spinner(_spinner, _opts = {})
raise 'This method is not implemented for PDK::CLI::Exec::InteractiveCommand'
Expand Down
2 changes: 1 addition & 1 deletion lib/pdk/config/namespace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def to_h
new_hash = {}
settings.each_pair { |k, v| new_hash[k] = v.value }
@mounts.each_pair { |k, mount_point| new_hash[k] = mount_point.to_h if mount_point.include_in_parent? }
new_hash.delete_if { |_, v| v.nil? }
new_hash.compact
new_hash
end

Expand Down
2 changes: 1 addition & 1 deletion lib/pdk/module/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def update!(data)
def to_json(*_args)
require 'json'

JSON.pretty_generate(@data.dup.delete_if { |_key, value| value.nil? })
JSON.pretty_generate(@data.dup.compact)
end

def write!(path)
Expand Down

0 comments on commit 6584844

Please sign in to comment.