-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfile
or--skip-bundle
. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
This file contains 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
### | |
# This is a demonstration of using SQLite3's Virtual File System API in Ruby. | |
# | |
# == Synopsis | |
# | |
# This program will store its SQLite database after the __END__ line. | |
# | |
# === In Detail | |
# | |
# SQLite3 uses the DATABase class as a proxy for our IO object. Upon |
This file contains 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
#!/bin/bash | |
if [ -z "$1" ]; then | |
wdir="." | |
else | |
wdir=$1 | |
fi | |
for f in $( find . -name '*.erb' ); do | |
out="${f%.erb}.haml" | |
if [ -e $out ]; then |
This file contains 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
// Forgetful.js is what I use on SSDs to prevent disk wear. | |
// Because each SSD sector can only be written a set # of times | |
// it's important not to write huge log files for no reason. | |
// So my test logs (and some others) are all outputted to this | |
// node.js instance which keeps track of the throughput | |
// in simply-named channels. | |
// | |
// To use this in, e.g., Rails, put this in environments/test.rb: | |
// | |
// class NamedChannelSocket < TCPSocket |
This file contains 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 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 bash | |
"$@" |
This file contains 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
# encoding: utf-8 | |
s = "Blah \xe9 blah 헌글" | |
puts "BEFORE" | |
puts "encoding: #{s.encoding}" | |
puts "valid : #{s.valid_encoding?}" | |
puts "text : #{s}" | |
s = s. |
This file contains 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
Gem::Specification.new do |s| | |
s.name = 'bang' | |
s.version = '0.1.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Jeff Kreeftmeijer' | |
s.email = 'jeff@kreeftmeijer.nl' | |
s.summary = 'Bang!' | |
s.description = 'Bangs existing model methods' | |
s.files = ['bang.rb'] |
This file contains 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 RequestDebugHelpers | |
DEBUG_URL = "http://example.dev/debug.html" | |
def show_page | |
filename = File.join(Rails.root, 'public', 'debug.html') | |
File.open(filename, 'w') do |f| | |
f.puts page.body.gsub("</title>", " (#{ current_path })\\0") | |
end | |
system "osascript", "-e", <<-OSASCRIPT |
An implementation of Conway's Game of Life in 140 characters of Ruby.
Created by Simon Ernst (@sier).
OlderNewer