radiospieler 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/core-extensions/impl_missing.rb +24 -0
- data/radiospieler.gemspec +5 -3
- data/test/impl_missing_test.rb +33 -0
- metadata +24 -22
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.6
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class ImplementationMissing < NameError; end
|
2
|
+
|
3
|
+
class Object
|
4
|
+
private
|
5
|
+
|
6
|
+
def implementation_missing!
|
7
|
+
calling_method_name = caller[1]
|
8
|
+
calling_method_name = $1 if calling_method_name =~ /.*in `(.*)'$/
|
9
|
+
|
10
|
+
raise ImplementationMissing, "Implementation missing: #{self.class.name}##{calling_method_name}"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
module Kernel
|
15
|
+
private
|
16
|
+
|
17
|
+
def abstract_method(*syms)
|
18
|
+
syms.each do |sym|
|
19
|
+
define_method sym do
|
20
|
+
raise ImplementationMissing, "#{self.class.name}##{sym}"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/radiospieler.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "radiospieler"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["radiospiel"]
|
12
|
-
s.date = "2012-04-
|
12
|
+
s.date = "2012-04-14"
|
13
13
|
s.description = "Some basics that your application could benefit from."
|
14
14
|
s.email = "eno@open-lab.org"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"lib/core-extensions/benchmark-logger.rb",
|
30
30
|
"lib/core-extensions/cgi_ext.rb",
|
31
31
|
"lib/core-extensions/hash_ext.rb",
|
32
|
+
"lib/core-extensions/impl_missing.rb",
|
32
33
|
"lib/core-extensions/object_ext.rb",
|
33
34
|
"lib/core-extensions/string_ext.rb",
|
34
35
|
"lib/core-extensions/string_without_accents.rb",
|
@@ -53,6 +54,7 @@ Gem::Specification.new do |s|
|
|
53
54
|
"test/fixtures-vcr/http_test.yml",
|
54
55
|
"test/hash_ext_test.rb",
|
55
56
|
"test/http_test.rb",
|
57
|
+
"test/impl_missing_test.rb",
|
56
58
|
"test/string_ext_test.rb",
|
57
59
|
"test/test_helper.rb",
|
58
60
|
"test/tls_test.rb",
|
@@ -61,7 +63,7 @@ Gem::Specification.new do |s|
|
|
61
63
|
s.homepage = "http://github.com/radiospiel/radiospieler"
|
62
64
|
s.licenses = ["MIT"]
|
63
65
|
s.require_paths = ["lib"]
|
64
|
-
s.rubygems_version = "1.8.
|
66
|
+
s.rubygems_version = "1.8.17"
|
65
67
|
s.summary = "Application base code"
|
66
68
|
|
67
69
|
if s.respond_to? :specification_version then
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require_relative 'test_helper'
|
4
|
+
|
5
|
+
class ImplMissingTest < Test::Unit::TestCase
|
6
|
+
abstract_method :an_abstract_method, :another_abstract_method, :not_an_abstract_method
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def not_an_abstract_method
|
11
|
+
"not_an_abstract_method"
|
12
|
+
end
|
13
|
+
|
14
|
+
public
|
15
|
+
|
16
|
+
def test_abstract_method
|
17
|
+
assert_raise(ImplementationMissing) {
|
18
|
+
an_abstract_method
|
19
|
+
}
|
20
|
+
|
21
|
+
begin
|
22
|
+
an_abstract_method
|
23
|
+
assert false
|
24
|
+
rescue ImplementationMissing
|
25
|
+
assert true
|
26
|
+
assert_equal("ImplMissingTest#an_abstract_method", $!.message)
|
27
|
+
end
|
28
|
+
#
|
29
|
+
assert public_methods.include?(:an_abstract_method)
|
30
|
+
assert public_methods.include?(:another_abstract_method)
|
31
|
+
assert private_methods.include?(:not_an_abstract_method)
|
32
|
+
end
|
33
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiospieler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
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: 2012-04-
|
12
|
+
date: 2012-04-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: htmlentities
|
16
|
-
requirement: &
|
16
|
+
requirement: &70138326919400 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70138326919400
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: simple_cache_rs
|
27
|
-
requirement: &
|
27
|
+
requirement: &70138326917560 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70138326917560
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &70138326916780 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70138326916780
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &70138326915920 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70138326915920
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: vcr
|
60
|
-
requirement: &
|
60
|
+
requirement: &70138326915240 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70138326915240
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: webmock
|
71
|
-
requirement: &
|
71
|
+
requirement: &70138326914620 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70138326914620
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: psych
|
82
|
-
requirement: &
|
82
|
+
requirement: &70138326914040 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70138326914040
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: simplecov
|
93
|
-
requirement: &
|
93
|
+
requirement: &70138326913360 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70138326913360
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: ruby-debug19
|
104
|
-
requirement: &
|
104
|
+
requirement: &70138326912520 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70138326912520
|
113
113
|
description: Some basics that your application could benefit from.
|
114
114
|
email: eno@open-lab.org
|
115
115
|
executables: []
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- lib/core-extensions/benchmark-logger.rb
|
131
131
|
- lib/core-extensions/cgi_ext.rb
|
132
132
|
- lib/core-extensions/hash_ext.rb
|
133
|
+
- lib/core-extensions/impl_missing.rb
|
133
134
|
- lib/core-extensions/object_ext.rb
|
134
135
|
- lib/core-extensions/string_ext.rb
|
135
136
|
- lib/core-extensions/string_without_accents.rb
|
@@ -154,6 +155,7 @@ files:
|
|
154
155
|
- test/fixtures-vcr/http_test.yml
|
155
156
|
- test/hash_ext_test.rb
|
156
157
|
- test/http_test.rb
|
158
|
+
- test/impl_missing_test.rb
|
157
159
|
- test/string_ext_test.rb
|
158
160
|
- test/test_helper.rb
|
159
161
|
- test/tls_test.rb
|
@@ -173,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
175
|
version: '0'
|
174
176
|
segments:
|
175
177
|
- 0
|
176
|
-
hash:
|
178
|
+
hash: 3616239390949431517
|
177
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
180
|
none: false
|
179
181
|
requirements:
|
@@ -182,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
184
|
version: '0'
|
183
185
|
requirements: []
|
184
186
|
rubyforge_project:
|
185
|
-
rubygems_version: 1.8.
|
187
|
+
rubygems_version: 1.8.17
|
186
188
|
signing_key:
|
187
189
|
specification_version: 3
|
188
190
|
summary: Application base code
|