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
| ## router.rb | |
| namespace :admin do | |
| match('/').to(:controller => 'dash', :action => 'index').name(:dash) | |
| resources :users | |
| resources :teams | |
| resources :seasons do | |
| resources :games | |
| 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
| Merb.logger.info("Compiling routes...") | |
| Merb::Router.prepare do | |
| authenticate do | |
| namespace :admin do | |
| match('/').to(:controller => 'dash', :action => 'index').name(:dash) | |
| resources :users | |
| resources :teams | |
| resources :seasons do | |
| resources :games | |
| 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
| require 'rubygems' | |
| gem 'dm-core' | |
| require 'dm-core' | |
| require 'pp' | |
| DataMapper.setup(:default, 'sqlite3::memory:') | |
| DataMapper::Logger.new(STDOUT, :info) | |
| DataObjects::Sqlite3.logger = DataObjects::Logger.new(STDOUT, 0) | |
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
| <html> | |
| <head> | |
| <title>Hello World</title> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> | |
| <script> | |
| $(document).read(function () { | |
| alert("hello World"); | |
| }); | |
| </script> |
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 HelloWorld | |
| def call(env) | |
| [200, {"Content-Type" => "text/plain"}, ["Hello world!"]] | |
| end | |
| end | |
| Rack::Handler::FastCGI.run(HelloWorld) |
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 'rubygems' | |
| gem 'dm-core' | |
| require 'dm-core' | |
| DataMapper.setup(:default, 'sqlite3::memory:') | |
| DataMapper::Logger.new(STDOUT, :debug) | |
| DataObjects::Sqlite3.logger = DataObjects::Logger.new(STDOUT, :debug) | |
| class User | |
| include DataMapper::Resource |
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 'rubygems' | |
| require 'dm-core' | |
| require 'dm-more' | |
| require 'dm-timestamps' | |
| require 'dm-is-versioned' | |
| DataMapper.setup(:sqlite3, 'sqlite3::memory:') | |
| DataMapper::Repository.adapters[:default] = DataMapper::Repository.adapters[:sqlite3] | |
| DataMapper::Logger.new(STDOUT, :debug) | |
| DataObjects::Sqlite3.logger = DataObjects::Logger.new(STDOUT, :debug) |
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 'rubygems' | |
| require 'ruby-prof' | |
| # Add the local gems dir if found within the app root; any dependencies loaded | |
| # hereafter will try to load from the local gems before loading system gems. | |
| if (local_gem_dir = File.join(File.dirname(__FILE__), '..', 'gems')) && $BUNDLE.nil? | |
| $BUNDLE = true; Gem.clear_paths; Gem.path.unshift(local_gem_dir) | |
| end | |
| require "merb-core" |
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
| /********************************************************************** | |
| gc.c - | |
| $Author: shyouhei $ | |
| $Date: 2008-08-03 22:24:26 -0500 (Sun, 03 Aug 2008) $ | |
| created at: Tue Oct 5 09:44:46 JST 1993 | |
| Copyright (C) 1993-2003 Yukihiro Matsumoto | |
| Copyright (C) 2000 Network Applied Communication Laboratory, Inc. |
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 Application < Merb::Controller | |
| def check(one, two, *args) | |
| hey = 'one' | |
| @@one = other | |
| a = two unless one.gsub /(test|another)*?/ | |
| end | |
| def other | |
| @other | |
| end |
OlderNewer