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!
Yandex::Webmaster Gem and Something More
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:
- Webmaster home page http://webmaster.yandex.com
- API Reference http://api.yandex.com/webmaster/
What to know more about gem and also get some bonus?
Using Git Subtree to Share Code Between Rails Applications
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”.
Yet Another Ruby Shootout (Round 2)
One week ago ruby-2.0.0-rc2 has been released, so I decided that the time has come to benchmark it again. This release will be compared to ruby-2.0.0-preview1 that I used in my first shooutout and to ruby-1.9.3-p385 that also was tagged not so long ago.
ipgeobase.ru Support in Geocoder Gem
For some reason geocoder gem don’t have support of ipgeobase.ru out of the box.
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 213.5.102.43; 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.
Rails Presenters and Filters
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.
Factory Girl – Not Only for Rails Models
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.
Celluloid – Ruby Multithreading Made Easy
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.
Yet Another Ruby Shootout
The beginning of the november brought us interesting news from Ruby World: ruby-2.0.0-preview1 was released and also rubinius-2.0rc1 was tagged on GitHub.
I decided to take these two distributions and compare them to current industry default ruby-1.9.3-p286.
Итоги Rails Rumble и Gem Яндекс.Метрика
Rails Rumble закончился и к сожалению наше приложение IDEA HQ не вошло в десятку лучших. Почему? Скорее всего не хватило опыта участия в подобных соревнованиях. Нужно было готовиться заранее и очень серьезно. Тем не менее мы сделали очень много серьезных выводов и это уже очень приятно.
Кроме того сегодня успел выпустить очередную версию gem Metrika – инструмента для работы с API Яндекс.Метрика. В этой версии уже можно получать/создавать/обновлять счетчики и цели, фильтры, операции и права доступа к ним. Пока всё это работает в виде JSON обёртки, уже скоро начну работать дальше над объектной вариантом.