Skip to content
Rake with configuration for Yast
Branch: master
Clone or download
jreidinger Merge pull request #66 from yast/bsc_number
Added bug number (bsc#1130043)
Latest commit b6c5997 Mar 21, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Added SLE15-SP1 target Mar 21, 2019
lib Make theme directory detected Nov 27, 2018
package Added bug number (bsc#1130043) Mar 21, 2019
.travis.yml Use Docker at Travis Jan 19, 2017 contributors should update version+changes Aug 19, 2016
Gemfile rubocop update Jul 14, 2016


Travis Build

Rake tasks to help with uniform handling of yast modules. It provides setup for packaging tasks and add yast specific tasks.

Quick Start

Create Rakefile with content:

  require "yast/rake"

Now lets check what it provides with rake -T

Provided tasks


Update the latest part of version in spec file.


Runs all RSpec tests ending with _spec.rb or _test.rb.

If the .rspec_parallel file exists then the tests are executed using the parallel_rspec command which runs the tests in parallel using all available CPUs, otherwise the standard RSpec is used.

It is possible to override this behavior via the PARALLEL_TESTS environment variable. Set it to 1 to run the tests in parallel or set it to 0 to use the standard RSpec with a single process.

You can pass additional parallel_rspec command options via the PARALLEL_TESTS_OPTIONS environment. E.g. you might choose to use only the half of the available CPUs with PARALLEL_TESTS_OPTIONS="-m 0.5" option or use just 4 CPUs with the PARALLEL_TESTS_OPTIONS="-n 4" option. See the parallel_tests documentation for more details.


Runs client with paths leading to git. Useful to testing module without installation.


Runs ruby console (irb) with paths leading to git and YaST environment.


Collect translatable strings and create *.pot files.


Check for common mistakes in translated texts.


Runs the Rubocop checker in parallel processes to speed up the check. The additional parameters to Rubocop can be passed via the options argument, e.g. rake check:rubocop[-D].


Similar to check:rubocop above, additionally it passes the auto correct parameter to Rubocop to try fixing the found issues (it is equivalent to rake check:rubocop[-a]).


Checks spelling in *.md and *.html files. It uses a global custom dictionary (file lib/tasks/spell.dict in this repository) and supports repository specific dictionary (spell.dict file in the repository root directory).

Note: The installed aspell English dictionary may differ in different products (esp. the Ubuntu dictionary used at Travis - a local check may pass, but it may later fail at Travis, be prepared for this...)

Note: You need to explicitly install aspell-devel, aspell-en, ruby-devel packages and the raspell Ruby gem. (The reason is to decrease the dependencies for the packages which do not use this task.)

These commands should work:

sudo zypper in aspell-devel aspell-en ruby-devel
sudo gem install raspell


Yast::Tasks provides a method to change the configuration of the packaging tasks. As it's just a proxy for ::Packaging.configuration, the same options are available.

  Yast::Tasks.configuration do |conf|
    conf.obs_api = ""
    conf.obs_project = "YaST:openSUSE:42.1"

To avoid duplication, Yast::Tasks also provides a method to set the whole configuration at once, just specifying the name of one of the available target definitions. For example, if you want to submit to SLE 12 Service Pack 1, you can do:


This method can receive, as a second parameter, the path to your own definitions if needed.

If submit_to is not explicitly used, it will be read from the environment variable YAST_SUBMIT. If that variable is not set, :factory will be used.


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


This package is licensed under LGPL-2.1.

You can’t perform that action at this time.