Maintainer

Welcome to the Maintainer! The idea is simple. There are so many ways to download packages, Bundler, Cocoapods, NPM, SPM, Homebrew ... and more. These packages are amazing but having to use multiple package managers is a pain. The Maintainer takes care of all that. It is the universal package manager.

Features
πŸ›  Universal Package Manager
πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Open Source
⏳ Save Time
😰 Reduce Stress

Installation

Add this line to your application's Gemfile:

gem 'maintainer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install maintainer

Usage

Command Description
setup Setup the maintainer file
pod podname Install a pod
install cocoapods Installs cocoapods
uninstall cocoapods Uninstalls cocoapods
pip package Install a python package
install pip Installs pip
uninstall pip Uninstalls pip

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Overview

Any project, be it big or small, usually makes use of someone elses code. Your options to add this outside code into your project are:

  • Add the source code to your codebase
  • Use a package manager

Typically, developers use the 2nd option.

When installing python packages, developers use the pip package manager When installing ruby packages, developers use the gems or bundler package manager When installing swift/obj-c packages, developers use SPM or Cocoapods

and this list goes on.

Clearly we have a bunch of independent packages managers, all of which must be kept up to date. All of which have their own unique commands.

The maintainer is a single layer of abstraction, a wrapper, that makes installing packages, or dependencies, easy.

How it works

Remember, the maintainer is only a wrapper. Under the hood you will still be using pip, npm, gems, bundler, cocoapods, spm..etc but since the maintainer deals with them, you don't have to. If you try to install a pip package without pip installed the maintainer will proceed the package installation with an installation of pip itself.

Lets take an example:

You want to install the pip package numpy

Without the maintainer you would:

  1. Install pip
  2. Install numpy

With mainatiner you would:

  1. Install numpy

How do you install pip? Does not matter. We know, and we have taught the maintainer to do it.

The maintainer also allows for enhanced control such as updating all your Pods and Pip packages, installing multiple packages as a time across multiple langauges and more. Even updating a dependency that occurs across multiple projects (For example, lets say it had a security flaw).

How to building process works

The steps are pretty simple and thats the main goal. Since all package managers contain similar abilties we want to make the process of adding new package managers a breeze.

The /bin/maintain file is where everything begins. A user will type maintain <cmd> to use the maintainer. It looks like an executable but if you right-click and open with your text-editor youll see its just ruby :D. The /bin/maintain files only job so far is read the arguments and call the Runner class inside the maintainer file to run the proper command. From there you can follow the functions to see what they do.

The process of installing works as follows:

In the commands.rb file there are many similar classes which contain inner-classes that have a require_sudo and command! function. The requires_sudo is a boolean that tells the commandRunner if it needs to run this command in sudo, the command! function should, check which OS the user is running (using the OS class) and then return an array of strings where each string is a command to run in that perticular order. Later down the line these inner-classes will become more complex, able to handle errors thrown etc.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Maintainer project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.