spec/applications/application_template_helper.rb
# copy all of the files and directories in spec/applications/universal into the new Rails application
copy all of the files and directories in spec/applications/universal into the new Rails application
copy all of the files and directories in spec / applications / universal into the new Rails application
def copy_universal
  Dir.glob(File.join(File.expand_path('../universal', __FILE__), '**', '*')) do |path|
    shortened_path = path.match(/universal\/(.+)/)[1]
    if File.directory?(path)
      run "mkdir -p #{app_dir}/#{shortened_path}"
    else
      run "cp #{path} #{app_dir}/#{shortened_path}"
    end
  end
end
def copy_universal Dir . glob ( File . join ( File . expand_path ( '../universal' , __FILE__ ) , '**' , '*' ) ) do | path | shortened_path = path . match ( / universal \/ (.+) / ) [ 1 ] if File . directory? ( path ) run "mkdir -p #{app_dir}/#{shortened_path}" else run "cp #{path} #{app_dir}/#{shortened_path}" end end end
copy all of the files and directories in spec/applications/universal into the new Rails application
copy all of the files and directories in spec / applications / universal into the new Rails application