AWS Developer Tools Blog

Contributing to the AWS SDK for Ruby

We love getting contributions from the community to the AWS SDK for Ruby. Whether it be added features, fixed bugs, or just extra optimizations, submitting a pull request helps make the SDK better for all of our users. Since we started the project, the SDK has seen over 60 contributors providing everything from a one line typo fix to a 500+ line high level service abstraction. In the past month alone we have merged over 20 pull requests, and we continue to see more every day. We not only want to keep seeing these pull requests, we want to see more of them, so if you have been submitting pull requests we want you to know that you should keep them coming!

However, if you haven’t yet submitted a pull request, today is a great day to start. We know that contributing code to a large project can occasionally seem daunting, so let’s talk about some of the very easy things you can do to make it easier for us to evaluate your patch and possibly merge it into the SDK.

How to Contribute on GitHub

If you would like to contribute to the SDK you can do so on our GitHub project at https://github.com/aws/aws-sdk-ruby. From there you can fork the repository and submit a pull request of your changes. GitHub has tools and guides to make the technical portions of this process as easy as possible, including desktop applications for Microsoft Windows and Mac OS X to sync your code to and from the site. You should visit GitHub’s help pages to get more information about submitting pull requests.

Contributing Documentation

Contributing documentation and fixing typos is one of the easiest ways to get started as a contributor to the SDK. Fortunately, GitHub makes editing files for small text changes very easy thanks to its inline file editor. If you find a typo or missing documentation, you can navigate to the file in GitHub and click the “Edit” button at the top to quickly bring up the file editor:

Contributing documentation part 1

You can now edit the file and write a descriptive comment about the change you’ve made. You should also make sure to “Preview” the document and ensure that it still looks okay in GitHub.

Editing a file in GitHub

If you do not already have a fork of the repository, GitHub will automatically fork the project to a new repository that you can use to submit a pull request from.

Submitting a pull request

This opens a pull request against the aws/aws-sdk-ruby project and begins the process of allowing us to evaluate the changes.

Contributing Code

To contribute code, you first need to clone your own fork of the aws-sdk-ruby Git repository. Once you have cloned the repository, use the Bundler bundle install command to install all development dependencies.

You should then run tests to ensure that there are no issues with the project before you get started. To run tests, run the rake command.

After you verify that the tests pass, you can make your changes. Please make sure to include new tests if you change or add behavior to the SDK. You should then run tests and ensure that they all pass before submitting your pull request, as this makes the process of merging your commits hassle-free.

Once you have added code, tests, and all the tests pass, you can commit your code with descriptive messages and push your changes to your forked repository. You can then log onto GitHub and click the “Pull Request” button at the top of your fork of the SDK.

Submitting a pull request from a forked repository

Submitting the pull request follows the same process as for documentation. Once you submit the pull request, we can evaluate the code and discuss any adjustments, if necessary.

Accepting Contributions!

As I said before, we love getting contributions from the community. If you have ideas about how the AWS SDK for Ruby can be improved, we definitely appreciate the help. Feature suggestions are always encouraged, but providing working code with tests in the form of a pull request will usually mean that we can get the changes into the SDK much faster. Plus, you get credit for making the SDK a better product, not just for yourself, but for all of your fellow Rubyists!

So go ahead, check out the repository on GitHub, and start submitting patches.