Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Overview

Name: Shunji Nishitani
Organization: Ruby
Project Name: Adding Autocomplete Function in RubyGems.org Search UI

Pull Request: https://github.com/rubygems/rubygems.org/pull/2047 (There are all of my commits in this PR. Other brances I made for the project were changed in this PR)
・ The last commit in GSoC is Move returning of gems name function from controller to model

The goal of this project was adding autocomplete function in the search field and functions to help to search for RubyGems.org.

Work I Have Done

Implement Autocomplete Function in Search Field


This is what it looks like.

Below are the challenges that I've faced.

  • Edit the Elasticsearch Model and Query Definition

I'm completely new to Elasticsearch, which is the search engine used in RubyGems.org. Thus I needed to understand how it worked, DSL of gems for Elasticsearch, and how it did in RubyGems.org code.

  • Code It in JQuery

First, I used a gem jquery-ui-rails. However, my mentor advised me not to add unnecessary gems because they increased gems dependencies. So I needed to write the function from scratch. I only studied Ruby, so it's another new thing what I had to learn.

  • Write Test Code

I faced many errors that I could not figure out how to solve. For example, Capybara and Selenium, which I used for the integration test, did not run correctly with a headless mode. Thanks to my mentors, eventually I successfully implemented tests.

What I Have Not Done

Implement Other Functions to Help Searching

I misjudged my skill and schedule, so I didn't have time to work on it. Also once I got deep understanding in my project, this idea was too vague, and even I didn't know what to do for it.
I should have planed with more solid ideas. When I have a chance to work on something in my future, I won't make the same mistake again.

Acknowledgement

I could not enough appriciate to my mentors, Aditya and Hiren. I was a beginner for programming, so I might ask many silly questions. But you answered every questions that I asked. Without you, I could not come this far. Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment