newrelic-dragonfly 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/lib/newrelic/dragonfly/instrumentation/instrumentation.rb +1 -1
- data/lib/newrelic/dragonfly/version.rb +1 -1
- data/spec/instrumentation_spec.rb +22 -1
- data/spec/spec_helper.rb +11 -3
- 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: d4034dddc94d3027cf42706b8f4331714d02f18f
|
4
|
+
data.tar.gz: 4f8ae40b4b01a61c4993e34b0298f3b854c4126e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a7efd36b1970de415d385a2b64c289a0a2b7acea85478a4526fa20fbdacc16e2865cf50471fe4ebd4b4db3cc1278240beaf53dafd86db7236a898160c89aa46
|
7
|
+
data.tar.gz: 6a0a819d3e40aab17e0e95eaeff634e108a7a959715d32eb5fa8da4681e87247429821d275a5074057eb64c2edb559719dab4fb685f270376495ac80f7ab896d
|
data/Gemfile
CHANGED
@@ -3,7 +3,12 @@ require 'spec_helper'
|
|
3
3
|
describe Newrelic::Dragonfly do
|
4
4
|
include Rack::Test::Methods
|
5
5
|
|
6
|
-
let(:
|
6
|
+
let(:root_path) { Dir.mktmpdir }
|
7
|
+
after { FileUtils.remove_entry_secure root_path }
|
8
|
+
|
9
|
+
let(:app) { Dragonfly.app(:images) }
|
10
|
+
before { app.use_datastore :file, root_path: root_path }
|
11
|
+
|
7
12
|
let(:uid) { app.store fixture('sample.png') }
|
8
13
|
|
9
14
|
let(:agent) { NewRelic::Agent.instance }
|
@@ -21,3 +26,19 @@ describe Newrelic::Dragonfly do
|
|
21
26
|
agent.transaction_sampler.last_sample.to_s.should include 'Dragonfly::ImageMagick::Processors::Encode'
|
22
27
|
end
|
23
28
|
end
|
29
|
+
|
30
|
+
describe Newrelic::Dragonfly, Dragonfly::S3DataStore do
|
31
|
+
include Rack::Test::Methods
|
32
|
+
|
33
|
+
let(:app) { Dragonfly.app(:images) }
|
34
|
+
before { app.use_datastore :s3, bucket_name: 'dragonfly', access_key_id: 'dummy', secret_access_key: 'dummy' }
|
35
|
+
|
36
|
+
let(:uid) { app.store fixture('sample.png') }
|
37
|
+
|
38
|
+
let(:agent) { NewRelic::Agent.instance }
|
39
|
+
|
40
|
+
it 'include s3 instrumentation' do
|
41
|
+
get app.create.fetch(uid).url
|
42
|
+
agent.transaction_sampler.last_sample.to_s.should include 'Dragonfly::S3DataStore'
|
43
|
+
end
|
44
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -6,7 +6,14 @@ Bundler.require :default, :test
|
|
6
6
|
|
7
7
|
RSpec.configure do |config|
|
8
8
|
config.before(:suite) do
|
9
|
-
|
9
|
+
Fog.mock!
|
10
|
+
end
|
11
|
+
|
12
|
+
config.before(:suite) do
|
13
|
+
Dragonfly.logger = Logger.new STDOUT
|
14
|
+
Dragonfly.app(:images).configure do
|
15
|
+
plugin :imagemagick
|
16
|
+
end
|
10
17
|
end
|
11
18
|
|
12
19
|
config.before(:suite) do
|
@@ -15,8 +22,9 @@ RSpec.configure do |config|
|
|
15
22
|
end
|
16
23
|
|
17
24
|
config.before(:each) do
|
18
|
-
|
19
|
-
|
25
|
+
agent = NewRelic::Agent.instance
|
26
|
+
agent.stats_engine.clear_stats
|
27
|
+
agent.transaction_sampler.reset!
|
20
28
|
end
|
21
29
|
end
|
22
30
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic-dragonfly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- miyucy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|