Skip to content

Commit

Permalink
Merge pull request #2132 from newrelic/hashicorporeal
Browse files Browse the repository at this point in the history
CI: URL checker - simplify hash value vivification
  • Loading branch information
fallwith authored Jul 12, 2023
2 parents 5900d42 + 6d215e7 commit 56f9a97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/new_relic/agent/instrumentation/memcache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# NOTE: there are multiple implementations of the Memcached client in Ruby,
# each with slightly different APIs and semantics.
# See:
# http://www.deveiate.org/code/Ruby-MemCache/ (Gem: Ruby-MemCache)
# https://rubygems.org/gems/Ruby-MemCache (Gem: Ruby-MemCache)
# https://github.com/mperham/memcache-client (Gem: memcache-client)
# https://github.com/mperham/dalli (Gem: dalli)

Expand Down
7 changes: 2 additions & 5 deletions test/new_relic/healthy_urls_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def real_url?(url)
end

def gather_urls
Dir.glob(File.join(ROOT, '**', '*')).each_with_object({}) do |file, urls|
Dir.glob(File.join(ROOT, '**', '*')).each_with_object(Hash.new { |hash, key| hash[key] = [] }) do |file, urls|
next unless File.file?(file) && File.basename(file).match?(FILE_PATTERN) && !file.match?(IGNORED_FILE_PATTERN)

changelog_entries_seen = 0
Expand All @@ -104,10 +104,7 @@ def gather_urls
next unless line =~ URL_PATTERN

url = Regexp.last_match(1).sub(%r{(?:/|\.)$}, '')
if real_url?(url)
urls[url] ||= []
urls[url] << file
end
urls[url] << file if real_url?(url)
end
end
end
Expand Down

0 comments on commit 56f9a97

Please sign in to comment.