Skip to content

Commit 58e8425

Browse files
authored
Fix name for CentOS and Ubuntu (#102)
According to https://www.centos.org/, Centos must be written as CentOS. The same for https://ubuntu.com/, where "Ubuntu Linux" is found nowhere. This commit fix both of them.
1 parent e01269d commit 58e8425

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ For example:
4646
```js
4747
{
4848
os: "linux",
49-
dist: "Ubuntu Linux",
49+
dist: "Ubuntu",
5050
codename: "precise",
5151
release: "12.04"
5252
}

os.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"/etc/fedora-release" : ["Fedora"],
3-
"/etc/redhat-release" : ["RHEL","RHAS","Red Hat Linux","Scientific Linux","ScientificSL","ScientificCERNSLC","ScientificFermiLTS","ScientificSLF","Centos"],
3+
"/etc/redhat-release" : ["RHEL","RHAS","Red Hat Linux","Scientific Linux","ScientificSL","ScientificCERNSLC","ScientificFermiLTS","ScientificSLF","CentOS"],
44
"/etc/redhat_version" : ["RHEL","RHAS","Red Hat Linux","Scientific Linux","ScientificSL","ScientificCERNSLC","ScientificFermiLTS","ScientificSLF"],
55
"/etc/SuSE-release": ["SUSE Linux"],
6-
"/etc/lsb-release" : ["Ubuntu Linux","Chakra","IYCC","Linux Mint","elementary OS","Arch Linux","Manjaro Linux", "KDE neon", "Zorin"],
6+
"/etc/lsb-release" : ["Ubuntu","Chakra","IYCC","Linux Mint","elementary OS","Arch Linux","Manjaro Linux", "KDE neon", "Zorin"],
77
"/etc/debian_version" : ["Debian"],
88
"/etc/debian_release" : ["Debian"],
99
"/etc/arch-release" : ["Arch Linux"],
@@ -25,9 +25,8 @@
2525
"/etc/linuxppc-release" : ["Linux-PPC"],
2626
"/etc/mageia-release" : ["Mageia"],
2727
"/etc/mandriva-release" : ["Mandriva Linux", "Mandrake Linux"],
28-
"/etc/mandrake-release" : ["Mandriva Linux", "Mandrake Linux"],
2928
"/etc/mandakelinux-release" : ["Mandriva Linux", "Mandrake Linux"],
30-
"/etc/mandrake-release" : ["Mandrake"],
29+
"/etc/mandrake-release" : ["Mandrake", "Mandriva Linux", "Mandrake Linux"],
3130
"/etc/mklinux-release" : ["MkLinux"],
3231
"/etc/nld-release" : ["Novell Linux Desktop"],
3332
"/etc/pld-release" : ["PLD Linux"],

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"cli-color": "^2.0.0",
3030
"execSync": "^1.0.2",
3131
"standard": "^14.3.1",
32-
"tape": "^4.13.0"
32+
"tape": "^4.13.2"
3333
},
3434
"dependencies": {
35-
"async": "^3.1.0"
35+
"async": "^3.2.0"
3636
},
3737
"contributors": [
3838
{

tests/mockdata.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[
22
{ "desc": "OS X", "platform": "darwin", "expected": { "os": "darwin" } }
33
, { "desc": "Windows", "platform": "win32", "expected": { "os": "win32" } }
4-
, { "desc": "Ubuntu 14.10", "platform": "linux", "file": { "/etc/lsb-release": "DISTRIB_ID=Ubuntu\nDISTRIB_RELEASE=14.10\nDISTRIB_CODENAME=utopic\nDISTRIB_DESCRIPTION=\"Ubuntu 14.10\"\n" }, "expected": { "codename": "utopic", "dist": "Ubuntu Linux", "os": "linux", "release": "14.10" } }
5-
, { "desc": "Ubuntu 14.04", "platform": "linux", "file": { "/etc/lsb-release": "DISTRIB_ID=Ubuntu\nDISTRIB_RELEASE=14.04\nDISTRIB_CODENAME=trusty\nDISTRIB_DESCRIPTION=\"Ubuntu 14.04.2 LTS\"\n" }, "expected": { "codename": "trusty", "dist": "Ubuntu Linux", "os": "linux", "release": "14.04" } }
6-
, { "desc": "Ubuntu 12.04", "platform": "linux", "file": { "/etc/lsb-release": "DISTRIB_ID=Ubuntu\nDISTRIB_RELEASE=12.04\nDISTRIB_CODENAME=precise\nDISTRIB_DESCRIPTION=\"Ubuntu 12.04.5 LTS\"\n" }, "expected": { "codename": "precise", "dist": "Ubuntu Linux", "os": "linux", "release": "12.04" } }
4+
, { "desc": "Ubuntu 14.10", "platform": "linux", "file": { "/etc/lsb-release": "DISTRIB_ID=Ubuntu\nDISTRIB_RELEASE=14.10\nDISTRIB_CODENAME=utopic\nDISTRIB_DESCRIPTION=\"Ubuntu 14.10\"\n" }, "expected": { "codename": "utopic", "dist": "Ubuntu", "os": "linux", "release": "14.10" } }
5+
, { "desc": "Ubuntu 14.04", "platform": "linux", "file": { "/etc/lsb-release": "DISTRIB_ID=Ubuntu\nDISTRIB_RELEASE=14.04\nDISTRIB_CODENAME=trusty\nDISTRIB_DESCRIPTION=\"Ubuntu 14.04.2 LTS\"\n" }, "expected": { "codename": "trusty", "dist": "Ubuntu", "os": "linux", "release": "14.04" } }
6+
, { "desc": "Ubuntu 12.04", "platform": "linux", "file": { "/etc/lsb-release": "DISTRIB_ID=Ubuntu\nDISTRIB_RELEASE=12.04\nDISTRIB_CODENAME=precise\nDISTRIB_DESCRIPTION=\"Ubuntu 12.04.5 LTS\"\n" }, "expected": { "codename": "precise", "dist": "Ubuntu", "os": "linux", "release": "12.04" } }
77
, { "desc": "Fedora 21", "platform": "linux", "file": { "/etc/fedora-release": "Fedora release 21 (Twenty One)\n" }, "expected": { "codename": "Twenty One", "dist": "Fedora", "os": "linux", "release": "21" } }
8-
, { "desc": "CentOS 5.11", "platform": "linux", "file": { "/etc/redhat-release": "CentOS release 5.11 (Final)\n" }, "expected": { "codename": "final", "dist": "Centos", "os": "linux", "release": "5.11" } }
9-
, { "desc": "Centos 6.6", "platform": "linux", "file": { "/etc/redhat-release": "CentOS release 6.6 (Final)\n" }, "expected": { "codename": "final", "dist": "Centos", "os": "linux", "release": "6.6" } }
10-
, { "desc": "Centos 7.1", "platform": "linux", "file": { "/etc/redhat-release": "CentOS Linux release 7.1.1503 (Core)\n" }, "expected": { "codename": "core", "dist": "Centos", "os": "linux", "release": "7.1.1503" } }
8+
, { "desc": "CentOS 5.11", "platform": "linux", "file": { "/etc/redhat-release": "CentOS release 5.11 (Final)\n" }, "expected": { "codename": "final", "dist": "CentOS", "os": "linux", "release": "5.11" } }
9+
, { "desc": "CentOS 6.6", "platform": "linux", "file": { "/etc/redhat-release": "CentOS release 6.6 (Final)\n" }, "expected": { "codename": "final", "dist": "CentOS", "os": "linux", "release": "6.6" } }
10+
, { "desc": "CentOS 7.1", "platform": "linux", "file": { "/etc/redhat-release": "CentOS Linux release 7.1.1503 (Core)\n" }, "expected": { "codename": "core", "dist": "CentOS", "os": "linux", "release": "7.1.1503" } }
1111
, { "desc": "RHEL 6.5", "platform": "linux", "file": { "/etc/redhat-release": "Red Hat Enterprise Linux Server release 6.5 (Santiago)\n" }, "expected": { "codename": "santiago", "dist": "Red Hat Linux", "os": "linux", "release": "6.5" } }
1212
, { "desc": "RHEL 6.6", "platform": "linux", "file": { "/etc/redhat-release": "Red Hat Enterprise Linux Server release 6.6 (Santiago)\n" }, "expected": { "codename": "santiago", "dist": "Red Hat Linux", "os": "linux", "release": "6.6" } }
1313
, { "desc": "RHEL 7.0", "platform": "linux", "file": { "/etc/redhat-release": "Red Hat Enterprise Linux Server release 7.0 (Maipo)\n" }, "expected": { "codename": "maipo", "dist": "Red Hat Linux", "os": "linux", "release": "7.0" } }

0 commit comments

Comments
 (0)