Wednesday, February 5, 2014

Use bindingModule within object

This article is about a trick on subcut DI framework.

There is no example of using injects in objects(singleton in scala).

I used this way:

Wednesday, February 20, 2013

How to scroll with capybara and poltergeist

Let's assume that we have some element with id = "scrollElement" and overflow: auto (or scroll).
And we have to test scrolling in capybara and some headless browser with javascript (poltergeist and phantomjs in my case).

I did it this way:

Wednesday, November 21, 2012

Accepted pull requests

I think it won't be bad to have some page with list of my accepted pull requests.

  1. Correct association validation https://github.com/jo/puret/pull/12;
  2. Bug with selector in PulltoRefresh iOS library, https://github.com/leah/PullToRefresh/pull/21.
  3. First commit to rails https://github.com/rails/rails/pull/7513.
  4. Cucumber API steps https://github.com/jayzes/cucumber-api-steps/pull/12 (21 Nov, 2012).

Friday, June 29, 2012

iOS development

I released two applications for local-country use so far:
Currency rates of our national bank and news application.

Programing iOS devices is very funny.
I had very little experience of C programing and knew how memory, cpu, compilers work from university and this knowledge helped a lot.
There is a long way before I can say that I'm experienced in this field but I released more or less stable product and I'm very glad of it.

Now I'm reading Kochan's "Programing Objective-C" book. Strong familiarity with ObjC will help me improve a level of my apps.

Saturday, March 24, 2012

Weird "C compiler cannot create executables" error

After upgrading to Mac OS X Lion 10.7.3 I wanted to install pdnsd from homebrew.
When I run "brew install pdnsd" (or any homebrew formula), I got "checking for C compiler default output file name... configure: error: C compiler cannot create executables".

To solve this problem you need to:

  1. Install XCode from app store.
  2. Install Command Line Tools in XCode Prefenences -> Downloads.

Thursday, July 21, 2011

CruiseControl.rb and Rails 3 with RVM

Hello. There is no article how to configure CruiseControl.rb(ccrb) for Rails 3 with RVM on internet so far. That's pity. Let's fix it.

First, install ccrb (just download and unzip from https://github.com/thoughtworks/cruisecontrol.rb/downloads).
Create new ccrb project named 'your_project'.

Then let's open ~/.cruise/projects/your_project/cruise_config.rb with your favorite editor.
Uncomment next line:
project.build_command = './build_my_app.sh'
Add build_by_app.sh to your rails application so full path should be ~/.cruise/projects/your/project/work/build_by_app.sh. 
This file should contain next lines:
#!/bin/bash
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
  # First try to load from a user install
  source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
  # Then try to load from a root install
  source "/usr/local/rvm/scripts/rvm"
else
  printf "ERROR: An RVM installation was not found.\n"

fi

bundle install
bundle exec cucumber

Start ccrb and build.

Saturday, March 19, 2011

rvm's zlib issue

I had problem with rubygem in rvm's ruby because ruby wasn't compiled with zlib support. You can avoid this issue if you'll install this packages:
sudo apt-get install zlib1g-dev libssl-dev libreadline5-dev libxml2-dev libsqlite3-dev
From this page