Permalink
Browse files

Initial commit after nuking history (pws and keys in history).

  • Loading branch information...
0 parents commit 99da4262cbad2845705a4bf047698560c312b343 @zk committed Sep 26, 2010
Showing 1,129 changed files with 307,747 additions and 0 deletions.
@@ -0,0 +1,7 @@
+require 'autotest/fsevent'
+require 'autotest/growl'
+
+Autotest.add_hook :initialize do |autotest|
+ %w{.git .svn .hg .DS_Store ._* vendor}.each {|exception| autotest.add_exception(exception) }
+ false
+end
@@ -0,0 +1,8 @@
+log/*
+tmp/*
+db/sphinx
+.DS_Store
+public/javascripts/cache-application.js
+public/stylesheets/cache-application.css
+coverage.data
+test/coverage
@@ -0,0 +1,34 @@
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
+
+load 'config/deploy' # remove this line to skip loading any of the default tasks
+
+after "deploy:update", :setup_gems
+after "deploy:update", :set_permissions
+after "deploy:update", :update_sphinx
+after "deploy:setup", :create_database
+
+task :create_database, :role => [:web, :app] do
+ run "echo 'create database clojuredocs' | mysql -u#{db_user} -p#{db_pass}"
+end
+
+task :set_permissions, :role => [:web, :app] do
+ run "chown -R nobody /var/www/clojuredocs/current/tmp"
+ run "chown -R nobody /var/www/clojuredocs/current/public"
+ run "chmod 0666 /var/www/clojuredocs/current/log/production.log"
+end
+
+task :setup_gems, :role => [:web, :app] do
+ run("/opt/ruby-enterprise/bin/gem install rcov -v=0.9.8")
+ run("/opt/ruby-enterprise/bin/gem install ruby-openid -v=2.1.2")
+ run("/opt/ruby-enterprise/bin/gem install rack-openid -v=1.0.3")
+ run("/opt/ruby-enterprise/bin/gem install rdiscount -v=1.6.5")
+ run("cd #{deploy_to}/current && #{rake} gems:install RAILS_ENV=production")
+ run("cd #{deploy_to}/current && #{rake} gems:unpack RAILS_ENV=production")
+ run("cd #{deploy_to}/current && #{rake} gems:build RAILS_ENV=production")
+end
+
+task :update_sphinx, :role => [:web, :app] do
+ run("killall searchd; true")
+ run("cd #{deploy_to}/current && #{rake} thinking_sphinx:rebuild RAILS_ENV=production")
+end
@@ -0,0 +1,31 @@
+# Getting Started
+
+## Gems
+sudo gem install ruby-openid --version '2.1.7'
+sudo gem install rcov --version '0.9.2.1'
+sudo rake gems:install
+
+## Import DB
+create the following databases in MySQL: clojuredocs, clojuredocs_test
+rake db:migrate
+rake db:migrate RAILS_ENV=test
+
+## Run Tests
+rake test
+
+## Start Server
+script/server
+
+## Search (Optional)
+http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz
+(in tarball dir)
+./configure
+make
+sudo make install
+
+(project dir)
+rake thinking_sphinx:rebuild
+
+
+## Known Issues
+* config.gem 'json_pure', :version => '1.4.3' -> autotest runs, but throws an error about not being able to find json_pure. rake test runs fine. Commented out for now.
@@ -0,0 +1,33 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require(File.join(File.dirname(__FILE__), 'config', 'boot'))
+
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+require 'tasks/rails'
+
+require 'rcov/rcovtask'
+
+namespace :test do
+namespace :coverage do
+desc "Delete aggregate coverage data."
+task(:clean) { rm_f "coverage.data" }
+end
+desc 'Aggregate code coverage for unit, functional and integration tests'
+ task :coverage => "test:coverage:clean"
+ %w[unit functional integration].each do |target|
+ namespace :coverage do
+ Rcov::RcovTask.new(target) do |t|
+ t.libs << "test"
+ t.test_files = FileList["test/#{target}/*_test.rb"]
+ t.output_dir = "test/coverage/#{target}"
+ t.verbose = true
+ t.rcov_opts << '--rails --aggregate coverage.data --exclude "gems,cc_quick_ref\.rb"'
+ end
+ end
+ task :coverage => "test:coverage:#{target}"
+ end
+end
Oops, something went wrong. Retry.

0 comments on commit 99da426

Please sign in to comment.