httplog 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/httplog.gemspec +2 -1
- data/lib/httplog/version.rb +1 -1
- metadata +2 -44
- data/.gitignore +0 -7
- data/.rspec +0 -2
- data/.rubocop.yml +0 -55
- data/.rubocop_todo.yml +0 -36
- data/.ruby-version +0 -1
- data/.travis.yml +0 -17
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -130
- data/Guardfile +0 -25
- data/MIT-LICENSE +0 -20
- data/Rakefile +0 -46
- data/gemfiles/http3.gemfile +0 -7
- data/gemfiles/http4.gemfile +0 -7
- data/gemfiles/http5.gemfile +0 -7
- data/gemfiles/rack1.gemfile +0 -7
- data/gemfiles/rack2.gemfile +0 -7
- data/spec/adapters/ethon_adapter.rb +0 -26
- data/spec/adapters/excon_adapter.rb +0 -16
- data/spec/adapters/faraday_adapter.rb +0 -59
- data/spec/adapters/http_adapter.rb +0 -27
- data/spec/adapters/http_base_adapter.rb +0 -39
- data/spec/adapters/httparty_adapter.rb +0 -16
- data/spec/adapters/httpclient_adapter.rb +0 -31
- data/spec/adapters/net_http_adapter.rb +0 -21
- data/spec/adapters/open_uri_adapter.rb +0 -19
- data/spec/adapters/patron_adapter.rb +0 -36
- data/spec/adapters/typhoeus_adapter.rb +0 -28
- data/spec/configuration_spec.rb +0 -22
- data/spec/lib/http_client_spec.rb +0 -15
- data/spec/lib/http_log_spec.rb +0 -320
- data/spec/log/.gitkeep +0 -0
- data/spec/spec_helper.rb +0 -45
- data/spec/support/index.html +0 -8
- data/spec/support/index.html.gz +0 -0
- data/spec/support/log4r.yml +0 -17
- data/spec/support/not_gzipped.html.gz +0 -8
- data/spec/support/shared_examples.rb +0 -79
- data/spec/support/test.bin +0 -0
- data/spec/support/test.pdf +0 -198
- data/spec/support/test_server.rb +0 -34
- data/spec/support/utf8-invalid.html +0 -0
- data/spec/support/utf8.html +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5d566f72650b5c55a8ae3dfc25dd551b9779eccce87cd307b31a0e134e25443
|
4
|
+
data.tar.gz: 6842fc573dfe4dc2e747b4c480b2a03c547813a05fc0bec13263af20c8a599b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61809a350f2a87225e275d49691539a10081ae8e4457c772cdc056fc9788c2c11913bf63647e76b3d5b81da2c6aaf83e4405e8224adc1120e04eabedd8f3b541
|
7
|
+
data.tar.gz: ac37ba6e331d1a553925b13361ea786728e20f608bddb9f3037b9fbb346ece62577def82c18319e9ae397e00c5bcccfd0b7637ea642c0659118c94689dfa0c37
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 1.3.1 - 2019-06-07
|
2
|
+
|
3
|
+
* [#76](https://github.com/trusche/httplog/pull/76) Added configurable logger method
|
4
|
+
|
1
5
|
## 1.3.0 - 2019-05-18
|
2
6
|
|
3
7
|
* [#74](https://github.com/trusche/httplog/pull/74) Added ability to filter sensitive parameter values in the request (based on [#73](https://github.com/trusche/httplog/pull/73)). Default masking of `password` parameter
|
data/httplog.gemspec
CHANGED
@@ -17,7 +17,8 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.description = "Log outgoing HTTP requests made from your application. Helpful for tracking API calls
|
18
18
|
of third party gems that don't provide their own log output."
|
19
19
|
|
20
|
-
gem.files =
|
20
|
+
gem.files = Dir['lib/**/*.rb'] +
|
21
|
+
%w(httplog.gemspec README.md CHANGELOG.md)
|
21
22
|
gem.test_files = `git ls-files -- test/*`.split("\n")
|
22
23
|
gem.require_paths = ['lib']
|
23
24
|
|
data/lib/httplog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httplog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thilo Rusche
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ethon
|
@@ -228,24 +228,8 @@ executables: []
|
|
228
228
|
extensions: []
|
229
229
|
extra_rdoc_files: []
|
230
230
|
files:
|
231
|
-
- ".gitignore"
|
232
|
-
- ".rspec"
|
233
|
-
- ".rubocop.yml"
|
234
|
-
- ".rubocop_todo.yml"
|
235
|
-
- ".ruby-version"
|
236
|
-
- ".travis.yml"
|
237
231
|
- CHANGELOG.md
|
238
|
-
- Gemfile
|
239
|
-
- Gemfile.lock
|
240
|
-
- Guardfile
|
241
|
-
- MIT-LICENSE
|
242
232
|
- README.md
|
243
|
-
- Rakefile
|
244
|
-
- gemfiles/http3.gemfile
|
245
|
-
- gemfiles/http4.gemfile
|
246
|
-
- gemfiles/http5.gemfile
|
247
|
-
- gemfiles/rack1.gemfile
|
248
|
-
- gemfiles/rack2.gemfile
|
249
233
|
- httplog.gemspec
|
250
234
|
- lib/httplog.rb
|
251
235
|
- lib/httplog/adapters/ethon.rb
|
@@ -257,32 +241,6 @@ files:
|
|
257
241
|
- lib/httplog/configuration.rb
|
258
242
|
- lib/httplog/http_log.rb
|
259
243
|
- lib/httplog/version.rb
|
260
|
-
- spec/adapters/ethon_adapter.rb
|
261
|
-
- spec/adapters/excon_adapter.rb
|
262
|
-
- spec/adapters/faraday_adapter.rb
|
263
|
-
- spec/adapters/http_adapter.rb
|
264
|
-
- spec/adapters/http_base_adapter.rb
|
265
|
-
- spec/adapters/httparty_adapter.rb
|
266
|
-
- spec/adapters/httpclient_adapter.rb
|
267
|
-
- spec/adapters/net_http_adapter.rb
|
268
|
-
- spec/adapters/open_uri_adapter.rb
|
269
|
-
- spec/adapters/patron_adapter.rb
|
270
|
-
- spec/adapters/typhoeus_adapter.rb
|
271
|
-
- spec/configuration_spec.rb
|
272
|
-
- spec/lib/http_client_spec.rb
|
273
|
-
- spec/lib/http_log_spec.rb
|
274
|
-
- spec/log/.gitkeep
|
275
|
-
- spec/spec_helper.rb
|
276
|
-
- spec/support/index.html
|
277
|
-
- spec/support/index.html.gz
|
278
|
-
- spec/support/log4r.yml
|
279
|
-
- spec/support/not_gzipped.html.gz
|
280
|
-
- spec/support/shared_examples.rb
|
281
|
-
- spec/support/test.bin
|
282
|
-
- spec/support/test.pdf
|
283
|
-
- spec/support/test_server.rb
|
284
|
-
- spec/support/utf8-invalid.html
|
285
|
-
- spec/support/utf8.html
|
286
244
|
homepage: http://github.com/trusche/httplog
|
287
245
|
licenses:
|
288
246
|
- MIT
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
inherit_from: ./.rubocop_todo.yml
|
2
|
-
|
3
|
-
AllCops:
|
4
|
-
TargetRubyVersion: 2.2
|
5
|
-
Exclude:
|
6
|
-
- 'db/**/*'
|
7
|
-
- 'db/schema.rb'
|
8
|
-
- 'app/assets/**'
|
9
|
-
- 'config/**/*'
|
10
|
-
- 'bin/**/*'
|
11
|
-
- 'node_modules/**/*'
|
12
|
-
- 'public/**/*'
|
13
|
-
- 'tmp/**/*'
|
14
|
-
- 'vendor/**/*'
|
15
|
-
- 'doc/**/*'
|
16
|
-
- 'coverage/**/*'
|
17
|
-
- Gemfile
|
18
|
-
- Guardfile
|
19
|
-
|
20
|
-
Layout/EmptyLinesAroundBlockBody:
|
21
|
-
EnforcedStyle: no_empty_lines
|
22
|
-
Enabled: true
|
23
|
-
|
24
|
-
Layout/EmptyLinesAroundClassBody:
|
25
|
-
EnforcedStyle: no_empty_lines
|
26
|
-
Enabled: true
|
27
|
-
|
28
|
-
Layout/EmptyLinesAroundModuleBody:
|
29
|
-
EnforcedStyle: no_empty_lines
|
30
|
-
|
31
|
-
Layout/IndentArray:
|
32
|
-
EnforcedStyle: consistent
|
33
|
-
|
34
|
-
Style/Documentation:
|
35
|
-
Enabled: false
|
36
|
-
|
37
|
-
Style/Lambda:
|
38
|
-
EnforcedStyle: literal
|
39
|
-
|
40
|
-
Style/PercentLiteralDelimiters:
|
41
|
-
PreferredDelimiters:
|
42
|
-
default: '[]'
|
43
|
-
'%i': '[]'
|
44
|
-
|
45
|
-
Metrics/PerceivedComplexity:
|
46
|
-
Enabled: false
|
47
|
-
|
48
|
-
Metrics/CyclomaticComplexity:
|
49
|
-
Enabled: false
|
50
|
-
|
51
|
-
Metrics/ModuleLength:
|
52
|
-
Enabled: false
|
53
|
-
|
54
|
-
Metrics/BlockNesting:
|
55
|
-
Enabled: false
|
data/.rubocop_todo.yml
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# Offense count: 13
|
2
|
-
Metrics/AbcSize:
|
3
|
-
Enabled: false
|
4
|
-
|
5
|
-
# Offense count: 43
|
6
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
7
|
-
Metrics/BlockLength:
|
8
|
-
Enabled: false
|
9
|
-
|
10
|
-
# Offense count: 137
|
11
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
12
|
-
# URISchemes: http, https
|
13
|
-
Metrics/LineLength:
|
14
|
-
Enabled: false
|
15
|
-
|
16
|
-
# Offense count: 7
|
17
|
-
# Configuration parameters: CountComments.
|
18
|
-
Metrics/MethodLength:
|
19
|
-
Enabled: false
|
20
|
-
|
21
|
-
Metrics/ClassLength:
|
22
|
-
Enabled: false
|
23
|
-
|
24
|
-
# Offense count: 195
|
25
|
-
# Cop supports --auto-correct.
|
26
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
27
|
-
# SupportedStyles: when_needed, always, never
|
28
|
-
Style/FrozenStringLiteralComment:
|
29
|
-
Enabled: false
|
30
|
-
|
31
|
-
# Offense count: 328
|
32
|
-
# Cop supports --auto-correct.
|
33
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
34
|
-
# SupportedStyles: single_quotes, double_quotes
|
35
|
-
Style/StringLiterals:
|
36
|
-
Enabled: false
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.6.2
|
data/.travis.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- "2.4.5"
|
4
|
-
- "2.5.3"
|
5
|
-
- "2.6.2"
|
6
|
-
gemfile:
|
7
|
-
- gemfiles/http3.gemfile
|
8
|
-
- gemfiles/http4.gemfile
|
9
|
-
- gemfiles/http5.gemfile
|
10
|
-
- gemfiles/rack1.gemfile
|
11
|
-
- gemfiles/rack2.gemfile
|
12
|
-
|
13
|
-
# uncomment this line if your project needs to run something other than `rake`:
|
14
|
-
script: bundle exec rspec spec
|
15
|
-
# workaround for https://github.com/travis-ci/travis-ci/issues/5239:
|
16
|
-
before_install:
|
17
|
-
- gem install bundler
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,130 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
httplog (1.3.1)
|
5
|
-
rack (>= 1.0)
|
6
|
-
rainbow (>= 2.0.0)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
addressable (2.5.2)
|
12
|
-
public_suffix (>= 2.0.2, < 4.0)
|
13
|
-
coderay (1.1.2)
|
14
|
-
daemons (1.2.6)
|
15
|
-
diff-lcs (1.3)
|
16
|
-
docile (1.3.1)
|
17
|
-
domain_name (0.5.20180417)
|
18
|
-
unf (>= 0.0.5, < 1.0.0)
|
19
|
-
ethon (0.11.0)
|
20
|
-
ffi (>= 1.3.0)
|
21
|
-
eventmachine (1.2.7)
|
22
|
-
excon (0.62.0)
|
23
|
-
faraday (0.15.4)
|
24
|
-
multipart-post (>= 1.2, < 3)
|
25
|
-
ffi (1.9.25)
|
26
|
-
formatador (0.2.5)
|
27
|
-
guard (2.15.0)
|
28
|
-
formatador (>= 0.2.4)
|
29
|
-
listen (>= 2.7, < 4.0)
|
30
|
-
lumberjack (>= 1.0.12, < 2.0)
|
31
|
-
nenv (~> 0.1)
|
32
|
-
notiffany (~> 0.0)
|
33
|
-
pry (>= 0.9.12)
|
34
|
-
shellany (~> 0.0)
|
35
|
-
thor (>= 0.18.1)
|
36
|
-
guard-compat (1.2.1)
|
37
|
-
guard-rspec (4.7.3)
|
38
|
-
guard (~> 2.1)
|
39
|
-
guard-compat (~> 1.1)
|
40
|
-
rspec (>= 2.99.0, < 4.0)
|
41
|
-
http (3.3.0)
|
42
|
-
addressable (~> 2.3)
|
43
|
-
http-cookie (~> 1.0)
|
44
|
-
http-form_data (~> 2.0)
|
45
|
-
http_parser.rb (~> 0.6.0)
|
46
|
-
http-cookie (1.0.3)
|
47
|
-
domain_name (~> 0.5)
|
48
|
-
http-form_data (2.1.1)
|
49
|
-
http_parser.rb (0.6.0)
|
50
|
-
httparty (0.16.3)
|
51
|
-
mime-types (~> 3.0)
|
52
|
-
multi_xml (>= 0.5.2)
|
53
|
-
httpclient (2.8.3)
|
54
|
-
json (2.1.0)
|
55
|
-
listen (3.1.5)
|
56
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
57
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
58
|
-
ruby_dep (~> 1.2)
|
59
|
-
lumberjack (1.0.13)
|
60
|
-
method_source (0.9.2)
|
61
|
-
mime-types (3.2.2)
|
62
|
-
mime-types-data (~> 3.2015)
|
63
|
-
mime-types-data (3.2018.0812)
|
64
|
-
multi_xml (0.6.0)
|
65
|
-
multipart-post (2.0.0)
|
66
|
-
nenv (0.3.0)
|
67
|
-
notiffany (0.1.1)
|
68
|
-
nenv (~> 0.1)
|
69
|
-
shellany (~> 0.0)
|
70
|
-
patron (0.13.1)
|
71
|
-
pry (0.12.2)
|
72
|
-
coderay (~> 1.1.0)
|
73
|
-
method_source (~> 0.9.0)
|
74
|
-
public_suffix (3.0.3)
|
75
|
-
rack (2.0.6)
|
76
|
-
rainbow (3.0.0)
|
77
|
-
rake (12.3.2)
|
78
|
-
rb-fsevent (0.10.3)
|
79
|
-
rb-inotify (0.9.10)
|
80
|
-
ffi (>= 0.5.0, < 2)
|
81
|
-
rspec (3.8.0)
|
82
|
-
rspec-core (~> 3.8.0)
|
83
|
-
rspec-expectations (~> 3.8.0)
|
84
|
-
rspec-mocks (~> 3.8.0)
|
85
|
-
rspec-core (3.8.0)
|
86
|
-
rspec-support (~> 3.8.0)
|
87
|
-
rspec-expectations (3.8.2)
|
88
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
89
|
-
rspec-support (~> 3.8.0)
|
90
|
-
rspec-mocks (3.8.0)
|
91
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
92
|
-
rspec-support (~> 3.8.0)
|
93
|
-
rspec-support (3.8.0)
|
94
|
-
ruby_dep (1.5.0)
|
95
|
-
shellany (0.0.1)
|
96
|
-
simplecov (0.16.1)
|
97
|
-
docile (~> 1.1)
|
98
|
-
json (>= 1.8, < 3)
|
99
|
-
simplecov-html (~> 0.10.0)
|
100
|
-
simplecov-html (0.10.2)
|
101
|
-
thin (1.7.2)
|
102
|
-
daemons (~> 1.0, >= 1.0.9)
|
103
|
-
eventmachine (~> 1.0, >= 1.0.4)
|
104
|
-
rack (>= 1, < 3)
|
105
|
-
thor (0.20.3)
|
106
|
-
unf (0.1.4)
|
107
|
-
unf_ext
|
108
|
-
unf_ext (0.0.7.5)
|
109
|
-
|
110
|
-
PLATFORMS
|
111
|
-
ruby
|
112
|
-
|
113
|
-
DEPENDENCIES
|
114
|
-
ethon (~> 0.11)
|
115
|
-
excon (~> 0.60)
|
116
|
-
faraday (~> 0.14)
|
117
|
-
guard-rspec (~> 4.7)
|
118
|
-
http (~> 3.0)
|
119
|
-
httparty (~> 0.16)
|
120
|
-
httpclient (~> 2.8)
|
121
|
-
httplog!
|
122
|
-
listen (~> 3.0)
|
123
|
-
patron (~> 0.12)
|
124
|
-
rake (~> 12.3)
|
125
|
-
rspec (~> 3.7)
|
126
|
-
simplecov (~> 0.15)
|
127
|
-
thin (~> 1.7)
|
128
|
-
|
129
|
-
BUNDLED WITH
|
130
|
-
1.17.2
|
data/Guardfile
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# A sample Guardfile
|
4
|
-
# More info at https://github.com/guard/guard#readme
|
5
|
-
|
6
|
-
guard 'rspec', cmd: 'bundle exec rspec' do
|
7
|
-
watch(%r{^spec/.+_spec\.rb$})
|
8
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
9
|
-
watch('spec/spec_helper.rb') { 'spec' }
|
10
|
-
|
11
|
-
# Rails example
|
12
|
-
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
13
|
-
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
14
|
-
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
15
|
-
watch(%r{^spec/support/(.+)\.rb$}) { 'spec' }
|
16
|
-
watch('config/routes.rb') { 'spec/routing' }
|
17
|
-
watch('app/controllers/application_controller.rb') { 'spec/controllers' }
|
18
|
-
|
19
|
-
# Capybara request specs
|
20
|
-
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
|
21
|
-
|
22
|
-
# Turnip features and steps
|
23
|
-
watch(%r{^spec/acceptance/(.+)\.feature$})
|
24
|
-
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
25
|
-
end
|
data/MIT-LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright 2011 Thilo Rusche
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'bundler/setup'
|
6
|
-
rescue LoadError
|
7
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
8
|
-
end
|
9
|
-
begin
|
10
|
-
require 'rdoc/task'
|
11
|
-
rescue LoadError
|
12
|
-
require 'rdoc/rdoc'
|
13
|
-
require 'rake/rdoctask'
|
14
|
-
RDoc::Task = Rake::RDocTask
|
15
|
-
end
|
16
|
-
require 'rspec/core/rake_task'
|
17
|
-
|
18
|
-
desc 'Run specs'
|
19
|
-
RSpec::Core::RakeTask.new(:spec)
|
20
|
-
|
21
|
-
desc 'Generate documentation'
|
22
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
23
|
-
rdoc.rdoc_dir = 'rdoc'
|
24
|
-
rdoc.title = 'HttpLog'
|
25
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
26
|
-
rdoc.rdoc_files.include('README.rdoc')
|
27
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
28
|
-
end
|
29
|
-
|
30
|
-
require 'rake/testtask'
|
31
|
-
|
32
|
-
Rake::TestTask.new(:test) do |t|
|
33
|
-
t.libs << 'lib'
|
34
|
-
t.libs << 'test'
|
35
|
-
t.pattern = 'test/**/*_test.rb'
|
36
|
-
t.verbose = false
|
37
|
-
end
|
38
|
-
|
39
|
-
# ----- Packaging -----
|
40
|
-
task :build do
|
41
|
-
sh 'gem build httplog.gemspec'
|
42
|
-
mkdir_p 'pkg'
|
43
|
-
sh 'mv *.gem pkg/ '
|
44
|
-
end
|
45
|
-
|
46
|
-
task default: :spec
|