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 .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.2.2
42 changes: 26 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
ast (2.4.3)
base64 (0.2.0)
coderay (1.1.3)
diff-lcs (1.4.4)
json (2.15.1)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
logger (1.6.1)
method_source (1.0.0)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
nio4r (2.7.4)
parallel (1.20.1)
parser (3.0.2.0)
parallel (1.27.0)
parser (3.3.9.0)
ast (~> 2.4.1)
racc
prism (1.5.1)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
puma (6.5.0)
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.16)
rack-protection (4.1.0)
base64 (>= 0.1.0)
Expand All @@ -28,9 +34,8 @@ GEM
rack (>= 3.0.0)
rackup (2.2.1)
rack (>= 3)
rainbow (3.0.0)
regexp_parser (2.1.1)
rexml (3.4.2)
rainbow (3.1.1)
regexp_parser (2.11.3)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
Expand All @@ -44,18 +49,21 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rubocop (1.18.4)
rubocop (1.81.1)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.8.0, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.47.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.9.0)
parser (>= 3.0.1.1)
ruby-progressbar (1.11.0)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.47.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
sinatra (4.1.0)
logger (>= 1.6.0)
Expand All @@ -65,7 +73,9 @@ GEM
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
tilt (2.4.0)
unicode-display_width (2.0.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.1.0)

PLATFORMS
ruby
Expand Down
13 changes: 9 additions & 4 deletions spec/diagnose_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{
"api_key" => "test",
"environment" => kind_of(String),
"hostname" => be_empty.or(be_nil),
"hostname" => be_empty.or(be_nil).or(be_a(String)),
"name" => "DiagnoseTests"
}.merge(matchers || {})
)
Expand Down Expand Up @@ -530,6 +530,7 @@
/ send_session_data: True/,
/ request_headers: \['accept', 'accept-charset', 'accept-encoding', 'accept-language', 'cache-control', 'connection', 'content-length', 'range'\]/, # rubocop:disable Layout/LineLength
/ app_path:/,
/ hostname:/,
/ name: #{quoted "DiagnoseTests"}/,
/ push_api_key: #{quoted "test"}/
]
Expand Down Expand Up @@ -705,6 +706,7 @@
"endpoint" => ENV.fetch("APPSIGNAL_PUSH_API_ENDPOINT", nil),
"environment" => "development",
"files_world_accessible" => true,
"hostname" => kind_of(String),
"log" => "file",
"log_level" => "info",
"logging_endpoint" => "https://appsignal-endpoint.net",
Expand Down Expand Up @@ -947,7 +949,10 @@
"range"
]
},
"system" => { "app_path" => ending_with("diagnose/python") },
"system" => {
"app_path" => ending_with("diagnose/python"),
"hostname" => kind_of(String)
},
"initial" => { "name" => "DiagnoseTests" },
"environment" => {
"diagnose_endpoint" => ending_with("diag"),
Expand Down Expand Up @@ -994,7 +999,7 @@
{
"api_key" => "test",
"environment" => kind_of(String),
"hostname" => be_empty.or(be_nil),
"hostname" => be_empty.or(be_nil).or(be_a(String)),
"name" => "DiagnoseTests"
}.merge(matchers || {})
)
Expand Down Expand Up @@ -1358,7 +1363,7 @@
{
"api_key" => be_empty.or(be_nil),
"environment" => kind_of(String),
"hostname" => be_empty.or(be_nil),
"hostname" => be_empty.or(be_nil).or(be_a(String)),
"name" => "DiagnoseTests"
}.merge(matchers || {})
)
Expand Down
16 changes: 8 additions & 8 deletions spec/support/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def to_s
@lines.join("\n")
end

private

SECTIONS = {
"AppSignal diagnose" => :header,
"AppSignal library" => :library,
Expand All @@ -45,6 +43,8 @@ def to_s
"Diagnostics report" => :send_report
}.freeze

private

def parse_output
sections = Hash.new { |hash, key| hash[key] = [] }
section_index = :other
Expand Down Expand Up @@ -93,8 +93,8 @@ def install_report?
def run_env
{
"APPSIGNAL_PUSH_API_KEY" => @push_api_key,
"APPSIGNAL_PUSH_API_ENDPOINT" => ENV["APPSIGNAL_PUSH_API_ENDPOINT"],
"APPSIGNAL_DIAGNOSE_ENDPOINT" => ENV["APPSIGNAL_DIAGNOSE_ENDPOINT"]
"APPSIGNAL_PUSH_API_ENDPOINT" => ENV.fetch("APPSIGNAL_PUSH_API_ENDPOINT", nil),
"APPSIGNAL_DIAGNOSE_ENDPOINT" => ENV.fetch("APPSIGNAL_DIAGNOSE_ENDPOINT", nil)
}
end

Expand Down Expand Up @@ -244,8 +244,8 @@ def after_setup
if install_report?
# Overwite created install report so we have a consistent test environment
File.write(install_report_path, install_report)
elsif File.exist?(install_report_path)
File.delete(install_report_path)
else
FileUtils.rm_f(install_report_path)
end
File.write("/tmp/appsignal.log", appsignal_log)
end
Expand Down Expand Up @@ -457,8 +457,8 @@ def after_setup
install_report_path = File.join(integration_path, "ext/install.report")
if install_report?
File.write(install_report_path, install_report)
elsif File.exist?(install_report_path)
File.delete(install_report_path)
else
FileUtils.rm_f(install_report_path)
end
File.write("/tmp/appsignal.log", appsignal_log)
end
Expand Down
Loading