native-package-installer 1.0.7 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -3
- data/Rakefile +1 -1
- data/doc/text/news.md +49 -0
- data/lib/native-package-installer/executable-finder.rb +1 -1
- data/lib/native-package-installer/os-release.rb +55 -0
- data/lib/native-package-installer/platform/alt-linux.rb +12 -5
- data/lib/native-package-installer/platform/arch-linux.rb +1 -1
- data/lib/native-package-installer/platform/debian.rb +10 -3
- data/lib/native-package-installer/platform/fedora.rb +3 -2
- data/lib/native-package-installer/platform/freebsd.rb +1 -1
- data/lib/native-package-installer/platform/homebrew.rb +1 -1
- data/lib/native-package-installer/platform/macports.rb +1 -1
- data/lib/native-package-installer/platform/msys2.rb +4 -2
- data/lib/native-package-installer/platform/pld-linux.rb +1 -1
- data/lib/native-package-installer/platform/redhat.rb +14 -3
- data/lib/native-package-installer/platform/suse.rb +3 -2
- data/lib/native-package-installer/platform/ubuntu.rb +41 -0
- data/lib/native-package-installer/platform/unknown.rb +1 -1
- data/lib/native-package-installer/platform.rb +31 -17
- data/lib/native-package-installer/version.rb +2 -2
- data/lib/native-package-installer.rb +6 -4
- data/test/run-test.rb +8 -2
- data/test/test-executable-finder.rb +1 -1
- metadata +6 -5
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: f81b6a31d687db3d8f2b8a18e81b1a5fcd89531561940774c31b115e2068d4ee
         | 
| 4 | 
            +
              data.tar.gz: 3f015fe58c1046a6db4adae8ca89487f136e2155ac3de47efe142fdd6b02c58f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: e6ce52d9eb449fe1ec2a98a83d6e719eb9e301e00122dc676e18871c5d00660c1c5331dc9dfa5903eabebecef4fe891e60479b1893f96f95f50a4f9d992f2510
         | 
| 7 | 
            +
              data.tar.gz: feaa63f0b76edeea500b41ec03d442122763f63b7abbf8aa05cb47f614d301eb9eccbc36584568e86e60d3c294eb4e945aa97949515d0134f3d19f43ea95ba7f
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,9 +1,16 @@ | |
| 1 | 
            -
            #  | 
