europeana-logging 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d28b719bb19c0365a3b0710aebf3034c24b40c97
4
- data.tar.gz: 5e44dc017d5952ec6d80d8fd5879014702dd412e
3
+ metadata.gz: 7c0865344890b90b0c9f1724e9752b76799c023b
4
+ data.tar.gz: 6bfd5ea9e87b1e5fa7bf1cc949f8df49f6e003d0
5
5
  SHA512:
6
- metadata.gz: eedfafe46cedcf2b2de0947187239a77e7de7c8779e3a6062e561b2176f4ae884433cdcf9367c746604ccd5615dfe9e3e181759991c5a05be9d961a513699cb2
7
- data.tar.gz: 490c3252fe06dbb2855a2b4803ded14750c1fe681d46d69b1b5751777782346ffc1298f0a301ac44f3c66c212c09adb97e7c7eaada4eefa80dc5453bf4dbf36c
6
+ metadata.gz: e3dd01d0bb801b0df2a525e97c207e72eeb4efe271a6c0885ae985a0d1e7b6f3f95413ce330eb03d196dd4daff38015cb668fe2c04f24e53573fbbecb9d42575
7
+ data.tar.gz: bbb00955f83db995743c1daa3c5eaa903c669157c0598112890c2203b16806e5ca2fe2991c4fddf06e69d25733f24657eac8da617662e0ceec0bfd4adaa17b6f
@@ -8,7 +8,7 @@ module Europeana
8
8
  # Overrides `#logger` in controller to first set session via
9
9
  # `Europeana::Logging::SessionLogging#session=`
10
10
  def logger(*args)
11
- super.session_id = session.id unless @_request.nil?
11
+ super.session_id = session_id_from_session unless @_request.nil?
12
12
  super(*args)
13
13
  end
14
14
 
@@ -16,7 +16,11 @@ module Europeana
16
16
  # Lograge payload
17
17
  def append_info_to_payload(payload)
18
18
  super
19
- payload[:session_id] = session.id
19
+ payload[:session_id] = session_id_from_session unless session_id_from_session.blank?
20
+ end
21
+
22
+ def session_id_from_session
23
+ session.respond_to?(:id) ? session.id : nil
20
24
  end
21
25
  end
22
26
  end
@@ -7,7 +7,7 @@ module Europeana
7
7
  define_method level.to_sym do |message=nil|
8
8
  message = yield if message.nil? && block_given?
9
9
  hmessage = message.is_a?(Hash) ? message.dup : { message: message }
10
- hmessage[:session_id] = session_id
10
+ hmessage[:session_id] = session_id unless session_id.blank?
11
11
  super(hmessage)
12
12
  end
13
13
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Europeana
3
3
  module Logging
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
6
6
  end
@@ -0,0 +1,6 @@
1
+ ----------------------------------
2
+ Europeana::LoggingTest: test_truth
3
+ ----------------------------------
4
+ ----------------------------------
5
+ Europeana::LoggingTest: test_truth
6
+ ----------------------------------
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: europeana-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Doe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-03 00:00:00.000000000 Z
11
+ date: 2018-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -116,6 +116,7 @@ files:
116
116
  - test/dummy/config/locales/en.yml
117
117
  - test/dummy/config/routes.rb
118
118
  - test/dummy/config/secrets.yml
119
+ - test/dummy/log/test.log
119
120
  - test/dummy/public/404.html
120
121
  - test/dummy/public/422.html
121
122
  - test/dummy/public/500.html
@@ -143,44 +144,45 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
144
  version: '0'
144
145
  requirements: []
145
146
  rubyforge_project:
146
- rubygems_version: 2.5.1
147
+ rubygems_version: 2.6.11
147
148
  signing_key:
148
149
  specification_version: 4
149
150
  summary: Europeana logging
150
151
  test_files:
151
152
  - test/integration/navigation_test.rb
152
- - test/dummy/public/404.html
153
- - test/dummy/public/500.html
153
+ - test/test_helper.rb
154
+ - test/europeana/logging_test.rb
155
+ - test/dummy/README.rdoc
156
+ - test/dummy/config.ru
154
157
  - test/dummy/public/favicon.ico
158
+ - test/dummy/public/404.html
155
159
  - test/dummy/public/422.html
156
- - test/dummy/config/locales/en.yml
157
- - test/dummy/config/application.rb
160
+ - test/dummy/public/500.html
161
+ - test/dummy/bin/rake
162
+ - test/dummy/bin/rails
163
+ - test/dummy/bin/bundle
164
+ - test/dummy/bin/setup
165
+ - test/dummy/log/test.log
166
+ - test/dummy/app/controllers/application_controller.rb
167
+ - test/dummy/app/assets/stylesheets/application.css
168
+ - test/dummy/app/assets/javascripts/application.js
169
+ - test/dummy/app/views/layouts/application.html.erb
170
+ - test/dummy/app/helpers/application_helper.rb
158
171
  - test/dummy/config/routes.rb
159
- - test/dummy/config/environments/development.rb
160
- - test/dummy/config/environments/production.rb
161
- - test/dummy/config/environments/test.rb
162
- - test/dummy/config/secrets.yml
163
- - test/dummy/config/boot.rb
164
- - test/dummy/config/environment.rb
165
- - test/dummy/config/initializers/mime_types.rb
172
+ - test/dummy/config/application.rb
166
173
  - test/dummy/config/initializers/wrap_parameters.rb
167
- - test/dummy/config/initializers/backtrace_silencers.rb
168
- - test/dummy/config/initializers/filter_parameter_logging.rb
169
174
  - test/dummy/config/initializers/session_store.rb
170
175
  - test/dummy/config/initializers/assets.rb
171
176
  - test/dummy/config/initializers/cookies_serializer.rb
177
+ - test/dummy/config/initializers/mime_types.rb
178
+ - test/dummy/config/initializers/filter_parameter_logging.rb
179
+ - test/dummy/config/initializers/backtrace_silencers.rb
172
180
  - test/dummy/config/initializers/inflections.rb
173
- - test/dummy/app/controllers/application_controller.rb
174
- - test/dummy/app/assets/stylesheets/application.css
175
- - test/dummy/app/assets/javascripts/application.js
176
- - test/dummy/app/helpers/application_helper.rb
177
- - test/dummy/app/views/layouts/application.html.erb
178
- - test/dummy/config.ru
181
+ - test/dummy/config/environment.rb
182
+ - test/dummy/config/secrets.yml
183
+ - test/dummy/config/environments/test.rb
184
+ - test/dummy/config/environments/development.rb
185
+ - test/dummy/config/environments/production.rb
186
+ - test/dummy/config/locales/en.yml
187
+ - test/dummy/config/boot.rb
179
188
  - test/dummy/Rakefile
180
- - test/dummy/bin/rake
181
- - test/dummy/bin/bundle
182
- - test/dummy/bin/setup
183
- - test/dummy/bin/rails
184
- - test/dummy/README.rdoc
185
- - test/europeana/logging_test.rb
186
- - test/test_helper.rb