Do you remember my previous post about Yandex::Webmaster gem? In the end of the post there was an example of typed attributes in plain Ruby class. I said that we plan to extract this functionality from Yandex::Webmaster into a separate gem and we’ve done it today!
I’ve just released Yandex::Webmaster-0.2.0 gem. Yandex::Webmaster is an object orientated wrapper for Yandex Webmaster API. Here are some links for you to find out more about Webmaster and its API:
What to know more about gem and also get some bonus?
For different reasons (mainly NDA) I cannot write real project names in this post. To make all things clear, let’s say that we have one project called FooLog (Rails 3.2) and we have to create new project called FooMarket (Rails 3.2 too) that uses data and ROI algorithms from FooLog.
As it usually happens at the beginning of the development, FooMarket seemed to us a very simple project with a pair of controllers and five or eight models. We wanted to add simple API to FooLog and authorise FooMarket to load data from FooLog through this API (with OAuth for example). After a couple of conference Skype-calls with our customers we understood that we are doing something bigger then two controllers and five models and I said – “OMG! We are trying to create another FooLog here! Why we cannot just add another section to FooLog and call it FooMarket?”. The answer was: “Because of marketing. FooLog and FooMarket are two different investment projects and should work separately”.
You may don’t know this, but ipgeobase.ru is leading ip-geocoding service in Russia and Ukraine. Its accuracy of coordinates detection for Russian ip-addresses is much higher then in the freegeoip.net. For example, I live in Tver and my home ip-address is 184.108.40.206; freegeoip tells me that I am in Moscow, ipgeobase tells me that I am in Tver, about 150 kilometres difference!
That’s why I decided to add support of ipgeobase to geocoder.
Part 1: Introduction and Filters
How ofter do you use Presenter Patter in your Rails applications? I do it when I have really complex views and want to move all logic from template file to some Ruby class. Usually this can be done when you have listing of items with paginations, per page selector sorting and filter for these items. In this post I want to show you my approach for such situations.
We in JetRockets widely use Factory Girl as a fixture replacement for our tests. A couple of days ago I replaced Test::Unit with RSpec for our wiselinks gem. I wanted to emulate situation when controller is processing wiselinks and non-wiselinks requests. To do this I had to create instance of
ActionDispatch::Request inside of my specs and Factory Girl helped me a lot with this.
Today I discovered Celluloid. To be short, with Celluloid multithreading in Ruby is getting easy and understandable, it helps you to combine concurrency with object oriented programming.
Rails Rumble закончился и к сожалению наше приложение IDEA HQ не вошло в десятку лучших. Почему? Скорее всего не хватило опыта участия в подобных соревнованиях. Нужно было готовиться заранее и очень серьезно. Тем не менее мы сделали очень много серьезных выводов и это уже очень приятно.
Кроме того сегодня успел выпустить очередную версию gem Metrika – инструмента для работы с API Яндекс.Метрика. В этой версии уже можно получать/создавать/обновлять счетчики и цели, фильтры, операции и права доступа к ним. Пока всё это работает в виде JSON обёртки, уже скоро начну работать дальше над объектной вариантом.