Dear Cologne Rubyists: Your user group needs you!
In November 2005 we’ve started the first Ruby usergroup in cologne. Back then we’ve been 4 people who met for beers. This was nearly exactly 6 years ago. Unfortunately the meetup has soon become inactive – actually I can not remember when that was and how it happened.
After that, I guess in 2007 the rurug.de started with greater success. It was a meetup which first took place in the rooms of the Chaos Computer Club Cologne. Sadly I haven’t participated in that meetup very activly :( *bad bumi*
Early this year the meetup then has moved to cowoco and renewed itself with about 30+ people attending. The following events had been awesome! Great talks and even better discussions. Unfortunatelly, after summer we’ve became very inactive again. Not many people participated on the mailing list and the event hasn’t taken place in the last two months.
WE NEED TO CHANGE THIS!!
And now is the time to rethink the meetup.
I know we have so many awesome ruby developers here in cologne, working on exciting projects!
We need to connect, share, teach in our local ruby community!
Let’s work together to bring back one of the best tech meetups in Cologne!
To get this started again I propose the following things:
- changing the mailing list to something that is more accessible.
This is something I’ve heard several times. The current mailinglist is kinda hard to follow and it’s hard for people to get into the conversation. -this is especially the case for new people.
I also think the mailing list has some spam issues?! - maybe using a google group for now. I do not really like google groups but it works for cologneJS.
- better organizations/archiving of the talk material like slides etc. – obviously ;)
- inviting more speakers
speakers exchange is a great. I herby invite @joshkalderimis from Amsterdam to tell us about travis-ci - meetup for some delicious Glühwein on the christmas market to discuss these things
Date: 14th Dez. 07:00pm at Heumarkt
What do you think? How do you feel about the cologne ruby meetup? Who joins me?
Cologne.rb let’s unite!
Git autocomplete in bash on a Mac
I’ve been using Linux and bash for great chunk of time for web development, and it always had great features like autocomplete, that I didn’t get by default on a Mac.
So, I’ve decided to take matters into my on hands, and leave a post for all those, who are also bugged by no git autocomplete in bash on a Mac.
Thankfully, git already has its autocomplete script, so it’s a matter of just two commands:
But I like to take it one step beyond. To save some keystrokes, I’ve added some aliases to my ~/.gitconfig:
Now I can tab on git co
No magic behind it but everytime worth to remember
Rspec Refactoring and Shared Example Groups
Today we had lightning talks about specs refactoring. Jan showed us some tricks based on his experiences from our latest open source project: railsrunners.org (Github):
Some simple spec principles
- Use clear descriptions for your specs in combination of using “describe”-, “context”-blocks
- Use contexts and descriptions properly, e.g.:
describe "#edit"; context "with valid params"; etc. - Use the –format documentation parameter to check your descriptions for specs, describes, and contexts. E.g.:
rspec spec/controllers/participants_controller_spec.rb --format documentation - Instead of manually creating associated models in your tests just to pass validations, FactoryGirl can automatically create them for you, e.g.:
- Then instead of:
- You’d simply have:
- Write one assertion per test.
- Stub requests using FakeWeb (Update: or WebMock or any other Request-Mocking-Helper), e.g.: FakeWeb.register_uri(:get, “http://static-maps-generator.appspot.com/url?msid=#{@future_run.msid}&size=950×300″, :body => response)
- Controller specs should only test the behaviour of your controller. Model specs test the behaviour of your model. Don’t mix the two! E.g.: do not test after_ or before_ save callbacks in your controller tests.
Take a look at the railsrunners Github repository: Github
Shared example groups
Sometimes you want to test the same behaviour in various specs or contexts. To keep your code DRY, you can use RSpec’s shared example groups:
If needed, you can move the shared example group to a spec helper and require that wherever you need to test for ‘successful responses’.
Further reading:
https://www.relishapp.com/rspec/rspec-core/v/2-0/docs/example-groups/shared-example-group
http://rspec.info/documentation/
http://blog.davidchelimsky.net/2010/11/07/specifying-mixins-with-shared-example-groups-in-rspec-2/
Global Day of Coderetreat Cologne / Bonn
Corey Haines is organizing a Global Day of Coderetreat for the 3rd of December. Many cities world-wide will collaborate and hold local code retreat events. Cologne, especially the Coworkingspace Gasmotorenfabrik is one of the hosts. For future details and registration check out: