rakefile.rb in rhodes-2.4.1 vs rakefile.rb in rhodes-3.0.0.beta.1
- old
+ new
@@ -194,13 +194,14 @@
$app_path = $config["env"]["app"]
unless File.exists? $app_path
puts "Could not find rhodes application. Please verify your application setting in #{File.dirname(__FILE__)}/rhobuild.yml"
exit 1
end
- $app_config = Jake.config(File.open(File.join($app_path, "build.yml")))
-
end
+
+ $app_config = Jake.config(File.open(File.join($app_path, "build.yml")))
+
Jake.set_bbver($app_config["bbver"].to_s)
extpaths = []
extpaths << $app_config["paths"]["extensions"] if $app_config["paths"] and $app_config["paths"]["extensions"]
@@ -504,45 +505,15 @@
Dir.glob("**/CVS").each { |f| rm_rf f }
end
end
def create_manifest
- dir = File.join($srcdir, 'apps')
- #fname = "config.rb"
- fappManifest = File.new( File.join(dir,'app_manifest.txt'), "w")
- dir = File.join($srcdir, 'apps/app')
-
- Find.find(dir) do |path|
-
- strDir = File.dirname(path)
- next unless dir == File.dirname(strDir) #one level only
+ require File.dirname(__FILE__) + '/lib/framework/rhoappmanifest'
- if File.basename(path) == "config.rb"
- puts "******ERROR enumerating models***********"
- puts "Model definition has changed and doesn't use config.rb anymore: '#{path}' "
- puts "You should replace config.rb with <model_name>.rb file as described: "
- puts "http://wiki.rhomobile.com/index.php/Rhom#Rhom_Models"
- puts "*****************************************"
- exit 1
- end
+ fappManifest = Rho::AppManifest.enumerate_models(File.join($srcdir, 'apps/app'))
+ content = fappManifest.read();
- fname = File.dirname(path)
- fname = File.basename(fname)
- modelname = fname.split(/(?=[A-Z])/).map{|w| w.downcase}.join("_")
- fname = modelname + ".rb"
-
- if File.basename(path) == fname
-
- relPath = path[dir.length+1, File.dirname(path).length-1] #relative path
- relPath = relPath[0, relPath.length-3] #remove .rb extension and app
- relPath = File.join(File.dirname(relPath), modelname )
- fappManifest.puts( relPath )
-
- end
- end
-
- fappManifest.close()
-
+ File.open( File.join($srcdir,'apps/app_manifest.txt'), "w"){|file| file.write(content)}
end
def process_exclude_folders
excl = []