This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if Rails.env != "development" | |
| c.send :rescue_from, ActiveRecord::RecordNotFound, | |
| ActionController::UnknownAction, | |
| ActionView::MissingTemplate, | |
| :with => :error_404 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'socket' | |
| require 'octopi' | |
| include Octopi | |
| COMPETITORS = { | |
| 'refinery' => "resolve/refinerycms", | |
| 'radiant' => "radiant/radiant", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # In a engine | |
| class Engine < Rails::Engine | |
| config.after_initialize do | |
| Page.send(:include, PageClassMethods) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CommonModel < ActiveRecord::Base | |
| self.abstract_class = true | |
| establish_connection "common#{Rails.env}" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ rm *.class; jrubyc Meh.rb ; java Meh | |
| Compiling Meh.rb to class Meh | |
| Exception in thread "main" java.lang.NoClassDefFoundError: Meh | |
| Caused by: java.lang.ClassNotFoundException: Meh | |
| at java.net.URLClassLoader$1.run(URLClassLoader.java:202) | |
| at java.security.AccessController.doPrivileged(Native Method) | |
| at java.net.URLClassLoader.findClass(URLClassLoader.java:190) | |
| at java.lang.ClassLoader.loadClass(ClassLoader.java:307) | |
| at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) | |
| at java.lang.ClassLoader.loadClass(ClassLoader.java:248) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ javap Meh | |
| Compiled from "Meh.rb" | |
| public class Meh extends org.jruby.ast.executable.AbstractScript{ | |
| public Meh(); | |
| public static org.jruby.runtime.builtin.IRubyObject __file__(Meh, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.Block); | |
| public org.jruby.runtime.builtin.IRubyObject __file__(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.Block); | |
| public static org.jruby.runtime.builtin.IRubyObject class_0$RUBY$Meh(Meh, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.Block); | |
| public static org.jruby.runtime.builtin.IRubyObject method__1$RUBY$main(Meh, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.Block); | |
| public static org.jruby.runtime.builtin.IRubyObject method__1$RUBY$main(Meh, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| maarten@maarten-laptop:~/Projects/obk/obk-driebruggen.nl$ ~/Projects/refinerycms/bin/refinerycms . --update | |
| Running: rails new "/home/maarten/Projects/obk/obk-driebruggen.nl" --force --database sqlite3 --skip-active-record --skip-gemfile --skip-git --skip-javascript --skip-prototype --skip-test-unit | |
| Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first. | |
| Type 'rails' for help. | |
| --------- | |
| Refinery successfully installed in '/home/maarten/Projects/obk/obk-driebruggen.nl'! | |
| Installing gem requirements using bundler.. | |
| Running: cd "/home/maarten/Projects/obk/obk-driebruggen.nl" && bundle install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'http://rubygems.org' | |
| gem 'rails', '3.0.3' | |
| gem 'mysql' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3-ruby', :require => 'sqlite3' | |
| gem 'capistrano' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature: Manage regattas | |
| In order to use be able to have a regatta | |
| users | |
| wants to create regatta's | |
| Scenario: Register new regatta | |
| Given I am on the regatta's new page | |
| And I fill in "regatta_name" with "My Regatta" | |
| When I press "Create" | |
| Then a regatta should exist with name: "My Regatta" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'refinery' | |
| module Refinery | |
| module PageLayouts | |
| class Engine < Rails::Engine | |
| initializer "static assets" do |app| | |
| app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public" | |
| end | |
| config.after_initialize do |