copperegg-apm 1.0.0.pre3 → 1.0.0.pre4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/copperegg_apm_test.db +0 -0
- data/lib/copperegg/apm/benchmark.rb +8 -2
- data/lib/copperegg/apm/version.rb +1 -1
- data/spec/apm_spec.rb +15 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79163ffe60c85728d0ef7395b45576b8adafe04a
|
4
|
+
data.tar.gz: dac7a7d0928a0b5ed9d3db1781e488a9e9e44598
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49594494683194b6838c4c5a40dac5a44addadb07cf2039232ec1b4115fe3b1dc3e684143a231b23a2d45d0bea33fd152d18b1c0e5f5fd570299ae632ceac898
|
7
|
+
data.tar.gz: 093ba0a311bc4c252686d63894d6faedb0fd14a255e9fecb68067d9e23a2baccbaf38c17a0c111c9e3ff6fe5e638ad4de33ba77357c7ee95ac11f9a42efed8b4
|
data/Gemfile.lock
CHANGED
data/copperegg_apm_test.db
CHANGED
Binary file
|
@@ -14,9 +14,15 @@ module CopperEgg
|
|
14
14
|
module_function
|
15
15
|
|
16
16
|
def configure(&block)
|
17
|
-
@@payload_cache = {:version => CopperEgg::APM::GEM_VERSION}.to_json
|
18
|
-
send_payload_cache
|
19
17
|
Configuration.configure(&block)
|
18
|
+
@@payload_cache = { :version => GEM_VERSION,
|
19
|
+
:id => Configuration.instrument_key,
|
20
|
+
:sql => Configuration.benchmark_sql?,
|
21
|
+
:http => Configuration.benchmark_http?,
|
22
|
+
:exceptions => Configuration.benchmark_exceptions?,
|
23
|
+
:methods => Configuration.benchmark_methods_level
|
24
|
+
}.to_json
|
25
|
+
send_payload_cache
|
20
26
|
end
|
21
27
|
|
22
28
|
def benchmark(arg, &block)
|
data/spec/apm_spec.rb
CHANGED
@@ -22,6 +22,21 @@ module Baz
|
|
22
22
|
end
|
23
23
|
|
24
24
|
describe CopperEgg::APM do
|
25
|
+
describe ".configure" do
|
26
|
+
it "should send a payload with version and configuration settings" do
|
27
|
+
Socket.any_instance.should_receive(:send) do |payload_cache, flag|
|
28
|
+
hash = JSON.parse(payload_cache)
|
29
|
+
expect(hash["version"]).to eq CopperEgg::APM::GEM_VERSION
|
30
|
+
expect(hash["id"]).to match(/\A[0-1a-z]{16}\z/i)
|
31
|
+
expect(hash["sql"]).to eq true
|
32
|
+
expect(hash["http"]).to eq true
|
33
|
+
expect(hash["exceptions"]).to eq true
|
34
|
+
expect(hash["methods"]).to eq "disabled"
|
35
|
+
end
|
36
|
+
CopperEgg::APM.configure {|config|}
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
25
40
|
describe ".trim_stacktrace" do
|
26
41
|
it "should remove lines not in app root" do
|
27
42
|
CopperEgg::APM::Configuration.app_root = "/deploy/current/"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copperegg-apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.pre4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Bradford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -291,7 +291,7 @@ rubyforge_project:
|
|
291
291
|
rubygems_version: 2.0.3
|
292
292
|
signing_key:
|
293
293
|
specification_version: 4
|
294
|
-
summary: copperegg-apm-1.0.0.
|
294
|
+
summary: copperegg-apm-1.0.0.pre4
|
295
295
|
test_files:
|
296
296
|
- spec/action_controller_spec.rb
|
297
297
|
- spec/apm_spec.rb
|