Skip to content

Commit

Permalink
Rename ConfigReader::Wicked to ConfigReader::Sysconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs authored and mchf committed Mar 21, 2019
1 parent 57a5495 commit ba952ee
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/lib/y2network/config.rb
Expand Up @@ -23,15 +23,15 @@ module Y2Network
# routes, etc.
#
# @example Reading from wicked
# config = Y2Network::Config.from(:wicked)
# config = Y2Network::Config.from(:sysconfig)
# config.interfaces.map(&:name) #=> ["lo", eth0", "wlan0"]
class Config
# @return [Array<Interface>]
attr_reader :interfaces

# @param source [Symbol] Source to read the configuration from
class << self
def from(source = :wicked)
def from(source)
builder = ConfigReader.for(source)
builder.network_config
end
Expand Down
Expand Up @@ -23,7 +23,7 @@
module Y2Network
module ConfigReader
# This class reads the current configuration from the system
class Wicked
class Sysconfig
# @return [Y2Network::Config] Network configuration
def config
Yast::NetworkInterfaces.Read
Expand Down
Expand Up @@ -17,9 +17,9 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.
require_relative "../../test_helper"
require "y2network/config_reader/wicked"
require "y2network/config_reader/sysconfig"

describe Y2Network::ConfigReader::Wicked do
describe Y2Network::ConfigReader::Sysconfig do
subject(:reader) { described_class.new }

let(:network_interfaces) do
Expand Down
4 changes: 2 additions & 2 deletions test/y2network/config_reader_test.rb
Expand Up @@ -22,8 +22,8 @@
describe Y2Network::ConfigReader do
describe ".for" do
it "returns the reader for the given source" do
reader = Y2Network::ConfigReader.for(:wicked)
expect(reader).to be_a(Y2Network::ConfigReader::Wicked)
reader = Y2Network::ConfigReader.for(:sysconfig)
expect(reader).to be_a(Y2Network::ConfigReader::Sysconfig)
end
end
end

0 comments on commit ba952ee

Please sign in to comment.