Mozilla Bespin

January 19, 2009

Bespin proposes an open extensible web-based framework for code editing that aims to increase developer productivity, enable compelling user experiences, and promote the use of open standards. One can read this here. Bespin’s initial prototype includes support for very basic features, but one can easily notice its power. Its all drawn in the canvas, every character, cursor blinks, scroll bars, text selection, etc. As a Vim user, I immediatly thought of Vim commands/keybindings in Bespin. ... Read more

on work...

January 15, 2009

3 or 4 new projects ahead. One of them will be CouchDB and Merb (no DataMapper, no ActiveRecord). The db schema is modeled by each user and upon criteria decisions.All of them Git managed, as been doing for the last year. Served by a Debian based Linux distro, coded under Debian, UNR (my lovely little netbook), and OSX mainly in Ruby 1.8.7. Production server structure not defined yet but development phase will be Mongrel. ... Read more

flash-like implementation

January 13, 2009

Flash is a Ruby on Rails method to show (mainly warning/error) messages. Camping has no such method, so i implemented an approach for error messages. The thing is, after a post method in the controller, the redirect creates a new instance for the controller, loosing the class instance variables set before.\nSo, after talking a bit with Zimbatm at #camping, we setup what could be a good solution: to use the @state session variable. ... Read more

ActiveRecord connection adapters

December 22, 2008

…because of Camping::Models I’m using ActiveRecord Ruby implementation gem. Because source code is pretty well documented I maintain an opened xterm to check how things are done. Since I’m not using SQLite but PostgreSQL, i had to dig for the other parameters for the connection and I noticed AR has now connectors for severall DMBS:\n\n$ cat /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record.rb\n[…]\nunless defined?(RAILS_CONNECTION_ADAPTERS)\n  RAILS_CONNECTION_ADAPTERS = %w( mysql postgresql sqlite firebird sqlserver db2 oracle sybase openbase frontbase )\nend\n[…]

Camping on IRB

December 22, 2008

IRB is a great tool. What about testing parts of a Camping app in IRB (meaning App::Models module) ? Just require the app, but do not forget to establish the (in case of using it) ActiveRecord connection, that problably is specified in dispatch.rb Try this, using _Why’s Blog webapp example: $ cd /path/to/blog/app\n$ irb irb(main):001:0> require 'rubygems' irb(main):002:0> require 'blog' irb(main):003:0> Camping::Models::Base.establish_connection :adapter => 'postgresql', :host => 'trees', :port => 54321, :database => 'beautifull', :username => 'green', :password => 'forest' irb(main):004:0> Blog::Models::Post. ... Read more

msg upload to gmail ruby class (imap)

December 4, 2008

… moving to Google Hosted (Google Apps), there was the need to upload some thousands of e-mail messages. Since they were (mt) MediaTemple\“”) Berkeley mbox stores, I scp’d them locally (backup) and them imported them into Evolution local folders. The problem was the copy/move to the google hosted imap mail server. Evolution couldn’t finish the task on severall tries. Mozilla Iceape (Seamonkey) had a similar behaviour, suffering from server disconnects, thus stopping the operation. ... Read more

living open source

November 4, 2008

… today a nice thing happened. In a developers tech chat room, someone made a question about Markaby. He was trying to perform an action in markaby that was crashing his MVC Camping app. Apparently his code was clean. I tryied the same, and got the same error. So he said he was going to fill a bug in the Trac. But I wondered how could that be a bug… So, to check, what better then pay a visit to the library source code ? ... Read more

next is... Camping MVC microframework

October 30, 2008

…next in line are 3 web apps that will me made entirely in Ruby with the help of Why’s very light yet functional Camping, the 4 Kbyte microframework.\nCamping lacks things, and its Markaby is a bit slow compared to RoR’s Erb, but the approach taken by _Why looks very interesting for its simplicity.\n\nI changed the DB connector, not to use the standard SQLite but PostgreSQL, done very rapidly in the dispatch. ... Read more

© 2018 | Follow on Twitter | pedro mg & Hugo