lib/kameleon/utils.rb in kameleon-builder-2.5.0 vs lib/kameleon/utils.rb in kameleon-builder-2.6.0
- old
+ new
@@ -75,14 +75,14 @@
Kameleon.env.root_dir = repository_path
catch_exception = kwargs.fetch(:catch_exception, true)
recipes_hash = []
recipes_files = get_recipes(repository_path)
recipes_files.each do |f|
- path = f.to_path
+ path = f.to_s
begin
recipe = RecipeTemplate.new(path)
- name = path.gsub(repository_path.to_path + '/', '').chomp('.yaml')
+ name = path.gsub(repository_path.to_s + '/', '').chomp('.yaml')
recipes_hash.push({
"name" => name,
"description" => recipe.metainfo['description'],
})
rescue => e
@@ -102,10 +102,10 @@
def self.get_recipes(path)
path.children.collect do |child|
if child.file?
if child.extname == ".yaml"
- unless child.to_path.include? "/steps/" or child.to_path.include? "/.steps/"
+ unless child.to_s.include? "/steps/" or child.to_s.include? "/.steps/"
child
end
end
elsif child.directory?
get_recipes(child)