loga 2.6.1 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -9
- data/Appraisals +30 -12
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/gemfiles/{rails32.gemfile → sidekiq60.gemfile} +2 -2
- data/gemfiles/{rails40.gemfile → sidekiq62.gemfile} +2 -2
- data/gemfiles/sidekiq63.gemfile +11 -0
- data/gemfiles/sidekiq64.gemfile +11 -0
- data/gemfiles/sidekiq65.gemfile +11 -0
- data/gemfiles/{sidekiq6.gemfile → sidekiq7.gemfile} +1 -1
- data/gemfiles/sidekiq70.gemfile +11 -0
- data/gemfiles/sidekiq71.gemfile +11 -0
- data/lib/loga/formatters/gelf_formatter.rb +13 -6
- data/lib/loga/sidekiq.rb +32 -9
- data/lib/loga/sidekiq7/job_logger.rb +51 -0
- data/lib/loga/version.rb +1 -1
- data/spec/integration/sidekiq60_spec.rb +180 -0
- data/spec/integration/sidekiq65_spec.rb +166 -0
- data/spec/integration/sidekiq7_spec.rb +193 -0
- data/spec/loga/sidekiq7/job_logger_spec.rb +125 -0
- data/spec/spec_helper.rb +23 -4
- data/spec/unit/loga/formatters/gelf_formatter_spec.rb +23 -0
- metadata +21 -11
- data/spec/fixtures/rails32.rb +0 -80
- data/spec/fixtures/rails40.rb +0 -80
- /data/spec/integration/{sidekiq6_spec.rb → sidekiq61_spec.rb} +0 -0
data/spec/fixtures/rails32.rb
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
require 'action_controller/railtie'
|
2
|
-
require 'action_mailer/railtie'
|
3
|
-
|
4
|
-
Bundler.require(*Rails.groups(assets: %w[development test]))
|
5
|
-
|
6
|
-
STREAM = StringIO.new unless defined?(STREAM)
|
7
|
-
|
8
|
-
class Dummy < Rails::Application
|
9
|
-
config.filter_parameters += [:password]
|
10
|
-
config.secret_token = '32431967aed1c4357d311f27708a1837a938f07e0abfdefa6b8b398d7024c08c6b883ce9254cdd8573ce8e78f9dd192efff39395127811040fc695ab23677452'
|
11
|
-
config.session_store :cookie_store, key: '_rails32_session'
|
12
|
-
|
13
|
-
config.log_tags = [:uuid, 'TEST_TAG']
|
14
|
-
config.loga = {
|
15
|
-
device: STREAM,
|
16
|
-
host: 'bird.example.com',
|
17
|
-
service_name: 'hello_world_app',
|
18
|
-
service_version: '1.0',
|
19
|
-
}
|
20
|
-
config.action_mailer.delivery_method = :test
|
21
|
-
config.active_support.deprecation = :notify
|
22
|
-
end
|
23
|
-
|
24
|
-
class ApplicationController < ActionController::Base
|
25
|
-
include Rails.application.routes.url_helpers
|
26
|
-
protect_from_forgery
|
27
|
-
|
28
|
-
def ok
|
29
|
-
render text: '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
|
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!
|
data/spec/fixtures/rails40.rb
DELETED
@@ -1,80 +0,0 @@
|
|
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: '_rails40_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
|
27
|
-
|
28
|
-
def ok
|
29
|
-
render text: '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
|
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!
|
File without changes
|