Rakefile in openstudio-extension-0.4.2 vs Rakefile in openstudio-extension-0.4.3
- old
+ new
@@ -43,14 +43,14 @@
desc 'Initialize a new gem'
task :init_new_gem do
puts 'Initializing a new extension gem'
print "\n Enter the name of the new gem directory (ex: openstudio-something-gem. Should end with '-gem'): "
- gem_name = STDIN.gets.chomp
+ gem_name = $stdin.gets.chomp
print "\n Enter the path (full or relative to this repo) where you want the new gem directory to be created: "
- dir_path = STDIN.gets.chomp
+ dir_path = $stdin.gets.chomp
# check if directory already exists at path, if so error
full_dir_name = dir_path + gem_name
if Dir.exist?(full_dir_name)
@@ -59,10 +59,10 @@
puts "CREATING dir #{full_dir_name}"
Dir.mkdir full_dir_name
end
# copy file structure
- FileUtils.cp('.gitignore', full_dir_name + '/.gitignore')
+ FileUtils.cp('.gitignore', "#{full_dir_name}/.gitignore")
FileUtils.cp_r(File.join(File.dirname(__FILE__), 'init_templates/template_gemfile.txt'), File.join(full_dir_name, 'Gemfile'))
FileUtils.cp_r(File.join(File.dirname(__FILE__), 'doc_templates'), full_dir_name)
Dir.mkdir File.join(full_dir_name, 'lib')
Dir.mkdir File.join(full_dir_name, 'lib/measures')