matches 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +6 -0
- data/.gitignore +21 -0
- data/VERSION +1 -1
- data/lib/match_method.rb +11 -9
- data/matches.gemspec +68 -0
- data/spec/spec.opts +1 -0
- metadata +6 -2
data/.document
ADDED
data/.gitignore
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/lib/match_method.rb
CHANGED
@@ -34,15 +34,17 @@ end
|
|
34
34
|
# Mauricio Fernandez is a Ruby beast.
|
35
35
|
# This provides instance-exec-like functionality in Ruby 1.8.
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
37
|
+
if RUBY_VERSION.split('.')[1].to_i < 9
|
38
|
+
class Object
|
39
|
+
def instance_exec(*args, &block)
|
40
|
+
mname = "__instance_exec_#{Thread.current.object_id.abs}"
|
41
|
+
class << self; self end.class_eval{ define_method(mname, &block) }
|
42
|
+
begin
|
43
|
+
ret = send(mname, *args)
|
44
|
+
ensure
|
45
|
+
class << self; self end.class_eval{ undef_method(mname) } rescue nil
|
46
|
+
end
|
47
|
+
ret
|
45
48
|
end
|
46
|
-
ret
|
47
49
|
end
|
48
50
|
end
|
data/matches.gemspec
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{matches}
|
8
|
+
s.version = "1.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Phil Calvin"]
|
12
|
+
s.date = %q{2009-10-23}
|
13
|
+
s.description = %q{Matches allows you to define methods that have regular
|
14
|
+
expressions rather than names, and automatically
|
15
|
+
configires method_missing to handle them.}
|
16
|
+
s.email = %q{pncalvin@gmail.com}
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.md",
|
20
|
+
"README.rdoc"
|
21
|
+
]
|
22
|
+
s.files = [
|
23
|
+
".document",
|
24
|
+
".gitignore",
|
25
|
+
"LICENSE",
|
26
|
+
"README.md",
|
27
|
+
"README.rdoc",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"features/define_matches.feature",
|
31
|
+
"features/step_definitions/method_steps.rb",
|
32
|
+
"features/support/env.rb",
|
33
|
+
"lib/match_method.rb",
|
34
|
+
"lib/matches.rb",
|
35
|
+
"matches.gemspec",
|
36
|
+
"spec/match_method_spec.rb",
|
37
|
+
"spec/matches_spec.rb",
|
38
|
+
"spec/spec.opts",
|
39
|
+
"spec/spec_helper.rb"
|
40
|
+
]
|
41
|
+
s.homepage = %q{http://github.com/pnc/matches}
|
42
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
43
|
+
s.require_paths = ["lib"]
|
44
|
+
s.rubygems_version = %q{1.3.5}
|
45
|
+
s.summary = %q{A DSL for defining regular-expression-based methods in Ruby.}
|
46
|
+
s.test_files = [
|
47
|
+
"spec/match_method_spec.rb",
|
48
|
+
"spec/matches_spec.rb",
|
49
|
+
"spec/spec_helper.rb"
|
50
|
+
]
|
51
|
+
|
52
|
+
if s.respond_to? :specification_version then
|
53
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
54
|
+
s.specification_version = 3
|
55
|
+
|
56
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
57
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
58
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
61
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
62
|
+
end
|
63
|
+
else
|
64
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
65
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matches
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phil Calvin
|
@@ -46,8 +46,11 @@ extra_rdoc_files:
|
|
46
46
|
- README.md
|
47
47
|
- README.rdoc
|
48
48
|
files:
|
49
|
+
- .document
|
50
|
+
- .gitignore
|
49
51
|
- LICENSE
|
50
52
|
- README.md
|
53
|
+
- README.rdoc
|
51
54
|
- Rakefile
|
52
55
|
- VERSION
|
53
56
|
- features/define_matches.feature
|
@@ -55,10 +58,11 @@ files:
|
|
55
58
|
- features/support/env.rb
|
56
59
|
- lib/match_method.rb
|
57
60
|
- lib/matches.rb
|
61
|
+
- matches.gemspec
|
58
62
|
- spec/match_method_spec.rb
|
59
63
|
- spec/matches_spec.rb
|
64
|
+
- spec/spec.opts
|
60
65
|
- spec/spec_helper.rb
|
61
|
-
- README.rdoc
|
62
66
|
has_rdoc: true
|
63
67
|
homepage: http://github.com/pnc/matches
|
64
68
|
licenses: []
|