lib/system_description_store.rb in machinery-tool-1.22.1 vs lib/system_description_store.rb in machinery-tool-1.22.2

- old
+ new

@@ -19,11 +19,11 @@ # directory where the system description is stored. It provides methods to # create, delete, and copy descriptions within the top-level directory. # # System descriptions are represented by sub directories of this top-level # directory. They are handled by the SystemDescription class. -class SystemDescriptionStore +class Machinery::SystemDescriptionStore attr_reader :base_path def default_path Machinery::DEFAULT_CONFIG_DIR end @@ -56,49 +56,49 @@ }.sort end def remove(name) unless name.empty? - SystemDescription.validate_name(name) + Machinery::SystemDescription.validate_name(name) FileUtils.rm_rf(description_path(name)) else raise "The system description has no name specified and thus can't be deleted." end end def copy(from, to) - SystemDescription.validate_name(from) - SystemDescription.validate_name(to) + Machinery::SystemDescription.validate_name(from) + Machinery::SystemDescription.validate_name(to) validate_existence_of_description(from) validate_nonexistence_of_description(to) FileUtils.cp_r(description_path(from), description_path(to)) end def move(from, to) - SystemDescription.validate_name(from) - SystemDescription.validate_name(to) + Machinery::SystemDescription.validate_name(from) + Machinery::SystemDescription.validate_name(to) validate_existence_of_description(from) validate_nonexistence_of_description(to) FileUtils.mv(description_path(from), description_path(to)) end def backup(description_name) - SystemDescription.validate_name(description_name) + Machinery::SystemDescription.validate_name(description_name) validate_existence_of_description(description_name) backup_name = get_backup_name(description_name) FileUtils.cp_r(description_path(description_name), description_path(backup_name)) backup_name end def rename(from, to) - SystemDescription.validate_name(from) - SystemDescription.validate_name(to) + Machinery::SystemDescription.validate_name(from) + Machinery::SystemDescription.validate_name(to) validate_existence_of_description(from) validate_nonexistence_of_description(to) FileUtils.mv(description_path(from), description_path(to))