Rakefile in mongodb_logger-0.3.3-jruby vs Rakefile in mongodb_logger-0.4.0
- old
+ new
@@ -1,47 +1,18 @@
#!/usr/bin/env rake
+require 'rubygems'
+require 'bundler'
+
+Bundler.require
require 'rake'
require 'rake/testtask'
-begin
- require 'cucumber/rake/task'
-rescue LoadError
- $stderr.puts "Please install cucumber: `gem install cucumber`"
- exit 1
-end
+require 'cucumber'
+require 'cucumber/rake/task'
-#require "bundler/gem_tasks"
-require 'bundler/gem_helper'
-Bundler::GemHelper.install_tasks(:name => 'mongodb_logger')
-Bundler::GemHelper.install_tasks(:name => 'mongodb_logger.java')
+require "bundler/gem_tasks"
#########################################
-### Help tasks
-#########################################
-
-require 'coffee-script'
-require 'uglifier'
-namespace :js do
- desc "compile coffee-scripts from ./lib/mongodb_logger/server/coffee to ./lib/mongodb_logger/server/public/javascripts"
- task :compile do
- source = "#{File.dirname(__FILE__)}/lib/mongodb_logger/server/coffee/"
- javascripts = "#{File.dirname(__FILE__)}/lib/mongodb_logger/server/public/javascripts/"
-
- Dir.foreach(source) do |cf|
- unless cf == '.' || cf == '..'
- js_compiled = CoffeeScript.compile File.read("#{source}#{cf}")
- js = Uglifier.compile js_compiled
- open "#{javascripts}#{cf.gsub('.coffee', '.js')}", 'w' do |f|
- f.puts js
- end
- end
- end
-
- puts "All done."
- end
-end
-
-#########################################
### TESTS
#########################################
desc 'Default: run unit tests.'
task :default => [:test]
@@ -75,20 +46,20 @@
LOCAL_GEM_ROOT = File.join(GEM_ROOT, 'tmp', 'local_gems').freeze
if ENV['CI']
# for ci testing only major rails versions
if 'java' == RUBY_PLATFORM
- RAILS_VERSIONS = ['3.1.6', '3.2.7']
+ RAILS_VERSIONS = ['3.1.6', '3.2.9']
else
- RAILS_VERSIONS = ['3.1.6', '3.2.7']
+ RAILS_VERSIONS = ['3.1.6', '3.2.9']
end
else
RAILS_VERSIONS = IO.read('SUPPORTED_RAILS_VERSIONS').strip.split("\n")
end
-LOCAL_GEMS = [['sqlite3', nil], ['shoulda', nil], ["rspec", nil], ["mocha", nil], ["cucumber", nil], ["bundler", "1.0.21"]] +
- RAILS_VERSIONS.collect { |version| ['rails', version] }
+LOCAL_GEMS = [['sqlite3', nil], ['shoulda', nil], ["rspec", nil], ["mocha", nil], ["cucumber", nil], ["bundler", "1.0.21"]] +
+RAILS_VERSIONS.collect { |version| ['rails', version] }
desc "Vendor test gems: Run this once to prepare your test environment"
task :vendor_test_gems do
old_gem_path = ENV['GEM_PATH']
old_gem_home = ENV['GEM_HOME']