logster 2.18.1 → 2.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +11 -2
- data/CHANGELOG.md +9 -1
- data/Gemfile +4 -0
- data/Rakefile +5 -2
- data/assets/javascript/{chunk.143.260395dfb82bdb155d19.js → chunk.143.86f7820bfe6482b8dcd5.js} +4 -4
- data/assets/javascript/{chunk.178.f01fdd20b1a3e2bdb6af.js → chunk.178.c5fac0c2a2035839a91e.js} +3 -3
- data/assets/javascript/client-app.js +2 -2
- data/client-app/app/components/message-info.js +1 -4
- data/gemfiles/rails_6.1.gemfile +9 -0
- data/gemfiles/rails_7.0.gemfile +9 -0
- data/gemfiles/rails_7.1.gemfile +9 -0
- data/lib/logster/configuration.rb +1 -3
- data/lib/logster/rails/railtie.rb +37 -19
- data/lib/logster/version.rb +1 -1
- data/lib/logster.rb +1 -1
- data/logster.gemspec +1 -0
- data/test/dummy/config/application.rb +31 -0
- data/test/dummy/config/boot.rb +6 -0
- data/test/dummy/config/environment.rb +6 -0
- data/test/logster/test_railtie.rb +21 -0
- metadata +29 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b8976148884a7689015c4625636954e32c5e67db9d4bf58ab25b81bd5b56cda
|
4
|
+
data.tar.gz: aa6e430fd3add97bf97ab22325f77c9115bd2d005f9c476a6bddb688ab8141be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 574810c10d6b601af399cbd353878c86f3acccee2c470bd61bfaa1ad80cbdb4b7970884dba6622ab74890081c4dd36873525dd4705cb4a00bd4eb3045c957000
|
7
|
+
data.tar.gz: d67995a5d78da07f2323ec29a91982b2669f98a6cf4a7ced67ddbec8bbd107f3c4f32efd482e2650d8e54def5720e77b82c0c3bc0023bda5abdcf58342b8c19b
|
data/.github/workflows/ci.yml
CHANGED
@@ -10,6 +10,8 @@ jobs:
|
|
10
10
|
backend:
|
11
11
|
runs-on: ubuntu-latest
|
12
12
|
|
13
|
+
name: "Ruby ${{ matrix.ruby }} - Rails ${{ matrix.rails }}"
|
14
|
+
|
13
15
|
services:
|
14
16
|
redis:
|
15
17
|
image: redis
|
@@ -18,7 +20,11 @@ jobs:
|
|
18
20
|
|
19
21
|
strategy:
|
20
22
|
matrix:
|
21
|
-
ruby: ['
|
23
|
+
ruby: ['3.0', '3.1', '3.2', '3.3']
|
24
|
+
rails: ['6.1', '7.0', '7.1']
|
25
|
+
|
26
|
+
env:
|
27
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile
|
22
28
|
|
23
29
|
steps:
|
24
30
|
- uses: actions/checkout@v3
|
@@ -42,9 +48,12 @@ jobs:
|
|
42
48
|
- name: Build JS app
|
43
49
|
run: bash build_client_app.sh
|
44
50
|
|
45
|
-
- name: Tests
|
51
|
+
- name: Tests (no Rails)
|
46
52
|
run: bundle exec rake test
|
47
53
|
|
54
|
+
- name: Tests (Railtie)
|
55
|
+
run: bundle exec rake test TEST=test/logster/test_railtie.rb
|
56
|
+
|
48
57
|
frontend:
|
49
58
|
runs-on: ubuntu-latest
|
50
59
|
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
-
|
3
|
+
- 2024-03-12: 2.19.1
|
4
|
+
|
5
|
+
- FIX: Don’t truncate backtrace on copying
|
6
|
+
|
7
|
+
- 2024-02-28: 2.19.0
|
8
|
+
|
9
|
+
- FIX: Add compatibility with Rails 7.1+
|
10
|
+
|
11
|
+
- 2024-02-19: 2.18.1
|
4
12
|
|
5
13
|
- UX: backlink in dark mode has a dark background
|
6
14
|
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require "bundler/gem_tasks"
|
|
4
4
|
require "rake/testtask"
|
5
5
|
|
6
6
|
Rake::TestTask.new do |t|
|
7
|
-
t.
|
7
|
+
t.test_files = FileList["test/**/test_*"].exclude(%r{test/logster/test_railtie\.rb})
|
8
8
|
end
|
9
9
|
|
10
10
|
task(default: :test)
|
@@ -12,7 +12,10 @@ task(default: :test)
|
|
12
12
|
desc "Starts Sinatra and Ember servers"
|
13
13
|
task :client_dev do
|
14
14
|
begin
|
15
|
-
pid =
|
15
|
+
pid =
|
16
|
+
spawn(
|
17
|
+
"cd website && LOGSTER_ENV=development BUNDLE_GEMFILE=Gemfile bundle exec rackup --host 0.0.0.0",
|
18
|
+
)
|
16
19
|
pid2 = spawn("cd client-app && npx ember s --proxy http://localhost:9292")
|
17
20
|
Process.wait pid
|
18
21
|
Process.wait pid2
|
data/assets/javascript/{chunk.143.260395dfb82bdb155d19.js → chunk.143.86f7820bfe6482b8dcd5.js}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
var __ember_auto_import__
|
2
|
-
!function(){var e,r={
|
3
|
-
e.exports=(o=_eai_d,t=_eai_r,window.emberAutoImportDynamic=function(e){return 1===arguments.length?t("_eai_dyn_"+e):t("_eai_dynt_"+e)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(e){return t("_eai_sync_"+e)(Array.prototype.slice.call(arguments,1))},o("__v1-addons__early-boot-set__",[],(function(){})),void o("sinon",["__v1-addons__early-boot-set__"],(function(){return n(468)})))},
|
2
|
+
!function(){var e,r={397:function(e,r,n){var o,t
|
3
|
+
e.exports=(o=_eai_d,t=_eai_r,window.emberAutoImportDynamic=function(e){return 1===arguments.length?t("_eai_dyn_"+e):t("_eai_dynt_"+e)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(e){return t("_eai_sync_"+e)(Array.prototype.slice.call(arguments,1))},o("__v1-addons__early-boot-set__",[],(function(){})),void o("sinon",["__v1-addons__early-boot-set__"],(function(){return n(468)})))},818:function(e,r){window._eai_r=require,window._eai_d=define}},n={}
|
4
4
|
function o(e){var t=n[e]
|
5
5
|
if(void 0!==t)return t.exports
|
6
6
|
var i=n[e]={exports:{}}
|
@@ -17,6 +17,6 @@ var r=function(r,n){var t,i,u=n[0],_=n[1],a=n[2],f=0
|
|
17
17
|
if(u.some((function(r){return 0!==e[r]}))){for(t in _)o.o(_,t)&&(o.m[t]=_[t])
|
18
18
|
if(a)var c=a(o)}for(r&&r(n);f<u.length;f++)i=u[f],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0
|
19
19
|
return o.O(c)},n=self.webpackChunk_ember_auto_import_=self.webpackChunk_ember_auto_import_||[]
|
20
|
-
n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))}(),o.O(void 0,[468],(function(){return o(
|
21
|
-
var t=o.O(void 0,[468],(function(){return o(
|
20
|
+
n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))}(),o.O(void 0,[468],(function(){return o(818)}))
|
21
|
+
var t=o.O(void 0,[468],(function(){return o(397)}))
|
22
22
|
t=o.O(t),__ember_auto_import__=t}()
|
data/assets/javascript/{chunk.178.f01fdd20b1a3e2bdb6af.js → chunk.178.c5fac0c2a2035839a91e.js}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
var __ember_auto_import__
|
2
|
-
!function(){var r,n={
|
2
|
+
!function(){var r,n={818:function(r,n){window._eai_r=require,window._eai_d=define},824:function(r,n,e){var t,o
|
3
3
|
r.exports=(t=_eai_d,o=_eai_r,window.emberAutoImportDynamic=function(r){return 1===arguments.length?o("_eai_dyn_"+r):o("_eai_dynt_"+r)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(r){return o("_eai_sync_"+r)(Array.prototype.slice.call(arguments,1))},t("__v1-addons__early-boot-set__",[],(function(){})),void t("qunit",["__v1-addons__early-boot-set__"],(function(){return e(916)})))}},e={}
|
4
4
|
function t(r){var o=e[r]
|
5
5
|
if(void 0!==o)return o.exports
|
@@ -17,6 +17,6 @@ var n=function(n,e){var o,i,_=e[0],u=e[1],a=e[2],c=0
|
|
17
17
|
if(_.some((function(n){return 0!==r[n]}))){for(o in u)t.o(u,o)&&(t.m[o]=u[o])
|
18
18
|
if(a)var f=a(t)}for(n&&n(e);c<_.length;c++)i=_[c],t.o(r,i)&&r[i]&&r[i][0](),r[i]=0
|
19
19
|
return t.O(f)},e=self.webpackChunk_ember_auto_import_=self.webpackChunk_ember_auto_import_||[]
|
20
|
-
e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))}(),t.O(void 0,[916],(function(){return t(
|
21
|
-
var o=t.O(void 0,[916],(function(){return t(
|
20
|
+
e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))}(),t.O(void 0,[916],(function(){return t(818)}))
|
21
|
+
var o=t.O(void 0,[916],(function(){return t(824)}))
|
22
22
|
o=t.O(o),__ember_auto_import__=o}()
|
@@ -184,7 +184,7 @@ var t,r,n,i=p(a)
|
|
184
184
|
function a(){var e,t,r,n,o;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,a)
|
185
185
|
for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f]
|
186
186
|
return e=i.call.apply(i,[this].concat(u)),t=y(e),r="showSolveAllButton",n=l,o=y(e),n&&Object.defineProperty(t,r,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(o):void 0}),e}return t=a,(r=[{key:"buttons",get:function(){var e=this.currentMessage.protected,t=[]
|
187
|
-
return!e&&this.showSolveButton&&t.push({klass:"solve",action:this.solve,icon:"check-square",label:"Solve",prefix:"far",danger:!0}),this.showSolveAllButton&&t.push({klass:"solve-all",action:this.solveAll,icon:"check-square",label:"Solve All",prefix:"far",danger:!0}),e?t.push({klass:"unprotect",action:this.unprotect,icon:"unlock",prefix:"fas",label:"Unprotect"}):t.push({klass:"remove",action:this.remove,icon:"trash-alt",label:"Remove",prefix:"far",danger:!0},{klass:"protect",action:this.protect,icon:"lock",prefix:"fas",label:"Protect"}),t.push({klass:"copy",action:this.copy,icon:"copy",prefix:"far",label:"Copy"}),t}},{key:"showSolveButton",get:function(){return!this.showSolveAllButton&&(this.currentMessage.env?this.currentMessage.canSolve:!!o.default.get("application_version"))}},{key:"copy",value:function(){var e=this.currentMessage.showCount?"Message (".concat(this.currentMessage.count," copies reported)"):"Message",t="".concat(e,"\n\n").concat(this.currentMessage.message),r="Backtrace\n\n".concat(this.currentMessage.backtrace
|
187
|
+
return!e&&this.showSolveButton&&t.push({klass:"solve",action:this.solve,icon:"check-square",label:"Solve",prefix:"far",danger:!0}),this.showSolveAllButton&&t.push({klass:"solve-all",action:this.solveAll,icon:"check-square",label:"Solve All",prefix:"far",danger:!0}),e?t.push({klass:"unprotect",action:this.unprotect,icon:"unlock",prefix:"fas",label:"Unprotect"}):t.push({klass:"remove",action:this.remove,icon:"trash-alt",label:"Remove",prefix:"far",danger:!0},{klass:"protect",action:this.protect,icon:"lock",prefix:"fas",label:"Protect"}),t.push({klass:"copy",action:this.copy,icon:"copy",prefix:"far",label:"Copy"}),t}},{key:"showSolveButton",get:function(){return!this.showSolveAllButton&&(this.currentMessage.env?this.currentMessage.canSolve:!!o.default.get("application_version"))}},{key:"copy",value:function(){var e=this.currentMessage.showCount?"Message (".concat(this.currentMessage.count," copies reported)"):"Message",t="".concat(e,"\n\n").concat(this.currentMessage.message),r="Backtrace\n\n".concat(this.currentMessage.backtrace),n=Array.isArray(this.currentMessage.env)?this.currentMessage.env.map((function(e){return e.HTTP_HOST})).filter((function(e,t,r){return e&&r.indexOf(e)===t})).join(", "):this.currentMessage.env.HTTP_HOST,o=[t,r,n?"Env\n\nHTTP HOSTS: ".concat(n):""].filter((function(e){return e})).join("\n\n"),i=document.createElement("TEXTAREA")
|
188
188
|
document.body.appendChild(i),i.value=o,i.select(),document.execCommand("copy"),document.body.removeChild(i)}},{key:"tabChanged",value:function(e){var t
|
189
189
|
null===(t=this.onTabChange)||void 0===t||t.call(this,e)}},{key:"protect",value:function(){this.currentMessage.protect()}},{key:"unprotect",value:function(){this.currentMessage.unprotect()}},{key:"remove",value:function(){this.removeMessage(this.currentMessage)}},{key:"solve",value:function(){this.solveMessage(this.currentMessage)}},{key:"solveAll",value:function(){this.currentRow.solveAll()}},{key:"share",value:function(){window.location.pathname=this.currentMessage.shareUrl}}])&&f(t.prototype,r),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.default),l=v(u.prototype,"showSolveAllButton",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),v(u.prototype,"buttons",[a],Object.getOwnPropertyDescriptor(u.prototype,"buttons"),u.prototype),v(u.prototype,"showSolveButton",[c],Object.getOwnPropertyDescriptor(u.prototype,"showSolveButton"),u.prototype),v(u.prototype,"copy",[n.action],Object.getOwnPropertyDescriptor(u.prototype,"copy"),u.prototype),v(u.prototype,"tabChanged",[n.action],Object.getOwnPropertyDescriptor(u.prototype,"tabChanged"),u.prototype),v(u.prototype,"protect",[n.action],Object.getOwnPropertyDescriptor(u.prototype,"protect"),u.prototype),v(u.prototype,"unprotect",[n.action],Object.getOwnPropertyDescriptor(u.prototype,"unprotect"),u.prototype),v(u.prototype,"remove",[n.action],Object.getOwnPropertyDescriptor(u.prototype,"remove"),u.prototype),v(u.prototype,"solve",[n.action],Object.getOwnPropertyDescriptor(u.prototype,"solve"),u.prototype),v(u.prototype,"solveAll",[n.action],Object.getOwnPropertyDescriptor(u.prototype,"solveAll"),u.prototype),v(u.prototype,"share",[n.action],Object.getOwnPropertyDescriptor(u.prototype,"share"),u.prototype),u)
|
190
190
|
e.default=b})),define("client-app/components/message-row",["exports","@ember-decorators/component","@ember/component"],(function(e,t,r){var n,o,i
|
@@ -1387,4 +1387,4 @@ var r=(0,t.createTemplateFactory)({id:"qqSpoh9d",block:'[[[10,0],[14,0,"settings
|
|
1387
1387
|
e.default=r})),define("client-app/templates/show",["exports","@ember/template-factory"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
1388
1388
|
var r=(0,t.createTemplateFactory)({id:"d6AYgHoB",block:'[[[8,[39,0],[[24,0,"recent-link"]],[["@route"],["index"]],[["default"],[[[[1,"Recent"]],[]]]]],[1,"\\n\\n"],[10,0],[14,1,"bottom-panel"],[14,0,"full"],[12],[1,"\\n "],[8,[39,1],null,[["@currentMessage","@showTitle","@removeMessage","@solveMessage","@envChangedAction","@currentEnvPosition","@actionsInMenu"],[[30,0,["model"]],"true",[30,0,["removeMessage"]],[30,0,["solveMessage"]],[30,0,["envChanged"]],[30,0,["envPosition"]],false]],null],[1,"\\n"],[13]],[],false,["link-to","message-info"]]',moduleName:"client-app/templates/show.hbs",isStrictMode:!1})
|
1389
1389
|
e.default=r})),define("client-app/config/environment",[],(function(){try{var e="client-app/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),r={default:JSON.parse(decodeURIComponent(t))}
|
1390
|
-
return Object.defineProperty(r,"__esModule",{value:!0}),r}catch(n){throw new Error('Could not read config from meta tag with name "'+e+'".')}})),runningTests||require("client-app/app").default.create({name:"client-app",version:"0.0.0+
|
1390
|
+
return Object.defineProperty(r,"__esModule",{value:!0}),r}catch(n){throw new Error('Could not read config from meta tag with name "'+e+'".')}})),runningTests||require("client-app/app").default.create({name:"client-app",version:"0.0.0+a1ec1140"})
|
@@ -94,10 +94,7 @@ export default class MessageInfo extends Component {
|
|
94
94
|
: "Message";
|
95
95
|
const message = `${header}\n\n${this.currentMessage.message}`;
|
96
96
|
|
97
|
-
const backtrace = `Backtrace\n\n${this.currentMessage.backtrace
|
98
|
-
.split("\n")
|
99
|
-
.slice(0, 10)
|
100
|
-
.join("\n")}`;
|
97
|
+
const backtrace = `Backtrace\n\n${this.currentMessage.backtrace}`;
|
101
98
|
|
102
99
|
const httpHosts = Array.isArray(this.currentMessage.env)
|
103
100
|
? this.currentMessage.env
|
@@ -46,9 +46,7 @@ module Logster
|
|
46
46
|
|
47
47
|
@allow_grouping = false
|
48
48
|
|
49
|
-
|
50
|
-
@allow_grouping = true
|
51
|
-
end
|
49
|
+
@allow_grouping = true if defined?(::Rails.env) && ::Rails.env.production?
|
52
50
|
end
|
53
51
|
|
54
52
|
def subdirectory
|
@@ -5,32 +5,39 @@ module Logster::Rails
|
|
5
5
|
class Engine < Rails::Engine
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
class << self
|
9
|
+
def set_logger(config)
|
10
|
+
return unless Logster.config.environments.include?(Rails.env.to_sym)
|
10
11
|
|
11
|
-
|
12
|
-
|
12
|
+
require "logster/middleware/debug_exceptions"
|
13
|
+
require "logster/middleware/reporter"
|
13
14
|
|
14
|
-
|
15
|
-
|
15
|
+
store = Logster.store ||= Logster::RedisStore.new
|
16
|
+
store.level = Logger::Severity::WARN if Rails.env.production?
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
if Rails.env.development?
|
19
|
+
require "logster/defer_logger"
|
20
|
+
logger = Logster::DeferLogger.new(store)
|
21
|
+
else
|
22
|
+
logger = Logster::Logger.new(store)
|
23
|
+
end
|
23
24
|
|
24
|
-
|
25
|
-
logger.level = ::Rails.logger.level
|
25
|
+
logger.level = ::Rails.logger.level
|
26
26
|
|
27
|
-
|
28
|
-
end
|
27
|
+
Logster.logger = config.logger = logger
|
29
28
|
|
30
|
-
|
31
|
-
|
29
|
+
if rails_71?
|
30
|
+
::Rails.logger.broadcast_to(logger)
|
31
|
+
else
|
32
|
+
logger.chain(::Rails.logger)
|
33
|
+
::Rails.logger = logger
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def initialize!(app)
|
38
|
+
return unless Logster.config.environments.include?(Rails.env.to_sym)
|
39
|
+
return unless logster_enabled?
|
32
40
|
|
33
|
-
if Logster::Logger === Rails.logger
|
34
41
|
if Logster.config.enable_js_error_reporting
|
35
42
|
app.middleware.insert_before ActionDispatch::ShowExceptions, Logster::Middleware::Reporter
|
36
43
|
end
|
@@ -52,6 +59,17 @@ module Logster::Rails
|
|
52
59
|
Logster.config.application_version = git_version.strip if git_version.present?
|
53
60
|
end
|
54
61
|
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def logster_enabled?
|
66
|
+
return ::Rails.logger == Logster.logger unless rails_71?
|
67
|
+
::Rails.logger.broadcasts.include?(Logster.logger)
|
68
|
+
end
|
69
|
+
|
70
|
+
def rails_71?
|
71
|
+
::Rails.version >= "7.1"
|
72
|
+
end
|
55
73
|
end
|
56
74
|
|
57
75
|
class Railtie < ::Rails::Railtie
|
data/lib/logster/version.rb
CHANGED
data/lib/logster.rb
CHANGED
@@ -57,4 +57,4 @@ end
|
|
57
57
|
# check logster/configuration.rb for config options
|
58
58
|
# Logster.config.environments << :staging
|
59
59
|
|
60
|
-
require "logster/rails/railtie" if defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 3
|
60
|
+
require "logster/rails/railtie" if defined?(::Rails::VERSION) && ::Rails::VERSION::MAJOR.to_i >= 3
|
data/logster.gemspec
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "boot"
|
3
|
+
|
4
|
+
require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
|
7
|
+
# Require the gems listed in Gemfile, including any gems
|
8
|
+
# you've limited to :test, :development, or :production.
|
9
|
+
Bundler.require(*Rails.groups)
|
10
|
+
|
11
|
+
require "logster"
|
12
|
+
|
13
|
+
module Dummy
|
14
|
+
class Application < Rails::Application
|
15
|
+
config.load_defaults Rails::VERSION::STRING.to_f
|
16
|
+
|
17
|
+
# For compatibility with applications that use this config
|
18
|
+
config.action_controller.include_all_helpers = false
|
19
|
+
|
20
|
+
config.eager_load = false
|
21
|
+
|
22
|
+
# Configuration for the application, engines, and railties goes here.
|
23
|
+
#
|
24
|
+
# These settings can be overridden in specific environments using the files
|
25
|
+
# in config/environments, which are processed later.
|
26
|
+
#
|
27
|
+
# config.time_zone = "Central Time (US & Canada)"
|
28
|
+
# config.eager_load_paths << Rails.root.join("extras")
|
29
|
+
Logster.set_environments([Rails.env.to_sym])
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Set up gems listed in the Gemfile.
|
3
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__)
|
4
|
+
|
5
|
+
require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
|
6
|
+
$LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
ENV["RAILS_ENV"] = "test"
|
4
|
+
|
5
|
+
require "redis"
|
6
|
+
require_relative "../dummy/config/environment"
|
7
|
+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("dummy/db/migrate", __dir__)]
|
8
|
+
|
9
|
+
require_relative "../test_helper"
|
10
|
+
|
11
|
+
class TestRailtie < Minitest::Test
|
12
|
+
def test_sets_logger
|
13
|
+
refute_nil Logster.logger
|
14
|
+
|
15
|
+
if Rails.version >= "7.1"
|
16
|
+
assert_includes Rails.logger.broadcasts, Logster.logger
|
17
|
+
else
|
18
|
+
assert_equal Rails.logger, Logster.logger
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: sqlite3
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
description: UI for viewing logs in Rack
|
154
168
|
email:
|
155
169
|
- sam.saffron@gmail.com
|
@@ -172,8 +186,8 @@ files:
|
|
172
186
|
- assets/images/icon_144x144.png
|
173
187
|
- assets/images/icon_64x64.png
|
174
188
|
- assets/javascript/.gitkeep
|
175
|
-
- assets/javascript/chunk.143.
|
176
|
-
- assets/javascript/chunk.178.
|
189
|
+
- assets/javascript/chunk.143.86f7820bfe6482b8dcd5.js
|
190
|
+
- assets/javascript/chunk.178.c5fac0c2a2035839a91e.js
|
177
191
|
- assets/javascript/chunk.468.95dd450003497c781cb3.js
|
178
192
|
- assets/javascript/chunk.916.85a3fc9d873df80f5ea5.js
|
179
193
|
- assets/javascript/client-app.js
|
@@ -263,6 +277,9 @@ files:
|
|
263
277
|
- client-app/tests/unit/routes/index-test.js
|
264
278
|
- client-app/tests/unit/routes/show-test.js
|
265
279
|
- client-app/yarn.lock
|
280
|
+
- gemfiles/rails_6.1.gemfile
|
281
|
+
- gemfiles/rails_7.0.gemfile
|
282
|
+
- gemfiles/rails_7.1.gemfile
|
266
283
|
- lib/examples/sidekiq_logster_reporter.rb
|
267
284
|
- lib/logster.rb
|
268
285
|
- lib/logster/base_store.rb
|
@@ -286,6 +303,9 @@ files:
|
|
286
303
|
- lib/logster/version.rb
|
287
304
|
- lib/logster/web.rb
|
288
305
|
- logster.gemspec
|
306
|
+
- test/dummy/config/application.rb
|
307
|
+
- test/dummy/config/boot.rb
|
308
|
+
- test/dummy/config/environment.rb
|
289
309
|
- test/examples/test_sidekiq_reporter_example.rb
|
290
310
|
- test/fake_data/Gemfile
|
291
311
|
- test/fake_data/generate.rb
|
@@ -299,6 +319,7 @@ files:
|
|
299
319
|
- test/logster/test_logger.rb
|
300
320
|
- test/logster/test_message.rb
|
301
321
|
- test/logster/test_pattern.rb
|
322
|
+
- test/logster/test_railtie.rb
|
302
323
|
- test/logster/test_redis_rate_limiter.rb
|
303
324
|
- test/logster/test_redis_store.rb
|
304
325
|
- test/test_helper.rb
|
@@ -327,6 +348,9 @@ signing_key:
|
|
327
348
|
specification_version: 4
|
328
349
|
summary: UI for viewing logs in Rack
|
329
350
|
test_files:
|
351
|
+
- test/dummy/config/application.rb
|
352
|
+
- test/dummy/config/boot.rb
|
353
|
+
- test/dummy/config/environment.rb
|
330
354
|
- test/examples/test_sidekiq_reporter_example.rb
|
331
355
|
- test/fake_data/Gemfile
|
332
356
|
- test/fake_data/generate.rb
|
@@ -340,6 +364,7 @@ test_files:
|
|
340
364
|
- test/logster/test_logger.rb
|
341
365
|
- test/logster/test_message.rb
|
342
366
|
- test/logster/test_pattern.rb
|
367
|
+
- test/logster/test_railtie.rb
|
343
368
|
- test/logster/test_redis_rate_limiter.rb
|
344
369
|
- test/logster/test_redis_store.rb
|
345
370
|
- test/test_helper.rb
|