Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/maxmind/geoip2/record/anonymizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def network_last_seen
@network_last_seen = Date.parse(date_string)
end

# The name of the VPN provider (e.g., NordVPN, SurfShark, etc.)
# The name of the VPN provider (e.g., nordvpn, surfshark)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example VPN providers are now lowercase (nordvpn, surfshark), but the test in test/test_client.rb still expects a capitalized value ('NordVPN'). This inconsistency between the documentation and the test can be misleading. Please update either the test or the documentation to make them consistent.

# associated with the network. This property is only available from
# Insights.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/maxmind/geoip2/record/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def population_density
get('population_density')
end

# The time zone associated with location, as specified by the IANA Time
# The time zone associated with the location, as specified by the IANA Time
# Zone Database, e.g., "America/New_York". See
# https://www.iana.org/time-zones.
#
Expand Down
9 changes: 4 additions & 5 deletions lib/maxmind/geoip2/record/traits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def autonomous_system_organization
get('autonomous_system_organization')
end

# The connection type may take the following values: "Dialup",
# "Cable/DSL", "Corporate", "Cellular", and "Satellite". Additional
# values may be added in the future. This attribute is only available
# The connection type may take the following values: "Cable/DSL",
# "Corporate", "Cellular", and "Satellite". Additional values may be
# added in the future. This attribute is only available
# from the City Plus and Insights web services and the Enterprise
# database.
#
Expand All @@ -52,7 +52,7 @@ def connection_type
get('connection_type')
end

# The second level domain associated with the IP address. This will be
# The second-level domain associated with the IP address. This will be
# something like "example.com" or "example.co.uk", not "foo.example.com".
# This attribute is only available from the City Plus and Insights web
# services and the Enterprise database.
Expand Down Expand Up @@ -266,7 +266,6 @@ def ip_risk_snapshot
# * college
# * consumer_privacy_network
# * content_delivery_network
# * dialup
# * government
# * hosting
# * library
Expand Down
4 changes: 2 additions & 2 deletions test/test_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ClientTest < Minitest::Test
'is_residential_proxy' => true,
'is_tor_exit_node' => false,
'network_last_seen' => '2025-10-15',
'provider_name' => 'NordVPN',
'provider_name' => 'nordvpn',
},
'continent' => {
'code' => 'NA',
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_insights
assert(record.anonymizer.residential_proxy?)
refute(record.anonymizer.tor_exit_node?)
assert_equal(Date.parse('2025-10-15'), record.anonymizer.network_last_seen)
assert_equal('NordVPN', record.anonymizer.provider_name)
assert_equal('nordvpn', record.anonymizer.provider_name)

# Test traits
assert(record.traits.anycast?)
Expand Down