missingly 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c83a64e80420514a8f4339f2339311fa644af8c5
4
+ data.tar.gz: 221eb5fa8de4ca6bb84451c5a3b85ffbf50a80f4
5
+ SHA512:
6
+ metadata.gz: 4d24aa8b5918b3243ed15baf68f7bbada4a779b32ca8dd7d3f5403dc0b6c9c2b2d107f2f72389546cc365024df892f87e39279c011de52da4898103f812d9608
7
+ data.tar.gz: fde01f81b25d55f21369f04e52b481c93100b38e4c009d70c517f06006937db76e6e67867251186255953c653791f94afe0ef5f6bf0b2de2982c59f56545a23c
@@ -15,6 +15,13 @@ module Missingly
15
15
  def _define_method(*args, &block)
16
16
  define_method(*args, &block)
17
17
  end
18
+
19
+ def inherited(subclass)
20
+ subclass.extend Missingly::Matchers::ClassMethods
21
+ self.missingly_matchers.each do |matcher|
22
+ subclass.missingly_matchers << matcher
23
+ end
24
+ end
18
25
  end
19
26
 
20
27
  def respond_to_missing?(method_name, include_all)
@@ -1,3 +1,3 @@
1
1
  module Missingly
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ describe Missingly::Matchers do
4
+ let(:super_class) do
5
+ Class.new do
6
+ include Missingly::Matchers
7
+
8
+ handle_missingly [:foo] do |method|
9
+ return method
10
+ end
11
+ end
12
+ end
13
+
14
+ let(:subclass) do
15
+ Class.new(super_class) do
16
+ end
17
+ end
18
+
19
+ it "should work with an inherited class" do
20
+ b = subclass.new
21
+ b.foo.should eq :foo
22
+ end
23
+ end
metadata CHANGED
@@ -1,80 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: missingly
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.0.1
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Thijs de Vries
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-08 00:00:00.000000000 Z
11
+ date: 2013-07-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
- version_requirements: !ruby/object:Gem::Requirement
15
+ requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
17
  - - ~>
19
18
  - !ruby/object:Gem::Version
20
19
  version: '1.3'
21
- none: false
22
- requirement: !ruby/object:Gem::Requirement
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
- none: false
28
- prerelease: false
29
- type: :development
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
- version_requirements: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - '>='
35
- - !ruby/object:Gem::Version
36
- version: '0'
37
- none: false
38
29
  requirement: !ruby/object:Gem::Requirement
39
30
  requirements:
40
31
  - - '>='
41
32
  - !ruby/object:Gem::Version
42
33
  version: '0'
43
- none: false
44
- prerelease: false
45
34
  type: :development
46
- - !ruby/object:Gem::Dependency
47
- name: rspec
35
+ prerelease: false
48
36
  version_requirements: !ruby/object:Gem::Requirement
49
37
  requirements:
50
38
  - - '>='
51
39
  - !ruby/object:Gem::Version
52
40
  version: '0'
53
- none: false
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
54
43
  requirement: !ruby/object:Gem::Requirement
55
44
  requirements:
56
45
  - - '>='
57
46
  - !ruby/object:Gem::Version
58
47
  version: '0'
59
- none: false
60
- prerelease: false
61
48
  type: :development
62
- - !ruby/object:Gem::Dependency
63
- name: pry
49
+ prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - '>='
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
- none: false
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
70
57
  requirement: !ruby/object:Gem::Requirement
71
58
  requirements:
72
59
  - - '>='
73
60
  - !ruby/object:Gem::Version
74
61
  version: '0'
75
- none: false
76
- prerelease: false
77
62
  type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
78
69
  description: A DSL for defining method missing methods
79
70
  email:
80
71
  - moger777@gmail.com
@@ -94,13 +85,15 @@ files:
94
85
  - lib/missingly/version.rb
95
86
  - missingly.gemspec
96
87
  - spec/array_spec.rb
88
+ - spec/class_inheritance_spec.rb
97
89
  - spec/delegation_spec.rb
98
90
  - spec/regex_spec.rb
99
91
  - spec/spec_helper.rb
100
92
  homepage: ''
101
93
  licenses:
102
94
  - MIT
103
- post_install_message:
95
+ metadata: {}
96
+ post_install_message:
104
97
  rdoc_options: []
105
98
  require_paths:
106
99
  - lib
@@ -109,21 +102,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
102
  - - '>='
110
103
  - !ruby/object:Gem::Version
111
104
  version: '0'
112
- none: false
113
105
  required_rubygems_version: !ruby/object:Gem::Requirement
114
106
  requirements:
115
107
  - - '>='
116
108
  - !ruby/object:Gem::Version
117
109
  version: '0'
118
- none: false
119
110
  requirements: []
120
- rubyforge_project:
121
- rubygems_version: 1.8.24
122
- signing_key:
123
- specification_version: 3
111
+ rubyforge_project:
112
+ rubygems_version: 2.0.2
113
+ signing_key:
114
+ specification_version: 4
124
115
  summary: A DSL for defining method missing methods
125
116
  test_files:
126
117
  - spec/array_spec.rb
118
+ - spec/class_inheritance_spec.rb
127
119
  - spec/delegation_spec.rb
128
120
  - spec/regex_spec.rb
129
121
  - spec/spec_helper.rb