opus-codium/puffy

View on GitHub

Showing 6 of 7 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

puppet.define_command do
name 'diff'
usage 'diff [options] <network>'
summary 'Show differences between network specification and firewall rules'
 
 
Severity: Minor
Found in lib/puffy/cli.rb and 1 other location - About 35 mins to fix
lib/puffy/cli.rb on lines 95..111

Similar blocks of code found in 2 locations. Consider refactoring.
Open

puppet.define_command do
name 'generate'
usage 'generate [options] <network>'
summary 'Generate network firewall rules according to network specification'
 
 
Severity: Minor
Found in lib/puffy/cli.rb and 1 other location - About 35 mins to fix
lib/puffy/cli.rb on lines 76..91

Identical blocks of code found in 2 locations. Consider refactoring.
Open

if value.respond_to?(:expand)
value.expand.each do |v|
@expand_res += orig.map { |hash| hash.merge(key => v) }
end
else
Severity: Minor
Found in lib/core_ext.rb and 1 other location - About 30 mins to fix
lib/core_ext.rb on lines 49..55

Identical blocks of code found in 2 locations. Consider refactoring.
Open

if value.respond_to?(:expand)
value.expand.each do |v|
@expand_res += orig.map { |hash| hash.merge(key => v) }
end
else
Severity: Minor
Found in lib/core_ext.rb and 1 other location - About 30 mins to fix
lib/core_ext.rb on lines 35..41

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module Formatters
module Iptables6 # :nodoc:
# IPv6 Iptables implementation of a Puffy Ruleset formatter.
class Ruleset < Puffy::Formatters::Iptables::Ruleset # :nodoc:
# Return an IPv6 Iptables String representation of the provided +rules+ Puffy::Rule with the +policy+ policy.
Severity: Minor
Found in lib/puffy/formatters/iptables6.rb and 1 other location - About 20 mins to fix
lib/puffy/formatters/iptables4.rb on lines 4..20

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module Formatters
module Iptables4 # :nodoc:
# IPv4 Iptables implementation of a Puffy Ruleset formatter.
class Ruleset < Puffy::Formatters::Iptables::Ruleset # :nodoc:
# Return an IPv4 Iptables String representation of the provided +rules+ Puffy::Rule with the +policy+ policy.
Severity: Minor
Found in lib/puffy/formatters/iptables4.rb and 1 other location - About 20 mins to fix
lib/puffy/formatters/iptables6.rb on lines 4..20
Severity
Category
Status
Source
Language