radius 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,4 +3,5 @@ doc
3
3
  *.dot
4
4
  pkg
5
5
  *.rbc
6
- *.gem
6
+ *.gem
7
+ coverage/*
data/CHANGELOG CHANGED
@@ -1,5 +1,8 @@
1
1
  = Change Log
2
2
 
3
+ == 0.7.4
4
+ * added support for Ruby 2+
5
+
3
6
  == 0.7.1
4
7
  * Running tests with bundler requires 'rake' to be specified [jgay]
5
8
 
data/Gemfile CHANGED
@@ -1,7 +1,11 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
5
  group :test do
6
+ gem 'rdoc'
7
+ gem 'rake'
6
8
  gem 'kramdown'
9
+ gem "simplecov"
10
+ gem 'coveralls', :require => false
7
11
  end
@@ -1,4 +1,7 @@
1
- = Radius -- Powerful Tag-Based Templates {<img src="https://secure.travis-ci.org/jlong/radius.png" />}[http://travis-ci.org/jlong/radius]
1
+ = Radius -- Powerful Tag-Based Templates
2
+
3
+ {<img src="https://travis-ci.org/jlong/radius.png?branch=master" alt="Build Status" />}[https://travis-ci.org/jlong/radius] {<img src="https://codeclimate.com/github/jlong/radius.png" />}[https://codeclimate.com/github/jlong/radius] {<img src="https://coveralls.io/repos/jlong/radius/badge.png" alt="Coverage Status" />}[https://coveralls.io/r/jlong/radius]
4
+
2
5
 
3
6
  Radius is a powerful tag-based template language for Ruby inspired by the
4
7
  template languages used in MovableType[http://www.movabletype.org] and
@@ -11,7 +14,7 @@ With Radius, it is extremely easy to create custom tags and parse them. Here's a
11
14
  example:
12
15
 
13
16
  require 'radius'
14
-
17
+
15
18
  # Define tags on a context that will be available to a template:
16
19
  context = Radius::Context.new do |c|
17
20
  c.define_tag 'hello' do
@@ -24,10 +27,10 @@ example:
24
27
  result
25
28
  end
26
29
  end
27
-
30
+
28
31
  # Create a parser to parse tags that begin with 'r:'
29
32
  parser = Radius::Parser.new(context, :tag_prefix => 'r')
30
-
33
+
31
34
  # Parse tags and output the result
32
35
  puts parser.parse(%{A small example:\n<r:repeat times="3">* <r:hello />!\n</r:repeat>})
33
36
 
@@ -45,10 +48,10 @@ Read the QUICKSTART file to get up and running with Radius.
45
48
 
46
49
 
47
50
  == Requirements
48
-
51
+
49
52
  Radius does not have any external requirements for using the library in your
50
53
  own programs.
51
-
54
+
52
55
  Ragel is required to create the ruby parser from the Ragel specification,
53
56
  and both Ragel and Graphviz are required to draw the state graph for the
54
57
  parser.
@@ -88,7 +91,7 @@ The latest version of Radius can be found on RubyForge:
88
91
  http://rubyforge.org/projects/radius
89
92
 
90
93
  Experimental and development versions of Radius can be found on Github:
91
-
94
+
92
95
  http://github.com/jlong/radius
93
96
 
94
97
  If you are interested in helping with the development of Radius, feel free to
@@ -1,6 +1,6 @@
1
1
  module Radius
2
2
  class OrdString < String
3
- if RUBY_VERSION[0,3] == '1.9'
3
+ unless "a"[0] == 97 # test for lower than Ruby 1.9
4
4
  def [](*args)
5
5
  if args.size == 1 && args.first.is_a?(Integer)
6
6
  slice(args.first).ord
@@ -1,5 +1,5 @@
1
1
  module Radius #:nodoc:
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  def self.version
4
4
  VERSION
5
5
  end
@@ -16,19 +16,11 @@ Gem::Specification.new do |s|
16
16
  "QUICKSTART.rdoc",
17
17
  "README.rdoc"
18
18
  ]
19
-
19
+
20
20
  ignores = File.read('.gitignore').split("\n").inject([]) {|a,p| a + Dir[p] }
21
21
  s.files = Dir['**/*','.gitignore'] - ignores
