google-cloud-env 2.3.0 → 2.3.1
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/CHANGELOG.md +6 -0
- data/lib/google/cloud/env/compute_smbios.rb +13 -4
- data/lib/google/cloud/env/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3d2a3f33d0f33823d9203719ac4c49862ed00b6b3b288b6851d83ca3358f8dc
|
4
|
+
data.tar.gz: 16e52c76711260d41d1f0018e022c38c9421b9ce26f4f1b36e63e58c42887d2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbdc0b547fea96b75eefa4b07724d725334258470b2bf932fc6c476c7d8f1f4edde22de46c4eb25dee06d38d5db3fa69344df9b40d1e6c8560a386aca7f62bc7
|
7
|
+
data.tar.gz: d8fd89b5762ec717e42d6b94cfab3a11a0e19c6eee961bc6e6119738d06a4d262936442f675928654a5b50b5e977f1498deff3c535ce4e22e16ff0c85774f436
|
data/CHANGELOG.md
CHANGED
@@ -119,11 +119,20 @@ module Google
|
|
119
119
|
private_constant :WINDOWS_KEYPATH, :WINDOWS_KEYNAME, :LINUX_FILEPATH
|
120
120
|
|
121
121
|
def load_product_name
|
122
|
-
|
123
|
-
|
124
|
-
|
122
|
+
begin
|
123
|
+
require "win32/registry"
|
124
|
+
Win32::Registry::HKEY_LOCAL_MACHINE.open WINDOWS_KEYPATH do |reg|
|
125
|
+
return [reg[WINDOWS_KEYNAME].to_s, :windows]
|
126
|
+
end
|
127
|
+
rescue LoadError
|
128
|
+
# Fall through to the Linux routine
|
129
|
+
rescue StandardError => e
|
130
|
+
# With JRuby 10, a Fiddle::DLError is raised, In the case the fiddle gem is not
|
131
|
+
# loadable, safely assert the error type without relying on the Fiddle namespace
|
132
|
+
# having been loaded.
|
133
|
+
raise e unless e.class.name == "Fiddle::DLError" # rubocop:disable Style/ClassEqualityComparison
|
134
|
+
# Fall through to the Linux routine
|
125
135
|
end
|
126
|
-
rescue LoadError
|
127
136
|
begin
|
128
137
|
File.open LINUX_FILEPATH do |file|
|
129
138
|
return [file.readline(chomp: true), :linux]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-env
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
@@ -72,10 +72,10 @@ homepage: https://github.com/googleapis/ruby-cloud-env
|
|
72
72
|
licenses:
|
73
73
|
- Apache-2.0
|
74
74
|
metadata:
|
75
|
-
changelog_uri: https://rubydoc.info/gems/google-cloud-env/2.3.
|
75
|
+
changelog_uri: https://rubydoc.info/gems/google-cloud-env/2.3.1/CHANGELOG.md
|
76
76
|
source_code_uri: https://github.com/googleapis/ruby-cloud-env
|
77
77
|
bug_tracker_uri: https://github.com/googleapis/ruby-cloud-env/issues
|
78
|
-
documentation_uri: https://rubydoc.info/gems/google-cloud-env/2.3.
|
78
|
+
documentation_uri: https://rubydoc.info/gems/google-cloud-env/2.3.1
|
79
79
|
rdoc_options: []
|
80
80
|
require_paths:
|
81
81
|
- lib
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
|
-
rubygems_version: 3.6.
|
93
|
+
rubygems_version: 3.6.9
|
94
94
|
specification_version: 4
|
95
95
|
summary: Google Cloud Platform hosting environment information.
|
96
96
|
test_files: []
|