Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

got everything working properly except rake server,

which does not recognize whether something needs to be recompiled or not correctly anymore(this is a regression, because it use to work.
  • Loading branch information...
commit 32feb420e18a542905ea68073df1c3640fb1fef5 1 parent ce3801e
@baroquebobcat baroquebobcat authored
View
7 Gemfile
@@ -1,3 +1,8 @@
source :gemcutter
-gemspec
+gemspec
+
+#gem 'mirah', '0.0.6', :path => '../mirah'#, :git => 'git://github.com/mirah/mirah.git'
+gem 'mirah_model', "0.0.1", :path => '../mirah_model'
+
+gem 'rake'
View
1  README.rdoc
@@ -53,6 +53,7 @@ http://code.google.com/appengine/docs/java/configyaml/appconfig_yaml.html
mkdir -p ~/mystuff; cd ~/mystuff
git clone http://github.com/headius/bitescript.git
git clone http://github.com/mirah/mirah.git
+ git clone http://github.com/mirah/mirah_model.git
git clone http://github.com/mirah/dubious.git
* Then build and install the gems for Mirah, Bitescript and Dubious
View
16 Rakefile
@@ -16,15 +16,13 @@ Gem::PackageTask.new Gem::Specification.load('dubious.gemspec') do |pkg|
pkg.need_tar = true
end
-task :gem => :jar
-
require 'dubious_tasks'
OUTDIR = File.expand_path 'build'
SRCDIR = File.expand_path 'src'
CLEAN.include(OUTDIR)
-CLOBBER.include("lib/dubious.jar")
+CLOBBER.include("lib/dubious.jar", "javalib/mirahdatastore.jar")
def class_files_for files
files.map do |f|
@@ -35,7 +33,6 @@ def class_files_for files
end
end
-#MODEL_JAR = "#{OUTDIR}/dubydatastore.jar"
LIB_MIRAH_SRC = Dir["src/**/*{.duby,.mirah}"]
LIB_JAVA_SRC = Dir["src/**/*.java"]
@@ -87,6 +84,13 @@ task :compile => LIB_CLASSES
desc "compiles jar for gemification"
task :jar => "lib/dubious.jar"
+desc "pull dependencies"
+task :dependencies => 'javalib/mirahdatastore.jar'
+
+file 'javalib/mirahdatastore.jar' do
+ cp Gem.find_files('mirahdatastore.jar'), 'javalib/'
+end
+
namespace :compile do
task :dubious => "lib/dubious.jar"
task :java => OUTDIR do
@@ -100,7 +104,7 @@ end
directory OUTDIR
(LIB_CLASSES).zip(LIB_SRC).each do |klass,src|
- file klass => src
+ file klass => [:dependencies, src]
end
task :generate_build_properties do
@@ -118,7 +122,7 @@ task :generate_build_properties do
dubious_data = git_data(".")
mirah_data = git_data(MIRAH_HOME)
bite_data = git_data(MIRAH_HOME + '/../bitescript')
- model_data = git_data(File.dirname(MODEL_SRC_JAR),File.basename(MODEL_SRC_JAR))
+ model_data = git_data(File.dirname(Gem.find_files('mirahdatastore.jar')),'mirahdatastore.jar')
prop_file = "config/build.properties"
File.open(prop_file, 'w') do |f|
View
8 dubious.gemspec
@@ -12,7 +12,10 @@ Gem::Specification.new do |s|
s.date = Time.now.strftime("YYYY-MM-DD")
s.description = %q{Dubious is a web framework written in Mirah.}
s.executables = ["dubious"]
- s.files = Dir["{bin,lib,test,examples,javalib}/**/*","{*.txt,Rakefile}"]
+ s.files = Dir["{bin,lib,test,examples,javalib}/**/*","{*.txt,Rakefile}"] + [
+ 'lib/dubious.jar',
+ 'javalib/mirahdatastore.jar'
+ ]
s.homepage = %q{http://github.com/mirah/dubious/}
s.extra_rdoc_files = ["LICENSE", "ROADMAP.rdoc", "README.rdoc"]
s.rdoc_options = ["--main", "README.rdoc"]
@@ -22,6 +25,7 @@ Gem::Specification.new do |s|
s.add_dependency("thor","0.13.8")
s.add_dependency("activesupport")
s.add_dependency("i18n")
- s.add_dependency("mirah", "0.0.5")
+ s.add_dependency("mirah", "0.0.5")
+ s.add_dependency("mirah_model", "0.0.1")
s.add_dependency("appengine-sdk", "~> 1.4.0")
end
View
2  examples/contacts/Rakefile
@@ -26,7 +26,7 @@ def class_files_for files
end
end
-MODEL_JAR = "WEB-INF/lib/dubydatastore.jar"
+MODEL_JAR = "WEB-INF/lib/mirahdatastore.jar"
LIB_MIRAH_SRC = Dir["lib/**/*.{duby,mirah}"]
LIB_JAVA_SRC = Dir["lib/**/*.java"]
View
2  examples/shout/Rakefile
@@ -14,7 +14,7 @@ mirah_compile_options :dest_path => OUTDIR,
:source_paths => '.',
:compiler_options => ['--classpath', [File.expand_path(OUTDIR), *FileList["WEB-INF/lib/*.jar"].map{|f|File.expand_path(f)}].join(':') + ':' + CLASSPATH]
-MODEL_JAR = "WEB-INF/lib/dubydatastore.jar"
+MODEL_JAR = "WEB-INF/lib/mirahdatastore.jar"
CLEAN.include(OUTDIR)
CLOBBER.include("WEB-INF/lib/dubious.jar", 'WEB-INF/appengine-generated')
View
BIN  javalib/dubydatastore.jar
Binary file not shown
View
4 lib/dubious/cli/init.rb
@@ -26,8 +26,8 @@ def cp_dubious_jar
copy_file '../../../dubious.jar', "#{name}/WEB-INF/lib/dubious.jar"
end
- def cp_dubydatastore_jar
- copy_file '../../../../javalib/dubydatastore.jar', "#{name}/WEB-INF/lib/dubydatastore.jar"
+ def cp_mirahdatastore_jar
+ copy_file '../../../../javalib/mirahdatastore.jar', "#{name}/WEB-INF/lib/mirahdatastore.jar"
end
end
View
6 lib/dubious/templates/base/Rakefile
@@ -10,7 +10,7 @@ require 'dubious_tasks'
OUTDIR = 'WEB-INF/classes'
CLEAN.include(OUTDIR)
-CLOBBER.include("WEB-INF/lib/dubious.jar", 'WEB-INF/appengine-generated')
+CLOBBER.include('WEB-INF/appengine-generated')
mirah_compile_options :dest_path => OUTDIR,
@@ -26,7 +26,7 @@ def class_files_for files
end
end
-MODEL_JAR = "WEB-INF/lib/dubydatastore.jar"
+MODEL_JAR = "WEB-INF/lib/mirahdatastore.jar"
LIB_MIRAH_SRC = Dir["lib/**/*.{duby,mirah}"]
LIB_JAVA_SRC = Dir["lib/**/*.java"]
@@ -63,7 +63,7 @@ file MODEL_JAR => MODEL_SRC_JAR do |t|
cp MODEL_SRC_JAR, MODEL_JAR
end
-appengine_app :app, 'app', '' => APP_CLASSES+LIB_CLASSES
+appengine_app :app, '', '.' => APP_CLASSES+LIB_CLASSES
namespace :compile do
task :app => APP_CLASSES
View
19 lib/dubious_tasks.rb
@@ -82,6 +82,7 @@ def update
timestamp = app_yaml_timestamp
@last_app_yaml_timestamp ||= timestamp
updated = false
+ names = real_prerequisites.select {|r|r.needed?}.map &:name
real_prerequisites.each do |dep|
if dep.needed?
puts "Executing #{dep.name}"
@@ -129,15 +130,10 @@ def webinf_lib_jars
end
end
-def appengine_app(*args, &block)
- deps = []
- if args[-1].kind_of?(Hash)
- hash = args.pop
- arg = hash.keys[0]
- deps = hash[arg]
- args << arg
- end
- name, src, war = args
+def appengine_app(name,src,hash={}, &block)
+ war = hash.keys.first
+ deps = hash[war] || []
+
task = AppEngine::Rake::AppEngineTask.define_task(name => deps, &block)
src = File.expand_path(src || 'src')
war = File.expand_path(war || 'war')
@@ -189,10 +185,9 @@ def mirahc *files
CLASSPATH = [SERVLET_JAR, AppEngine::SDK::API_JAR].join(":")
-MIRAH_HOME = ENV['MIRAH_HOME'] ? ENV['MIRAH_HOME'] : Gem.find_files('mirah').first.sub(/lib\/mirah.rb/,'')
+MODEL_SRC_JAR = File.dirname(Gem.find_files('dubious.rb').first) + '/../javalib/mirahdatastore.jar'
-MODEL_SRC_JAR = File.join(MIRAH_HOME, 'examples', 'appengine', 'war',
- 'WEB-INF', 'lib', 'dubydatastore.jar')
+MIRAH_HOME = ENV['MIRAH_HOME'] ? ENV['MIRAH_HOME'] : Gem.find_files('mirah').first.sub(/lib\/mirah.rb/,'')
task :publish => :upload
View
2  spec/spec_helper.rb
@@ -5,7 +5,7 @@
require AppEngine::SDK::SDK_ROOT + '/lib/shared/geronimo-servlet_2.5_spec-1.2.jar'
require File.dirname(__FILE__)+'/../lib/dubious.jar'
-require File.dirname(__FILE__)+'/../javalib/dubydatastore.jar'
+require File.dirname(__FILE__)+'/../javalib/mirahdatastore.jar'
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletRequest
View
2  src/dubious/action_controller.mirah
@@ -1,4 +1,4 @@
-import com.google.appengine.ext.duby.db.Model
+import com.google.appengine.ext.mirah.db.Model
import javax.servlet.ServletConfig
import javax.servlet.http.*
import java.util.regex.Pattern
View
2  src/dubious/form_helper.mirah
@@ -1,4 +1,4 @@
-import com.google.appengine.ext.duby.db.Model
+import com.google.appengine.ext.mirah.db.Model
import dubious.TimeConversion
import dubious.InstanceTag
import java.util.HashMap
Please sign in to comment.
Something went wrong with that request. Please try again.