sitehub 0.4.1 → 0.4.2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sitehub/logging/access_logger.rb +1 -1
- data/lib/sitehub/version.rb +1 -1
- data/spec/sitehub/logging/access_logger_spec.rb +10 -10
- 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: af77a45a381dc3d5db1d15d6d4934dd97fcfcf14
|
4
|
+
data.tar.gz: 365f724e5ecc280935665cadc36dbab16b45fe34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a263ad7fde6a5f68b9c3480ae0765b302918cdbd1eccd30bff05704ed9054c171b7c291932bbc5632b32b30162237c5c586e84e9616392a4604e35cff944e74
|
7
|
+
data.tar.gz: 48358f5f31aae39ff3d70a3bc83e2760b53b37b46046c2cd28eddf53537aa3b607bcc22dce3143a7ac41acc387898660b55d87e51c99196532be4a38412df0f6
|
data/Gemfile.lock
CHANGED
@@ -52,7 +52,7 @@ class SiteHub
|
|
52
52
|
env[REQUEST_METHOD],
|
53
53
|
env[PATH_INFO],
|
54
54
|
env[QUERY_STRING].empty? ? EMPTY_STRING : QUESTION_MARK+env[QUERY_STRING],
|
55
|
-
mapped_request.mapped_url.to_s,
|
55
|
+
mapped_request ? mapped_request.mapped_url.to_s : EMPTY_STRING,
|
56
56
|
env[HTTP_VERSION],
|
57
57
|
status.to_s[STATUS_RANGE],
|
58
58
|
length,
|
data/lib/sitehub/version.rb
CHANGED
@@ -33,22 +33,14 @@ class SiteHub
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
#describe '#before_call' do
|
37
|
-
# it 'saves the time' do
|
38
|
-
# now = Time.now
|
39
|
-
# allow(Time).to receive(:now).and_return(now)
|
40
|
-
# subject.before_call(:env)
|
41
|
-
# expect(subject.start_time).to eq(now)
|
42
|
-
# end
|
43
|
-
#end
|
44
|
-
|
45
36
|
describe '#call' do
|
46
37
|
let(:env) do
|
47
38
|
{
|
48
39
|
REQUEST_MAPPING => request_mapping,
|
49
40
|
described_class::QUERY_STRING => '',
|
50
41
|
described_class::PATH_INFO => 'path_info',
|
51
|
-
Constants::RackHttpHeaderKeys::TRANSACTION_ID => :transaction_id
|
42
|
+
Constants::RackHttpHeaderKeys::TRANSACTION_ID => :transaction_id,
|
43
|
+
described_class::HTTP_VERSION => '1.1'
|
52
44
|
}
|
53
45
|
|
54
46
|
end
|
@@ -100,6 +92,14 @@ class SiteHub
|
|
100
92
|
expect(logger.string).to include("#{env[described_class::PATH_INFO]} => #{:mapped_url}")
|
101
93
|
end
|
102
94
|
|
95
|
+
context '404 returned, i.e. no downstream call made' do
|
96
|
+
let(:request_mapping) { nil }
|
97
|
+
it 'does not log the down stream url' do
|
98
|
+
subject.call(env)
|
99
|
+
expect(logger.string).to include("=> #{EMPTY_STRING} #{env[described_class::HTTP_VERSION]}")
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
103
|
end
|
104
104
|
describe '#extract_content_length' do
|
105
105
|
context 'content length header not present' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sitehub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ladtech
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|