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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a78fc6fe7c02647f5c95b62c1dc4a1d761607ba5
4
- data.tar.gz: a89ef89b32da99fe38e0d966e8a641beccc5d784
3
+ metadata.gz: 4463e614c6bdf3bc92daf444c696199570b5518b
4
+ data.tar.gz: 253eb6558f24b7e7f400de4fdd7d9d1eac263e49
5
5
  SHA512:
6
- metadata.gz: c1df351bcc0a13fbe286d63bb834f3ea6cbaf72df2f79a4cd7eb39e8cc3c3de9d36c14b6d83e37b84db101f3a9a8550fa0ddff84fe8b0de39a53268066d666b7
7
- data.tar.gz: 754db64514e4b86785d8daff58d4128eebfce117b1d775c69b52b552bb6e0aa0ef5c0748356572290aae2669f5c6eb6c47ce428738389a455d471b52022d7b21
6
+ metadata.gz: 4a4fd8abdce4116540b98e6071c46413c16fbdad7d64866a16e4ac7b4e6d07a4aaedb9ab850162a06eae0670e69d10efebac5c746436df129e71d50592cac87e
7
+ data.tar.gz: 88e54519e42bde7e6317a633c7ba36768ab83dad8856c40ca53b4f3bc8c4b28c010e1d8d1953cfd216474933b724430332e6f74e6404bb64aa9bb870eb709f71
data/NEWS.md CHANGED
@@ -1,4 +1,7 @@
1
1
  # wright NEWS
2
+ ## 0.4.3 (2015-06-28)
3
+ - Fix distro detection for Fedora 22 (#15)
4
+
2
5
  ## 0.4.2 (2015-06-15)
3
6
  - Don't colorize log messages if Config[:log][:colorize] is nil (#13)
4
7
 
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
@@ -1,4 +1,4 @@
1
1
  module Wright # rubocop:disable Documentation
2
2
  # Current wright version
3
- VERSION = '0.4.2'
3
+ VERSION = '0.4.3'
4
4
  end
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.2
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-15 00:00:00.000000000 Z
11
+ date: 2015-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest