- Notifications
You must be signed in to change notification settings - Fork0
Polisher is a Ruby module and set of utilities aimed to assisting the post-publishing packaging process for Ruby gems and applications.
License
strzibny/polisher
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Ruby Post-Publishing Processor - Polish your Ruby projects with ease!
.77 7. +$ =~+?ZZZII .Z$$$$$$$~~:,.$Z $~~:,.7 ?~:,, .......................................redmine...............=~:,,. ~::,..rails.......................................................~~:,. ~~:,, .........rack................json...........................=~:,, =~::,.....................sass............activerecord..............~::,. ~~:,.=....eruby...................................................~~:,.~ +~:,,.................haml......................eventmachine.......?~::,. ~::,. ........................rspec................................~~:,.: =~:,,:.........................................bundler.............~~:,, ~I7I..........rvm..................rake...........................,~7?II $$$$$$$O $$$$$$$$ .ZO7Z, .+ZIZ. 7 7 $I ZI
Polisher is a Ruby module and set of utilities aimed to assisting the post-publishingpackaging process for Ruby gems and applications.
Provided are a series of tools geared towards querying rubygems.org and other upstreamruby sources for metadata as well as downstream sources such as the Fedora and Debiandistributions to cross reference various supported stacks vendored by each.
Polisher also includes utilities to integrate and hook into various build and install workflowsused by both upstream and downstream developers to synergize operations and streamlinethe packaging and support process.
Polisher is made available throughrubygems.
Polisher dependends on the 'curb' rubygem which in return depends on the curl-develheaders. The user should install those and the development tools for their platformor install the curb gem packaged by their distribution like so:
# install the ruby & curl headers & development tools...yum install ruby-devel libcurl-develyum group install "Development Tools"# ... or install the gem manuallyyum install rubygem-curb
Replace the 'yum install' commands with the corresponding ones on alternate platforms.
Various polisher subcomponents depend on various command line utilities, these include:
- /usr/bin/git - to checkout git repos
- /usr/bin/koji - to query and build against koji
- /usr/bin/yum - to query yum
- /usr/bin/md5sum - to generate required metadata
- /usr/bin/fedpkg - to query fedora
Some of these are pre-installed on many platforms and some are available via a quick'yum install' / 'apt-get' or other. Not all are required for all utilities, see thespecific executables and modules for details.
To install the latest release and all ruby dependencies simply run:
gem install polisher
See the bin/ directory for all executables available, pass '-h' to any tosee specific command line options. To run any command from a local git checkoutof polisher, run the following beforehand:
export RUBYLIB='lib'
A few select utilities are highlighted below.
A utility to cross reference rubygems and bundler gemfiles against various downstreamresources including the koji build system, distgit (as used by Fedora), and more.
For example to check a specified ruby app for compatability in koji and yum:
gem_dependency_checker.rb --gemfile ~/myapp/Gemfile -k -y
A script that clones a rubygem maintained by distgit and update it to the latestversion of the package available on rubygems (or the specified version if given).A scratch built will be run and if all goes will a commit staged so that the enduser just has to 'git push' the updated package to the distro.
Simply specify the name of the gem to update like so:
git_gem_updater.rb -n rails
Alternatively if "-u" is specified with a Fedora username, all the packages theuser owns will be checked out and updated.
A script that does a source comparison between a gem maintained in git againstits corresponding rubygems.org gem.
Simply specify the url to the git repo and the tool will automatically detectthe version of the gem to retrieve and run the diff on
git_gem_diff.rb -g https://github.com/ManageIQ/polisher.git
A tool to update a given ruby gem or application based rpm spec to the specifiednew source (as specified by a gem, gemspec, or gemfile).
Simply pass it the location of the spec to update, and optionally a upstreamsource which to update from and the utility will print out the updated specto STDOUT.
ruby_rpm_spec_updater.rb ~/rpmbuild/SPECS/rubygem-rails.spec rails-5.0.0.gem
A tool to compare the given ruby based rpm spec against the specified sourceand/or the corresponding gem retrieved from rubygems.org
check_ruby_spec.rb ~/rpmbuild/SPECS/rubygem-polisher.spec
This will retrieve the gem and check the spec for consistency, reportingany discrepancies.
The core library behind these utilities, polisher provides reusable modules toquery and interface with upstream ruby sources and downstream vendors and systems.
Polisher comes with complete documentation and a full test suite.
Documentation relies on the 'yard' gem / documentation system, togenerate run:
rake yard
The test suite is based on rspec, to run:
rake spec
Polisher is Licensed under the MIT License, Copyright (C) 2013-2014 Red Hat, Inc.
See the commit log for authors of the project. All feedback and contributionsare more than welcome.
About
Polisher is a Ruby module and set of utilities aimed to assisting the post-publishing packaging process for Ruby gems and applications.