Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

ENV['MIRAH_HOME'] must be used before requiring mirah #15

Closed
wants to merge 3 commits into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 29 additions and 4 deletions.
  1. +19 −2 Rakefile
  2. +10 −2 lib/dubious/templates/base/Rakefile
View
21 Rakefile
@@ -7,6 +7,14 @@ rescue LoadError
exit 1
end
+
+neighbor_mirah = File.expand_path '../mirah'
+
+if File.exists?(neighbor_mirah)
+ ENV['MIRAH_HOME'] ||= neighbor_mirah
+end
+
+
MIRAH_HOME = ENV['MIRAH_HOME'] ? ENV['MIRAH_HOME'] : Gem.find_files('mirah').first.sub(/lib\/mirah.rb/,'')
if ENV['MIRAH_HOME'] && File.exist?(ENV['MIRAH_HOME'] +'/lib/mirah.rb')
@@ -55,11 +63,20 @@ file "#{OUTDIR}/dubious/ActionController.class" => ["#{OUTDIR}/dubious/Params.cl
"#{OUTDIR}/dubious/CustomRoutes.class",
]
-file "#{OUTDIR}/dubious/Inflections.class" => ["#{OUTDIR}/dubious/TextHelper.class",
- "#{OUTDIR}/dubious/Inflection.class"]
+file "#{OUTDIR}/dubious/Inflections.class" => [
+ "#{OUTDIR}/dubious/TextHelper.class",
+ "#{OUTDIR}/dubious/Inflection.class"
+ ]
+
+file "#{OUTDIR}/dubious/TextHelper.class" => [
+ "#{OUTDIR}/dubious/Inflection.class",
+ ]
+
+
file "#{OUTDIR}/dubious/FormHelper.class" => [
"#{OUTDIR}/dubious/Inflections.class",
"#{OUTDIR}/dubious/InstanceTag.class",
+ "#{OUTDIR}/dubious/Params.class",
"#{OUTDIR}/dubious/TimeConversion.class",
*STDLIB_CLASSES]
file "#{OUTDIR}/dubious/InstanceTag.class" => "#{OUTDIR}/dubious/SanitizeHelper.class"
View
12 lib/dubious/templates/base/Rakefile
@@ -5,13 +5,21 @@ rescue LoadError
exit 1
end
-require 'rake/clean'
-require 'mirah/appengine_tasks'
+
+neighbor_mirah = File.expand_path '../mirah'
+
+if File.exists?(neighbor_mirah)
+ ENV['MIRAH_HOME'] ||= neighbor_mirah
+end
if ENV['MIRAH_HOME'] && File.exist?(ENV['MIRAH_HOME'] +'/lib/mirah.rb')
$: << File.expand_path(ENV['MIRAH_HOME'] +'/lib')
end
+require 'rake/clean'
+require 'mirah/appengine_tasks'
+
+
if File.exist?('../bitescript/lib/bitescript.rb')
$: << File.expand_path('../bitescript/lib/')
end
Something went wrong with that request. Please try again.