log4r-date_directory_file_outputter 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe0d61f07ef2dc5aad37f063df0b071c2c47531a1e876569a1862cd14757b6cc
4
- data.tar.gz: 5d9fd36ac89d1d3106f38a631c54d1adf47984e0772ddad41831fb4c64ad27b3
3
+ metadata.gz: df65485732915a7ccf524306c9c3b0095a1a23fc39273ca7d1c381446093cc6c
4
+ data.tar.gz: 56dc6dc62bd6cf1aaa886cce6ea7bef4c40fde80b95ef0d8a551ca0166cf2dc5
5
5
  SHA512:
6
- metadata.gz: 39a0dc6bcbd388ea4c4393855a4f0665a22506c17ab6a82a1a0f79c5a4442921a02580154d76f96e19cc6b3f1176ab50e8d5695e63f09535c618d81f30baa7fa
7
- data.tar.gz: b55a576bfd122ce01526f5ec622eccc495e0953367622c1d2d7fedcbf57fa6a70bd36533d3990105bf9c8bde2a4dc63283f2fadfd3bb05285157ec3bf59fe52d
6
+ metadata.gz: d3c3ce36594c843beb4c5c7dd283e17c20079e0e0c0a877dd25c38ee74e983fa96bd50d673e69f90260d4eaeefcfda0065218a0b30b6e15dd6cfb59c761c083a
7
+ data.tar.gz: acc17da9c0bba183aedd19c8295030007fc402a32e1c8053f034defbbcd46f63b448e2e05a6fc56797d1ed3d62fdf31323f5e6f25326dbc1d4f283e31e510853
data/.gitignore CHANGED
@@ -11,4 +11,5 @@
11
11
  .rspec_status
12
12
  /vendor/bundle/
13
13
  /.idea/
14
- /.bundle/
14
+ /.bundle/
15
+ Gemfile.lock
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Log4r::DateDirectoryFileOutputter
1
+ [![Build Status](https://travis-ci.org/tzmfreedom/log4r-date_directory_file_outputter.svg?branch=master)](https://travis-ci.org/tzmfreedom/log4r-date_directory_file_outputter)
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/log4r/date_directory_file_outputter`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ # Log4r::DateDirectoryFileOutputter
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ Log4r Outputter to output log to file in date directory (e.g. /var/log/2018/01/23/request.log)
6
6
 
7
7
  ## Installation
8
8
 
@@ -22,6 +22,12 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
+ require outputter gem
26
+ ```ruby
27
+ require 'log4r/date_directory_file_outputter'
28
+ ```
29
+
30
+ setting outputter
25
31
  ```yaml
26
32
  log4r_config:
27
33
  # ...
@@ -47,7 +53,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
47
53
 
48
54
  ## Contributing
49
55
 
50
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/log4r-date_directory_file_outputter.
56
+ Bug reports and pull requests are welcome on GitHub at https://github.com/tzmfreedom/log4r-date_directory_file_outputter.
51
57
 
52
58
  ## License
53
59
 
@@ -3,8 +3,6 @@ require 'log4r/staticlogger'
3
3
 
4
4
  module Log4r
5
5
  class DateDirectoryFileOutputter < FileOutputter
6
- VERSION = '0.1.0'
7
-
8
6
  def initialize(name, hash = {})
9
7
  @file_path_pattern = hash[:file_path] || hash['file_path']
10
8
  @file_path = hash[:filename] = hash['filename'] = Time.now.strftime(@file_path_pattern)
@@ -1,11 +1,10 @@
1
1
 
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'log4r/date_directory_file_outputter'
5
4
 
6
5
  Gem::Specification.new do |spec|
7
6
  spec.name = 'log4r-date_directory_file_outputter'
8
- spec.version = Log4r::DateDirectoryFileOutputter::VERSION
7
+ spec.version = '0.1.1'
9
8
  spec.authors = ['tzmfreedom']
10
9
  spec.email = ['makoto_tajitsu@hotmail.co.jp']
11
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log4r-date_directory_file_outputter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - tzmfreedom
@@ -91,12 +91,10 @@ files:
91
91
  - ".rspec"
92
92
  - ".travis.yml"
93
93
  - Gemfile
94
- - Gemfile.lock
95
94
  - LICENSE.txt
96
95
  - README.md
97
96
  - Rakefile
98
97
  - bin/console
99
- - bin/rspec
100
98
  - bin/setup
101
99
  - lib/log4r/date_directory_file_outputter.rb
102
100
  - log4r-date_directory_file_outputter.gemspec
@@ -1,49 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- log4r-date_directory_file_outputter (0.1.0)
5
- log4r
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- byebug (9.1.0)
11
- coderay (1.1.2)
12
- diff-lcs (1.3)
13
- log4r (1.1.10)
14
- method_source (0.9.0)
15
- pry (0.11.3)
16
- coderay (~> 1.1.0)
17
- method_source (~> 0.9.0)
18
- pry-byebug (3.5.1)
19
- byebug (~> 9.1)
20
- pry (~> 0.10)
21
- rake (10.5.0)
22
- rspec (3.7.0)
23
- rspec-core (~> 3.7.0)
24
- rspec-expectations (~> 3.7.0)
25
- rspec-mocks (~> 3.7.0)
26
- rspec-core (3.7.1)
27
- rspec-support (~> 3.7.0)
28
- rspec-expectations (3.7.0)
29
- diff-lcs (>= 1.2.0, < 2.0)
30
- rspec-support (~> 3.7.0)
31
- rspec-mocks (3.7.0)
32
- diff-lcs (>= 1.2.0, < 2.0)
33
- rspec-support (~> 3.7.0)
34
- rspec-support (3.7.0)
35
- timecop (0.9.1)
36
-
37
- PLATFORMS
38
- ruby
39
-
40
- DEPENDENCIES
41
- bundler (~> 1.16)
42
- log4r-date_directory_file_outputter!
43
- pry-byebug
44
- rake (~> 10.0)
45
- rspec (~> 3.0)
46
- timecop
47
-
48
- BUNDLED WITH
49
- 1.16.1
data/bin/rspec DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rspec' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("rspec-core", "rspec")