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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: beedd3ba78e01af0d41fb8220cce012a0441491a
4
- data.tar.gz: 69a3c46b3f4d6a9a2c3b440b62f4d905b9bbb587
3
+ metadata.gz: 79163ffe60c85728d0ef7395b45576b8adafe04a
4
+ data.tar.gz: dac7a7d0928a0b5ed9d3db1781e488a9e9e44598
5
5
  SHA512:
6
- metadata.gz: cc6c2e4abfc822f06d85d6fc635ed00d317d8b602998c5ad124c4256c59716b648b0762eeb284f5416a0bb8196907f07967967ceab3c635d349fcde997ebe942
7
- data.tar.gz: 181e044f77964cb87e8c81237b49732909b8d0f4f80d407b53333fface58eca151b4d112f6d08962b0c4eae7702c4961c86676a028daa41b7fdbdf31d4a574bb
6
+ metadata.gz: 49594494683194b6838c4c5a40dac5a44addadb07cf2039232ec1b4115fe3b1dc3e684143a231b23a2d45d0bea33fd152d18b1c0e5f5fd570299ae632ceac898
7
+ data.tar.gz: 093ba0a311bc4c252686d63894d6faedb0fd14a255e9fecb68067d9e23a2baccbaf38c17a0c111c9e3ff6fe5e638ad4de33ba77357c7ee95ac11f9a42efed8b4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- copperegg-apm (1.0.0.pre2)
4
+ copperegg-apm (1.0.0.pre4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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)
@@ -1,5 +1,5 @@
1
1
  module CopperEgg
2
2
  module APM
3
- GEM_VERSION = '1.0.0.pre3'
3
+ GEM_VERSION = '1.0.0.pre4'
4
4
  end
5
5
  end
@@ -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.pre3
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-30 00:00:00.000000000 Z
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.pre3
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