Skip to content

Commit 471c173

Browse files
committed
Only use Strings in client metadata document values
1 parent 4dee654 commit 471c173

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/mongo/cluster/app_metadata.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ class AppMetadata
3636
# @ since 2.4.0
3737
MAX_APP_NAME_SIZE = 128.freeze
3838

39+
# The driver name.
40+
#
41+
# @ since 2.4.0
42+
DRIVER_NAME = 'mongo-ruby-driver'
43+
3944
# Instantiate the new AppMetadata object.
4045
#
4146
# @api private
@@ -101,7 +106,7 @@ def serialize
101106

102107
def driver_doc
103108
{
104-
name: :'mongo-ruby-driver',
109+
name: DRIVER_NAME,
105110
version: Mongo::VERSION
106111
}
107112
end
@@ -116,7 +121,7 @@ def os_doc
116121

117122
def type
118123
(RbConfig::CONFIG && RbConfig::CONFIG['host_os']) ?
119-
RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase.to_sym : :unknown
124+
RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase : 'unknown'
120125
end
121126

122127
def name

0 commit comments

Comments
 (0)