wright 0.4.2 → 0.4.3
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/NEWS.md +3 -0
- data/lib/wright/util.rb +2 -2
- data/lib/wright/version.rb +1 -1
- data/spec/util_spec.rb +19 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4463e614c6bdf3bc92daf444c696199570b5518b
|
|
4
|
+
data.tar.gz: 253eb6558f24b7e7f400de4fdd7d9d1eac263e49
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a4fd8abdce4116540b98e6071c46413c16fbdad7d64866a16e4ac7b4e6d07a4aaedb9ab850162a06eae0670e69d10efebac5c746436df129e71d50592cac87e
|
|
7
|
+
data.tar.gz: 88e54519e42bde7e6317a633c7ba36768ab83dad8856c40ca53b4f3bc8c4b28c010e1d8d1953cfd216474933b724430332e6f74e6404bb64aa9bb870eb709f71
|
data/NEWS.md
CHANGED
data/lib/wright/util.rb
CHANGED
|
@@ -42,8 +42,8 @@ module Wright
|
|
|
42
42
|
return default unless ::File.exist?(release_file)
|
|
43
43
|
|
|
44
44
|
os_release = ::File.read(release_file)
|
|
45
|
-
/^ID_LIKE="?(?<id_like>[^"]*)"?$/ =~ os_release
|
|
46
|
-
/^ID="?(?<id>[^"]*)"?$/ =~ os_release
|
|
45
|
+
/^ID_LIKE="?(?<id_like>[^"\n]*)"?$/ =~ os_release
|
|
46
|
+
/^ID="?(?<id>[^"\n]*)"?$/ =~ os_release
|
|
47
47
|
return id_like.split(' ').first if id_like
|
|
48
48
|
id || default
|
|
49
49
|
end
|
data/lib/wright/version.rb
CHANGED
data/spec/util_spec.rb
CHANGED
|
@@ -74,6 +74,22 @@ ANSI_COLOR="0;31"
|
|
|
74
74
|
CPE_NAME="cpe:/o:centos:centos:7"
|
|
75
75
|
HOME_URL="https://www.centos.org/"
|
|
76
76
|
BUG_REPORT_URL="https://bugs.centos.org/"
|
|
77
|
+
EOS
|
|
78
|
+
@fedora_os_release = <<EOS
|
|
79
|
+
NAME=Fedora
|
|
80
|
+
VERSION="22 (Twenty Two)"
|
|
81
|
+
ID=fedora
|
|
82
|
+
VERSION_ID=22
|
|
83
|
+
PRETTY_NAME="Fedora 22 (Twenty Two)"
|
|
84
|
+
ANSI_COLOR="0;34"
|
|
85
|
+
CPE_NAME="cpe:/o:fedoraproject:fedora:22"
|
|
86
|
+
HOME_URL="https://fedoraproject.org/"
|
|
87
|
+
BUG_REPORT_URL="https://bugzilla.redhat.com/"
|
|
88
|
+
REDHAT_BUGZILLA_PRODUCT="Fedora"
|
|
89
|
+
REDHAT_BUGZILLA_PRODUCT_VERSION=22
|
|
90
|
+
REDHAT_SUPPORT_PRODUCT="Fedora"
|
|
91
|
+
REDHAT_SUPPORT_PRODUCT_VERSION=22
|
|
92
|
+
PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy
|
|
77
93
|
EOS
|
|
78
94
|
end
|
|
79
95
|
|
|
@@ -100,6 +116,9 @@ EOS
|
|
|
100
116
|
|
|
101
117
|
File.write('/etc/os-release', @centos_os_release)
|
|
102
118
|
Wright::Util.os_family.must_equal 'rhel'
|
|
119
|
+
|
|
120
|
+
File.write('/etc/os-release', @fedora_os_release)
|
|
121
|
+
Wright::Util.os_family.must_equal 'fedora'
|
|
103
122
|
end
|
|
104
123
|
end
|
|
105
124
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wright
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sebastian Boehm
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06-
|
|
11
|
+
date: 2015-06-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|