Posted by yrashk
I’ve tried to signup for a trial of Google Apps Premier Edition
Google says it is a “Free trial until April 30th, 2007” and “You will be asked to provide a credit card number to sign up for Google Apps Premier Edition. However, you can cancel at any time before April 30, 2007 and your card will not be charged.”
I’ve surely provided them with a card # and entered that I want to try it out with 20 users ($50 / user account / year = $1000). I’ve got in and played a bit, then canceled it (downgraded to Standard Edition, haven’t found a way to cancel account completely).
Though in morning I’ve read SMS notifications from my bank telling that google tried to charge me $1000. I’ve logged in Google Checkout and found this:
Does this mean that Google tried to charge me for $1000? Luckily, it was not a credit, but a debit card and I had not enough funds there.
Posted by yrashk
If your company has some general incoming contact email (like info@foocompany.com) and uses Highrise, you may find this script useful:
#! /usr/bin/env ruby
require 'rubygems'
require_gem 'actionmailer'
mail = TMail::Mail.parse(STDIN.read)
forward = mail.create_forward.first
forward.subject = "Fwd: #{mail.subject}"
forward.to = 'dropbox@yournum.foocompany.highrisehq.com'
forward.from = 'Foocompany Info <info@foocompany.com>'
forward.date = Time.now
forward.body = "Begin forwarded message:\n#{forward.body}"
forward.reply_to = 'support@foocompany.com'
ActionMailer::Base.deliver forward
It has at least one problem, though—it seems that it can’t forward attachments properly. I’m working on this.
Posted by yrashk
I’ve spent few hours improving Caches.rb recently. While it is not still released (i.e. no official gem, only svn trunk), I’d like to disclose recent changes and share with my plans about it.
So, what’s done?
- First of all, it was greatly refactored. The most significant change is that storages are not responsible for caching algorithms anymore. Each storage has only few (like 5) simple API methods that needs to be defined. You can look into the sources (svn://verbdev.com/rubylibs/caches.rb/trunk) to see how they are designed now. Please be aware that API method names are most likely to be changed very soon. I don’t like current naming scheme.
- One more caching module added—
Caches::Storage::Global, which stores cache in a global variable cache.
- Then, I got rid of CachesConfig. If you need to specify a storage for your instance, just do
instance_cache_storage StorageModule. CachesStorage::Instance is used by default (which stores cache in an object’s instance)
- Caching static methods was requested by caches.rb users several times, so here you are:
class SomeClass
def self.static_method
...
end
class_caches :static_method
end
You can also specify storage for static methods:
class_cache_storage StorageModule
- Since I was adding some Rails-specific behavior recently I’ve got some feedback on Rails-specific usage of Caches.rb. Apparently, if you cache static methods in your rails app and you’re running in development mode, your class is going to be reloaded by Rails and hence you will lose your changes. That’s why
Caches::Storage::Global has appeared. So, now you can use the following pattern:
class MyModel < ActiveRecord::Base
def self.static_method
...
end
class_cache_storage Caches::Storage::Global
class_caches :static_method
end
- I’ve added experimental method
caches? which should be used to check class whether it caches this or that method. I haven’t decided whether it makes any sense, so may be I will drop it.
Seems that it’s all.
Now, few words on my plans. I plan to:
- perform a code cleanup,
refactor it to the extent possible
invent a better naming schema for storage API (though I’m still not very satisfied with it)
- improve specs, perform more tests
- release new version
- think about adding more sophisticated storage modules, like
support for memcached.
Update: I’ve performed some refactoring and added memcached support (Caches::Storage::MemCached). Everything is available in svn trunk for testing purposes. I plan to release new official version (0.4.0) soon.