Re: Docs on Rspec & Ripple

2011-02-13 Thread Mat Ellis
x27;t collide with one another's data. Make sure your suite isn't > parallelized (Spork, for example?). > > Sean Cribbs > Developer Advocate > Basho Technologies, Inc. > http://basho.com/ > > On Feb 12, 2011, at 11:43 PM, Mat Ellis wrote: > >> I got the

Re: Docs on Rspec & Ripple

2011-02-12 Thread Mat Ellis
I got the wrong impression, I thought the test_server was setup by the script. Once we setup a variant of the dev environment and pointed test_server.rb at that things moved forward. Now we just get: "Broken pipe when recycling, is Riak alive?" On Feb 12, 2011, at 8:31 PM, Mat E

Re: Docs on Rspec & Ripple

2011-02-12 Thread Mat Ellis
. > The test server is completely independent of any stubbing or additional > testing frameworks you use and so it should still work for your specs. Think > of it like having a separate test database, with a big rolled-back > transaction at the end of each example. > > Sean Cri

Docs on Rspec & Ripple

2011-02-12 Thread Mat Ellis
Is there a tutorial or a walk-through available for testing with Rspec & Ripple? Currently ploughing our way through https://github.com/seancribbs/ripple/tree/41a7f741603ea186d97064ff3ef542238a078135/ripple/spec attempting to make the in memory test server work. And of course, our Rspec setup i

Re: Ripple & an attribute named 'key'

2011-02-12 Thread Mat Ellis
Try this: > > def key > @key ||= UUID.new # Replace with whatever you want, as long as it's a String > end > > Sean Cribbs > Developer Advocate > Basho Technologies, Inc. > http://basho.com/ > > On Feb 12, 2011, at 10:53 PM, Mat Ellis wrote: > >> Yep,

Re: Ripple & an attribute named 'key'

2011-02-12 Thread Mat Ellis
t I checked). Is that not what you're trying to do? > > Sean Cribbs > Developer Advocate > Basho Technologies, Inc. > http://basho.com/ > > On Feb 12, 2011, at 10:50 PM, Mat Ellis wrote: > >> The point of the code is not to use a non-string ID but to generate a

Re: Ripple & an attribute named 'key'

2011-02-12 Thread Mat Ellis
rue, :default => 1234 > key_on :some_num > > Sean Cribbs > Developer Advocate > Basho Technologies, Inc. > http://basho.com/ > > On Feb 12, 2011, at 8:00 PM, Mat Ellis wrote: > >> Why do these behave differently in Ripple? >> >> # Leaves key field

Ripple & an attribute named 'key'

2011-02-12 Thread Mat Ellis
Why do these behave differently in Ripple? # Leaves key field blank property :key, Integer, :presence => true, :default => 1234 # Populates key2 field with 1234 property :key2, Integer, :presence => true, :default => 1234 We'd like to use the key field as a standard (like the 'id' field is the

Polymorphism

2011-02-11 Thread Mat Ellis
We build lots of interfaces to other systems. Generally we like to do this using Polymorphism. For instance, if we had to interface with 50 different publishers of books, we'd have one class called "Publisher" with the core logic and then interface specific overrides as "PenguinPublisher", "Ran

Re: has_many :through

2011-02-11 Thread Mat Ellis
t > many :authors > > def books >authors.map {|a| a.books }.flatten > end > end > > Sean Cribbs > Developer Advocate > Basho Technologies, Inc. > http://basho.com/ > > On Feb 11, 2011, at 3:39 PM, Mat Ellis wrote: > >> We're still thorough

has_many :through

2011-02-11 Thread Mat Ellis
We're still thoroughly in an ActiveRecord mindset over here. Before we go and build some simple collect statements to replace a few has_many :through statements, is there some Ripple or Riak goodness we should be using instead? Example: * A Publisher has many Authors who have many Books * We wa

Re: Schema Architecture, Map Reduce & Key Lists

2011-02-10 Thread Mat Ellis
Good idea, thanks. M. On Feb 10, 2011, at 4:10 PM, Alexander Sicular wrote: > i would change the model and have another stream for "converted" clicks. > > -Alexander Sicular > > @siculars > > On Feb 10, 2011, at 5:58 PM, Mat Ellis wrote: > >> Thanks

Re: Schema Architecture, Map Reduce & Key Lists

2011-02-10 Thread Mat Ellis
#x27;ll take a look at it as soon as we've finished getting our head around the Ripple goodness. Cheers M. On Feb 10, 2011, at 11:54 AM, Bryan Fink wrote: > On Thu, Feb 10, 2011 at 12:35 PM, Mat Ellis wrote: >> We are converting a mysql based schema to Riak using Ripple. We're

Re: Schema Architecture, Map Reduce & Key Lists

2011-02-10 Thread Mat Ellis
cket. It'll only be removed when compactions occur, but if you're storing > clickstream data that should be happen often enough. > > -- > Jeremiah Peschka > Microsoft SQL Server MVP > MCITP: Database Developer, DBA > On Thursday, February 10, 2011 at 9:35 AM, M

Re: Ripple & Dynamic Default Values

2011-02-10 Thread Mat Ellis
write it up as a pull-request (with specs please). > > Sean Cribbs > Developer Advocate > Basho Technologies, Inc. > http://basho.com/ > > On Feb 10, 2011, at 12:28 PM, Mat Ellis wrote: > >> Yes, I got NameError: undefined method `foo' for class `Class' when

Schema Architecture, Map Reduce & Key Lists

2011-02-10 Thread Mat Ellis
We are converting a mysql based schema to Riak using Ripple. We're tracking a lot of clicks, and each click belongs to a cascade of other objects: click -> placement -> campaign -> customer i.e. we do a lot of operations on these clicks grouped by placement or sets of placements. Reading this

Re: Ripple & Dynamic Default Values

2011-02-10 Thread Mat Ellis
logies, Inc. > http://basho.com/ > > On Feb 10, 2011, at 8:29 AM, Mat Ellis wrote: > >> For anyone else trying to do this, I couldn't find any docs on how to do >> dynamic default values. >> >> Objective: add an auto-generated UUID field to a Click model u

Ripple & Dynamic Default Values

2011-02-10 Thread Mat Ellis
For anyone else trying to do this, I couldn't find any docs on how to do dynamic default values. Objective: add an auto-generated UUID field to a Click model using Twitter's simple_uuid gem. Class Click include Ripple::Document include SimpleUUID property :uuid, String, :default => foo