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
begin | |
$: << 'lib'; %w( rubygems rake/testtask rake/rdoctask rake/gempackagetask extensions/all | |
utilities/string utilities/symbol date).each { |dep| require dep } | |
rescue LoadError => e | |
if e.message == 'no such file to load -- extensions/all' | |
puts "Better do `rake setup` to get all the fancies you're missing" | |
puts | |
else | |
raise e | |
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
# I was hoping something like this might work .... | |
# The hope was that config.database could as easily be a string as a hash.... | |
+++configurations/development.rb | |
module Blog | |
module Configurations | |
class Development < Default |
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
<ab5tract> we are trying to figure out the best/preferred way to interface with sequel | |
<ab5tract> so if thats what you recommend, we'l write a converter function that takes the hash and turns it into a URI | |
<jeremyevans> ab5tract: That function is already there. Database#uri | |
<ab5tract> well, thats handy :) | |
* wishdev (n=jwh@67.170.158.202) has joined #sequel | |
<ab5tract> jeremyevans, does Database#uri take a hash? | |
<ab5tract> its sort of a stupid question, but im not getting the kind of uri i would expect by doing: | |
<ab5tract> irb(main):007:0> q = Sequel::Database.new :adapter => 'jdbc', :database_type => 'postgresql', :host => 'localhost', :database => 'jblog', :user => 'waves' | |
<ab5tract> => #<Sequel::Database: "://waves@localhost/jblog"> | |
<ab5tract> irb(main):009:0> q.uri |
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
/home/user/waves> ./bin/waves ~/ruby/xs | |
Ruby/Extensions: Binding#eval is already defined; not overwriting | |
Ruby/Extensions: Enumerable#none? is already defined; not overwriting | |
Ruby/Extensions: Enumerable#one? is already defined; not overwriting | |
Ruby/Extensions: Integer#even? is already defined; not overwriting | |
Ruby/Extensions: Integer#odd? is already defined; not overwriting | |
Ruby/Extensions: Symbol#to_proc is already defined; not overwriting | |
** Creating new Waves application ... | |
/usr/lib/ruby/1.8/fileutils.rb:1262:in `initialize': No such file or directory - /home/user/ruby/xs/Rakefile (Errno::ENOENT) | |
from /usr/lib/ruby/1.8/fileutils.rb:1262:in `open' |
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 <%= @name %> | |
module Configurations | |
class Default < Waves::Configurations::Default | |
attribute 'dependencies' | |
dependencies ['first', 'second'] | |
end | |
end | |
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
require 'foundations/simple' | |
module Blog | |
include Waves::Foundations::Simple | |
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
module Waves | |
class Cache | |
attr_accessor :cache | |
def initialize | |
@cache = {} | |
end | |
def [](key) |
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
# All @memcached's are now Waves.cache ... will this be a problem when in reality | |
# Waves.cache = Waves::Layers::Cache::MemcachedCache.new("localhost:11211") ? | |
# It's the self referentiality that is confusing me.... | |
module Waves | |
module Layers | |
module Cache |
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
# mostly golden | |
module Waves | |
module Layers | |
module Cache | |
class Memcached < Waves::Cache | |
require 'memcached' | |
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 self.dependencies( *args ) | |
self['dependencies'] ||= Set.new | |
args.length == 0 ? self['dependencies'] + gems.dependencies : | |
( self['dependencies'] += ( args - gems.dependencies ) ) | |
end |
OlderNewer