-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfileor--skip-bundle. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
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
| [client] | |
| socket = /tmp/mysql.sock | |
| default-character-set = utf8 | |
| # XXX: how can the connection collation be set to utf8_unicode_ci | |
| [mysqld] | |
| port = 3306 | |
| socket = /tmp/mysql.sock |
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
| function pp(object, depth, embedded) { | |
| typeof(depth) == "number" || (depth = 0) | |
| typeof(embedded) == "boolean" || (embedded = false) | |
| var newline = false | |
| var spacer = function(depth) { var spaces = ""; for (var i=0;i<depth;i++) { spaces += " "}; return spaces } | |
| var pretty = "" | |
| if ( typeof(object) == "undefined" ) { pretty += "undefined" } | |
| else if ( typeof(object) == "boolean" || | |
| typeof(object) == "number" ) { pretty += object.toString() } | |
| else if ( typeof(object) == "string" ) { pretty += "\"" + object + "\"" } |
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 'pp' | |
| invalids = ObjectSpace.each_object(DataMapper::Resource).select { |obj| !obj.saved? && !obj.valid? } | |
| pp invalids.map { |obj| [obj.class, obj.errors.to_hash] } |
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
| module Test | |
| module Unit | |
| TestCase = RSpec::Core::ExampleGroup | |
| end | |
| end | |
| class Test::Unit::TestCase | |
| def self.inherited(host) | |
| host.set_it_up host.name.gsub(/(Spec|Test)/,'') | |
| def host.method_added(name) |
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
| <!-- A scaffolded edit view converted to mustache --> | |
| <h1>Editing post</h1> | |
| {{#form}} | |
| {{#errors?}} | |
| <div id="error_explanation"> | |
| <h2>{{error_header}}</h2> | |
| </div> | |
| <ul> |
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
| @import compass/reset | |
| @import compass/css3/border-radius | |
| table | |
| border: none | |
| border-collapse: separate | |
| th, td | |
| padding: 5px | |
| thead | |
| background-color: #f2f6fa |
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
| module DataMapper | |
| module Adapters | |
| class ConnectionPoolAdapter < AbstractAdapter | |
| def initialize(name, options) | |
| super | |
| assert_kind_of 'options', @options[:pool], Array | |
| raise ArgumentError, "The are no adapters in the adapter pool" if @options[:pool].empty? |
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
| module DataMapper | |
| # DataMapper::Sweeper provides an observer to model changes that have access | |
| # to the controller invoking the changes. | |
| # | |
| # The api for DataMapper::Sweeper is similar to DataMapper::Observer, but | |
| # there is one important difference: in DataMapper::Observer .before and | |
| # .after blocks are evaluated in the context of the resource instance. | |
| # However, DataMapper::Sweeper .before and .after blocks are evaluated in the | |
| # context of an instance of your Sweeper class, and missing methods are |
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 'sinatra/base' | |
| class MyApp < Sinatra::Base | |
| @@my_app = {} | |
| def self.new(*) self < MyApp ? super : Rack::URLMap.new(@@my_app) end | |
| def self.map(url) @@my_app[url] = self end | |
| class FooController < MyApp | |
| map '/foo' |