appsignal 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/appsignal/cli/diagnose.rb +2 -1
- data/lib/appsignal/hooks/rake.rb +5 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/cli/diagnose_spec.rb +1 -1
- data/spec/lib/appsignal/hooks/rake_spec.rb +19 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5aa85a93e18c0f2eaea8092efacae7a033f139b
|
4
|
+
data.tar.gz: 6cffdf6eacf9c4a7e25ec324b9e24e8638b05341
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f53eb19a35f673c2f6b79e8e9a20ccc20f09c9d604c1c4221284fa166b41fba0b1b55787ae8888092672a9fd5ffc822a8c2fb672ed385de345f90ba1ecf00072
|
7
|
+
data.tar.gz: 4813fbced178b4deded50623519c96e87b8d8382b1c8e8ba1bcf396758546999ba6c2e6ce35944f04e476725fad37b039b4c398b6c67e701ea8aa31c5c775514
|
data/CHANGELOG.md
CHANGED
@@ -132,7 +132,8 @@ module Appsignal
|
|
132
132
|
return
|
133
133
|
end
|
134
134
|
|
135
|
-
puts "
|
135
|
+
puts " Please email us at support@appsignal.com with the following"
|
136
|
+
puts " support token."
|
136
137
|
begin
|
137
138
|
response_data = JSON.parse(response.body)
|
138
139
|
puts " Your support token: #{response_data["token"]}"
|
data/lib/appsignal/hooks/rake.rb
CHANGED
@@ -15,11 +15,15 @@ module Appsignal
|
|
15
15
|
def execute(*args)
|
16
16
|
execute_without_appsignal(*args)
|
17
17
|
rescue => error
|
18
|
+
# Format given arguments and cast to hash if possible
|
19
|
+
params, _ = args
|
20
|
+
params = params.to_hash if params.respond_to?(:to_hash)
|
21
|
+
|
18
22
|
transaction = Appsignal::Transaction.create(
|
19
23
|
SecureRandom.uuid,
|
20
24
|
Appsignal::Transaction::BACKGROUND_JOB,
|
21
25
|
Appsignal::Transaction::GenericRequest.new(
|
22
|
-
:params =>
|
26
|
+
:params => params
|
23
27
|
)
|
24
28
|
)
|
25
29
|
transaction.set_action(name)
|
data/lib/appsignal/version.rb
CHANGED
@@ -104,7 +104,7 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :report => true do
|
|
104
104
|
run
|
105
105
|
expect(output).to include "Diagnostics report",
|
106
106
|
"Send diagnostics report to AppSignal? (Y/n): ",
|
107
|
-
"
|
107
|
+
"Please email us at support@appsignal.com with the following\n support token."
|
108
108
|
end
|
109
109
|
|
110
110
|
it "outputs the support token from the server" do
|
@@ -2,6 +2,8 @@ require "rake"
|
|
2
2
|
|
3
3
|
describe Appsignal::Hooks::RakeHook do
|
4
4
|
let(:task) { Rake::Task.new("task:name", Rake::Application.new) }
|
5
|
+
let(:arguments) { Rake::TaskArguments.new(["foo"], ["bar"]) }
|
6
|
+
let(:generic_request) { Appsignal::Transaction::GenericRequest.new({}) }
|
5
7
|
before(:context) do
|
6
8
|
Appsignal.config = project_fixture_config
|
7
9
|
expect(Appsignal.active?).to be_truthy
|
@@ -47,8 +49,24 @@ describe Appsignal::Hooks::RakeHook do
|
|
47
49
|
expect(Appsignal).to receive(:stop).with("rake").ordered
|
48
50
|
end
|
49
51
|
|
52
|
+
it "adds the task arguments to the request" do
|
53
|
+
expect(Appsignal::Transaction::GenericRequest).to receive(:new)
|
54
|
+
.with(:params => { :foo => "bar" })
|
55
|
+
.and_return(generic_request)
|
56
|
+
end
|
57
|
+
|
58
|
+
context "when first argument is not a `Rake::TaskArguments`" do
|
59
|
+
let(:arguments) { nil }
|
60
|
+
|
61
|
+
it "adds the first argument regardless" do
|
62
|
+
expect(Appsignal::Transaction::GenericRequest).to receive(:new)
|
63
|
+
.with(:params => nil)
|
64
|
+
.and_return(generic_request)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
50
68
|
after do
|
51
|
-
expect { task.execute(
|
69
|
+
expect { task.execute(arguments) }.to raise_error VerySpecificError
|
52
70
|
end
|
53
71
|
end
|
54
72
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-08-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|