<commit_before># Zypper Library #

This library provides Ruby access to libzypp using the
`zypper` command.

## License ##

Distributed under the MIT license, see LICENSE file.

## Features ###

* Running zypper in chroot
* Running your system zypper over a different root directory
* Installing and removing packages
* Adding and removing repositories
* Easy to extend

## Usage ##

Require the library

```ruby
require "zypper"
```

Initialize new access to the library methods

```ruby
zypper = Zypper.new()
```

Add a new repository

```ruby
zypper.add_repository(:url => 'http://example.org/new/repo', :alias => 'Repo_at_Example_Org')
```

## Public Methods ##

### Global ###

#### Constructor ###

```ruby
zypper = Zypper.new(parameters)
```

All parameters are optional, using their default value if not set.

Possible parameters in hash:
* :root => '/changed-root' - defaults to '/'
* :chroot_method => 'local' or 'chroot'
* :refresh_repo => true or false - default for all newly added repositories
* :auto_agree_with_licenses => true or false - default for installing packages

#### Zypper Version ####

```ruby
zypper.version

# Returns
{:major=>1, :minor=>3, :revision=>7}
```

### Repositories ###
### Packages ###<commit_msg>More docu<commit_after># Zypper Library #

This library provides Ruby access to libzypp using the
`zypper` command.

## License ##

Distributed under the MIT license, see LICENSE file.

## Features ###

* Running zypper in chroot
* Running your system zypper over a different root directory
* Installing and removing packages
* Adding and removing repositories
* Easy to extend

## Usage ##

Require the library

```ruby
require "zypper"
```

Initialize new access to the library methods

```ruby
zypper = Zypper.new()
```

Add a new repository

```ruby
zypper.add_repository(:url => 'http://example.org/new/repo', :alias => 'Repo_at_Example_Org')
```

## Public Methods ##

### Global ###

#### Constructor ###

```ruby
zypper = Zypper.new(parameters)
```

All parameters are optional, using their default value if not set.

Possible parameters in hash:
* :root => '/changed-root' - defaults to '/'
* :chroot_method => 'local' or 'chroot'
* :refresh_repo => true or false - default for all newly added repositories
* :auto_agree_with_licenses => true or false - default for installing packages

#### Zypper Version ####

```ruby
zypper.version

# Returns
{:major=>1, :minor=>3, :revision=>7}
```

#### Caches Cleanup ####

clean_caches

#### Importing All used GPG Keys ####

auto_import_keys

### Repositories ###

#### Listing repositories ####

repositories

#### Adding a Repository ####

add_repository

#### Removing a Repository ####

remove_repository

#### Refreshing Repositories ####

refresh_repositories

### Services ###

#### Listing Services ####

services

#### Refreshing Services ####

refresh_services

### Packages ###

#### Installing Packages ####

install

#### Removing Packages ####

remove

### Patches ###

#### Listing Patches ####

patches
{'fraction_non_alphanumeric': 0.14822200066467264, 'fraction_numerical': 0.0019940179461615153, 'mean_word_length': 4.71157495256167, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1015763', 'n_tokens_mistral': 966, 'n_tokens_neox': 922, 'n_words': 305}