Skip to content

Commit

Permalink
This fixes a problem with the specs. DB support is still broken. :(
Browse files Browse the repository at this point in the history
  • Loading branch information
wyhaines committed Dec 4, 2024
1 parent 9b26aab commit 83eace8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.2
0.5.5
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: opentelemetry-instrumentation
version: 0.5.4
version: 0.5.5

authors:
- Kirk Haines <[email protected]>
Expand Down
1 change: 0 additions & 1 deletion spec/instrumentation/not_defined_spec.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "../spec_helper"
require "defined"

# This spec just tests the null case....an instrument that does not exist should, in fact,
# not exist.
Expand Down
12 changes: 7 additions & 5 deletions spec/instrumentation/stefanwille_redis_spec_helper.cr
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
require "defined"
require "spec"

if_defined?(Redis::Strategy::SingleStatement) do
# A poor man's sort for an array of redis values.
#
# I don't know how to do this better within Crystal's type system.
def sort(a)
{{ "def sort(a)
unless a.is_a? Array(Redis::RedisValue)
raise "Cannot sort this: #{a.class}"
raise \"Cannot sort this: \#{a.class}\"
end
convert_to_string_array(a).sort
Expand All @@ -16,13 +17,14 @@ if_defined?(Redis::Strategy::SingleStatement) do
a.map(&.to_s)
end
# Same as `sort` except sorting feature
# Same as \`sort\` except sorting feature
def array(a) : Array(String)
(a.as(Array(Redis::RedisValue))).map(&.to_s)
rescue
raise "Cannot convert to Array(Redis::RedisValue): #{a.class}"
raise \"Cannot convert to Array(Redis::RedisValue): \#{a.class}\"
end
TEST_UNIXSOCKET = ENV["CI_UNIXSOCKET"]? || "/tmp/redis.sock"
TEST_UNIXSOCKET = ENV[\"CI_UNIXSOCKET\"]? || \"/tmp/redis.sock\"
PASSWORD_PORT = 6380
" }}
end
1 change: 1 addition & 0 deletions spec/spec_helper.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "defined"
require "spec"
require "db"
require "./instrumentation/framework_lucky/mocks"
Expand Down

0 comments on commit 83eace8

Please sign in to comment.