| 1 | 
            +
            # native-package-installer
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 3 | 
            +
            [](https://badge.fury.io/rb/native-package-installer)
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            Users need to install native packages to install an extension library
         | 
| 6 | 
            +
            that depends on native packages. It bores users because users need to
         | 
| 7 | 
            +
            install native packages and an extension library separately.
         | 
| 8 | 
            +
            native-package-installer helps to install native packages on "gem install".
         | 
| 9 | 
            +
            Users can install both native packages and an extension library by one action,
         | 
| 10 | 
            +
            "gem install".
         | 
| 4 11 |  | 
| 5 12 | 
             
            ## License
         | 
| 6 13 |  | 
| 7 | 
            -
            Copyright (C) 2013- | 
| 14 | 
            +
            Copyright (C) 2013-2020  Ruby-GNOME Project Team
         | 
| 8 15 |  | 
| 9 16 | 
             
            LGPL-3 or later. See doc/text/lgpl-3.txt for details.
         | 
    
        data/Rakefile
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            # -*- ruby -*-
         | 
| 2 2 | 
             
            #
         | 
| 3 | 
            -
            # Copyright (C) 2013  Ruby- | 
| 3 | 
            +
            # Copyright (C) 2013  Ruby-GNOME Project Team
         | 
| 4 4 | 
             
            #
         | 
| 5 5 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 6 6 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
    
        data/doc/text/news.md
    CHANGED
    
    | @@ -1,5 +1,54 @@ | |
| 1 1 | 
             
            # News
         | 
| 2 2 |  | 
| 3 | 
            +
            ## 1.1.2 - 2022-01-18
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            ### Improvements
         | 
| 6 | 
            +
             | 
| 7 | 
            +
              * Changed priority for Homebrew on Linux. System package manager is preferred.
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              * Improved OpenSuSE detection.
         | 
| 10 | 
            +
             | 
| 11 | 
            +
              * Added support for Ruby 3.1 based RubyInstaller.
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            ## 1.1.1 - 2021-01-17
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            ### Improvements
         | 
| 16 | 
            +
             | 
| 17 | 
            +
              * [CentOS 8] Followed the powertools repository name change.
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            ## 1.1.0 - 2020-04-12
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            ### Improvements
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              * Updated README.
         | 
| 24 | 
            +
                [GitHub#11][Patch by kojix2]
         | 
| 25 | 
            +
             | 
| 26 | 
            +
              * Added support for Raspbian.
         | 
| 27 | 
            +
                [GitHub#12][Patch by xetum]
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            ### Thanks
         | 
| 30 | 
            +
             | 
| 31 | 
            +
              * kojix2
         | 
| 32 | 
            +
             | 
| 33 | 
            +
              * xetum
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            ## 1.0.9 - 2019-12-10
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            ### Improvements
         | 
| 38 | 
            +
             | 
| 39 | 
            +
              * Added support for Ubuntu specific package.
         | 
| 40 | 
            +
                [GitHub#9][Patch by İsmail Arılık]
         | 
| 41 | 
            +
             | 
| 42 | 
            +
            ### Thanks
         | 
| 43 | 
            +
             | 
| 44 | 
            +
              * İsmail Arılık
         | 
| 45 | 
            +
             | 
| 46 | 
            +
            ## 1.0.8 - 2019-10-10
         | 
| 47 | 
            +
             | 
| 48 | 
            +
            ### Improvements
         | 
| 49 | 
            +
             | 
| 50 | 
            +
              * Enabled PowerTools repository on CentOS 8.
         | 
| 51 | 
            +
             | 
| 3 52 | 
             
            ## 1.0.7 - 2019-03-09
         | 
| 4 53 |  | 
| 5 54 | 
             
            ### Fixes
         | 
| @@ -0,0 +1,55 @@ | |
| 1 | 
            +
            # Copyright (C) 2021  Ruby-GNOME Project Team
         | 
| 2 | 
            +
            #
         | 
| 3 | 
            +
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 | 
            +
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| 5 | 
            +
            # the Free Software Foundation, either version 3 of the License, or
         | 
| 6 | 
            +
            # (at your option) any later version.
         | 
| 7 | 
            +
            #
         | 
| 8 | 
            +
            # This program is distributed in the hope that it will be useful,
         | 
| 9 | 
            +
            # but WITHOUT ANY WARRANTY; without even the implied warranty of
         | 
| 10 | 
            +
            # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
         | 
| 11 | 
            +
            # GNU Lesser General Public License for more details.
         | 
| 12 | 
            +
            #
         | 
| 13 | 
            +
            # You should have received a copy of the GNU Lesser General Public License
         | 
| 14 | 
            +
            # along with this program.  If not, see <http://www.gnu.org/licenses/>.
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            class NativePackageInstaller
         | 
| 17 | 
            +
              class OSRelease
         | 
| 18 | 
            +
                include Enumerable
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                def initialize
         | 
| 21 | 
            +
                  parse
         | 
| 22 | 
            +
                end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                def each(&block)
         | 
| 25 | 
            +
                  @variables.each(&block)
         | 
| 26 | 
            +
                end
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                def [](key)
         | 
| 29 | 
            +
                  @variables[key]
         | 
| 30 | 
            +
                end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                def id
         | 
| 33 | 
            +
                  self["ID"]
         | 
| 34 | 
            +
                end
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                def id_like
         | 
| 37 | 
            +
                  (self["ID_LIKE"] || "").split(/ /)
         | 
| 38 | 
            +
                end
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                private
         | 
| 41 | 
            +
                def parse
         | 
| 42 | 
            +
                  @variables = {}
         | 
| 43 | 
            +
                  path = "/etc/os-release"
         | 
| 44 | 
            +
                  return unless File.exist?(path)
         | 
| 45 | 
            +
                  File.foreach(path) do |line|
         | 
| 46 | 
            +
                    key, value = line.strip.split("=", 2)
         | 
| 47 | 
            +
                    next if value.nil?
         | 
| 48 | 
            +
                    if value.start_with?("\"") and value.end_with?("\"")
         | 
| 49 | 
            +
                      value = value[1..-2]
         | 
| 50 | 
            +
                    end
         | 
| 51 | 
            +
                    @variables[key] = value
         | 
| 52 | 
            +
                  end
         | 
| 53 | 
            +
                end
         | 
| 54 | 
            +
              end
         | 
| 55 | 
            +
            end
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Copyright (C) 2017  Ruby- | 
| 1 | 
            +
            # Copyright (C) 2017-2021  Ruby-GNOME Project Team
         | 
| 2 2 | 
             
            #
         | 
| 3 3 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 4 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -13,22 +13,29 @@ | |
| 13 13 | 
             
            # You should have received a copy of the GNU Lesser General Public License
         | 
| 14 14 | 
             
            # along with this program.  If not, see <http://www.gnu.org/licenses/>.
         | 
| 15 15 |  | 
| 16 | 
            -
            require "native-package-installer/platform/debian"
         | 
| 17 | 
            -
             | 
| 18 16 | 
             
            class NativePackageInstaller
         | 
| 19 17 | 
             
              module Platform
         | 
| 20 | 
            -
                class ALTLinux | 
| 18 | 
            +
                class ALTLinux
         | 
| 21 19 | 
             
                  Platform.register(self)
         | 
| 22 20 |  | 
| 23 21 | 
             
                  class << self
         | 
| 24 22 | 
             
                    def current_platform?
         | 
| 25 | 
            -
                       | 
| 23 | 
            +
                      os_release = OSRelease.new
         | 
| 24 | 
            +
                      os_release.id == "altlinux"
         | 
| 26 25 | 
             
                    end
         | 
| 27 26 | 
             
                  end
         | 
| 28 27 |  | 
| 29 28 | 
             
                  def package(spec)
         | 
| 30 29 | 
             
                    spec[:alt_linux]
         | 
| 31 30 | 
             
                  end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                  def install_command
         | 
| 33 | 
            +
                    "apt-get install -V -y"
         | 
| 34 | 
            +
                  end
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                  def need_super_user_priviledge?
         | 
| 37 | 
            +
                    true
         | 
| 38 | 
            +
                  end
         | 
| 32 39 | 
             
                end
         | 
| 33 40 | 
             
              end
         | 
| 34 41 | 
             
            end
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Copyright (C) 2013  Ruby- | 
| 1 | 
            +
            # Copyright (C) 2013-2021  Ruby-GNOME Project Team
         | 
| 2 2 | 
             
            #
         | 
| 3 3 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 4 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -20,7 +20,14 @@ class NativePackageInstaller | |
| 20 20 |  | 
| 21 21 | 
             
                  class << self
         | 
| 22 22 | 
             
                    def current_platform?
         | 
| 23 | 
            -
                       | 
| 23 | 
            +
                      os_release = OSRelease.new
         | 
| 24 | 
            +
                      case os_release.id
         | 
| 25 | 
            +
                      when "debian", "raspbian"
         | 
| 26 | 
            +
                        return true
         | 
| 27 | 
            +
                      else
         | 
| 28 | 
            +
                        return true if os_release.id_like.include?("debian")
         | 
| 29 | 
            +
                      end
         | 
| 30 | 
            +
                      false
         | 
| 24 31 | 
             
                    end
         | 
| 25 32 | 
             
                  end
         | 
| 26 33 |  | 
| @@ -29,7 +36,7 @@ class NativePackageInstaller | |
| 29 36 | 
             
                  end
         | 
| 30 37 |  | 
| 31 38 | 
             
                  def install_command
         | 
| 32 | 
            -
                    "apt install -V -y"
         | 
| 39 | 
            +
                    "apt-get install -V -y"
         | 
| 33 40 | 
             
                  end
         | 
| 34 41 |  | 
| 35 42 | 
             
                  def need_super_user_priviledge?
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Copyright (C)  | 
| 1 | 
            +
            # Copyright (C) 2021  Ruby-GNOME Project Team
         | 
| 2 2 | 
             
            #
         | 
| 3 3 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 4 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -20,7 +20,8 @@ class NativePackageInstaller | |
| 20 20 |  | 
| 21 21 | 
             
                  class << self
         | 
| 22 22 | 
             
                    def current_platform?
         | 
| 23 | 
            -
                       | 
| 23 | 
            +
                      os_release = OSRelease.new
         | 
| 24 | 
            +
                      os_release.id == "fedora"
         | 
| 24 25 | 
             
                    end
         | 
| 25 26 | 
             
                  end
         | 
| 26 27 |  | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Copyright (C) 2017-2019  Ruby- | 
| 1 | 
            +
            # Copyright (C) 2017-2019  Ruby-GNOME Project Team
         | 
| 2 2 | 
             
            #
         | 
| 3 3 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 4 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -31,7 +31,7 @@ class NativePackageInstaller | |
| 31 31 | 
             
                        Dir.glob("c:/msys{64,32,*}/usr/bin") do |bin|
         | 
| 32 32 | 
             
                          finder.append_path(bin)
         | 
| 33 33 | 
             
                        end
         | 
| 34 | 
            -
                      when "x64-mingw32"
         | 
| 34 | 
            +
                      when "x64-mingw32", "x64-mingw-ucrt"
         | 
| 35 35 | 
             
                        Dir.glob("c:/msys{64,*}/usr/bin") do |bin|
         | 
| 36 36 | 
             
                          finder.append_path(bin)
         | 
| 37 37 | 
             
                        end
         | 
| @@ -45,6 +45,8 @@ class NativePackageInstaller | |
| 45 45 | 
             
                        "mingw-w64-i686-"
         | 
| 46 46 | 
             
                      when "x64-mingw32"
         | 
| 47 47 | 
             
                        "mingw-w64-x86_64-"
         | 
| 48 | 
            +
                      when "x64-mingw-ucrt"
         | 
| 49 | 
            +
                        "mingw-w64-ucrt-x86_64-"
         | 
| 48 50 | 
             
                      else
         | 
| 49 51 | 
             
                        nil
         | 
| 50 52 | 
             
                      end
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Copyright (C) 2017  Ruby- | 
| 1 | 
            +
            # Copyright (C) 2017-2021  Ruby-GNOME Project Team
         | 
| 2 2 | 
             
            #
         | 
| 3 3 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 4 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -20,7 +20,8 @@ class NativePackageInstaller | |
| 20 20 |  | 
| 21 21 | 
             
                  class << self
         | 
| 22 22 | 
             
                    def current_platform?
         | 
| 23 | 
            -
                       | 
| 23 | 
            +
                      os_release = OSRelease.new
         | 
| 24 | 
            +
                      os_release.id_like.include?("rhel")
         | 
| 24 25 | 
             
                    end
         | 
| 25 26 | 
             
                  end
         | 
| 26 27 |  | 
| @@ -29,12 +30,22 @@ class NativePackageInstaller | |
| 29 30 | 
             
                  end
         | 
| 30 31 |  | 
| 31 32 | 
             
                  def install_command
         | 
| 32 | 
            -
                     | 
| 33 | 
            +
                    if major_version >= 8
         | 
| 34 | 
            +
                      "dnf install --enablerepo=powertools -y"
         | 
| 35 | 
            +
                    else
         | 
| 36 | 
            +
                      "yum install -y"
         | 
| 37 | 
            +
                    end
         | 
| 33 38 | 
             
                  end
         | 
| 34 39 |  | 
| 35 40 | 
             
                  def need_super_user_priviledge?
         | 
| 36 41 | 
             
                    true
         | 
| 37 42 | 
             
                  end
         | 
| 43 | 
            +
             | 
| 44 | 
            +
                  private
         | 
| 45 | 
            +
                  def major_version
         | 
| 46 | 
            +
                    major_version_string = File.read("/etc/redhat-release")[/(\d+)/, 0]
         | 
| 47 | 
            +
                    Integer(major_version_string, 10)
         | 
| 48 | 
            +
                  end
         | 
| 38 49 | 
             
                end
         | 
| 39 50 | 
             
              end
         | 
| 40 51 | 
             
            end
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Copyright (C) 2017  Ruby- | 
| 1 | 
            +
            # Copyright (C) 2017-2021  Ruby-GNOME Project Team
         | 
| 2 2 | 
             
            #
         | 
| 3 3 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 4 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -20,7 +20,8 @@ class NativePackageInstaller | |
| 20 20 |  | 
| 21 21 | 
             
                  class << self
         | 
| 22 22 | 
             
                    def current_platform?
         | 
| 23 | 
            -
                       | 
| 23 | 
            +
                      os_release = OSRelease.new
         | 
| 24 | 
            +
                      os_release.id_like.include?("suse")
         | 
| 24 25 | 
             
                    end
         | 
| 25 26 | 
             
                  end
         | 
| 26 27 |  | 
| @@ -0,0 +1,41 @@ | |
| 1 | 
            +
            # Copyright (C) 2021  Ruby-GNOME Project Team
         | 
| 2 | 
            +
            #
         | 
| 3 | 
            +
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 | 
            +
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| 5 | 
            +
            # the Free Software Foundation, either version 3 of the License, or
         | 
| 6 | 
            +
            # (at your option) any later version.
         | 
| 7 | 
            +
            #
         | 
| 8 | 
            +
            # This program is distributed in the hope that it will be useful,
         | 
| 9 | 
            +
            # but WITHOUT ANY WARRANTY; without even the implied warranty of
         | 
| 10 | 
            +
            # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
         | 
| 11 | 
            +
            # GNU Lesser General Public License for more details.
         | 
| 12 | 
            +
            #
         | 
| 13 | 
            +
            # You should have received a copy of the GNU Lesser General Public License
         | 
| 14 | 
            +
            # along with this program.  If not, see <http://www.gnu.org/licenses/>.
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            require_relative "debian"
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            class NativePackageInstaller
         | 
| 19 | 
            +
              module Platform
         | 
| 20 | 
            +
                class Ubuntu < Debian
         | 
| 21 | 
            +
                  Platform.register(self)
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                  class << self
         | 
| 24 | 
            +
                    def current_platform?
         | 
| 25 | 
            +
                      os_release = OSRelease.new
         | 
| 26 | 
            +
                      case os_release.id
         | 
| 27 | 
            +
                      when "ubuntu"
         | 
| 28 | 
            +
                        return true
         | 
| 29 | 
            +
                      else
         | 
| 30 | 
            +
                        return true if os_release.id_like.include?("ubuntu")
         | 
| 31 | 
            +
                      end
         | 
| 32 | 
            +
                      false
         | 
| 33 | 
            +
                    end
         | 
| 34 | 
            +
                  end
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                  def package(spec)
         | 
| 37 | 
            +
                    spec[:ubuntu] || spec[:debian]
         | 
| 38 | 
            +
                  end
         | 
| 39 | 
            +
                end
         | 
| 40 | 
            +
              end
         | 
| 41 | 
            +
            end
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Copyright (C) 2017  Ruby- | 
| 1 | 
            +
            # Copyright (C) 2017-2021  Ruby-GNOME Project Team
         | 
| 2 2 | 
             
            #
         | 
| 3 3 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 4 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -23,30 +23,44 @@ class NativePackageInstaller | |
| 23 23 | 
             
                  end
         | 
| 24 24 |  | 
| 25 25 | 
             
                  def detect
         | 
| 26 | 
            -
                     | 
| 27 | 
            -
                      platform_class.current_platform?
         | 
| 26 | 
            +
                    PLATFORM_CLASSES.reverse_each do |platform_class|
         | 
| 27 | 
            +
                      return platform_class.new if platform_class.current_platform?
         | 
| 28 28 | 
             
                    end
         | 
| 29 | 
            -
                     | 
| 30 | 
            -
                    platform_class.new
         | 
| 29 | 
            +
                    Unknown.new
         | 
| 31 30 | 
             
                  end
         | 
| 32 31 | 
             
                end
         | 
| 33 32 | 
             
              end
         | 
| 34 33 | 
             
            end
         | 
| 35 34 |  | 
| 36 | 
            -
            require "native-package-installer/platform/msys2"
         | 
| 37 35 |  | 
| 38 | 
            -
             | 
| 36 | 
            +
            # Windows
         | 
| 37 | 
            +
            require_relative "platform/msys2"
         | 
| 39 38 |  | 
| 40 | 
            -
            require "native-package-installer/platform/debian"
         | 
| 41 | 
            -
            require "native-package-installer/platform/fedora"
         | 
| 42 | 
            -
            require "native-package-installer/platform/redhat"
         | 
| 43 | 
            -
            require "native-package-installer/platform/suse"
         | 
| 44 | 
            -
            require "native-package-installer/platform/alt-linux"
         | 
| 45 | 
            -
            require "native-package-installer/platform/arch-linux"
         | 
| 46 | 
            -
            require "native-package-installer/platform/pld-linux"
         | 
| 47 39 |  | 
| 48 | 
            -
             | 
| 40 | 
            +
            # macOS
         | 
| 41 | 
            +
            require_relative "platform/macports"
         | 
| 49 42 |  | 
| 50 | 
            -
             | 
| 43 | 
            +
            require_relative "platform/homebrew"
         | 
| 51 44 |  | 
| 52 | 
            -
             | 
| 45 | 
            +
             | 
| 46 | 
            +
            # FreeBSD
         | 
| 47 | 
            +
            require_relative "platform/freebsd"
         | 
| 48 | 
            +
             | 
| 49 | 
            +
             | 
| 50 | 
            +
            # Linux
         | 
| 51 | 
            +
            require_relative "platform/arch-linux"
         | 
| 52 | 
            +
             | 
| 53 | 
            +
            require_relative "platform/debian"
         | 
| 54 | 
            +
            require_relative "platform/ubuntu"
         | 
| 55 | 
            +
            require_relative "platform/alt-linux"
         | 
| 56 | 
            +
             | 
| 57 | 
            +
            require_relative "platform/pld-linux"
         | 
| 58 | 
            +
             | 
| 59 | 
            +
            require_relative "platform/redhat"
         | 
| 60 | 
            +
            require_relative "platform/fedora"
         | 
| 61 | 
            +
             | 
| 62 | 
            +
            require_relative "platform/suse"
         | 
| 63 | 
            +
             | 
| 64 | 
            +
             | 
| 65 | 
            +
            # Fallback
         | 
| 66 | 
            +
            require_relative "platform/unknown"
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Copyright (C) 2013- | 
| 1 | 
            +
            # Copyright (C) 2013-2021  Ruby-GNOME Project Team
         | 
| 2 2 | 
             
            #
         | 
| 3 3 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 4 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -14,5 +14,5 @@ | |
| 14 14 | 
             
            # along with this program.  If not, see <http://www.gnu.org/licenses/>.
         | 
| 15 15 |  | 
| 16 16 | 
             
            class NativePackageInstaller
         | 
| 17 | 
            -
              VERSION = "1. | 
| 17 | 
            +
              VERSION = "1.1.2"
         | 
| 18 18 | 
             
            end
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Copyright (C) 2017  Ruby- | 
| 1 | 
            +
            # Copyright (C) 2017-2021  Ruby-GNOME Project Team
         | 
| 2 2 | 
             
            #
         | 
| 3 3 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 4 4 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -15,10 +15,12 @@ | |
| 15 15 |  | 
| 16 16 | 
             
            require "shellwords"
         | 
| 17 17 |  | 
| 18 | 
            -
             | 
| 18 | 
            +
            require_relative "native-package-installer/version"
         | 
| 19 19 |  | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 20 | 
            +
            require_relative "native-package-installer/executable-finder"
         | 
| 21 | 
            +
            require_relative "native-package-installer/os-release"
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            require_relative "native-package-installer/platform"
         | 
| 22 24 |  | 
| 23 25 | 
             
            class NativePackageInstaller
         | 
| 24 26 | 
             
              class << self
         | 
    
        data/test/run-test.rb
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            #!/usr/bin/env ruby
         | 
| 2 2 | 
             
            #
         | 
| 3 | 
            -
            # Copyright (C) 2013  Ruby- | 
| 3 | 
            +
            # Copyright (C) 2013  Ruby-GNOME Project Team
         | 
| 4 4 | 
             
            #
         | 
| 5 5 | 
             
            # This library is free software: you can redistribute it and/or modify
         | 
| 6 6 | 
             
            # it under the terms of the GNU Lesser General Public License as published by
         | 
| @@ -20,4 +20,10 @@ $VERBOSE = true | |
| 20 20 | 
             
            require "test-unit"
         | 
| 21 21 | 
             
            require "test/unit/rr"
         | 
| 22 22 |  | 
| 23 | 
            -
             | 
| 23 | 
            +
            base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
         | 
| 24 | 
            +
            lib_dir = File.join(base_dir, "lib")
         | 
| 25 | 
            +
            test_dir = File.join(base_dir, "test")
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            $LOAD_PATH.unshift(lib_dir)
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            exit(Test::Unit::AutoRunner.run(true, test_dir))
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: native-package-installer
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.1.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Kouhei Sutou
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2022-01-17 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -73,6 +73,7 @@ files: | |
| 73 73 | 
             
            - doc/text/news.md
         | 
| 74 74 | 
             
            - lib/native-package-installer.rb
         | 
| 75 75 | 
             
            - lib/native-package-installer/executable-finder.rb
         | 
| 76 | 
            +
            - lib/native-package-installer/os-release.rb
         | 
| 76 77 | 
             
            - lib/native-package-installer/platform.rb
         | 
| 77 78 | 
             
            - lib/native-package-installer/platform/alt-linux.rb
         | 
| 78 79 | 
             
            - lib/native-package-installer/platform/arch-linux.rb
         | 
| @@ -85,11 +86,12 @@ files: | |
| 85 86 | 
             
            - lib/native-package-installer/platform/pld-linux.rb
         | 
| 86 87 | 
             
            - lib/native-package-installer/platform/redhat.rb
         | 
| 87 88 | 
             
            - lib/native-package-installer/platform/suse.rb
         | 
| 89 | 
            +
            - lib/native-package-installer/platform/ubuntu.rb
         | 
| 88 90 | 
             
            - lib/native-package-installer/platform/unknown.rb
         | 
| 89 91 | 
             
            - lib/native-package-installer/version.rb
         | 
| 90 92 | 
             
            - test/run-test.rb
         | 
| 91 93 | 
             
            - test/test-executable-finder.rb
         | 
| 92 | 
            -
            homepage: https://github.com/ruby- | 
| 94 | 
            +
            homepage: https://github.com/ruby-gnome/native-package-installer
         | 
| 93 95 | 
             
            licenses:
         | 
| 94 96 | 
             
            - LGPL-3+
         | 
| 95 97 | 
             
            metadata: {}
         | 
| @@ -108,8 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 108 110 | 
             
                - !ruby/object:Gem::Version
         | 
| 109 111 | 
             
                  version: '0'
         | 
| 110 112 | 
             
            requirements: []
         | 
| 111 | 
            -
             | 
| 112 | 
            -
            rubygems_version: 2.7.6
         | 
| 113 | 
            +
            rubygems_version: 3.4.0.dev
         | 
| 113 114 | 
             
            signing_key: 
         | 
| 114 115 | 
             
            specification_version: 4
         | 
| 115 116 | 
             
            summary: native-package-installer helps to install native packages on "gem install"
         |