lib/repositories.rb in forj-0.0.19 vs lib/repositories.rb in forj-0.0.20
- old
+ new
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
+# encoding: UTF-8
# (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,14 +20,17 @@
require 'require_relative'
require_relative 'yaml_parse.rb'
include YamlParse
+#
+# Repositories module
+#
module Repositories
def clone_repo
- definitions = YamlParse.get_values('../lib/catalog.yaml')
+ definitions = YamlParse::get_values('../lib/catalog.yaml')
maestro_url = definitions['default']['maestro']
home = File.expand_path('~')
path = home + '/.hpcloud/'
@@ -36,10 +40,10 @@
FileUtils.rm_r path + 'maestro'
end
Git.clone(maestro_url, 'maestro', :path => path)
end
rescue
- puts 'Error while cloning the repo from %s' % [maestro_url]
+ puts format('Error while cloning the repo from %{maestro_url}', maestro_url: maestro_url)
puts 'If this error persist you could clone the repo manually in ~/.hpcloud/'
end
end
-end
\ No newline at end of file
+end