

Organisation : Ruby
Project: rubygems.org
Project page: Recursive tree view for gem dependencies
Mentors: Aditya Prakash
and Qiu Chaofan
Recursive tree view for gem dependencies
Abstract
This project would add a feature on the rubygems.org website to give an option on each gem web page to show a tree/DAG of all transitive dependencies needed by that gem. In one of the issue
that lead to this project, a user talks about how some users download a gem based of it’s transitive dependencies and how they need to keep a mindmap of these transitive dependencies to conclude whether or not to use the gem. This project will help such users get a better idea of whether that gem is for them or not.
Road Map
Front end
- List of dependencies for that particular gem
- Arrow before each dependency which when clicked will display all of that gem’s dependencies
- This keeps happening for all dependencies on the page. Once a dependency is clicked, it can’t be clicked again (only toggled for hiding its dependencies).
- All dependencies are divided by runtime or development scope
- Both dependencies and scopes are togglable
Back end
- Write a controller to use gem name and version to find its dependencies
- Use rubygem code to find best version for each dependency based on it’s requirement
- Controller should render html and json (for ajax clicks)
- write functional and integration tests
The Story So Far
- First created a web page that displays all the transitive dependencies list in ascending order
- It was taking too long to load and not very user friendly
- Created basic webpage with toggling
- Added ajax request to find transitive dependencies but creating a js file in view
- Made toggling possible to open and close dependencies
- Moved the js file to asset pipeline thus making ajax requests client side
- Added functional test case for controller and integration test for js
- Seperated view as runtime and development dependencies, also togglable to be hidden
Code Contribution
Acknowledgement
I’d like to thank my mentors Aditya Prakash and Qui Chaofan for always monitoring my progress, immediately responding and guiding me whenever I needed help. I know I asked a lot of doubts and they helped me every time. I also know I must have been a little difficult to work with, so thank you for having the patience. I owe my wholehearted thanks and appreciation to the entire team of ruby and rubygem.org for selecting me for this project and for their assistance during the entire project work.