hooked 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ - LICENSE
data/hooked.gemspec CHANGED
@@ -14,8 +14,10 @@ Gem::Specification.new do |s|
14
14
  s.description = %q{Hooked lets you transparently aspectify your methods and blocks.}
15
15
 
16
16
  s.add_development_dependency "rspec"
17
+ s.add_development_dependency "yard"
18
+ s.add_development_dependency "rdiscount"
17
19
 
18
- s.files = `git ls-files`.split("\n") - [".gitignore", ".rvmrc"]
20
+ s.files = `git ls-files`.split("\n") - [".gitignore", ".travis.yml"]
19
21
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
22
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
23
  s.require_paths = ["lib"]
data/lib/hooked.rb CHANGED
@@ -13,7 +13,7 @@ module Hooked
13
13
  end
14
14
  end
15
15
 
16
- def instead_of(pointcut, advice, &block)
16
+ def instead_of(pointcut, advice = nil, &block)
17
17
  hook! pointcut
18
18
  hooked[pointcut].instead_pointcut = (advice || block)
19
19
  end
@@ -43,6 +43,8 @@ module Hooked
43
43
  end
44
44
 
45
45
  def self.included(klass)
46
+ return unless Class === klass
47
+
46
48
  klass.instance_variable_set :@instance_hooked, {}
47
49
  klass.extend ClassMethods
48
50
 
@@ -1,3 +1,3 @@
1
1
  module Hooked
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hooked
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-20 00:00:00.000000000Z
12
+ date: 2011-08-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &78308770 !ruby/object:Gem::Requirement
16
+ requirement: &78476800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,29 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *78308770
24
+ version_requirements: *78476800
25
+ - !ruby/object:Gem::Dependency
26
+ name: yard
27
+ requirement: &78476590 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *78476590
36
+ - !ruby/object:Gem::Dependency
37
+ name: rdiscount
38
+ requirement: &78476380 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *78476380
25
47
  description: Hooked lets you transparently aspectify your methods and blocks.
26
48
  email:
27
49
  - lars.gierth@gmail.com
@@ -30,7 +52,7 @@ extensions: []
30
52
  extra_rdoc_files: []
31
53
  files:
32
54
  - .rspec
33
- - .travis.yml
55
+ - .yardopts
34
56
  - Gemfile
35
57
  - LICENSE
36
58
  - README.md
@@ -66,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
88
  version: '0'
67
89
  requirements: []
68
90
  rubyforge_project:
69
- rubygems_version: 1.8.5
91
+ rubygems_version: 1.8.8
70
92
  signing_key:
71
93
  specification_version: 3
72
94
  summary: Aspect Orientation Made Simple
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- rvm:
2
- - 1.8.7
3
- - 1.9.2
4
- - jruby
5
- - rbx-2.0