omg 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -11,9 +11,12 @@ Sometimes you just want to see whether a method was called. Those times you don'
11
11
 
12
12
  When the method is called, in the log you will find
13
13
 
14
- ==============
15
- OMG! some_method called!
16
- ==============
14
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
+ OMG!
16
+ some_method called!
17
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
+
19
+ Or, pass an object to omg! and it will print out the result of the object's inspect method
17
20
 
18
21
  Easy.
19
22
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.4
data/lib/omg/kernel.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Kernel
2
2
  private
3
- def this_method
3
+ def omg_method
4
4
  caller[1][/`([^']*)'/, 1]
5
5
  end
6
6
  end
data/lib/omg/omg.rb CHANGED
@@ -1,7 +1,14 @@
1
1
  module Omg
2
- def omg!
3
- Rails.logger.debug('==============')
4
- Rails.logger.debug "OMG! #{this_method} called!"
5
- Rails.logger.debug('==============')
2
+ def omg!(obj=nil)
3
+ Rails.logger.debug('')
4
+ Rails.logger.debug('~~~~~~~~~~~~~~~~~~~~~~~~~~~')
5
+ Rails.logger.debug "OMG!"
6
+ if obj
7
+ Rails.logger.debug obj.inspect
8
+ else
9
+ Rails.logger.debug "#{omg_method} called!"
10
+ end
11
+ Rails.logger.debug('~~~~~~~~~~~~~~~~~~~~~~~~~~~')
12
+ Rails.logger.debug('')
6
13
  end
7
14
  end
data/omg.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{omg}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["philnash"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omg
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - philnash