faraday-detailed_logger 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -2
- data/.rubocop.yml +14 -0
- data/.travis.yml +58 -19
- data/Appraisals +14 -14
- data/CHANGELOG.md +9 -5
- data/Gemfile +1 -1
- data/Gemfile.lock +146 -0
- data/README.md +17 -3
- data/Rakefile +2 -2
- data/bin/console +3 -3
- data/faraday-detailed_logger.gemspec +25 -21
- data/gemfiles/{faraday_0.10.gemfile → faraday_0.14.gemfile} +1 -1
- data/gemfiles/{faraday_0.11.gemfile → faraday_0.15.gemfile} +1 -1
- data/gemfiles/{faraday_0.9.gemfile → faraday_latest.gemfile} +1 -1
- data/lib/faraday/detailed_logger.rb +2 -2
- data/lib/faraday/detailed_logger/middleware.rb +20 -20
- data/lib/faraday/detailed_logger/tagged_logging.rb +6 -6
- data/lib/faraday/detailed_logger/version.rb +1 -1
- metadata +31 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 91d24aff65036d79a388ed02f6e7c229bf97050a428324607d2195e104f8a5d4
|
4
|
+
data.tar.gz: 9edc0d283c9673ed8296cf029143b008e32c7aff4037bc6c3b3cebf9475055c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a098569911310740177858324eb5b6ae95f21d666ac40ba0ccfb1da38fb15d186af972cae1b0ba016afc2b13a2637903ef2e4128672d94b9a5b81b919f3fd503
|
7
|
+
data.tar.gz: 78a9805f17cd6fabd388f1a549cce9fe912a3b39708ac18ef9d877e02316eb781f0d7d1eddf5cfb389e828b5c3f1811b6b550da7763006345b289443f2f7ead6
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,3 +1,17 @@
|
|
1
1
|
inherit_gem:
|
2
2
|
rubocop-rails:
|
3
3
|
- config/rails.yml
|
4
|
+
|
5
|
+
Layout/IndentationConsistency:
|
6
|
+
Enabled: true
|
7
|
+
EnforcedStyle: normal
|
8
|
+
|
9
|
+
Style/StringLiterals:
|
10
|
+
Enabled: true
|
11
|
+
EnforcedStyle: single_quotes
|
12
|
+
|
13
|
+
AllCops:
|
14
|
+
Exclude:
|
15
|
+
- 'gemfiles/*.gemfile'
|
16
|
+
TargetRailsVersion: 5.2
|
17
|
+
TargetRubyVersion: 2.5
|
data/.travis.yml
CHANGED
@@ -1,22 +1,61 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
---
|
2
|
+
before_install:
|
3
|
+
- gem install bundler -v 2.0.1
|
4
|
+
before_script:
|
5
|
+
- bundle exec license_finder licenses add bundler MIT
|
6
|
+
branches:
|
7
|
+
only:
|
8
|
+
- master
|
9
|
+
- /^v\d+\.\d+\.\d+/
|
10
|
+
cache:
|
11
|
+
bundler: true
|
12
|
+
dist: xenial
|
13
|
+
jobs:
|
13
14
|
allow_failures:
|
14
|
-
-
|
15
|
-
|
15
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_canary.gemfile
|
16
|
+
rvm: 2.6.2
|
17
|
+
|
18
|
+
fail_fast: true
|
19
|
+
|
20
|
+
include:
|
21
|
+
- stage: Test
|
22
|
+
script: bundle exec rake
|
23
|
+
rvm: 2.6.2
|
24
|
+
|
25
|
+
- stage: Latest Faraday Release
|
26
|
+
env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_latest.gemfile
|
27
|
+
rvm: 2.6.2
|
28
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_latest.gemfile
|
29
|
+
rvm: 2.5.5
|
30
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_latest.gemfile
|
31
|
+
rvm: 2.4.5
|
32
|
+
|
33
|
+
- stage: Additional Faraday Tests
|
34
|
+
env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.15.gemfile
|
35
|
+
rvm: 2.6.2
|
36
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.15.gemfile
|
37
|
+
rvm: 2.4.5
|
38
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.14.gemfile
|
39
|
+
rvm: 2.6.2
|
40
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.14.gemfile
|
41
|
+
rvm: 2.4.5
|
42
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.13.gemfile
|
43
|
+
rvm: 2.6.2
|
44
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.13.gemfile
|
45
|
+
rvm: 2.4.5
|
46
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.12.gemfile
|
47
|
+
rvm: 2.6.2
|
48
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.12.gemfile
|
49
|
+
rvm: 2.4.5
|
50
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.8.gemfile
|
51
|
+
rvm: 2.6.2
|
52
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_0.8.gemfile
|
53
|
+
rvm: 2.4.5
|
54
|
+
- env: BUNDLE_GEMFILE=$PWD/gemfiles/faraday_canary.gemfile
|
55
|
+
rvm: 2.6.2
|
56
|
+
language: ruby
|
16
57
|
notifications:
|
17
58
|
email: false
|
18
|
-
|
19
|
-
-
|
20
|
-
-
|
21
|
-
- 2.4.1
|
22
|
-
sudo: false
|
59
|
+
script:
|
60
|
+
- bundle exec license_finder --quiet
|
61
|
+
- bundle exec rake
|
data/Appraisals
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
appraise
|
4
|
-
gem
|
3
|
+
appraise 'faraday-0.8' do
|
4
|
+
gem 'faraday', '~> 0.8.0'
|
5
5
|
end
|
6
6
|
|
7
|
-
appraise
|
8
|
-
gem
|
7
|
+
appraise 'faraday-0.12' do
|
8
|
+
gem 'faraday', '~> 0.12.0'
|
9
9
|
end
|
10
10
|
|
11
|
-
appraise
|
12
|
-
gem
|
11
|
+
appraise 'faraday-0.13' do
|
12
|
+
gem 'faraday', '~> 0.13.0'
|
13
13
|
end
|
14
14
|
|
15
|
-
appraise
|
16
|
-
gem
|
15
|
+
appraise 'faraday-0.14' do
|
16
|
+
gem 'faraday', '~> 0.14.0'
|
17
17
|
end
|
18
18
|
|
19
|
-
appraise
|
20
|
-
gem
|
19
|
+
appraise 'faraday-0.15' do
|
20
|
+
gem 'faraday', '~> 0.15.0'
|
21
21
|
end
|
22
22
|
|
23
|
-
appraise
|
24
|
-
gem
|
23
|
+
appraise 'faraday-latest' do
|
24
|
+
gem 'faraday'
|
25
25
|
end
|
26
26
|
|
27
|
-
appraise
|
28
|
-
gem
|
27
|
+
appraise 'faraday-canary' do
|
28
|
+
gem 'faraday', git: 'https://github.com/lostisland/faraday.git'
|
29
29
|
end
|
data/CHANGELOG.md
CHANGED
@@ -2,22 +2,25 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://img.shields.io/gem/v/faraday-detailed_logger.svg)](https://rubygems.org/gems/faraday-detailed_logger)
|
4
4
|
[![Build Status](https://img.shields.io/travis/envylabs/faraday-detailed_logger/master.svg)](https://travis-ci.org/envylabs/faraday-detailed_logger)
|
5
|
-
[![
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/4d352482c536f5cee0c8/maintainability)](https://codeclimate.com/github/envylabs/faraday-detailed_logger/maintainability)
|
6
6
|
[![Coverage Status](https://img.shields.io/coveralls/envylabs/faraday-detailed_logger.svg)](https://coveralls.io/r/envylabs/faraday-detailed_logger)
|
7
|
-
[![Dependency Status](https://gemnasium.com/envylabs/faraday-detailed_logger.svg)](https://gemnasium.com/envylabs/faraday-detailed_logger)
|
8
7
|
[![Inline docs](https://inch-ci.org/github/envylabs/faraday-detailed_logger.svg?branch=master)](https://inch-ci.org/github/envylabs/faraday-detailed_logger)
|
9
8
|
|
10
9
|
## [HEAD][] / unreleased
|
11
10
|
|
12
11
|
* No significant changes.
|
13
12
|
|
14
|
-
## [2.1.
|
13
|
+
## [2.1.3][] / 2019-04-04
|
14
|
+
|
15
|
+
* Maintenance release, no functional changes.
|
16
|
+
|
17
|
+
## [2.1.2][] / 2017-08-21
|
15
18
|
|
16
19
|
* Update the middleware to allow the `logger` and `tags` to be publicly
|
17
20
|
accessible. This is not necessarily intended to be developer-used, but rather
|
18
21
|
fix warnings in older versions of Ruby.
|
19
22
|
|
20
|
-
## [2.1.1][] /
|
23
|
+
## [2.1.1][] / 2017-01-07
|
21
24
|
|
22
25
|
* Require faraday `~> 0.8`. This change only makes explicit the minimum version
|
23
26
|
of faraday which is supported.
|
@@ -52,4 +55,5 @@
|
|
52
55
|
[2.1.0]: https://github.com/envylabs/faraday-detailed_logger/compare/v2.0.0...v2.1.0
|
53
56
|
[2.1.1]: https://github.com/envylabs/faraday-detailed_logger/compare/v2.1.0...v2.1.1
|
54
57
|
[2.1.2]: https://github.com/envylabs/faraday-detailed_logger/compare/v2.1.1...v2.1.2
|
55
|
-
[
|
58
|
+
[2.1.3]: https://github.com/envylabs/faraday-detailed_logger/compare/v2.1.2...v2.1.3
|
59
|
+
[HEAD]: https://github.com/envylabs/faraday-detailed_logger/compare/v2.1.3...master
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
faraday-detailed_logger (2.1.3)
|
5
|
+
faraday (~> 0.8)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionpack (5.2.3)
|
11
|
+
actionview (= 5.2.3)
|
12
|
+
activesupport (= 5.2.3)
|
13
|
+
rack (~> 2.0)
|
14
|
+
rack-test (>= 0.6.3)
|
15
|
+
rails-dom-testing (~> 2.0)
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
17
|
+
actionview (5.2.3)
|
18
|
+
activesupport (= 5.2.3)
|
19
|
+
builder (~> 3.1)
|
20
|
+
erubi (~> 1.4)
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
23
|
+
activesupport (5.2.3)
|
24
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
|
+
i18n (>= 0.7, < 2)
|
26
|
+
minitest (~> 5.1)
|
27
|
+
tzinfo (~> 1.1)
|
28
|
+
appraisal (2.2.0)
|
29
|
+
bundler
|
30
|
+
rake
|
31
|
+
thor (>= 0.14.0)
|
32
|
+
ast (2.4.0)
|
33
|
+
builder (3.2.3)
|
34
|
+
concurrent-ruby (1.1.5)
|
35
|
+
coveralls (0.8.22)
|
36
|
+
json (>= 1.8, < 3)
|
37
|
+
simplecov (~> 0.16.1)
|
38
|
+
term-ansicolor (~> 1.3)
|
39
|
+
thor (~> 0.19.4)
|
40
|
+
tins (~> 1.6)
|
41
|
+
crass (1.0.4)
|
42
|
+
diff-lcs (1.3)
|
43
|
+
docile (1.3.1)
|
44
|
+
erubi (1.8.0)
|
45
|
+
faraday (0.15.4)
|
46
|
+
multipart-post (>= 1.2, < 3)
|
47
|
+
i18n (1.6.0)
|
48
|
+
concurrent-ruby (~> 1.0)
|
49
|
+
jaro_winkler (1.5.2)
|
50
|
+
json (2.2.0)
|
51
|
+
license_finder (5.7.1)
|
52
|
+
bundler
|
53
|
+
rubyzip
|
54
|
+
thor
|
55
|
+
toml (= 0.2.0)
|
56
|
+
with_env (= 1.1.0)
|
57
|
+
xml-simple
|
58
|
+
loofah (2.2.3)
|
59
|
+
crass (~> 1.0.2)
|
60
|
+
nokogiri (>= 1.5.9)
|
61
|
+
method_source (0.9.2)
|
62
|
+
mini_portile2 (2.4.0)
|
63
|
+
minitest (5.11.3)
|
64
|
+
multipart-post (2.0.0)
|
65
|
+
nokogiri (1.10.2)
|
66
|
+
mini_portile2 (~> 2.4.0)
|
67
|
+
parallel (1.17.0)
|
68
|
+
parser (2.6.2.0)
|
69
|
+
ast (~> 2.4.0)
|
70
|
+
parslet (1.8.2)
|
71
|
+
psych (3.1.0)
|
72
|
+
rack (2.0.7)
|
73
|
+
rack-test (1.1.0)
|
74
|
+
rack (>= 1.0, < 3)
|
75
|
+
rails-dom-testing (2.0.3)
|
76
|
+
activesupport (>= 4.2.0)
|
77
|
+
nokogiri (>= 1.6)
|
78
|
+
rails-html-sanitizer (1.0.4)
|
79
|
+
loofah (~> 2.2, >= 2.2.2)
|
80
|
+
railties (5.2.3)
|
81
|
+
actionpack (= 5.2.3)
|
82
|
+
activesupport (= 5.2.3)
|
83
|
+
method_source
|
84
|
+
rake (>= 0.8.7)
|
85
|
+
thor (>= 0.19.0, < 2.0)
|
86
|
+
rainbow (3.0.0)
|
87
|
+
rake (12.3.2)
|
88
|
+
rspec (3.8.0)
|
89
|
+
rspec-core (~> 3.8.0)
|
90
|
+
rspec-expectations (~> 3.8.0)
|
91
|
+
rspec-mocks (~> 3.8.0)
|
92
|
+
rspec-core (3.8.0)
|
93
|
+
rspec-support (~> 3.8.0)
|
94
|
+
rspec-expectations (3.8.2)
|
95
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
96
|
+
rspec-support (~> 3.8.0)
|
97
|
+
rspec-mocks (3.8.0)
|
98
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
99
|
+
rspec-support (~> 3.8.0)
|
100
|
+
rspec-support (3.8.0)
|
101
|
+
rubocop (0.67.0)
|
102
|
+
jaro_winkler (~> 1.5.1)
|
103
|
+
parallel (~> 1.10)
|
104
|
+
parser (>= 2.5, != 2.5.1.1)
|
105
|
+
psych (>= 3.1.0)
|
106
|
+
rainbow (>= 2.2.2, < 4.0)
|
107
|
+
ruby-progressbar (~> 1.7)
|
108
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
109
|
+
rubocop-rails_config (0.5.0)
|
110
|
+
railties (>= 3.0)
|
111
|
+
rubocop (~> 0.60)
|
112
|
+
ruby-progressbar (1.10.0)
|
113
|
+
rubyzip (1.2.2)
|
114
|
+
simplecov (0.16.1)
|
115
|
+
docile (~> 1.1)
|
116
|
+
json (>= 1.8, < 3)
|
117
|
+
simplecov-html (~> 0.10.0)
|
118
|
+
simplecov-html (0.10.2)
|
119
|
+
term-ansicolor (1.7.1)
|
120
|
+
tins (~> 1.0)
|
121
|
+
thor (0.19.4)
|
122
|
+
thread_safe (0.3.6)
|
123
|
+
tins (1.20.2)
|
124
|
+
toml (0.2.0)
|
125
|
+
parslet (~> 1.8.0)
|
126
|
+
tzinfo (1.2.5)
|
127
|
+
thread_safe (~> 0.1)
|
128
|
+
unicode-display_width (1.5.0)
|
129
|
+
with_env (1.1.0)
|
130
|
+
xml-simple (1.1.5)
|
131
|
+
|
132
|
+
PLATFORMS
|
133
|
+
ruby
|
134
|
+
|
135
|
+
DEPENDENCIES
|
136
|
+
appraisal (~> 2.0)
|
137
|
+
bundler (~> 2.0)
|
138
|
+
coveralls
|
139
|
+
faraday-detailed_logger!
|
140
|
+
license_finder (~> 5.0)
|
141
|
+
rake (~> 12.0)
|
142
|
+
rspec (~> 3.0)
|
143
|
+
rubocop-rails_config (~> 0.5.0)
|
144
|
+
|
145
|
+
BUNDLED WITH
|
146
|
+
2.0.1
|
data/README.md
CHANGED
@@ -2,9 +2,8 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://img.shields.io/gem/v/faraday-detailed_logger.svg)](https://rubygems.org/gems/faraday-detailed_logger)
|
4
4
|
[![Build Status](https://img.shields.io/travis/envylabs/faraday-detailed_logger/master.svg)](https://travis-ci.org/envylabs/faraday-detailed_logger)
|
5
|
-
[![
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/4d352482c536f5cee0c8/maintainability)](https://codeclimate.com/github/envylabs/faraday-detailed_logger/maintainability)
|
6
6
|
[![Coverage Status](https://img.shields.io/coveralls/envylabs/faraday-detailed_logger.svg)](https://coveralls.io/r/envylabs/faraday-detailed_logger)
|
7
|
-
[![Dependency Status](https://gemnasium.com/envylabs/faraday-detailed_logger.svg)](https://gemnasium.com/envylabs/faraday-detailed_logger)
|
8
7
|
[![Inline docs](https://inch-ci.org/github/envylabs/faraday-detailed_logger.svg?branch=master)](https://inch-ci.org/github/envylabs/faraday-detailed_logger)
|
9
8
|
|
10
9
|
A Faraday middleware used for providing debug- and info-level logging
|
@@ -159,4 +158,19 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/envyla
|
|
159
158
|
|
160
159
|
## License
|
161
160
|
|
162
|
-
The gem is available as open source under the terms of the [MIT License]
|
161
|
+
The gem is available as open source under the terms of the [MIT License][].
|
162
|
+
|
163
|
+
### Dependency Licensing
|
164
|
+
|
165
|
+
The dependencies and sub-dependencies of this gem are checked to be available
|
166
|
+
for Private Use, Commercial Use, Modification, and Distribution:
|
167
|
+
|
168
|
+
* [2-Clause BSD License][]
|
169
|
+
* [Apache 2.0 License][]
|
170
|
+
* [MIT License][]
|
171
|
+
* [Ruby License][]
|
172
|
+
|
173
|
+
[2-Clause BSD License]: https://opensource.org/licenses/BSD-2-Clause
|
174
|
+
[Apache 2.0 License]: https://opensource.org/licenses/Apache-2.0
|
175
|
+
[MIT License]: https://opensource.org/licenses/MIT
|
176
|
+
[Ruby License]: https://en.wikipedia.org/wiki/Ruby_License
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'faraday/detailed_logger'
|
6
6
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -11,5 +11,5 @@ require "faraday/detailed_logger"
|
|
11
11
|
# require "pry"
|
12
12
|
# Pry.start
|
13
13
|
|
14
|
-
require
|
14
|
+
require 'irb'
|
15
15
|
IRB.start(__FILE__)
|
@@ -1,38 +1,42 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
5
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
|
-
require
|
5
|
+
require 'faraday/detailed_logger/version'
|
7
6
|
|
8
7
|
Gem::Specification.new do |spec|
|
9
|
-
spec.name =
|
8
|
+
spec.name = 'faraday-detailed_logger'
|
10
9
|
spec.version = Faraday::DetailedLogger::VERSION
|
11
|
-
spec.authors = [
|
12
|
-
spec.email = [
|
10
|
+
spec.authors = ['Envy Labs']
|
11
|
+
spec.email = ['']
|
13
12
|
|
14
|
-
spec.summary =
|
13
|
+
spec.summary = 'A detailed request and response logger for Faraday.'
|
15
14
|
spec.description = %(
|
16
15
|
A Faraday middleware for logging request and response activity including
|
17
16
|
method, URI, headers, and body at varying log levels.
|
18
17
|
)
|
19
|
-
spec.homepage =
|
20
|
-
spec.license =
|
18
|
+
spec.homepage = 'https://github.com/envylabs/faraday-detailed_logger'
|
19
|
+
spec.license = 'MIT'
|
21
20
|
|
22
|
-
spec.files =
|
23
|
-
f.match(%r{^(test|spec|features)/})
|
24
|
-
|
21
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
|
+
end
|
25
24
|
|
26
|
-
spec.bindir =
|
25
|
+
spec.bindir = 'exe'
|
27
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
-
spec.require_paths = [
|
27
|
+
spec.require_paths = ['lib']
|
29
28
|
|
30
|
-
spec.
|
29
|
+
spec.metadata['changelog_uri'] = 'https://github.com/envylabs/faraday-detailed_logger/blob/master/CHANGELOG.md'
|
30
|
+
spec.metadata['source_code_uri'] = 'https://github.com/envylabs/faraday-detailed_logger'
|
31
|
+
spec.metadata['bug_tracker_uri'] = 'https://github.com/envylabs/faraday-detailed_logger/issues'
|
31
32
|
|
32
|
-
spec.
|
33
|
-
|
34
|
-
spec.add_development_dependency
|
35
|
-
spec.add_development_dependency
|
36
|
-
spec.add_development_dependency
|
37
|
-
spec.add_development_dependency
|
33
|
+
spec.add_runtime_dependency 'faraday', '~> 0.8'
|
34
|
+
|
35
|
+
spec.add_development_dependency 'appraisal', '~> 2.0'
|
36
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
37
|
+
spec.add_development_dependency 'coveralls'
|
38
|
+
spec.add_development_dependency 'license_finder', '~> 5.0'
|
39
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
40
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
41
|
+
spec.add_development_dependency 'rubocop-rails_config', '~> 0.5.0'
|
38
42
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'faraday'
|
4
|
+
require 'faraday/detailed_logger/tagged_logging'
|
5
5
|
|
6
6
|
module Faraday
|
7
7
|
module DetailedLogger
|
@@ -25,7 +25,7 @@ module Faraday
|
|
25
25
|
# Returns a Logger instance.
|
26
26
|
#
|
27
27
|
def self.default_logger
|
28
|
-
require
|
28
|
+
require 'logger'
|
29
29
|
::Logger.new($stdout)
|
30
30
|
end
|
31
31
|
|
@@ -82,27 +82,27 @@ module Faraday
|
|
82
82
|
|
83
83
|
private
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
|
85
|
+
def curl_request_output(env)
|
86
|
+
curl_output(env[:request_headers], env[:body]).inspect
|
87
|
+
end
|
88
88
|
|
89
|
-
|
90
|
-
|
91
|
-
|
89
|
+
def curl_response_output(env)
|
90
|
+
curl_output(env[:response_headers], env[:body]).inspect
|
91
|
+
end
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
def curl_output(headers, body)
|
94
|
+
string = headers.map { |k, v| "#{k}: #{v}" }.join("\n")
|
95
|
+
string + "\n\n#{body}"
|
96
|
+
end
|
97
97
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
end
|
98
|
+
def log_response_status(status, &block)
|
99
|
+
case status
|
100
|
+
when 200..399
|
101
|
+
logger.info(&block)
|
102
|
+
else
|
103
|
+
logger.warn(&block)
|
105
104
|
end
|
105
|
+
end
|
106
106
|
end
|
107
107
|
end
|
108
108
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'logger'
|
4
4
|
|
5
5
|
module Faraday
|
6
6
|
module DetailedLogger
|
@@ -48,12 +48,12 @@ module Faraday
|
|
48
48
|
|
49
49
|
private
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
end
|
51
|
+
def tags_text
|
52
|
+
tags = current_tags
|
53
|
+
if tags.any?
|
54
|
+
tags.map { |tag| "[#{tag}] " }.join
|
56
55
|
end
|
56
|
+
end
|
57
57
|
end
|
58
58
|
|
59
59
|
def self.new(logger)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday-detailed_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Envy Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: license_finder
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '5.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '5.0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rake
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,19 +109,19 @@ dependencies:
|
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '3.0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop-
|
112
|
+
name: rubocop-rails_config
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
117
|
+
version: 0.5.0
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
124
|
+
version: 0.5.0
|
111
125
|
description: "\n A Faraday middleware for logging request and response activity
|
112
126
|
including\n method, URI, headers, and body at varying log levels.\n "
|
113
127
|
email:
|
@@ -124,19 +138,21 @@ files:
|
|
124
138
|
- Appraisals
|
125
139
|
- CHANGELOG.md
|
126
140
|
- Gemfile
|
141
|
+
- Gemfile.lock
|
127
142
|
- LICENSE.txt
|
128
143
|
- README.md
|
129
144
|
- Rakefile
|
130
145
|
- bin/console
|
131
146
|
- bin/setup
|
147
|
+
- doc/dependency_decisions.yml
|
132
148
|
- faraday-detailed_logger.gemspec
|
133
|
-
- gemfiles/faraday_0.10.gemfile
|
134
|
-
- gemfiles/faraday_0.11.gemfile
|
135
149
|
- gemfiles/faraday_0.12.gemfile
|
136
150
|
- gemfiles/faraday_0.13.gemfile
|
151
|
+
- gemfiles/faraday_0.14.gemfile
|
152
|
+
- gemfiles/faraday_0.15.gemfile
|
137
153
|
- gemfiles/faraday_0.8.gemfile
|
138
|
-
- gemfiles/faraday_0.9.gemfile
|
139
154
|
- gemfiles/faraday_canary.gemfile
|
155
|
+
- gemfiles/faraday_latest.gemfile
|
140
156
|
- lib/faraday/detailed_logger.rb
|
141
157
|
- lib/faraday/detailed_logger/middleware.rb
|
142
158
|
- lib/faraday/detailed_logger/tagged_logging.rb
|
@@ -144,7 +160,10 @@ files:
|
|
144
160
|
homepage: https://github.com/envylabs/faraday-detailed_logger
|
145
161
|
licenses:
|
146
162
|
- MIT
|
147
|
-
metadata:
|
163
|
+
metadata:
|
164
|
+
changelog_uri: https://github.com/envylabs/faraday-detailed_logger/blob/master/CHANGELOG.md
|
165
|
+
source_code_uri: https://github.com/envylabs/faraday-detailed_logger
|
166
|
+
bug_tracker_uri: https://github.com/envylabs/faraday-detailed_logger/issues
|
148
167
|
post_install_message:
|
149
168
|
rdoc_options: []
|
150
169
|
require_paths:
|
@@ -160,8 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
179
|
- !ruby/object:Gem::Version
|
161
180
|
version: '0'
|
162
181
|
requirements: []
|
163
|
-
|
164
|
-
rubygems_version: 2.6.11
|
182
|
+
rubygems_version: 3.0.3
|
165
183
|
signing_key:
|
166
184
|
specification_version: 4
|
167
185
|
summary: A detailed request and response logger for Faraday.
|