newrelic-faraday 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MGE3Njc4NWEzNWNjZmUzNjMzMGI0OTY3MTdkYjNmZjFhMGRmOWYwYQ==
5
+ data.tar.gz: !binary |-
6
+ NmE4MjkxOWU3MjliYWE4MWRiMDMzZGY3ZjRiNjk4ZTcwNjRkODA4Ng==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ YzA2YWFhNjMyYzcwODRkMTFjMzdkNTYyZjhmZDAxY2M0OGY0NmM4MWM3NjZh
10
+ ZjdiMDJjMzBjZGNjZjAwM2I4ODNhZWZlNWE3OTkzNzVlODU3ZmYwZTY2ZjYx
11
+ N2JmN2MzYjI1ZjJkZjI2N2MzOGQ1NTJiNDM1MDI2NDlkZmFiMzk=
12
+ data.tar.gz: !binary |-
13
+ OTc1ODc5OGQyODliNTY5NGE4MmY1OTE4NTBkMmUyNzE2NmU5ZTU4MjFjOTA5
14
+ ZjdlYWY4NmI0NjQ5NzcxOTAxZjI2NzI0YTQwMzZmZTg0ZWUzMTlkZjBmMTI3
15
+ M2VlZWM2MzUxMTQyNjY0ZTQzZjhkYTczY2Y3ODRiYWE3NDJiYmE=
@@ -1,6 +1,6 @@
1
1
  = newrelic-faraday
2
2
 
3
- * http://github.com/Viximo/newrelic-faraday
3
+ * http://github.com/roguecomma/newrelic-faraday
4
4
 
5
5
  == DESCRIPTION:
6
6
 
@@ -1,26 +1,38 @@
1
- if defined?(::Faraday) and not NewRelic::Control.instance['disable_faraday'] and not ENV['NEWRELIC_ENABLE'].to_s =~ /false|off|no/i
2
- Faraday::Connection.class_eval do
3
- def run_request_with_newrelic_trace(method, url, params, headers, &block)
4
- newrelic_host = parse_host_for_newrelic url
5
- metrics = ["External/#{newrelic_host}/Faraday::Connection/#{method}", "External/#{newrelic_host}/all", "External/all"]
6
- if NewRelic::Agent::Instrumentation::MetricFrame.recording_web_transaction?
7
- metrics << "External/allWeb"
8
- else
9
- metrics << "External/allOther"
10
- end
11
- self.class.trace_execution_scoped metrics do
12
- run_request_without_newrelic_trace(method, url, params, headers, &block)
1
+ DependencyDetection.defer do
2
+ named :faraday
3
+
4
+ depends_on do
5
+ defined?(::Faraday)
6
+ end
7
+
8
+ executes do
9
+ ::NewRelic::Agent.logger.info 'Installing Faraday instrumentation'
10
+ end
11
+
12
+ executes do
13
+ Faraday::Connection.class_eval do
14
+ def run_request_with_newrelic_trace(method, url, params, headers, &block)
15
+ newrelic_host = parse_host_for_newrelic url
16
+ metrics = ["External/#{newrelic_host}/Faraday::Connection/#{method}", "External/#{newrelic_host}/all", "External/all"]
17
+ if NewRelic::Agent::Instrumentation::MetricFrame.recording_web_transaction?
18
+ metrics << "External/allWeb"
19
+ else
20
+ metrics << "External/allOther"
21
+ end
22
+ self.class.trace_execution_scoped metrics do
23
+ run_request_without_newrelic_trace(method, url, params, headers, &block)
24
+ end
13
25
  end
14
- end
15
- alias run_request_without_newrelic_trace run_request
16
- alias run_request run_request_with_newrelic_trace
26
+ alias run_request_without_newrelic_trace run_request
27
+ alias run_request run_request_with_newrelic_trace
17
28
 
18
- def parse_host_for_newrelic(url)
19
- begin
20
- return host if host
21
- URI(url).host.to_s
22
- rescue
23
- ''
29
+ def parse_host_for_newrelic(url)
30
+ begin
31
+ return host if host
32
+ URI(url).host.to_s
33
+ rescue
34
+ ''
35
+ end
24
36
  end
25
37
  end
26
38
  end
@@ -2,7 +2,7 @@ module NewrelicFaraday
2
2
  module VERSION
3
3
  MAJOR = '0'
4
4
  MINOR = '6'
5
- PATCH = '3'
5
+ PATCH = '4'
6
6
  STRING = [MAJOR, MINOR, PATCH].join('.')
7
7
  end
8
8
  end
@@ -6,14 +6,13 @@ Gem::Specification.new do |s|
6
6
  s.version = NewrelicFaraday::VERSION::STRING
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
- s.authors = ["Eric Abbott"]
10
- s.date = "2012-03-22"
9
+ s.authors = ["Eric Abbott", "Matt Griffin"]
11
10
  s.description = "Faraday instrumentation for Newrelic."
12
- s.email = ["eric.abbott@viximo.com"]
11
+ s.email = ["matt@griffinonline.org"]
13
12
  s.has_rdoc = false
