loga 2.4.0 → 2.5.0

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
  SHA256:
3
- metadata.gz: 8b069a9b029cfb82d0a179ebb76738b71506eb717c49e0053c135204225f7d4f
4
- data.tar.gz: e62a39b1e52025dc1bcd7a8c69b1d8e260f73e954de16f7c9fbfb42529154363
3
+ metadata.gz: b861a3c084a6aee96710b7de7e863dc5a6167a189ff99975805500c7d1c66596
4
+ data.tar.gz: 15190282eedb92b8d18ab65b3e27b7ea5a73de754ddd6f80b2e0bbaf24bf8ec5
5
5
  SHA512:
6
- metadata.gz: 9aae956e2b49cc519590cca3be9d32d6d268871b4d8bc97fb568b66003d3fd7913f04debf445b6cee2ced3a04d1d3af610eb256c48411b3f92fc76b3120c8d51
7
- data.tar.gz: 16f42b6af8af4479ae5dfec57f47c27db4b41d9e4b7e58491e289cb5d487316d115fe47723bbf8690c30d692da59bb134a29f2b9eb964b9ff7477a3a5b2fd1f0
6
+ metadata.gz: ab122312cd675226c261250c65b90d900246c52471937450eafe767cc143f94954128d72c67803a418e05599b515272e95255eddd688b8f4fffe511ee46cae23
7
+ data.tar.gz: 4af4ebe2bfb678a3cc45ec9a7b48bb768490313d85f5983135f57b83448171411ca262dea277f67093a26559a4de7e4ecbc309158d92f25fefc45429554984bf
data/Appraisals CHANGED
@@ -24,6 +24,12 @@ appraise 'rails52' do
24
24
  gem 'rails', '~> 5.2.0'
25
25
  end
26
26
 
27
+ if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('2.5.0')
28
+ appraise 'rails60' do
29
+ gem 'rails', '~> 6.0.0'
30
+ end
31
+ end
32
+
27
33
  appraise 'sidekiq51' do
28
34
  gem 'sidekiq', '~> 5.1.0'
29
35
  end
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [2.5.0] - 2019-11-12
8
+ ### Added
9
+ - Add support for rails 6
10
+
7
11
  ## [2.4.0] - 2019-09-03
8
12
  ### Fixed
9
13
  - `duration` in the `sidekiq` integration is now calculated correctly
@@ -125,7 +125,7 @@ module Loga
125
125
  def silence_rails_rack_logger
126
126
  case Rails::VERSION::MAJOR
127
127
  when 3 then require 'loga/ext/rails/rack/logger3.rb'
128
- when 4..5 then require 'loga/ext/rails/rack/logger.rb'
128
+ when 4..6 then require 'loga/ext/rails/rack/logger.rb'
129
129
  else
130
130
  raise Loga::ConfigurationError,
131
131
  "Rails #{Rails::VERSION::MAJOR} is unsupported"
@@ -1,3 +1,3 @@
1
1
  module Loga
2
- VERSION = '2.4.0'.freeze
2
+ VERSION = '2.5.0'.freeze
3
3
  end
@@ -0,0 +1,80 @@
1
+ require 'action_controller/railtie'
2
+ require 'action_mailer/railtie'
3
+
4
+ Bundler.require(*Rails.groups)
5
+
6
+ STREAM = StringIO.new unless defined?(STREAM)
7
+
8
+ class Dummy < Rails::Application
9
+ config.eager_load = true
10
+ config.filter_parameters += [:password]
11
+ config.secret_key_base = '2624599ca9ab3cf3823626240138a128118a87683bf03ab8f155844c33b3cd8cbbfa3ef5e29db6f5bd182f8bd4776209d9577cfb46ac51bfd232b00ab0136b24'
12
+ config.session_store :cookie_store, key: '_rails60_session'
13
+
14
+ config.log_tags = [:uuid, 'TEST_TAG']
15
+ config.loga = {
16
+ device: STREAM,
17
+ host: 'bird.example.com',
18
+ service_name: 'hello_world_app',
19
+ service_version: '1.0',
20
+ }
21
+ config.action_mailer.delivery_method = :test
22
+ end
23
+
24
+ class ApplicationController < ActionController::Base
25
+ include Rails.application.routes.url_helpers
26
+ protect_from_forgery with: :null_session
27
+
28
+ def ok
29
+ render plain: 'Hello Rails'
30
+ end
31
+
32
+ def error
33
+ nil.name
34
+ end
35
+
36
+ def show
37
+ render json: params
38
+ end
39
+
40
+ def create
41
+ render json: params
42
+ end
43
+
44
+ def new
45
+ redirect_to :ok
46
+ end
47
+
48
+ def update
49
+ @id = params[:id]
50
+ render '/user'
51
+ end
52
+ end
53
+
54
+ class FakeMailer < ActionMailer::Base
55
+ default from: 'notifications@example.com'
56
+
57
+ def self.send_email
58
+ basic_mail.deliver_now
59
+ end
60
+
61
+ def basic_mail
62
+ mail(
63
+ to: 'user@example.com',
64
+ subject: 'Welcome to My Awesome Site',
65
+ body: 'Banana muffin',
66
+ content_type: 'text/html',
67
+ )
68
+ end
69
+ end
70
+
71
+ Dummy.routes.append do
72
+ get 'ok' => 'application#ok'
73
+ get 'error' => 'application#error'
74
+ get 'show' => 'application#show'
75
+ post 'users' => 'application#create'
76
+ get 'new' => 'application#new'
77
+ put 'users/:id' => 'application#update'
78
+ end
79
+
80
+ Dummy.initialize!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loga
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Funding Circle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-09 00:00:00.000000000 Z
11
+ date: 2019-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -290,6 +290,7 @@ files:
290
290
  - spec/fixtures/rails42.rb
291
291
  - spec/fixtures/rails50.rb
292
292
  - spec/fixtures/rails52.rb
293
+ - spec/fixtures/rails60.rb
293
294
  - spec/fixtures/random_bin
294
295
  - spec/integration/rails/action_mailer_spec.rb
295
296
  - spec/integration/rails/railtie_spec.rb
@@ -345,6 +346,7 @@ test_files:
345
346
  - spec/fixtures/rails42.rb
346
347
  - spec/fixtures/rails50.rb
347
348
  - spec/fixtures/rails52.rb
349
+ - spec/fixtures/rails60.rb
348
350
  - spec/fixtures/random_bin
349
351
  - spec/integration/rails/action_mailer_spec.rb
350
352
  - spec/integration/rails/railtie_spec.rb