gem install rails --pre
rails new my_app -T
| require 'thor' | |
| require 'active_support/inflector' | |
| require 'thor/group' | |
| module Update | |
| module My | |
| class Tasks < Thor | |
| include Thor::Actions | |
| desc "task", "Generate Base App" | |
| def task | |
| thor :update, "make.thor", "http://gist.github.com/623258" |
| load 'config/deploy/settings.rb' | |
| load 'config/deploy/symlinks.rb' | |
| load 'config/deploy/passenger.rb' | |
| load 'config/deploy/callbacks.rb' | |
| load 'config/deploy/maintenance.rb' | |
| load 'config/deploy/git.rb' |
| %w{readline rubygems bond}.each {|e| require e } | |
| Bond.start | |
| history_file = File.join(ENV["HOME"], '.mini_irb_history') | |
| IO.readlines(history_file).each {|e| Readline::HISTORY << e.chomp } if File.exists?(history_file) | |
| while (input = Readline.readline('>> ', true)) != 'exit' | |
| begin puts "=> #{eval(input).inspect}"; rescue Exception; puts "Error: #{$!}" end | |
| end | |
| File.open(history_file, 'w') {|f| f.write Readline::HISTORY.to_a.join("\n") } |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| require 'flexgen/model_builder' | |
| require 'metamodel/as' | |
| include ASMetaModel | |
| def auto_build | |
| FlexGen::ModelBuilder.build(ASMetaModel) do | |
| app "App", :base => "com.test" do | |
| # Models | |
| actor "Customer" do | |
| attribute "first_name", :view_type => "String" | |
| attribute "last_name", :view_type => "String" |
| > SET server:name "bidja" | |
| "OK" | |
| > SADD item:item1:bidders 123456 | |
| true | |
| > SADD item:item1:bidders 333333 | |
| true | |
| > SADD item:item1:bidders 555555 | |
| true | |
| > SADD item:item1:bidders 123456 | |
| true |
| app "App", :base => "com.test" do | |
| # Models | |
| actor "Customer" do | |
| attribute "first_name", :view_type => "String" | |
| attribute "last_name", :view_type => "String" | |
| # Customer Signals | |
| sig "New" | |
| sig "Destroy" | |
| end | |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'redis' | |
| # To use, simply start your Redis server and boot this | |
| # example app with: | |
| # ruby example_note_keeping_app.rb | |
| # | |
| # Point your browser to http://localhost:4567 and enjoy! | |
| # |
| class ActionDispatch::Routing::Mapper | |
| def draw(routes_name) | |
| instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
| end | |
| end | |
| BCX::Application.routes.draw do | |
| draw :api | |
| draw :account | |
| draw :session |