craft_parts.plugins.ruby_plugin module¶
The Ruby plugin.
- class craft_parts.plugins.ruby_plugin.RubyFlavor(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
-
All Ruby implementations supported by ruby-install.
- jruby = 'jruby'¶
A Ruby implementation that runs on the JVM.
- mruby = 'mruby'¶
A lightweight Ruby implementation designed for embedding.
- ruby = 'ruby'¶
The reference (MRI/CRuby) Ruby implementation.
- truffleruby = 'truffleruby'¶
A high-performance Ruby implementation built on GraalVM.
- class craft_parts.plugins.ruby_plugin.RubyPlugin(*, properties, part_info)¶
Bases:
PluginA plugin for Ruby based projects.
The desired Ruby interpreter is compiled using ruby-install.
The ruby plugin uses the following plugin-specific keys:
ruby-flavor(string) ruby,jruby,truffleruby,mrubyruby-gems(list of str) Defaults to []ruby-version(str) Minor version number of the specified interpreter flavor. e.g. ‘3.2’, meaning the newest release of the 3.2.x series.ruby-use-jemalloc(bool) Defaults to Falseruby-shared(bool) Defaults to Falseruby-configure-options(list of str) Defaults to []ruby-use-bundler(bool) Defaults to False
- Parameters:
properties (
PluginProperties)part_info (
PartInfo)
- get_build_commands()¶
Return a list of commands to run during the build step.
- get_build_environment()¶
Return a dictionary with the environment to use in the build step.
- get_build_packages()¶
Return a set of required packages to install in the build environment.
- get_build_snaps()¶
Return a set of required snaps to install in the build environment.
- properties_class¶
alias of
RubyPluginProperties
- classmethod supported_build_attributes()¶
Return the build attributes that this plugin supports.
- validator_class¶
alias of
RubyPluginEnvironmentValidator
- class craft_parts.plugins.ruby_plugin.RubyPluginEnvironmentValidator(*, part_name, env, properties)¶
Bases:
PluginEnvironmentValidatorCheck the execution environment for the Ruby plugin.
- Parameters:
part_name (
str) – The part whose build environment is being validated.env (
str) – A string containing the build step environment setup.properties (
PluginProperties)
- class craft_parts.plugins.ruby_plugin.RubyPluginProperties(**data)¶
Bases:
PluginPropertiesThe part properties used by the Ruby plugin.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function PluginProperties.<lambda>>, 'extra': 'forbid', 'frozen': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
ruby_configure_options:
list[str]¶ The extra arguments to pass to the
configurescript when building the Ruby interpreter.
-
ruby_flavor:
RubyFlavor|None¶ The Ruby interpreter to build and include.
Whether to build libruby.so, a shared library that other binaries can link against.
When set to
true, the plugin buildslibruby.so, a shared library that other binaries can link against.