spec/applications/application_template_helper.rb
# copy all of the files and directories in spec/applications/[app_name]/shared into the new Rails application
copy all of the files and directories in spec/applications/[app_name]/shared into the new Rails application
copy all of the files and directories in spec / applications / [ app_name ] / shared into the new Rails application
def copy_shared
  Dir.glob(File.join(app_dir, '..', 'shared', '**', '*')) do |path|
    shortened_path = path.match(/shared\/(.+)/)[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_shared Dir . glob ( File . join ( app_dir , '..' , 'shared' , '**' , '*' ) ) do | path | shortened_path = path . match ( / shared \/ (.+) / ) [ 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/[app_name]/shared into the new Rails application
copy all of the files and directories in spec / applications / [ app_name ] / shared into the new Rails application