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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee30017f8ce2afb2e16bbc2454e11aedc0e84bec021a6d5c25d36e35f236559f
4
- data.tar.gz: dca562b5ce756af8c59a338ec5745c0fa0655bb3a4c4f4c27b5d52541d747f6e
3
+ metadata.gz: e3d2a3f33d0f33823d9203719ac4c49862ed00b6b3b288b6851d83ca3358f8dc
4
+ data.tar.gz: 16e52c76711260d41d1f0018e022c38c9421b9ce26f4f1b36e63e58c42887d2b
5
5
  SHA512:
6
- metadata.gz: 1712c626416d21011bd9b5d8997f745a0ffdd902f73f26c0cb2eb5cf5e4dac8f89edc38a732fad7986294b73399191774edfc635beb084be5e56e93a0840e7a7
7
- data.tar.gz: 72fa796fdc5ad759cb1fb41d70a8869819aa51d1dc4ce679cb48211d83481d5b8a367046c36396f66516b42febc0082ae280498c318bed78e7d49e656c87a3ea
6
+ metadata.gz: cbdc0b547fea96b75eefa4b07724d725334258470b2bf932fc6c476c7d8f1f4edde22de46c4eb25dee06d38d5db3fa69344df9b40d1e6c8560a386aca7f62bc7
7
+ data.tar.gz: d8fd89b5762ec717e42d6b94cfab3a11a0e19c6eee961bc6e6119738d06a4d262936442f675928654a5b50b5e977f1498deff3c535ce4e22e16ff0c85774f436
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 2.3.1 (2025-05-23)
4
+
5
+ #### Bug Fixes
6
+
7
+ * Compatibility fix for JRuby 10 on non-Windows systems ([#86](https://github.com/googleapis/ruby-cloud-env/issues/86))
8
+
3
9
  ### 2.3.0 (2025-04-30)
4
10
 
5
11
  #### Features
@@ -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
- require "win32/registry"
123
- Win32::Registry::HKEY_LOCAL_MACHINE.open WINDOWS_KEYPATH do |reg|
124
- return [reg[WINDOWS_KEYNAME].to_s, :windows]
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]
@@ -20,7 +20,7 @@ module Google
20
20
  # Library version
21
21
  # @return [String]
22
22
  #
23
- VERSION = "2.3.0".freeze
23
+ VERSION = "2.3.1".freeze
24
24
  end
25
25
  end
26
26
  end
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.0
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.0/CHANGELOG.md
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.0
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.8
93
+ rubygems_version: 3.6.9
94
94
  specification_version: 4
95
95
  summary: Google Cloud Platform hosting environment information.
96
96
  test_files: []