14
13
  s.files = %w( README.rdoc LICENSE newrelic-faraday.gemspec )
15
14
  s.files += Dir.glob("lib/**/*")
16
- s.homepage = "http://github.com/Viximo/newrelic-faraday"
15
+ s.homepage = "http://github.com/roguecomma/newrelic-faraday"
17
16
  s.require_paths = ["lib"]
18
17
  s.rubyforge_project = "newrelic-faraday"
19
18
  s.rubygems_version = "1.5.3"
@@ -24,10 +23,9 @@ Gem::Specification.new do |s|
24
23
  s.specification_version = 3
25
24
 
26
25
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
- s.add_runtime_dependency(%q<faraday>, ["< 0.9"])
28
- s.add_runtime_dependency(%q<faraday>, [">= 0.6"])
29
- s.add_runtime_dependency(%q<newrelic_rpm>, ["~> 3.0"])
30
- s.add_development_dependency(%q<rdoc>, ["~> 3.10"])
26
+ s.add_runtime_dependency(%q<faraday>, ">= 0.6", "< 0.9")
27
+ s.add_runtime_dependency(%q<newrelic_rpm>, "~> 3.0")
28
+ s.add_development_dependency(%q<rdoc>, "~> 3.10")
31
29
  else
32
30
  s.add_dependency(%q<faraday>, ["< 0.9"])
33
31
  s.add_dependency(%q<faraday>, [">= 0.6"])
metadata CHANGED
@@ -1,52 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic-faraday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
5
- prerelease:
4
+ version: 0.6.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Eric Abbott
8
+ - Matt Griffin
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-22 00:00:00.000000000 Z
12
+ date: 2015-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
16
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
17
  requirements:
19
- - - <
18
+ - - ! '>='
20
19
  - !ruby/object:Gem::Version
21
- version: '0.9'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
20
+ version: '0.6'
27
21
  - - <
28
22
  - !ruby/object:Gem::Version
29
23
  version: '0.9'
30
- - !ruby/object:Gem::Dependency
31
- name: faraday
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0.6'
38
24
  type: :runtime
39
25
  prerelease: false
40
26
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
27
  requirements:
43
28
  - - ! '>='
44
29
  - !ruby/object:Gem::Version
45
30
  version: '0.6'
31
+ - - <
32
+ - !ruby/object:Gem::Version
33
+ version: '0.9'
46
34
  - !ruby/object:Gem::Dependency
47
35
  name: newrelic_rpm
48
36
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
37
  requirements:
51
38
  - - ~>
52
39
  - !ruby/object:Gem::Version
@@ -54,7 +41,6 @@ dependencies:
54
41
  type: :runtime
55
42
  prerelease: false
56
43
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
44
  requirements:
59
45
  - - ~>
60
46
  - !ruby/object:Gem::Version
@@ -62,7 +48,6 @@ dependencies:
62
48
  - !ruby/object:Gem::Dependency
63
49
  name: rdoc
64
50
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
51
  requirements:
67
52
  - - ~>
68
53
  - !ruby/object:Gem::Version
@@ -70,48 +55,45 @@ dependencies:
70
55
  type: :development
71
56
  prerelease: false
72
57
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
58
  requirements:
75
59
  - - ~>
76
60
  - !ruby/object:Gem::Version
77
61
  version: '3.10'
78
62
  description: Faraday instrumentation for Newrelic.
79
63
  email:
80
- - eric.abbott@viximo.com
64
+ - matt@griffinonline.org
81
65
  executables: []
82
66
  extensions: []
83
67
  extra_rdoc_files: []
84
68
  files:
85
- - README.rdoc
86
69
  - LICENSE
87
- - newrelic-faraday.gemspec
70
+ - README.rdoc
88
71
  - lib/newrelic-faraday.rb
89
72
  - lib/newrelic_faraday/instrumentation.rb
90
73
  - lib/newrelic_faraday/version.rb
91
- homepage: http://github.com/Viximo/newrelic-faraday
74
+ - newrelic-faraday.gemspec
75
+ homepage: http://github.com/roguecomma/newrelic-faraday
92
76
  licenses:
93
77
  - MIT
78
+ metadata: {}
94
79
  post_install_message:
95
80
  rdoc_options: []
96
81
  require_paths:
97
82
  - lib
98
83
  required_ruby_version: !ruby/object:Gem::Requirement
99
- none: false
100
84
  requirements:
101
85
  - - ! '>='
102
86
  - !ruby/object:Gem::Version
103
87
  version: '0'
104
88
  required_rubygems_version: !ruby/object:Gem::Requirement
105
- none: false
106
89
  requirements:
107
90
  - - ! '>='
108
91
  - !ruby/object:Gem::Version
109
92
  version: '0'
110
93
  requirements: []
111
94
  rubyforge_project: newrelic-faraday
112
- rubygems_version: 1.8.21
95
+ rubygems_version: 2.3.0
113
96
  signing_key:
114
97
  specification_version: 3
115
98
  summary: Faraday instrumentation for Newrelic.
116
99
  test_files: []
117
- has_rdoc: false