Skip to content

Commit

Permalink
move install to rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Burton committed May 12, 2012
1 parent ffd021c commit d6077be
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ pkg
build.sh
README.html
build
software
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GEM

PLATFORMS
java
ruby

DEPENDENCIES
mvn:org.clojure:clojure (~> 1.3.0)
Expand Down
63 changes: 43 additions & 20 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,52 @@ require 'rubygems'
require 'rake'
require 'rubygems/package_task'
require 'rspec/core/rake_task'
load 'jrclj.gemspec'
begin
load 'jrclj.gemspec'
rescue
$stderr.puts "WARN: not running in jruby, will not be able to perform some tasks."
end

SPEC_FILES = FileList['spec/*_spec.rb']

task :default => :spec
# task :default => :spec
#
# desc "Run all specs"
# RSpec::Core::RakeTask.new('spec') do |t|
# $:.push "#{File.dirname(__FILE__)}/lib"
# Dir["#{File.dirname(__FILE__)}/deps/*.jar"].each do |jar|
# require jar
# end
# t.pattern = 'spec/*_spec.rb'
# end
#
# desc "Run rcov"
# RSpec::Core::RakeTask.new('rcov') do |t|
# t.pattern = 'spec/*_spec.rb'
# t.rcov = true
# t.rcov_opts = ['--exclude', 'spec']
# end
#
# #Rake::GemPackageTask.new($spec) do |t|
# Gem::PackageTask.new($spec) do |t|
# t.need_tar = true
# end

namespace :jruby do
desc "install jruby"
task :install do
url = "http://jruby.org.s3.amazonaws.com/downloads/1.6.7.2/jruby-bin-1.6.7.2.tar.gz"
unless File.exist? "software"
FileUtils.mkdir "software"
end
Dir.chdir("software") do
unless File.exist? File.basename(url)
system "wget", url
end

desc "Run all specs"
RSpec::Core::RakeTask.new('spec') do |t|
$:.push "#{File.dirname(__FILE__)}/lib"
Dir["#{File.dirname(__FILE__)}/deps/*.jar"].each do |jar|
require jar
unless File.exist? "jruby-1.6.7.2"
system "tar", "xzf", File.basename(url)
end
end
end
t.pattern = 'spec/*_spec.rb'
end

desc "Run rcov"
RSpec::Core::RakeTask.new('rcov') do |t|
t.pattern = 'spec/*_spec.rb'
t.rcov = true
t.rcov_opts = ['--exclude', 'spec']
end

#Rake::GemPackageTask.new($spec) do |t|
Gem::PackageTask.new($spec) do |t|
t.need_tar = true
end
5 changes: 0 additions & 5 deletions install-jruby.sh

This file was deleted.

2 changes: 1 addition & 1 deletion jrepl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env jruby
#!./software/jruby-1.6.7.2/bin/jruby
require 'rubygems'
require 'java'
# Set up gems listed in the Gemfile.
Expand Down

0 comments on commit d6077be

Please sign in to comment.