From bde4d455fe8720e89cc6c13ba7add9efacd61892 Mon Sep 17 00:00:00 2001 From: Jill Klang Date: Mon, 22 Aug 2022 12:47:29 -0400 Subject: [PATCH] Jk/lumberaxe enhancements (#21) * Ignore uploaded files in dev * Don't implicity setup Rails app * Bump version --- packages/lumberaxe/.gitignore | 4 ++++ packages/lumberaxe/docs/README.md | 2 +- packages/lumberaxe/lib/lumberaxe.rb | 1 - packages/lumberaxe/lib/lumberaxe/logger.rb | 2 +- packages/lumberaxe/lib/lumberaxe/railtie.rb | 1 + packages/lumberaxe/lib/lumberaxe/version.rb | 2 +- packages/lumberaxe/spec/internal/config/storage.yml | 3 --- 7 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 packages/lumberaxe/spec/internal/config/storage.yml diff --git a/packages/lumberaxe/.gitignore b/packages/lumberaxe/.gitignore index 2f3de776..89b9ede9 100644 --- a/packages/lumberaxe/.gitignore +++ b/packages/lumberaxe/.gitignore @@ -12,3 +12,7 @@ vendor/bundle *.sqlite *.sqlite3 Gemfile.lock + +# Ignore uploaded files in development +/storage/* +!/storage/.keep diff --git a/packages/lumberaxe/docs/README.md b/packages/lumberaxe/docs/README.md index 72182103..0afcac94 100644 --- a/packages/lumberaxe/docs/README.md +++ b/packages/lumberaxe/docs/README.md @@ -9,7 +9,7 @@ After installing the gem, require it as part of your application configuration. ```ruby # application.rb -require "lumberaxe" +require "lumberaxe/railtie" ``` ## Setting JSON logging diff --git a/packages/lumberaxe/lib/lumberaxe.rb b/packages/lumberaxe/lib/lumberaxe.rb index 36ce3797..4e41122d 100644 --- a/packages/lumberaxe/lib/lumberaxe.rb +++ b/packages/lumberaxe/lib/lumberaxe.rb @@ -2,7 +2,6 @@ require "logger" require "active_support" -require "lumberaxe/railtie" if defined?(Rails) require "lumberaxe/logger" require "lumberaxe/json_formatter" diff --git a/packages/lumberaxe/lib/lumberaxe/logger.rb b/packages/lumberaxe/lib/lumberaxe/logger.rb index c4806957..8abe85ca 100644 --- a/packages/lumberaxe/lib/lumberaxe/logger.rb +++ b/packages/lumberaxe/lib/lumberaxe/logger.rb @@ -2,7 +2,7 @@ module Lumberaxe class Logger < ::ActiveSupport::Logger - cattr_accessor :log_level + cattr_accessor(:log_level) { :debug } def initialize(output = $stdout, progname:, level: log_level) super output diff --git a/packages/lumberaxe/lib/lumberaxe/railtie.rb b/packages/lumberaxe/lib/lumberaxe/railtie.rb index 792908d2..94e906e6 100644 --- a/packages/lumberaxe/lib/lumberaxe/railtie.rb +++ b/packages/lumberaxe/lib/lumberaxe/railtie.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require "lograge" +require "lumberaxe" module Lumberaxe class Railtie < Rails::Railtie diff --git a/packages/lumberaxe/lib/lumberaxe/version.rb b/packages/lumberaxe/lib/lumberaxe/version.rb index fc4054ac..f0b22a7d 100644 --- a/packages/lumberaxe/lib/lumberaxe/version.rb +++ b/packages/lumberaxe/lib/lumberaxe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lumberaxe - VERSION = "0.1.0" + VERSION = "0.1.1" end diff --git a/packages/lumberaxe/spec/internal/config/storage.yml b/packages/lumberaxe/spec/internal/config/storage.yml deleted file mode 100644 index b24060b3..00000000 --- a/packages/lumberaxe/spec/internal/config/storage.yml +++ /dev/null @@ -1,3 +0,0 @@ -test: - service: Disk - root: /Users/jill/power-tools/packages/lumberaxe/tmp/storage