My friend, Carl Mercier, unveiled Defensio in November 2007. At the time, I had repeatedly told Carl I would write a plugin for Mephisto to integrate with Defensio. Then, in December 2007, TheWebFellas released a plugin that integrated Mephisto and Defensio.

I installed the plugin, but it didn’t work out for me. And then, I had other stuff to do (like nobody does, duh). And now, a couple of months later, I am just learning about Git, and how Git empowers people to make wholesale changes to an application, and still be able to exchange that code with everyone.

I was on the #github channel on Friday night, having some problems creating a new repository. Comes alongs halorgium telling me “why didn’t you name your repository Mephiso ?” Good question. And I asked him if Rick Olson (techno-weenie) had a public Git repository for Mephisto. Halorgium replied with Rick’s repository URL, and told me that it was down at the moment. But, he had a recent clone, which he pushed to GitHub. I then simply forked his repository, and started coding like mad.

It’s now 4 days later, and I am releasing a refactored Mephisto. Instead of being intimately tied to Akismet, or Defensio for that matter, this version of Mephisto uses the Strategy and Adapter design patterns to enable any spam detection engine to connect to Mephisto.

I don’t know Rick personally, nor do I know Mark Dagget, but if they wish, they can now pull from my repository, and the whole Mephisto community will have a much better Mephisto available to them all.

So:

  • If halorgium hadn’t been on #github on Friday, I wouldn’t have known about Rick’s Mephisto repository;
  • If halorgium hadn’t had a clone, I wouldn’t have started then;
  • If I hadn’t been using Git, I wouldn’t have attempted this (too many changes in too many places for Subversion);

Git empowered me to make big changes to a foreign code base. I’m not afraid of losing any of my changes, and anyone can pull from my repository. This is a completely different working model than Subversion.

If you wish to play with this Mephisto version, you can pull from my public clone URL: git://github.com/francois/mephisto.git

Update 2008-03-03: After discussion with Halorgium on #github, I have pushed a multiengine branch. Use that instead of my master, which has been reset.

1
2
3
4
5
git clone git://github.com/francois/mephisto.git mephisto_defensio
cd mephisto_defensio
git checkout multiengine
rake db:bootstrap db:migrate
thin start

If you already have a clone of Mephisto’s repository from someone else, add mine as a remote:

1
2
3
4
5
6
7
cd mephisto
git remote add francois git://github.com/francois/mephisto.git
git fetch francois
git branch --track multiengine francois/multiengine
git checkout multiengine
rake db:migrate
thin start

In case you want to look at the code first, you can browse the GitHub repository using http://github.com/francois/mephisto/tree/multiengine

I suggest starting with Mephisto::SpamDetectionEngine::Base, and exploring from there.

2 Responses to “Mephisto + Defensio: a completely different approach”

  1. James Says:

    Nice. This is why I like Mercurial. Distributed == power + safety

  2. Marc Says:

    Your version of mephisto interestingly solves a problem that occures in the recent trunk versions of mephisto but still runs on rails 2.x :D cool thing

Leave a Reply

 

Search

A picture of me

I am François Beausoleil, a Ruby on Rails coder. During the day, I work on XLsuite. At night, I am interested many things. Read my biography

Tags

(3) (1) (0) (2) (1) (1) (2) (2) (1) (2) (1) (2) (1) (2) (1) (1) (1) (1) (2) (14) (1) (1) (1) (1) (2) (1) (1) (2) (0) (1) (2) (1) (3) (1) (1) (1) (1) (1) (1) (0) (3) (2) (1) (2) (2) (1) (3) (2) (8) (8) (9) (12) (1) (1) (3) (1) (1) (1) (1) (1) (1) (2) (2) (2) (1) (1) (3) (1) (3) (1) (0) (23) (1) (1) (0) (1) (1) (1) (23) (25) (1) (1) (13) (1) (1) (2) (3) (1) (1) (4) (1) (2) (3) (0) (1) (7) (3) (1) (5) (5) (2) (2) (2) (4) (6) (7) (1) (0) (1) (1) (2) (2) (1) (4) (12) (2) (1) (2) (4) (1) (1) (1) (2) (8) (2) (3) (2) (2) (1) (3) (1) (1)

Links

Projects I work on

Categories

Archives