22
-
22
+
23
23
  s.homepage = %q{http://github.com/jlong/radius}
24
24
  s.summary = %q{A tag-based templating language for Ruby.}
25
-
26
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
- s.add_development_dependency(%q<kramdown>, [">= 0"])
28
- s.add_development_dependency('rake', ['~> 0.8.7'])
29
- else
30
- s.add_dependency(%q<RedCloth>, [">= 0"])
31
- s.add_dependency('rake', ['~> 0.8.7'])
32
- end
33
25
  end
34
26
 
@@ -1,7 +1,7 @@
1
- require 'rake/rdoctask'
1
+ require 'rdoc/task'
2
2
  Rake::RDocTask.new do |rdoc|
3
3
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
4
-
4
+
5
5
  rdoc.rdoc_dir = 'rdoc'
6
6
  rdoc.title = "Radius #{version}"
7
7
  rdoc.main = "README.rdoc"
@@ -1,17 +1,26 @@
1
- require 'rubygems'
1
+ require 'simplecov'
2
+ SimpleCov.start do
3
+ add_filter 'test'
4
+ end
5
+
6
+ require 'coveralls'
7
+ if ENV['COVERALLS']
8
+ Coveralls.wear!
9
+ end
10
+
2
11
  require 'timeout'
3
12
 
4
13
  unless defined? RADIUS_LIB
5
-
14
+
6
15
  RADIUS_LIB = File.join(File.dirname(__FILE__), '..', 'lib')
7
16
  $LOAD_PATH << RADIUS_LIB
8
-
17
+
9
18
  require 'radius'
10
19
  require 'test/unit'
11
-
20
+
12
21
  module RadiusTestHelper
13
22
  class TestContext < Radius::Context; end
14
-
23
+
15
24
  def new_context
16
25
  Radius::Context.new do |c|
17
26
  c.define_tag("reverse" ) { |tag| tag.expand.reverse }
@@ -24,11 +33,11 @@ unless defined? RADIUS_LIB
24
33
  end
25
34
  end
26
35
  end
27
-
36
+
28
37
  def define_tag(name, options = {}, &block)
29
38
  @parser.context.define_tag name, options, &block
30
39
  end
31
-
40
+
32
41
  def define_global_tag(name, options = {}, &block)
33
42
  @context.define_tag name, options, &block
34
43
  end
metadata CHANGED
@@ -1,69 +1,73 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: radius
3
- version: !ruby/object:Gem::Version
4
- hash: 5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.4
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 7
9
- - 3
10
- version: 0.7.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - John W. Long (me@johnwlong.com)
14
9
  - David Chelimsky (dchelimsky@gmail.com)
15
10
  - Bryce Kerley (bkerley@brycekerley.net)
16
11
  autorequire:
17
12
  bindir: bin
18
13
  cert_chain: []
19
-
20
- date: 2012-02-26 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- name: kramdown
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
34
- type: :development
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: rake
38
- prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 49
45
- segments:
46
- - 0
47
- - 8
48
- - 7
49
- version: 0.8.7
50
- type: :development
51
- version_requirements: *id002
52
- description: Radius is a powerful tag-based template language for Ruby inspired by the template languages used in MovableType and TextPattern. It uses tags similar to XML, but can be used to generate any form of plain text (HTML, e-mail, etc...).
14
+ date: 2013-09-19 00:00:00.000000000 Z
15
+ dependencies: []
16
+ description: Radius is a powerful tag-based template language for Ruby inspired by
17
+ the template languages used in MovableType and TextPattern. It uses tags similar
18
+ to XML, but can be used to generate any form of plain text (HTML, e-mail, etc...).
53
19
  email: me@johnwlong.com
54
20
  executables: []
55
-
56
21
  extensions: []
57
-
58
- extra_rdoc_files:
22
+ extra_rdoc_files:
59
23
  - CHANGELOG
60
24
  - CONTRIBUTORS
61
25
  - LICENSE
62
26
  - QUICKSTART.rdoc
63
27
  - README.rdoc
64
- files:
28
+ files:
65
29
  - CHANGELOG
66
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
67
71
  - Gemfile
68
72
  - lib/radius/context.rb
69
73
  - lib/radius/delegating_open_struct.rb
@@ -105,38 +109,27 @@ files:
105
109
  - .gitignore
106
110
  homepage: http://github.com/jlong/radius
107
111
  licenses: []
108
-
109
112
  post_install_message:
110
113
  rdoc_options: []
111
-
112
- require_paths:
114
+ require_paths:
113
115
  - lib
114
- required_ruby_version: !ruby/object:Gem::Requirement
116
+ required_ruby_version: !ruby/object:Gem::Requirement
115
117
  none: false
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- hash: 3
120
- segments:
121
- - 0
122
- version: "0"
123
- required_rubygems_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - '>='
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
123
  none: false
125
- requirements:
126
- - - ">"
127
- - !ruby/object:Gem::Version
128
- hash: 25
129
- segments:
130
- - 1
131
- - 3
132
- - 1
124
+ requirements:
125
+ - - '>'
126
+ - !ruby/object:Gem::Version
133
127
  version: 1.3.1
134
128
  requirements: []
135
-
136
129
  rubyforge_project:
137
- rubygems_version: 1.8.10
130
+ rubygems_version: 1.8.26
138
131
  signing_key:
139
132
  specification_version: 3
140
133
  summary: A tag-based templating language for Ruby.
141
134
  test_files: []
142
-
135
+ has_rdoc: