https://github.com/spk/ruby-apt-pkg
Ruby interface to Debian apt-pkg
https://github.com/spk/ruby-apt-pkg
apt binding debian ruby ruby-interface
Last synced: 2 months ago
JSON representation
Ruby interface to Debian apt-pkg
- Host: GitHub
- URL: https://github.com/spk/ruby-apt-pkg
- Owner: spk
- License: mit
- Created: 2014-01-07T16:26:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-08-26T15:34:54.000Z (almost 2 years ago)
- Last Synced: 2025-04-19T12:13:48.978Z (3 months ago)
- Topics: apt, binding, debian, ruby, ruby-interface
- Language: C++
- Homepage: http://www.rubydoc.info/gems/apt-pkg
- Size: 146 KB
- Stars: 17
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
README
# Ruby interface to apt-pkg
Goal of this project is to have a proper Ruby binding to APT like in
[Python](https://tracker.debian.org/pkg/python-apt).Currently install, remove packages commands are **not** implemented.
## INSTALL
```
apt install build-essential ruby-dev libapt-pkg-dev (>= 1.0)
gem install apt-pkg
```## USING
Basic usage:
``` ruby
require 'debian/apt_pkg'# Initialize the configuration and system of apt
Debian::AptPkg.init# Update the index files used by the cache
Debian::AptPkg::PkgCache.update# List packages stored in the cache
Debian::AptPkg::PkgCache.packages# List installed packages
Debian::AptPkg::PkgCache.packages.select { |pkg| pkg.is_installed }
```[Documentation](http://www.rubydoc.info/gems/apt-pkg)
## BUILD
``` console
rake compile
```## TEST
``` console
rake test
```## LICENSE
The MIT License
Copyright (c) 2014-2020 Laurent Arnoud
---
[](https://gitlab.com/spkdev/ruby-apt-pkg/-/commits/master)
[](https://rubygems.org/gems/apt-pkg)
[](http://www.rubydoc.info/gems/apt-pkg)
[](http://opensource.org/licenses/MIT "MIT")
[](https://github.com/spk/ruby-apt-pkg)