Ubuntu Pastebin

Paste from bdx at Wed, 14 Jun 2017 18:44:51 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)
Download as text