merb-colorful-logger 0.1.4 → 0.1.5
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.
- data/.gitignore +3 -0
- data/LICENSE +1 -1
- data/README.markdown +3 -3
- data/Rakefile +12 -49
- data/VERSION +1 -0
- data/lib/merb-colorful-logger.rb +6 -6
- data/merb-colorful-logger.gemspec +54 -0
- metadata +13 -10
data/.gitignore
ADDED
data/LICENSE
CHANGED
data/README.markdown
CHANGED
@@ -5,11 +5,11 @@ A plugin for the Merb framework that provides some color in merb console and new
|
|
5
5
|
|
6
6
|
Instalation
|
7
7
|
-----------
|
8
|
-
gem sources -a http://
|
9
|
-
sudo gem install
|
8
|
+
gem sources -a http://gemscutter.org
|
9
|
+
sudo gem install merb-colorful-logger
|
10
10
|
|
11
11
|
# config/dependencies.rb
|
12
|
-
dependency "
|
12
|
+
dependency "merb-colorful-logger"
|
13
13
|
|
14
14
|
Usage
|
15
15
|
-----
|
data/Rakefile
CHANGED
@@ -1,53 +1,16 @@
|
|
1
|
-
|
2
|
-
require '
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
EMAIL = "i@teamon.eu"
|
11
|
-
HOMEPAGE = "http://blog.teamon.eu/projekty/"
|
12
|
-
SUMMARY = "Merb plugin that provides some color to merb console"
|
13
|
-
|
14
|
-
spec = Gem::Specification.new do |s|
|
15
|
-
s.rubyforge_project = 'merb'
|
16
|
-
s.name = GEM_NAME
|
17
|
-
s.version = GEM_VERSION
|
18
|
-
s.platform = Gem::Platform::RUBY
|
19
|
-
s.has_rdoc = true
|
20
|
-
s.extra_rdoc_files = ["README.markdown", "LICENSE", 'TODO']
|
21
|
-
s.summary = SUMMARY
|
22
|
-
s.description = s.summary
|
23
|
-
s.author = AUTHOR
|
24
|
-
s.email = EMAIL
|
25
|
-
s.homepage = HOMEPAGE
|
26
|
-
s.add_dependency('merb-core', '>= 1.0')
|
27
|
-
s.require_path = 'lib'
|
28
|
-
s.files = %w(LICENSE README.markdown Rakefile TODO) + Dir.glob("{lib,spec}/**/*")
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
33
|
-
pkg.gem_spec = spec
|
34
|
-
end
|
35
|
-
|
36
|
-
desc "install the plugin as a gem"
|
37
|
-
task :install do
|
38
|
-
Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
|
39
|
-
end
|
40
|
-
|
41
|
-
desc "Uninstall the gem"
|
42
|
-
task :uninstall do
|
43
|
-
Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
|
44
|
-
end
|
45
|
-
|
46
|
-
desc "Create a gemspec file"
|
47
|
-
task :gemspec do
|
48
|
-
File.open("#{GEM_NAME}.gemspec", "w") do |file|
|
49
|
-
file.puts spec.to_ruby
|
1
|
+
begin
|
2
|
+
require 'jeweler'
|
3
|
+
Jeweler::Tasks.new do |gemspec|
|
4
|
+
gemspec.name = "merb-colorful-logger"
|
5
|
+
gemspec.summary = gemspec.description = "Merb plugin that provides some color to merb console"
|
6
|
+
gemspec.email = "i@teamon.eu"
|
7
|
+
gemspec.homepage = "http://github.com/teamon/merb-colorful-logger"
|
8
|
+
gemspec.authors = ["Tymon Tobolski"]
|
9
|
+
gemspec.add_dependency('merb-core', '>= 1.0')
|
50
10
|
end
|
11
|
+
Jeweler::GemcutterTasks.new
|
12
|
+
rescue LoadError
|
13
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
51
14
|
end
|
52
15
|
|
53
16
|
desc "Run specs"
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.5
|
data/lib/merb-colorful-logger.rb
CHANGED
@@ -11,7 +11,7 @@ if defined?(Merb::Plugins)
|
|
11
11
|
:debug => :cyan,
|
12
12
|
:custom => :magenta
|
13
13
|
},
|
14
|
-
|
14
|
+
|
15
15
|
:color_values => {
|
16
16
|
:black => 30,
|
17
17
|
:red => 31,
|
@@ -20,10 +20,10 @@ if defined?(Merb::Plugins)
|
|
20
20
|
:blue => 34,
|
21
21
|
:magenta => 35,
|
22
22
|
:cyan => 36,
|
23
|
-
:white => 37
|
23
|
+
:white => 37
|
24
24
|
}
|
25
25
|
}
|
26
|
-
|
26
|
+
|
27
27
|
Merb::BootLoader.before_app_loads do
|
28
28
|
module Merb
|
29
29
|
class Logger
|
@@ -56,16 +56,16 @@ if defined?(Merb::Plugins)
|
|
56
56
|
self << "\033[0;#{Merb::Plugins.config[:merb_colorful_logger][:color_values][Merb::Plugins.config[:merb_colorful_logger][:colors][:custom]]}m%s\033[0m" % message.inspect
|
57
57
|
self
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
60
|
def d!(message = nil)
|
61
61
|
message = block_given? ? yield : message
|
62
62
|
self << "\033[0;#{Merb::Plugins.config[:merb_colorful_logger][:color_values][Merb::Plugins.config[:merb_colorful_logger][:colors][:custom]]}m%s\033[0m" % message.inspect
|
63
63
|
flush
|
64
64
|
self
|
65
65
|
end
|
66
|
-
|
66
|
+
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
70
|
-
|
70
|
+
|
71
71
|
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{merb-colorful-logger}
|
8
|
+
s.version = "0.1.5"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Tymon Tobolski"]
|
12
|
+
s.date = %q{2009-10-12}
|
13
|
+
s.description = %q{Merb plugin that provides some color to merb console}
|
14
|
+
s.email = %q{i@teamon.eu}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.markdown"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".gitignore",
|
21
|
+
"LICENSE",
|
22
|
+
"README.markdown",
|
23
|
+
"Rakefile",
|
24
|
+
"TODO",
|
25
|
+
"VERSION",
|
26
|
+
"lib/merb-colorful-logger.rb",
|
27
|
+
"merb-colorful-logger.gemspec",
|
28
|
+
"spec/merb-colorful-logger_spec.rb",
|
29
|
+
"spec/spec.opts",
|
30
|
+
"spec/spec_helper.rb"
|
31
|
+
]
|
32
|
+
s.homepage = %q{http://github.com/teamon/merb-colorful-logger}
|
33
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
34
|
+
s.require_paths = ["lib"]
|
35
|
+
s.rubygems_version = %q{1.3.5}
|
36
|
+
s.summary = %q{Merb plugin that provides some color to merb console}
|
37
|
+
s.test_files = [
|
38
|
+
"spec/merb-colorful-logger_spec.rb",
|
39
|
+
"spec/spec_helper.rb"
|
40
|
+
]
|
41
|
+
|
42
|
+
if s.respond_to? :specification_version then
|
43
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
44
|
+
s.specification_version = 3
|
45
|
+
|
46
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
47
|
+
s.add_runtime_dependency(%q<merb-core>, [">= 1.0"])
|
48
|
+
else
|
49
|
+
s.add_dependency(%q<merb-core>, [">= 1.0"])
|
50
|
+
end
|
51
|
+
else
|
52
|
+
s.add_dependency(%q<merb-core>, [">= 1.0"])
|
53
|
+
end
|
54
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-colorful-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tymon Tobolski
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-10-12 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -29,25 +29,27 @@ executables: []
|
|
29
29
|
extensions: []
|
30
30
|
|
31
31
|
extra_rdoc_files:
|
32
|
-
- README.markdown
|
33
32
|
- LICENSE
|
34
|
-
-
|
33
|
+
- README.markdown
|
35
34
|
files:
|
35
|
+
- .gitignore
|
36
36
|
- LICENSE
|
37
37
|
- README.markdown
|
38
38
|
- Rakefile
|
39
39
|
- TODO
|
40
|
+
- VERSION
|
40
41
|
- lib/merb-colorful-logger.rb
|
42
|
+
- merb-colorful-logger.gemspec
|
41
43
|
- spec/merb-colorful-logger_spec.rb
|
42
44
|
- spec/spec.opts
|
43
45
|
- spec/spec_helper.rb
|
44
46
|
has_rdoc: true
|
45
|
-
homepage: http://
|
47
|
+
homepage: http://github.com/teamon/merb-colorful-logger
|
46
48
|
licenses: []
|
47
49
|
|
48
50
|
post_install_message:
|
49
|
-
rdoc_options:
|
50
|
-
|
51
|
+
rdoc_options:
|
52
|
+
- --charset=UTF-8
|
51
53
|
require_paths:
|
52
54
|
- lib
|
53
55
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -64,10 +66,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
66
|
version:
|
65
67
|
requirements: []
|
66
68
|
|
67
|
-
rubyforge_project:
|
69
|
+
rubyforge_project:
|
68
70
|
rubygems_version: 1.3.5
|
69
71
|
signing_key:
|
70
72
|
specification_version: 3
|
71
73
|
summary: Merb plugin that provides some color to merb console
|
72
|
-
test_files:
|
73
|
-
|
74
|
+
test_files:
|
75
|
+
- spec/merb-colorful-logger_spec.rb
|
76
|
+
- spec/spec_helper.rb
|