logsly 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,11 +1,10 @@
1
1
  *.gem
2
2
  *.log
3
3
  *.rbc
4
+ .rbx/
4
5
  .bundle
5
6
  .config
6
7
  .yardoc
7
- .rvmrc
8
- .rbenv-version
9
8
  Gemfile.lock
10
9
  InstalledFiles
11
10
  _yardoc
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'bundler', '~>1.1'
6
- gem 'rake', '~>0.9.2'
5
+ gem 'rake'
6
+ gem 'pry'
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 <TODO: copyright holders>
1
+ Copyright (c) 2012-Present Kelly Redding and Collin Redding
2
2
 
3
3
  MIT License
4
4
 
data/Rakefile CHANGED
@@ -1,8 +1 @@
1
- #!/usr/bin/env rake
2
-
3
- require 'assert/rake_tasks'
4
- Assert::RakeTasks.install
5
-
6
- require 'bundler/gem_tasks'
7
-
8
- task :default => :build
1
+ require "bundler/gem_tasks"
@@ -1,3 +1,3 @@
1
1
  module Logsly
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/logsly.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'ns-options'
2
2
  require 'logging'
3
+ require 'logsly/version'
3
4
  require 'logsly/settings'
4
5
 
5
6
  module Logsly
data/log/.gitkeep ADDED
File without changes
data/logsly.gemspec CHANGED
@@ -1,14 +1,15 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/logsly/version', __FILE__)
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'logsly/version'
3
5
 
4
6
  Gem::Specification.new do |gem|
5
7
  gem.name = "logsly"
6
8
  gem.version = Logsly::VERSION
7
- gem.description = %q{Create custom loggers.}
8
- gem.summary = %q{Create custom loggers.}
9
-
10
9
  gem.authors = ["Kelly Redding", "Collin Redding"]
11
10
  gem.email = ["kelly@kellyredding.com", "collin.redding@me.com"]
11
+ gem.description = %q{Create custom loggers.}
12
+ gem.summary = %q{Create custom loggers.}
12
13
  gem.homepage = "http://github.com/redding/logsly"
13
14
 
14
15
  gem.files = `git ls-files`.split("\n")
@@ -16,7 +17,7 @@ Gem::Specification.new do |gem|
16
17
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
18
  gem.require_paths = ["lib"]
18
19
 
19
- gem.add_development_dependency("assert", ["~> 1.0"])
20
+ gem.add_development_dependency("assert", ["~> 2.0"])
20
21
 
21
22
  gem.add_dependency("ns-options", ["~> 1.1"])
22
23
  gem.add_dependency("logging", ["~> 1.7"])
data/test/helper.rb CHANGED
@@ -1,5 +1,8 @@
1
- # this file is automatically required in when you require 'assert' in your tests
2
- # put test helpers here
1
+ # this file is automatically required when you run `assert`
2
+ # put any test helpers here
3
3
 
4
- # add root dir to the load path
4
+ # add the root dir to the load path
5
5
  $LOAD_PATH.unshift(File.expand_path("../..", __FILE__))
6
+
7
+ # require pry for debugging (`binding.pry`)
8
+ require 'pry'
@@ -23,7 +23,7 @@ class Logsly::FileOutput
23
23
  @logger = OpenStruct.new
24
24
  @logger.debug_level = :white
25
25
  @logger.pattern = '%d : %m\n'
26
- @logger.file = "dev.log"
26
+ @logger.file = "log/dev.log"
27
27
 
28
28
  Logsly.colors('a_color_scheme') do |logger|
29
29
  debug logger.debug_level
@@ -46,7 +46,7 @@ class Logsly::FileOutput
46
46
  appender = subject.to_appender @logger
47
47
 
48
48
  assert_kind_of Logging::Appenders::File, appender
49
- assert_equal 'dev.log', appender.name
49
+ assert_equal 'log/dev.log', appender.name
50
50
  assert_kind_of Logging::Layouts::Pattern, appender.layout
51
51
  assert_equal '%d : %m\n', appender.layout.pattern
52
52
  assert_kind_of Logging::ColorScheme, appender.layout.color_scheme
@@ -57,10 +57,10 @@ module Logsly
57
57
  setup do
58
58
  Logsly.stdout 'my_stdout'
59
59
  Logsly.file('my_file') do |logger|
60
- path "development-#{logger.log_type}.log"
60
+ path "log/development-#{logger.log_type}.log"
61
61
  end
62
62
  Logsly.file('my_other_file') do |logger|
63
- path "other-#{logger.log_type}.log"
63
+ path "log/other-#{logger.log_type}.log"
64
64
  end
