radius 0.7.4 → 0.7.5

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9a9d5e91e668a3f52c558032a845fbfd300ef4d1e3b4fcf66df0a32a51a4028a
4
+ data.tar.gz: 1a20e29879405bb509e47e96ed997e59aa7dd3b35b627066f5502afcabf72d2c
5
+ SHA512:
6
+ metadata.gz: 2283394ba3750027c877988a248ed8789477fff61ab000739486da18e90ec607e53252d3e2a798815299f7e4ade1aecf754beb0eb0f9b4997f93eb490186cda3
7
+ data.tar.gz: 3bdb9a160895b1a5ec95dab7c0e0b35f0f773b82298fa4a664c70c76aeb24d129d94a77bdeea755c5061e34bbb106a15606cb6fb627c68aeda48be8228d021e9
data/CHANGELOG CHANGED
@@ -1,5 +1,8 @@
1
1
  = Change Log
2
2
 
3
+ == 0.7.5
4
+ * Added support for tags and attributes containing dashes [yurivm, ronald]
5
+
3
6
  == 0.7.4
4
7
  * added support for Ruby 2+
5
8
 
data/Gemfile CHANGED
@@ -7,5 +7,15 @@ group :test do
7
7
  gem 'rake'
8
8
  gem 'kramdown'
9
9
  gem "simplecov"
10
+ gem 'test-unit', '2.5.5'
10
11
  gem 'coveralls', :require => false
11
- end
12
+ end
13
+
14
+
15
+ platforms :rbx do
16
+ gem 'racc' # if using gems like ruby_parser or parser
17
+ gem 'rubysl', '~> 2.0'
18
+ gem 'psych'
19
+ gem 'rubysl-test-unit' # if using test-unit with minitest 5.x https://github.com/rubysl/rubysl-test-unit/issues/1
20
+ gem 'rubinius-developer_tools'
21
+ end
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- require 'rubygems'
1
+ require 'bundler/gem_tasks'
2
2
  require 'rake'
3
3
 
4
4
  require File.dirname(__FILE__) + '/lib/radius/version'
