omg 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -10,9 +10,6 @@ begin
10
10
  gem.email = "philnash@gmail.com"
11
11
  gem.homepage = "http://github.com/philnash/omg"
12
12
  gem.authors = ["philnash"]
13
- gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
14
- gem.add_dependency 'activerecord'
15
- gem.add_dependency 'actionpack'
16
13
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
14
  end
18
15
  Jeweler::GemcutterTasks.new
data/TODO ADDED
@@ -0,0 +1 @@
1
+ Allow user to supply a logger and method to log with OMG.use_logger(Rails.logger, :debug)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
data/lib/omg.rb CHANGED
@@ -1,2 +1,26 @@
1
- require 'omg/kernel'
2
- require 'omg/omg'
1
+ module Omg
2
+ def self.debug(str)
3
+ defined?(Rails) ? Rails.logger.debug(str) : $stdout.puts(str)
4
+ end
5
+
6
+ def omg!(obj=nil)
7
+ Omg.debug('')
8
+ Omg.debug('~~~~~~~~~~~~~~~~~~~~~~~~~~~')
9
+ Omg.debug "OMG!"
10
+ if obj
11
+ Omg.debug obj.inspect
12
+ else
13
+ Omg.debug "#{omg_method} called!"
14
+ end
15
+ Omg.debug('~~~~~~~~~~~~~~~~~~~~~~~~~~~')
16
+ Omg.debug('')
17
+ end
18
+
19
+ private
20
+
21
+ def omg_method
22
+ caller[1][/`([^']*)'/, 1]
23
+ end
24
+ end
25
+
26
+ Object.send(:include, Omg)
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.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["philnash"]
@@ -14,7 +14,8 @@ Gem::Specification.new do |s|
14
14
  s.email = %q{philnash@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc",
18
+ "TODO"
18
19
  ]
19
20
  s.files = [
20
21
  ".document",
@@ -22,12 +23,10 @@ Gem::Specification.new do |s|
22
23
  "LICENSE",
23
24
  "README.rdoc",
24
25
  "Rakefile",
26
+ "TODO",
25
27
  "VERSION",
26
28
  "lib/omg.rb",
27
- "lib/omg/kernel.rb",
28
- "lib/omg/omg.rb",
29
29
  "omg.gemspec",
30
- "rails/init.rb",
31
30
  "test/helper.rb",
32
31
  "test/test_omg.rb"
33
32
  ]
@@ -46,18 +45,9 @@ Gem::Specification.new do |s|
46
45
  s.specification_version = 3
47
46
 
48
47
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
50
- s.add_runtime_dependency(%q<activerecord>, [">= 0"])
51
- s.add_runtime_dependency(%q<actionpack>, [">= 0"])
52
48
  else
53
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
54
- s.add_dependency(%q<activerecord>, [">= 0"])
55
- s.add_dependency(%q<actionpack>, [">= 0"])
56
49
  end
57
50
  else
58
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
59
- s.add_dependency(%q<activerecord>, [">= 0"])
60
- s.add_dependency(%q<actionpack>, [">= 0"])
61
51
  end
62
52
  end
63
53
 
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - philnash
@@ -17,49 +17,8 @@ cert_chain: []
17
17
 
18
18
  date: 2010-10-11 00:00:00 +01:00
19
19
  default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: thoughtbot-shoulda
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
33
- type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: activerecord
37
- prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
47
- type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: actionpack
51
- prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
61
- type: :runtime
62
- version_requirements: *id003
20
+ dependencies: []
21
+
63
22
  description: OMG debugging!
64
23
  email: philnash@gmail.com
65
24
  executables: []
@@ -69,18 +28,17 @@ extensions: []
69
28
  extra_rdoc_files:
70
29
  - LICENSE
71
30
  - README.rdoc
31
+ - TODO
72
32
  files:
73
33
  - .document
74
34
  - .gitignore
75
35
  - LICENSE
76
36
  - README.rdoc
77
37
  - Rakefile
38
+ - TODO
78
39
  - VERSION
79
40
  - lib/omg.rb
80
- - lib/omg/kernel.rb
81
- - lib/omg/omg.rb
82
41
  - omg.gemspec
83
- - rails/init.rb
84
42
  - test/helper.rb
85
43
  - test/test_omg.rb
86
44
  has_rdoc: true
data/lib/omg/kernel.rb DELETED
@@ -1,6 +0,0 @@
1
- module Kernel
2
- private
3
- def omg_method
4
- caller[1][/`([^']*)'/, 1]
5
- end
6
- end
data/lib/omg/omg.rb DELETED
@@ -1,14 +0,0 @@
1
- module Omg
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('')
13
- end
14
- end
data/rails/init.rb DELETED
@@ -1,5 +0,0 @@
1
- require File.join(File.dirname(__FILE__), %w[.. lib omg])
2
-
3
- ActiveRecord::Base.send(:include, Omg)
4
- ActionController::Base.send(:include, Omg)
5
-