Skip to content

Commit

Permalink
Updates from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Oct 31, 2017
1 parent 6ce6595 commit 8f3b1ae
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/lib/y2storage/autoinst_issues/invalid_value.rb
Expand Up @@ -49,7 +49,7 @@ def initialize(section, attr, new_value = :skip)
#
# @return [Integer,String,Symbol] Invalid value
def value
section.send(attr)
section.public_send(attr)
end

# Return problem severity
Expand Down
2 changes: 1 addition & 1 deletion src/lib/y2storage/autoinst_profile/drive_section.rb
Expand Up @@ -100,7 +100,7 @@ def self.attributes

# Constructor
#
# @param parent [Object] parent section
# @param parent [#parent,#section_name] parent section
def initialize(parent = nil)
@parent = parent
@partitions = []
Expand Down
2 changes: 1 addition & 1 deletion src/lib/y2storage/autoinst_profile/raid_options_section.rb
Expand Up @@ -58,7 +58,7 @@ def self.attributes
# @!attribute raid_name
# @return [String] undocumented attribute

# @param parent [Object] parent section
# @param parent [#parent,#section_name] parent section
def initialize(parent = nil)
@parent = parent
@device_order = []
Expand Down
8 changes: 4 additions & 4 deletions src/lib/y2storage/autoinst_profile/section_with_attributes.rb
Expand Up @@ -47,10 +47,10 @@ def attributes
# contain the relevant information. Attributes are set to nil for
# missing keys and for blank values.
#
# @param hash [Hash] content of the corresponding section of the profile.
# @param hash [Hash] content of the corresponding section of the profile.
# Each element of the hash corresponds to one of the attributes
# defined in the section.
# @param parent [Object] parent section
# @param parent [#parent,#section_name] parent section
# @return [SectionWithAttributes]
def new_from_hashes(hash, parent = nil)
result = new(parent)
Expand All @@ -71,7 +71,7 @@ def define_attr_accessors

# This value only makes sense when {.new_from_hashes} is used.
#
# @return [Object] Parent section
# @return [#parent,#section_name] Parent section
attr_reader :parent

# Constructor
Expand Down Expand Up @@ -122,7 +122,7 @@ def section_name
klass_name = self.class.name.split("::").last
klass_name
.gsub(/([a-z])([A-Z])/, "\\1_\\2").downcase
.gsub(/_section\z/, "")
.chomp("_section")
end

protected
Expand Down
8 changes: 4 additions & 4 deletions src/lib/y2storage/autoinst_profile/skip_list_section.rb
Expand Up @@ -63,8 +63,8 @@ class SkipListSection
class << self
# Creates a skip list from an AutoYaST profile
#
# @param profile_rules [Array<Hash>] List of profile skip rules
# @param parent [Object] Parent section
# @param profile_rules [Array<Hash>] List of profile skip rules
# @param parent [#parent,#section_name] Parent section
# @return [SkipList]
def new_from_hashes(profile_rules, parent = nil)
rules = profile_rules.map { |h| SkipRule.from_profile_rule(h) }
Expand All @@ -74,8 +74,8 @@ def new_from_hashes(profile_rules, parent = nil)

# Constructor
#
# @param rules [Array<SkipRule>] List of rules to apply
# @param parent [Object] parent section
# @param rules [Array<SkipRule>] List of rules to apply
# @param parent [#parent,#section_name] parent section
def initialize(rules, parent = nil)
@rules = rules
@parent = parent
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/y2storage/autoinst_profile/drive_section_test.rb
Expand Up @@ -21,7 +21,7 @@
# find current contact information at www.suse.com.

require_relative "../spec_helper"
require_relative "#{TEST_PATH}/support/autoinst_profile_examples"
require_relative "#{TEST_PATH}/support/autoinst_profile_sections_examples"
require "y2storage"

describe Y2Storage::AutoinstProfile::DriveSection do
Expand Down
2 changes: 1 addition & 1 deletion test/y2storage/autoinst_profile/partition_section_test.rb
Expand Up @@ -21,7 +21,7 @@
# find current contact information at www.suse.com.

require_relative "../spec_helper"
require_relative "#{TEST_PATH}/support/autoinst_profile_examples"
require_relative "#{TEST_PATH}/support/autoinst_profile_sections_examples"
require "y2storage"

describe Y2Storage::AutoinstProfile::PartitionSection do
Expand Down
Expand Up @@ -21,7 +21,7 @@
# find current contact information at www.suse.com.

require_relative "../spec_helper"
require_relative "#{TEST_PATH}/support/autoinst_profile_examples"
require_relative "#{TEST_PATH}/support/autoinst_profile_sections_examples"
require "y2storage"

describe Y2Storage::AutoinstProfile::RaidOptionsSection do
Expand Down
2 changes: 1 addition & 1 deletion test/y2storage/autoinst_profile/skip_list_section_test.rb
Expand Up @@ -20,7 +20,7 @@
# find current contact information at www.suse.com.

require_relative "../spec_helper"
require_relative "#{TEST_PATH}/support/autoinst_profile_examples"
require_relative "#{TEST_PATH}/support/autoinst_profile_sections_examples"
require "y2storage"

describe Y2Storage::AutoinstProfile::SkipListSection do
Expand Down

0 comments on commit 8f3b1ae

Please sign in to comment.