My first open source contribution

Screen cap of the app in development

I’ve been spending so much time gaining skillz over the last 7 months, that I was really excited for a chance to give back. I selected Double H Ranch, a Ruby for Good project, as my target.

It took me a long time to settle on what I wanted to work on. There are so many opportunities, and the range of different issues is immense! I finally settled on the project/issue I did because I though it was a great balance of challenge, but also something that was only slightly outside my reach, as I had many other things to focus on this mod.

My task was to add update and delete functionality for a user’s own posts. Simple enough, right? Where it got more complicated was in setting up the project locally.

It didn’t take long to get the app down and running in development, but when I went to start working with Posts — uh oh. The app uses Paperclip and AWS S3 to store photos, which is required for each Post. I was therefore unable to successfully create a Post before figuring out how to set up permissions for myself! I couldn’t very well test and implement a feature where I was supposed to update and delete something if I couldn’t even create it.

I asked the organizers initially, and they pointed out that they were using dotenv rather than Figaro — this was a nudge in the right direction, as after that I had only to go set up my own AWS bucket and user to get it working.

The other challenge was testing. When I initially cloned down the repo, there were just three controller tests. I didn’t particularly want to Wild West it on my first contribution, so I knew I had to get that set up. However, in trying to run RSpec with Capybara, I kept getting the same error, that made it appear I was doing something wrong, though I was pretty sure I wasn’t. By a stroke of luck, Craig, a friend and cohort-mate, had been working on the same project, and had fought the beast that was setting up testing for this project, which involved configuration helpers from both Devise and Warden. In the open-source spirit, he helped me get set up, and I was fairly quickly able to work on my chosen feature.

Overall, it was a great experience, and I look forward to doing it again!