@@ -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}:([-\w:]+?)(\s+(?:\w+\s*=\s*(?:"[^"]*?"|'[^']*?')\s*)*|)(\/?)>|<\/#{prefix}:([-\w:]+?)\s*>}
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.
@@ -47,7 +47,7 @@ module Radius
47
47
 
48
48
  def parse_attributes(text) # :nodoc:
49
49
  attr = {}
50
- re = /(\w+?)\s*=\s*('|")(.*?)\2/
50
+ re = /([-\w]+?)\s*=\s*('|")(.*?)\2/
51
51
  while md = re.match(text)
52
52
  attr[$1] = $3
53
53
  text = md.post_match
@@ -1,5 +1,5 @@
1
1
  module Radius #:nodoc:
2
- VERSION = "0.7.4"
2
+ VERSION = "0.7.5"
3
3
  def self.version
4
4
  VERSION
5
5
  end
@@ -39,6 +39,14 @@ class RadiusParserTest < Test::Unit::TestCase
39
39
 
40
40
  assert_parse_output 'ok', '<r:some-tag>nope</r:some-tag>'
41
41
  end
42
+
43
+ def test_parse_tag_with_dashed_attributes
44
+ define_tag 'tag-with-dashed-attributes' do |tag|
45
+ "dashed: #{tag.attr['data-dashed']} regular: #{tag.attr['regular']}"
46
+ end
47
+ assert_parse_output 'dashed: dashed-value regular: value', '<r:tag-with-dashed-attributes data-dashed="dashed-value" regular="value"></r:tag-with-dashed-attributes>'
48
+ end
49
+
42
50
 
43
51
  def test_parse_individual_tags_and_parameters
44
52
  define_tag "add" do |tag|
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radius
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
5
- prerelease:
4
+ version: 0.7.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - John W. Long (me@johnwlong.com)
@@ -11,7 +10,7 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2013-09-19 00:00:00.000000000 Z
13
+ date: 2019-04-05 00:00:00.000000000 Z
15
14
  dependencies: []
16
15
  description: Radius is a powerful tag-based template language for Ruby inspired by
17
16
  the template languages used in MovableType and TextPattern. It uses tags similar
@@ -26,74 +25,58 @@ extra_rdoc_files:
26
25
  - QUICKSTART.rdoc
27
26
  - README.rdoc
28
27
  files:
28
+ - ".gitignore"
29
29
  - CHANGELOG
30
30
  - CONTRIBUTORS
31
- - coverage/assets/0.7.1/application.css
32
- - coverage/assets/0.7.1/application.js
33
- - coverage/assets/0.7.1/fancybox/blank.gif
34
- - coverage/assets/0.7.1/fancybox/fancy_close.png
35
- - coverage/assets/0.7.1/fancybox/fancy_loading.png
36
- - coverage/assets/0.7.1/fancybox/fancy_nav_left.png
37
- - coverage/assets/0.7.1/fancybox/fancy_nav_right.png
38
- - coverage/assets/0.7.1/fancybox/fancy_shadow_e.png
39
- - coverage/assets/0.7.1/fancybox/fancy_shadow_n.png
40
- - coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png
41
- - coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png
42
- - coverage/assets/0.7.1/fancybox/fancy_shadow_s.png
43
- - coverage/assets/0.7.1/fancybox/fancy_shadow_se.png
44
- - coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png
45
- - coverage/assets/0.7.1/fancybox/fancy_shadow_w.png
46
- - coverage/assets/0.7.1/fancybox/fancy_title_left.png
47
- - coverage/assets/0.7.1/fancybox/fancy_title_main.png
48
- - coverage/assets/0.7.1/fancybox/fancy_title_over.png
49
- - coverage/assets/0.7.1/fancybox/fancy_title_right.png
50
- - coverage/assets/0.7.1/fancybox/fancybox-x.png
51
- - coverage/assets/0.7.1/fancybox/fancybox-y.png
52
- - coverage/assets/0.7.1/fancybox/fancybox.png
53
- - coverage/assets/0.7.1/favicon_green.png
54
- - coverage/assets/0.7.1/favicon_red.png
55
- - coverage/assets/0.7.1/favicon_yellow.png
56
- - coverage/assets/0.7.1/loading.gif
57
- - coverage/assets/0.7.1/magnify.png
58
- - coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
59
- - coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
60
- - coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
61
- - coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
62
- - coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png
63
- - coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
64
- - coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
65
- - coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
66
- - coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png
67
- - coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png
68
- - coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png
69
- - coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png
70
- - coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png
71
31
  - Gemfile
32
+ - LICENSE
33
+ - QUICKSTART.rdoc
34
+ - README.rdoc
35
+ - Rakefile
36
+ - coverage/assets/0.10.2/application.css
37
+ - coverage/assets/0.10.2/application.js
38
+ - coverage/assets/0.10.2/colorbox/border.png
39
+ - coverage/assets/0.10.2/colorbox/controls.png
40
+ - coverage/assets/0.10.2/colorbox/loading.gif
41
+ - coverage/assets/0.10.2/colorbox/loading_background.png
42
+ - coverage/assets/0.10.2/favicon_green.png
43
+ - coverage/assets/0.10.2/favicon_red.png
44
+ - coverage/assets/0.10.2/favicon_yellow.png
45
+ - coverage/assets/0.10.2/loading.gif
46
+ - coverage/assets/0.10.2/magnify.png
47
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
48
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
49
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
50
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
51
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png
52
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
53
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
54
+ - coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
55
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png
56
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png
57
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png
58
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png
59
+ - coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png
60
+ - lib/radius.rb
72
61
  - lib/radius/context.rb
73
62
  - lib/radius/delegating_open_struct.rb
74
63
  - lib/radius/error.rb
75
64
  - lib/radius/ord_string.rb
76
65
  - lib/radius/parse_tag.rb
77
- - lib/radius/parser/java_scanner.jar
66
+ - lib/radius/parser.rb
78
67
  - lib/radius/parser/JavaScanner$Flavor.class
79
68
  - lib/radius/parser/JavaScanner$Tag.class
80
69
  - lib/radius/parser/JavaScanner.class
81
70
  - lib/radius/parser/JavaScanner.java
82
71
  - lib/radius/parser/JavaScanner.rl
72
+ - lib/radius/parser/java_scanner.jar
83
73
  - lib/radius/parser/scanner.rb
84
74
  - lib/radius/parser/squiggle_scanner.rb
85
- - lib/radius/parser.rb
86
75
  - lib/radius/tag_binding.rb
87
76
  - lib/radius/tag_definitions.rb
88
77
  - lib/radius/utility.rb
89
78
  - lib/radius/version.rb
90
- - lib/radius.rb
91
- - LICENSE
92
- - pkg/radius-0.7.0.prerelease.gem
93
- - QUICKSTART.rdoc
94
79
  - radius.gemspec
95
- - Rakefile
96
- - README.rdoc
97
80
  - tasks/rdoc.rake
98
81
  - tasks/rubinius.rake
99
82
  - tasks/test.rake
@@ -106,30 +89,27 @@ files:
106
89
  - test/squiggle_test.rb
107
90
  - test/test_helper.rb
108
91
  - test/utility_test.rb
109
- - .gitignore
110
92
  homepage: http://github.com/jlong/radius
111
93
  licenses: []
94
+ metadata: {}
112
95
  post_install_message:
113
96
  rdoc_options: []
114
97
  require_paths:
115
98
  - lib
116
99
  required_ruby_version: !ruby/object:Gem::Requirement
117
- none: false
118
100
  requirements:
119
- - - '>='
101
+ - - ">="
120
102
  - !ruby/object:Gem::Version
121
103
  version: '0'
122
104
  required_rubygems_version: !ruby/object:Gem::Requirement
123
- none: false
124
105
  requirements:
125
- - - '>'
106
+ - - ">"
126
107
  - !ruby/object:Gem::Version
127
108
  version: 1.3.1
128
109
  requirements: []
129
110
  rubyforge_project:
130
- rubygems_version: 1.8.26
111
+ rubygems_version: 2.7.6
131
112
  signing_key:
132
- specification_version: 3
113
+ specification_version: 4
133
114
  summary: A tag-based templating language for Ruby.
134
115
  test_files: []
135
- has_rdoc: