native-package-installer 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aaa2e24fa2ecafa482a2f056d65dbcd6d7d843be
4
- data.tar.gz: 5e0383ed4fdbb8002e220326334f5cf270004c3b
3
+ metadata.gz: 6787655da3e53dd28304ac2a6e41f0bac54615d0
4
+ data.tar.gz: 42101e7d1d488adc27ea597c38cf533d9ac3b06f
5
5
  SHA512:
6
- metadata.gz: 247e935badb21d089b3bb48f69712fd76f74419220c716282a890cea8ba2160218aa9d8a76ace8543ef381a338abd67b22108adb6038229a08f1db0dae0ed68d
7
- data.tar.gz: 7dec5bc64359324e8b6f37f00dc139492cef94b1cedbd6a5f437f8d3e0a4ca84bdf5ab5c9595e26576d176c6b5643c09599aec4f1c0c58873a368949026a5c94
6
+ metadata.gz: 7da03fb0cf1988b3af75b1ddc042c5d1fd7d160e2992d78623c7cbc1801d0b84533e2be4c86305abde20bf1640ea7cb6529083b40ed16700689d1fba45cf0f5d
7
+ data.tar.gz: 317ecbb09eb80d8e14ad25b342142404c448871dbc185e44d97b47dd6be999b8fe2bf262f54d37ca800519bf66bcf873cc90ef6216a8a5734b475f69d18dbf24
@@ -0,0 +1,23 @@
1
+ # News
2
+
3
+ ## 1.0.1 - 2017-05-03
4
+
5
+ ### Improvements
6
+
7
+ * Supported FreeBSD.
8
+ [GitHub#1][Patch by Po-Chuan Hsieh]
9
+
10
+ ### Fixes
11
+
12
+ * Fixed a bug that an error is raised on unknown platforms.
13
+ [GitHub#2][Patch by Kunihiko Ito]
14
+
15
+ ### Thanks
16
+
17
+ * Po-Chuan Hsieh
18
+
19
+ * Kunihiko Ito
20
+
21
+ ## 1.0.0 - 2017-04-10
22
+
23
+ Initial release!!!
@@ -26,13 +26,14 @@ class NativePackageInstaller
26
26
  platform_class = PLATFORM_CLASSES.find do |platform_class|
27
27
  platform_class.current_platform?
28
28
  end
29
- platform_class ||= Unkown
29
+ platform_class ||= Unknown
30
30
  platform_class.new
31
31
  end
32
32
  end
33
33
  end
34
34
  end
35
35
 
36
+ require "native-package-installer/platform/freebsd"
36
37
  require "native-package-installer/platform/debian"
37
38
  require "native-package-installer/platform/fedora"
38
39
  require "native-package-installer/platform/redhat"
@@ -0,0 +1,40 @@
1
+ # Copyright (C) 2017 Ruby-GNOME2 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
+ module Platform
18
+ class FreeBSD
19
+ Platform.register(self)
20
+
21
+ class << self
22
+ def current_platform?
23
+ ExecutableFinder.exist?("pkg")
24
+ end
25
+ end
26
+
27
+ def package(spec)
28
+ spec[:freebsd]
29
+ end
30
+
31
+ def install_command
32
+ "pkg install -y"
33
+ end
34
+
35
+ def need_super_user_priviledge?
36
+ true
37
+ end
38
+ end
39
+ end
40
+ end
@@ -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.0.0"
17
+ VERSION = "1.0.1"
18
18
  end
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.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-10 00:00:00.000000000 Z
11
+ date: 2017-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,6 +84,7 @@ files:
84
84
  - Rakefile
85
85
  - doc/text/gpl-3.txt
86
86
  - doc/text/lgpl-3.txt
87
+ - doc/text/news.md
87
88
  - lib/native-package-installer.rb
88
89
  - lib/native-package-installer/executable-finder.rb
89
90
  - lib/native-package-installer/platform.rb
@@ -91,6 +92,7 @@ files:
91
92
  - lib/native-package-installer/platform/arch-linux.rb
92
93
  - lib/native-package-installer/platform/debian.rb
93
94
  - lib/native-package-installer/platform/fedora.rb
95
+ - lib/native-package-installer/platform/freebsd.rb
94
96
  - lib/native-package-installer/platform/homebrew.rb
95
97
  - lib/native-package-installer/platform/macports.rb
96
98
  - lib/native-package-installer/platform/redhat.rb