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 | |
gem1.8 list --local --no-versions > 1.8.txt | |
gem1.9 list --local --no-versions > 1.9.txt | |
diff gem1.8.txt gem1.9.txt |
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
def daemonize(port) | |
Merb.logger.warn! "About to fork..." if Merb::Config[:verbose] | |
fork do | |
Process.setsid | |
exit if fork | |
Merb.logger.warn! "In #{Process.pid}" if Merb.logger | |
File.umask 0000 | |
STDIN.reopen "/dev/null" | |
STDOUT.reopen "/dev/null", "a" | |
STDERR.reopen STDOUT |
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 ruby | |
require 'rubygems' | |
require 'merb-core' | |
ARGV.push '-H' if ARGV[0] && ARGV[0] =~ /^[^-]/ | |
unless %w[-a --adapter -i --irb-console -r --script-runner].any? { |o| ARGV.index(o) } | |
ARGV.push *%w[-a mongrel] | |
end | |
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
# Merb::Config wrapped in a class << self (uses optparse) | |
# Returns the hash of default config values for Merb. | |
# | |
# ==== Returns | |
# Hash:: The defaults for the config. | |
# | |
# :api: private | |
def defaults | |
@defaults ||= { |
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
# ==== Returns | |
# Boolean:: True if Merb environment is testing for instance, | |
# Merb is running with RSpec, Test::Unit of other testing facility. | |
# | |
# :api: public | |
def testing? | |
$TESTING ||= env?(:test) || Merb::Config[:testing] | |
end | |
# ... snip ... |
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
# Set up the logger. | |
# | |
# Place the logger inside of the Merb log directory (set up in | |
# Merb::BootLoader::BuildFramework) | |
class Merb::BootLoader::Logger < Merb::BootLoader | |
# Sets Merb.logger to a new logger created based on the config settings. | |
# | |
# ==== Returns | |
# nil |
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
# Adds the inheriting class to the list of subclasses in a position | |
# specified by the before and after methods. | |
# | |
# ==== Parameters | |
# klass<Class>:: The class inheriting from Merb::BootLoader. | |
# | |
# ==== Returns | |
# nil | |
# | |
# :api: plugin |
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
# Execute this boot loader after the specified boot loader. | |
# | |
# ==== Parameters | |
# klass<~to_s>:: | |
# The boot loader class after which this boot loader should be run. | |
# | |
# ==== Returns | |
# nil | |
# | |
# :api: plugin |
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
# Load Slice classes before the app's classes are loaded. | |
# | |
# This allows the application to override/merge any slice-level classes. | |
class Merb::Slices::Loader < Merb::BootLoader | |
before LoadClasses | |
class << self | |
# Gather all slices from search path and gems and load their classes. |
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
# Build the framework paths. | |
# | |
# By default, the following paths will be used: | |
# application:: Merb.root/app/controller/application.rb | |
# config:: Merb.root/config | |
# lib:: Merb.root/lib | |
# log:: Merb.root/log | |
# view:: Merb.root/app/views | |
# model:: Merb.root/app/models | |
# controller:: Merb.root/app/controllers |
OlderNewer