Skip to content

Commit 7e7148b

Browse files
authored
T-4821 Avoid Rails methods in pure Ruby, fix CI (#33)
1 parent 6993d4b commit 7e7148b

File tree

6 files changed

+22
-20
lines changed

6 files changed

+22
-20
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@ jobs:
1515

1616
matrix:
1717
ruby-version:
18-
- 3.2
19-
- 3.1
20-
- 3.0
21-
- 2.7
22-
- 2.6
23-
- 2.5
24-
- 2.4
25-
- 2.3
26-
- jruby-9.4.3.0
27-
- jruby-9.2.14.0
28-
- truffleruby-23.0.0
29-
- truffleruby-22.1.0
18+
- "3"
19+
- "3.4"
20+
- "3.3"
21+
- "3.2"
22+
- "3.1"
23+
- "3.0"
24+
- "2.7"
25+
- "2.6"
26+
- "2.5"
27+
- "jruby-9.4.3.0"
28+
- "jruby-9.2.14.0"
29+
- "truffleruby-23.0.0"
30+
- "truffleruby-22.1.0"
3031

3132
steps:
3233
- uses: actions/checkout@v2

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ gemspec
88
gem "rake", "~> 13.0"
99

1010
gem "rspec", "~> 3.0"
11+
gem "base64" if RUBY_VERSION >= "3.4.0"

example-project/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
source 'https://rubygems.org'
2-
gem "logtail", "~> 0.1.14"
2+
gem "logtail", "~> 0.1.15"

example-project/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
logtail (0.1.14)
4+
logtail (0.1.15)
55
msgpack (~> 1.0)
66
msgpack (1.7.2)
77

88
PLATFORMS
99
ruby
1010

1111
DEPENDENCIES
12-
logtail (~> 0.1.14)
12+
logtail (~> 0.1.15)
1313

1414
BUNDLED WITH
1515
2.1.4

lib/logtail/log_devices/http.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class HTTP
2121
DEFAULT_INGESTING_PORT = 443
2222
DEFAULT_INGESTING_SCHEME = "https".freeze
2323
CONTENT_TYPE = "application/msgpack".freeze
24-
USER_AGENT = "Better Stack Telemetry for Ruby/#{Logtail::VERSION} (HTTP)".freeze
24+
USER_AGENT = "Logtail Ruby/#{Logtail::VERSION} (HTTP)".freeze
2525

2626
# Instantiates a new HTTP log device that can be passed to {Logtail::Logger#initialize}.
2727
#
@@ -69,9 +69,9 @@ class HTTP
6969
# Logtail::Logger.new(http_log_device)
7070
def initialize(source_token, options = {})
7171
# Handle backward-compatibility of argument names
72-
options[:ingesting_host] ||= options[:ingesting_host] if options[:ingesting_host].present?
73-
options[:ingesting_port] ||= options[:logtail_port] if options[:logtail_port].present?
74-
options[:ingesting_scheme] ||= options[:logtail_scheme] if options[:logtail_scheme].present?
72+
options[:ingesting_host] ||= options[:logtail_host]
73+
options[:ingesting_port] ||= options[:logtail_port]
74+
options[:ingesting_scheme] ||= options[:logtail_scheme]
7575

7676
@source_token = source_token || raise(ArgumentError.new("The source_token parameter cannot be blank"))
7777
@ingesting_host = options[:ingesting_host] || ENV['INGESTING_HOST'] || ENV['LOGTAIL_HOST'] || DEFAULT_INGESTING_HOST

lib/logtail/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Logtail
2-
VERSION = "0.1.14"
2+
VERSION = "0.1.15"
33
end

0 commit comments

Comments
 (0)