tty-logger 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +69 -8
  4. data/lib/tty/logger.rb +14 -10
  5. data/lib/tty/logger/config.rb +34 -3
  6. data/lib/tty/logger/data_filter.rb +121 -0
  7. data/lib/tty/logger/handlers/console.rb +13 -3
  8. data/lib/tty/logger/version.rb +1 -1
  9. data/tty-logger.gemspec +4 -6
  10. metadata +4 -38
  11. data/Rakefile +0 -8
  12. data/examples/child.rb +0 -9
  13. data/examples/console.rb +0 -22
  14. data/examples/custom_type.rb +0 -27
  15. data/examples/error.rb +0 -11
  16. data/examples/handler.rb +0 -19
  17. data/examples/log.rb +0 -9
  18. data/examples/output.rb +0 -15
  19. data/examples/override.rb +0 -29
  20. data/examples/stream.rb +0 -22
  21. data/spec/perf/json_formatter_spec.rb +0 -29
  22. data/spec/perf/log_spec.rb +0 -21
  23. data/spec/perf/text_formatter_spec.rb +0 -29
  24. data/spec/spec_helper.rb +0 -31
  25. data/spec/unit/add_handler_spec.rb +0 -25
  26. data/spec/unit/config_spec.rb +0 -109
  27. data/spec/unit/copy_spec.rb +0 -27
  28. data/spec/unit/event_spec.rb +0 -22
  29. data/spec/unit/exception_spec.rb +0 -45
  30. data/spec/unit/filter_spec.rb +0 -32
  31. data/spec/unit/formatter_spec.rb +0 -70
  32. data/spec/unit/formatters/json_spec.rb +0 -41
  33. data/spec/unit/formatters/text_spec.rb +0 -82
  34. data/spec/unit/handler_spec.rb +0 -83
  35. data/spec/unit/handlers/custom_spec.rb +0 -26
  36. data/spec/unit/handlers/null_spec.rb +0 -15
  37. data/spec/unit/handlers/stream_spec.rb +0 -72
  38. data/spec/unit/levels_spec.rb +0 -40
  39. data/spec/unit/log_at_spec.rb +0 -34
  40. data/spec/unit/log_metadata_spec.rb +0 -55
  41. data/spec/unit/log_spec.rb +0 -203
  42. data/spec/unit/output_spec.rb +0 -40
  43. data/tasks/console.rake +0 -11
  44. data/tasks/coverage.rake +0 -11
  45. data/tasks/spec.rake +0 -34
data/tasks/console.rake DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Load gem inside irb console'
4
- task :console do
5
- require 'irb'
6
- require 'irb/completion'
7
- require File.join(__FILE__, '../../lib/tty-logger')
8
- ARGV.clear
9
- IRB.start
10
- end
11
- task c: %w[ console ]
data/tasks/coverage.rake DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc 'Measure code coverage'
4
- task :coverage do
5
- begin
6
- original, ENV['COVERAGE'] = ENV['COVERAGE'], 'true'
7
- Rake::Task['spec'].invoke
8
- ensure
9
- ENV['COVERAGE'] = original
10
- end
11
- end
data/tasks/spec.rake DELETED
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- require "rspec/core/rake_task"
5
-
6
- desc "Run all specs"
7
- RSpec::Core::RakeTask.new(:spec) do |task|
8
- task.pattern = "spec/{unit,integration}{,/*/**}/*_spec.rb"
9
- end
10
-
11
- namespace :spec do
12
- desc "Run unit specs"
13
- RSpec::Core::RakeTask.new(:unit) do |task|
14
- task.pattern = "spec/unit{,/*/**}/*_spec.rb"
15
- end
16
-
17
- desc "Run integration specs"
18
- RSpec::Core::RakeTask.new(:integration) do |task|
19
- task.pattern = "spec/integration{,/*/**}/*_spec.rb"
20
- end
21
-
22
- desc "Run integration specs"
23
- RSpec::Core::RakeTask.new(:perf) do |task|
24
- task.pattern = "spec/perf{,/*/**}/*_spec.rb"
25
- end
26
- end
27
-
28
- rescue LoadError
29
- %w[spec spec:unit spec:integration].each do |name|
30
- task name do
31
- $stderr.puts "In order to run #{name}, do `gem install rspec`"
32
- end
33
- end
34
- end