65
65
  Logsly.syslog('my_syslog') do |logger|
66
66
  identity "my_syslog_logger-#{logger.log_type}"
@@ -77,7 +77,7 @@ module Logsly
77
77
  filelog = extract_appender_from_logger(log, :file)
78
78
 
79
79
  assert_includes_appender Logging::Appenders::File, log
80
- assert_equal 'development-test.log', filelog.name
80
+ assert_equal 'log/development-test.log', filelog.name
81
81
  end
82
82
 
83
83
  should "add a named syslog appender" do
data/tmp/.gitkeep ADDED
File without changes
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logsly
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding
@@ -16,26 +16,27 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-12-12 00:00:00 Z
19
+ date: 2013-03-23 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
+ name: assert
22
23
  prerelease: false
23
- version_requirements: &id001 !ruby/object:Gem::Requirement
24
+ requirement: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
25
26
  requirements:
26
27
  - - ~>
27
28
  - !ruby/object:Gem::Version
28
- hash: 15
29
+ hash: 3
29
30
  segments:
30
- - 1
31
+ - 2
31
32
  - 0
32
- version: "1.0"
33
- requirement: *id001
34
- name: assert
33
+ version: "2.0"
35
34
  type: :development
35
+ version_requirements: *id001
36
36
  - !ruby/object:Gem::Dependency
37
+ name: ns-options
37
38
  prerelease: false
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
39
+ requirement: &id002 !ruby/object:Gem::Requirement
39
40
  none: false
40
41
  requirements:
41
42
  - - ~>
@@ -45,12 +46,12 @@ dependencies:
45
46
  - 1
46
47
  - 1
47
48
  version: "1.1"
48
- requirement: *id002
49
- name: ns-options
50
49
  type: :runtime
50
+ version_requirements: *id002
51
51
  - !ruby/object:Gem::Dependency
52
+ name: logging
52
53
  prerelease: false
53
- version_requirements: &id003 !ruby/object:Gem::Requirement
54
+ requirement: &id003 !ruby/object:Gem::Requirement
54
55
  none: false
55
56
  requirements:
56
57
  - - ~>
@@ -60,9 +61,8 @@ dependencies:
60
61
  - 1
61
62
  - 7
62
63
  version: "1.7"
63
- requirement: *id003
64
- name: logging
65
64
  type: :runtime
65
+ version_requirements: *id003
66
66
  description: Create custom loggers.
67
67
  email:
68
68
  - kelly@kellyredding.com
@@ -76,7 +76,7 @@ extra_rdoc_files: []
76
76
  files:
77
77
  - .gitignore
78
78
  - Gemfile
79
- - LICENSE
79
+ - LICENSE.txt
80
80
  - README.md
81
81
  - Rakefile
82
82
  - lib/logsly.rb
@@ -87,9 +87,9 @@ files:
87
87
  - lib/logsly/stdout_output.rb
88
88
  - lib/logsly/syslog_output.rb
89
89
  - lib/logsly/version.rb
90
+ - log/.gitkeep
90
91
  - logsly.gemspec
91
92
  - test/helper.rb
92
- - test/irb.rb
93
93
  - test/support/logger.rb
94
94
  - test/unit/base_output_tests.rb
95
95
  - test/unit/colors_tests.rb
@@ -98,6 +98,7 @@ files:
98
98
  - test/unit/settings_tests.rb
99
99
  - test/unit/stdout_output_tests.rb
100
100
  - test/unit/syslog_output_tests.rb
101
+ - tmp/.gitkeep
101
102
  homepage: http://github.com/redding/logsly
102
103
  licenses: []
103
104
 
@@ -127,13 +128,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
128
  requirements: []
128
129
 
129
130
  rubyforge_project:
130
- rubygems_version: 1.8.15
131
+ rubygems_version: 1.8.24
131
132
  signing_key:
132
133
  specification_version: 3
133
134
  summary: Create custom loggers.
134
135
  test_files:
135
136
  - test/helper.rb
136
- - test/irb.rb
137
137
  - test/support/logger.rb
138
138
  - test/unit/base_output_tests.rb
139
139
  - test/unit/colors_tests.rb
data/test/irb.rb DELETED
@@ -1,9 +0,0 @@
1
- require 'assert/setup'
2
-
3
- # this file is required in when the 'irb' rake test is run.
4
- # b/c 'assert/setup' is required above, the test helper will be
5
- # required in as well.
6
-
7
- # put any IRB setup code here
8
-
9
- require 'logsly'