radius 0.7.5 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -0
- data/CONTRIBUTORS +2 -0
- data/Gemfile +9 -5
- data/README.rdoc +2 -6
- data/Rakefile +9 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_asc.png +0 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_both.png +0 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_desc.png +0 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
- data/coverage/assets/0.13.1/application.css +1 -0
- data/coverage/assets/0.13.1/application.js +7 -0
- data/coverage/assets/0.13.1/colorbox/border.png +0 -0
- data/coverage/assets/0.13.1/colorbox/controls.png +0 -0
- data/coverage/assets/0.13.1/colorbox/loading.gif +0 -0
- data/coverage/assets/0.13.1/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.13.1/favicon_green.png +0 -0
- data/coverage/assets/0.13.1/favicon_red.png +0 -0
- data/coverage/assets/0.13.1/favicon_yellow.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/assets/0.13.1/loading.gif +0 -0
- data/coverage/assets/0.13.1/magnify.png +0 -0
- data/lib/radius/context.rb +2 -1
- data/lib/radius/delegating_open_struct.rb +15 -19
- data/lib/radius/ord_string.rb +6 -8
- data/lib/radius/parser/JavaScanner.class +0 -0
- data/lib/radius/parser/JavaScanner.java +211 -161
- data/lib/radius/parser/JavaScanner.rl +36 -7
- data/lib/radius/parser.rb +69 -40
- data/lib/radius/utility.rb +5 -14
- data/lib/radius/version.rb +1 -1
- data/lib/radius.rb +11 -11
- data/pkg/radius-0.8.0.gem +0 -0
- data/radius.gemspec +12 -4
- data/test/context_test.rb +13 -5
- data/test/multithreaded_test.rb +60 -43
- data/test/ord_string_test.rb +3 -3
- data/test/parser_test.rb +3 -3
- data/test/quickstart_test.rb +2 -2
- data/test/squiggle_test.rb +3 -3
- data/test/test_helper.rb +21 -26
- data/test/utility_test.rb +3 -3
- metadata +52 -16
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/radius/context.rb
CHANGED
@@ -58,6 +58,7 @@ module Radius
|
|
58
58
|
else
|
59
59
|
tag_definition_block = @definitions[qualified_tag_name(name.to_s)]
|
60
60
|
if tag_definition_block
|
61
|
+
# puts name: name, attributes: attributes
|
61
62
|
stack(name, attributes, block) do |tag|
|
62
63
|
tag_definition_block.call(tag).to_s
|
63
64
|
end
|
@@ -95,7 +96,7 @@ module Radius
|
|
95
96
|
def stack(name, attributes, block)
|
96
97
|
previous = @tag_binding_stack.last
|
97
98
|
previous_locals = previous.nil? ? globals : previous.locals
|
98
|
-
locals =
|
99
|
+
locals = previous_locals.dup
|
99
100
|
binding = TagBinding.new(self, locals, name, attributes, block)
|
100
101
|
@tag_binding_stack.push(binding)
|
101
102
|
result = yield(binding)
|
@@ -8,30 +8,26 @@ module Radius
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def dup
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
self.class.new.tap do |copy|
|
12
|
+
copy.instance_variable_set(:@hash, @hash.dup)
|
13
|
+
copy.object = @object
|
14
|
+
end
|
14
15
|
end
|
15
16
|
|
16
17
|
def method_missing(method, *args, &block)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
@hash[symbol]
|
24
|
-
else
|
25
|
-
unless object.nil?
|
26
|
-
@object.send(method, *args, &block)
|
27
|
-
else
|
28
|
-
nil
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
18
|
+
return super if args.size > 1
|
19
|
+
|
20
|
+
symbol = method.to_s.chomp('=').to_sym
|
21
|
+
|
22
|
+
if method.to_s.end_with?('=')
|
23
|
+
@hash[symbol] = args.first
|
32
24
|
else
|
33
|
-
|
25
|
+
@hash.fetch(symbol) { @object&.public_send(method, *args, &block) }
|
34
26
|
end
|
35
27
|
end
|
28
|
+
|
29
|
+
def respond_to_missing?(method, include_private = false)
|
30
|
+
(args.size <= 1) || super
|
31
|
+
end
|
36
32
|
end
|
37
33
|
end
|
data/lib/radius/ord_string.rb
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
module Radius
|
2
2
|
class OrdString < String
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
super
|
9
|
-
end
|
3
|
+
def [](*args)
|
4
|
+
if args.size == 1 && args.first.is_a?(Integer)
|
5
|
+
slice(args.first).ord
|
6
|
+
else
|
7
|
+
super
|
10
8
|
end
|
11
9
|
end
|
12
10
|
end
|
13
|
-
end
|
11
|
+
end
|
Binary file
|