Public Gists by markbates

Gravatar
Tue Oct 07 14:22:38 -0700 2008
1
2
3
require 'rubygems'
require 'configatron'
 
Gravatar
Sun Oct 05 06:16:15 -0700 2008
1
2
3
require 'rubygems'
require 'dm-core'
require 'dm-aggregates'
Gravatar
Fri Oct 03 11:22:52 -0700 2008
1
2
3
require 'rubygems'
require 'configatron'
 
Gravatar
Wed Sep 17 12:24:26 -0700 2008
1
2
3
configatron.email = 'me@example.com'
configatron.email # => 'me@example.com'
configatron.set_default(:name, 'Mark Bates')
Gravatar
Wed Sep 17 12:19:18 -0700 2008
1
2
3
configatron.allow_admins = false
configatron.protect(:allow_admins)
 
Gravatar
Wed Sep 17 10:15:23 -0700 2008
1
2
3
# Setting parameters with Configatron 1.x:
configatron do |c|
  c.foo = :bar
Gravatar
Mon Sep 08 13:10:22 -0700 2008
1
2
3
configatron.email.pop.address # => 'pop.example.com'
configatron.email.pop.port # => 110
# and so on...
Gravatar
Mon Sep 08 13:08:07 -0700 2008
1
2
3
# config.yml:
email:
  pop:
Gravatar
Mon Sep 08 12:59:51 -0700 2008
1
2
3
configatron.configure_from_hash({:email =>
  {:pop => {:address => 'pop.example.com', :port => 110}},
   :smtp => {:address => 'smtp.example.com'}})
Gravatar
Mon Sep 08 11:59:15 -0700 2008
1
2
3
    it "should namespace hashes" do
      
      configatron.should_not respond_to(:cartoon)
Gravatar
Thu Sep 04 12:33:32 -0700 2008
1
2
3
module Mack
  module Notifier
    module Adapters # :nodoc:
Gravatar
Fri Aug 29 09:00:08 -0700 2008
1
2
3
configatron.email.pop.address # => "pop.example.com"
configatron.email.smtp.address # => "smtp.example.com"
configatron.website_url # => "http://www.mackframework.com"
Gravatar
Fri Aug 29 08:59:25 -0700 2008
1
2
3
configatron do |config|
  config.website_url = "http://www.mackframework.com"
  config.namespace(:email) do |email|
Gravatar
Fri Aug 29 08:58:44 -0700 2008
1
2
configatron.email # => "mark@mackframework.com"
configatron.database_url # => "postgres://localhost/mack_framework_rocks_development"
Gravatar
Fri Aug 29 08:58:05 -0700 2008
1
2
3
configatron do |config|
  config.database_url = "postgres://localhost/mack_framework_rocks_development"
end
Gravatar
Fri Aug 29 08:56:26 -0700 2008
1
2
configatron.email # => "mark@mackframework.com"
configatron.database_url # => "postgres://localhost/mack_framework_rocks"
Gravatar
Fri Aug 29 08:55:35 -0700 2008
1
2
3
configatron do |config|
  config.email = "mark@mackframework.com"
  config.database_url = "postgres://localhost/mack_framework_rocks"
Gravatar
Tue Aug 26 17:30:11 -0700 2008
1
2
3
## Sample virtual host ##
<VirtualHost *:80>
    ServerName www.example.com
Gravatar
Tue Aug 26 17:28:34 -0700 2008
1
2
3
## Sample load ##
# Passenger (Mod_Rails)
LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so
Gravatar
Mon Aug 25 10:22:53 -0700 2008
1
2
3
Mack::Routes.build do |r|
 
  r.login "/users/login", :controller => :users, :action => :login