radius 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTORS +8 -6
- data/lib/radius/parser/scanner.rb +1 -1
- data/lib/radius/utility.rb +1 -1
- data/lib/radius/version.rb +1 -1
- data/test/parser_test.rb +8 -0
- metadata +5 -7
data/CONTRIBUTORS
CHANGED
@@ -3,12 +3,14 @@ CONTRIBUTORS
|
|
3
3
|
|
4
4
|
The following people have committed code to Radius. Thank you!
|
5
5
|
|
6
|
-
|
6
|
+
John W. Long
|
7
|
+
Todd Willey
|
7
8
|
Bryce Kerley
|
8
|
-
David Chelimsky
|
9
|
-
Jason Garber
|
10
|
-
Jeremy
|
11
9
|
Jim Gay
|
12
10
|
Johannes Fahrenkrug
|
13
|
-
|
14
|
-
|
11
|
+
Adrian Madrid
|
12
|
+
Benny Degezelle
|
13
|
+
Moritz Heidkamp
|
14
|
+
Jeremy
|
15
|
+
Jason Garber
|
16
|
+
David Chelimsky
|
@@ -4,7 +4,7 @@ module Radius
|
|
4
4
|
# The regular expression used to find (1) opening and self-enclosed tag names, (2) self-enclosing trailing slash,
|
5
5
|
# (3) attributes and (4) closing tag
|
6
6
|
def scanner_regex(prefix = nil)
|
7
|
-
%r{<#{prefix}:([
|
7
|
+
%r{<#{prefix}:([-\w:]+?)(\s+(?:\w+\s*=\s*(?:"[^"]*?"|'[^']*?')\s*)*|)(\/?)>|<\/#{prefix}:([-\w:]+?)\s*>}
|
8
8
|
end
|
9
9
|
|
10
10
|
# Parses a given string and returns an array of nodes.
|
data/lib/radius/utility.rb
CHANGED
data/lib/radius/version.rb
CHANGED
data/test/parser_test.rb
CHANGED
@@ -31,6 +31,14 @@ class RadiusParserTest < Test::Unit::TestCase
|
|
31
31
|
assert_kind_of TestContext, @parser.context
|
32
32
|
assert_equal 'r', @parser.tag_prefix
|
33
33
|
end
|
34
|
+
|
35
|
+
def test_parse_tag_with_dashes
|
36
|
+
define_tag 'some-tag' do |tag|
|
37
|
+
'ok'
|
38
|
+
end
|
39
|
+
|
40
|
+
assert_parse_output 'ok', '<r:some-tag>nope</r:some-tag>'
|
41
|
+
end
|
34
42
|
|
35
43
|
def test_parse_individual_tags_and_parameters
|
36
44
|
define_tag "add" do |tag|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radius
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 2
|
10
|
+
version: 0.7.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John W. Long (me@johnwlong.com)
|
@@ -17,8 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date:
|
21
|
-
default_executable:
|
20
|
+
date: 2012-02-13 00:00:00 Z
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
24
23
|
name: RedCloth
|
@@ -104,7 +103,6 @@ files:
|
|
104
103
|
- test/test_helper.rb
|
105
104
|
- test/utility_test.rb
|
106
105
|
- .gitignore
|
107
|
-
has_rdoc: true
|
108
106
|
homepage: http://github.com/jlong/radius
|
109
107
|
licenses: []
|
110
108
|
|
@@ -136,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
134
|
requirements: []
|
137
135
|
|
138
136
|
rubyforge_project:
|
139
|
-
rubygems_version: 1.
|
137
|
+
rubygems_version: 1.8.10
|
140
138
|
signing_key:
|
141
139
|
specification_version: 3
|
142
140
|
summary: A tag-based templating language for Ruby.
|