tappow 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1059759d71beb3110ad89598a328ebcbe65cafcd
4
- data.tar.gz: 9b742c203c11949c707fa66f4945d06e010956de
3
+ metadata.gz: 909a90fc749b5a0b36cf03027f690d1d7805b415
4
+ data.tar.gz: d151511ac22a63b4e149efc027f1b8ae2e4e8b29
5
5
  SHA512:
6
- metadata.gz: 65d30ae4589bd74c5879ec0e8fa9bff6e7bd78f2e58e3f2196bf5f207a4e0cb1ce98856c3a5953b0b64637f8a2b71288ece5a9d785287817ec27f47fb5c941fd
7
- data.tar.gz: a152e3dded33a530fcf4590fdebd06cb550891de0609621339b15338b49f8634f16d5624399ff98317d7b9d9ec1c8cbb52f4de6d8bc3bd5fa6817b88c073cc79
6
+ metadata.gz: 8950c951278d671545439ad446a028c105685bcce271dfedaaa67e90eec49db499d9c2b7a9f2c6ae2244874ae46459ad3159697f279b387904228657493c7533
7
+ data.tar.gz: a7812c6283a1a366e5541836dda7ea77aae917d73b3612df9570be1ad72ec689bb14ef11ede6f271cd6137bc305c21c4088f2945d49fef08aa91d7fc2b294896
@@ -0,0 +1,21 @@
1
+ require 'tapp/printer'
2
+
3
+ module Tapp::Printer
4
+ class LoggerAwesome < Base
5
+ def print(*args)
6
+ require 'ap'
7
+
8
+ self.class.class_eval do
9
+ remove_method :print
10
+
11
+ def print(*args)
12
+ Tappow.logger.send(Tappow.log_level, args[0].awesome_inspect)
13
+ end
14
+ end
15
+
16
+ print(*args)
17
+ end
18
+ end
19
+
20
+ register :logger_awesome, LoggerAwesome
21
+ end
@@ -0,0 +1,21 @@
1
+ require 'tapp/printer'
2
+
3
+ module Tapp::Printer
4
+ class LoggerPretty < Base
5
+ def print(*args)
6
+ require 'pp'
7
+
8
+ self.class.class_eval do
9
+ remove_method :print
10
+
11
+ def print(*args)
12
+ Tappow.logger.send(Tappow.log_level, args[0].pretty_inspect)
13
+ end
14
+ end
15
+
16
+ print(*args)
17
+ end
18
+ end
19
+
20
+ register :logger_pretty, LoggerPretty
21
+ end
@@ -1,9 +1,11 @@
1
1
  require 'tapp/printer'
2
2
 
3
- module Tappow::Printer
4
- class LoggerString < Tapp::Printer::Base
3
+ module Tapp::Printer
4
+ class LoggerString < Base
5
5
  def print(*args)
6
6
  Tappow.logger.send(Tappow.log_level, args[0].to_s)
7
7
  end
8
8
  end
9
+
10
+ register :logger_string, LoggerString
9
11
  end
@@ -1,10 +1,11 @@
1
- require 'tappow/printer'
2
- require 'tappow/tapp_extension'
3
- require 'tappow/object_extension'
4
-
5
1
  require 'logger'
6
2
  require 'tapp'
7
3
 
4
+ require 'tappow/object_extension'
5
+ require 'tapp/printer/logger_awesome'
6
+ require 'tapp/printer/logger_pretty'
7
+ require 'tapp/printer/logger_string'
8
+
8
9
  module Tappow
9
10
  class << self
10
11
  attr_writer :logger, :log_level, :default_printer
@@ -22,5 +23,4 @@ module Tappow
22
23
  end
23
24
  end
24
25
 
25
- Tapp::Printer.singleton_class.__send__ :prepend, Tappow::TappExtension
26
26
  Object.__send__ :include, Tappow::ObjectExtension
@@ -1,3 +1,3 @@
1
1
  module Tappow
2
- VERSION = "0.1.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency "tapp"
21
+ spec.add_runtime_dependency "tapp", ">= 1.5.0"
22
22
 
23
23
  spec.add_development_dependency "bundler", ">= 1.7"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tappow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-19 00:00:00.000000000 Z
11
+ date: 2015-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tapp
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 1.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -95,13 +95,11 @@ files:
95
95
  - Rakefile
96
96
  - bin/console
97
97
  - bin/setup
98
+ - lib/tapp/printer/logger_awesome.rb
99
+ - lib/tapp/printer/logger_pretty.rb
100
+ - lib/tapp/printer/logger_string.rb
98
101
  - lib/tappow.rb
99
102
  - lib/tappow/object_extension.rb
100
- - lib/tappow/printer.rb
101
- - lib/tappow/printer/logger_awesome.rb
102
- - lib/tappow/printer/logger_pretty.rb
103
- - lib/tappow/printer/logger_string.rb
104
- - lib/tappow/tapp_extension.rb
105
103
  - lib/tappow/version.rb
106
104
  - tappow.gemspec
107
105
  homepage: https://github.com/joker1007/tappow
@@ -1,7 +0,0 @@
1
- module Tappow
2
- module Printer
3
- autoload :LoggerAwesome, 'tappow/printer/logger_awesome'
4
- autoload :LoggerPretty, 'tappow/printer/logger_pretty'
5
- autoload :LoggerString, 'tappow/printer/logger_string'
6
- end
7
- end
@@ -1,10 +0,0 @@
1
- require 'tapp/printer'
2
- require 'ap'
3
-
4
- module Tappow::Printer
5
- class LoggerAwesome < Tapp::Printer::Base
6
- def print(*args)
7
- Tappow.logger.send(Tappow.log_level, args[0].awesome_inspect)
8
- end
9
- end
10
- end
@@ -1,10 +0,0 @@
1
- require 'tapp/printer'
2
- require 'pp'
3
-
4
- module Tappow::Printer
5
- class LoggerPretty < Tapp::Printer::Base
6
- def print(*args)
7
- Tappow.logger.send(Tappow.log_level, args[0].pretty_inspect)
8
- end
9
- end
10
- end
@@ -1,16 +0,0 @@
1
- module Tappow
2
- module TappExtension
3
- def instance(name)
4
- case name
5
- when :logger_pretty
6
- Tappow::Printer::LoggerPretty.instance
7
- when :logger_awesome
8
- Tappow::Printer::LoggerAwesome.instance
9
- when :logger_string
10
- Tappow::Printer::LoggerString.instance
11
- else
12
- super
13
- end
14
- end
15
- end
16
- end