class RubyPlugin(BasePlugin):
@classmethod
def schema(cls):
schema = super().schema()
schema['properties']['ruby-version'] = {
'type': 'string',
'default': "2.3.1"
}
return schema
@classmethod
def get_pull_properties(cls):
# Inform Snapcraft of the properties associated with pulling. If these
# change in the YAML Snapcraft will consider the build step dirty.
return ['ruby-version']
def __init__(self, name, options, project):
super().__init__(name, options, project)
pkgs = ['build-essential', 'libreadline-dev', 'libssl-dev',
'libgmp-dev', 'libffi-dev', 'libyaml-dev', 'libxslt-dev',
'zlib1g-dev', 'libgdbm-dev', 'openssl', 'libicu-dev', 'cmake',
'pkg-config', 'libxml2-dev', 'libncurses5-dev']
for pkg in pkgs:
self.build_packages.append(pkg)
def ruby_download_url(ruby_version):
return _RUBY_TMPL.format(version=ruby_version)