comfortable_mexican_sofa 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/VERSION +1 -1
- data/comfortable_mexican_sofa.gemspec +2 -2
- data/lib/comfortable_mexican_sofa/cms_tag.rb +1 -1
- data/test/unit/cms_tag_test.rb +16 -4
- data/test/unit/cms_tags/partial_test.rb +4 -0
- metadata +4 -4
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.12
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{comfortable_mexican_sofa}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov", "The Working Group Inc"]
|
12
|
-
s.date = %q{2010-11-
|
12
|
+
s.date = %q{2010-11-03}
|
13
13
|
s.description = %q{}
|
14
14
|
s.email = %q{oleg@theworkinggroup.ca}
|
15
15
|
s.extra_rdoc_files = [
|
data/test/unit/cms_tag_test.rb
CHANGED
@@ -5,13 +5,25 @@ class CmsTagTest < ActiveSupport::TestCase
|
|
5
5
|
def test_tokenizer_regex
|
6
6
|
regex = CmsTag::TOKENIZER_REGEX
|
7
7
|
|
8
|
+
tokens = 'text { text } text'.scan(regex)
|
9
|
+
assert_equal nil, tokens[0][0]
|
10
|
+
assert_equal 'text { text } text', tokens[0][1]
|
11
|
+
|
8
12
|
tokens = 'content<{{cms:some_tag content'.scan(regex)
|
9
|
-
assert_equal nil,
|
10
|
-
assert_equal 'content<
|
13
|
+
assert_equal nil, tokens[0][0]
|
14
|
+
assert_equal 'content<', tokens[0][1]
|
15
|
+
assert_equal nil, tokens[1][0]
|
16
|
+
assert_equal '{{', tokens[1][1]
|
17
|
+
assert_equal nil, tokens[2][0]
|
18
|
+
assert_equal 'cms:some_tag content', tokens[2][1]
|
11
19
|
|
12
20
|
tokens = 'content<{{cms some_tag}}>content'.scan(regex)
|
13
|
-
assert_equal nil,
|
14
|
-
assert_equal 'content<
|
21
|
+
assert_equal nil, tokens[0][0]
|
22
|
+
assert_equal 'content<', tokens[0][1]
|
23
|
+
assert_equal nil, tokens[1][0]
|
24
|
+
assert_equal '{{', tokens[1][1]
|
25
|
+
assert_equal nil, tokens[2][0]
|
26
|
+
assert_equal 'cms some_tag}}>content',tokens[2][1]
|
15
27
|
|
16
28
|
tokens = 'content<{{cms:some_tag}}>content'.scan(regex)
|
17
29
|
assert_equal nil, tokens[0][0]
|
@@ -32,6 +32,10 @@ class PartialTest < ActiveSupport::TestCase
|
|
32
32
|
assert_equal "<%= render :partial => 'path/to/partial' %>", tag.content
|
33
33
|
assert_equal "<%= render :partial => 'path/to/partial' %>", tag.render
|
34
34
|
|
35
|
+
tag = CmsTag::Partial.initialize_tag(cms_pages(:default), '{{cms:partial:path/to/partial:param1}}')
|
36
|
+
assert_equal "<%= render :partial => 'path/to/partial', :locals => {:param_1 => 'param1'} %>", tag.content
|
37
|
+
assert_equal "<%= render :partial => 'path/to/partial', :locals => {:param_1 => 'param1'} %>", tag.render
|
38
|
+
|
35
39
|
tag = CmsTag::Partial.initialize_tag(cms_pages(:default), '{{cms:partial:path/to/partial:param1:param2}}')
|
36
40
|
assert_equal "<%= render :partial => 'path/to/partial', :locals => {:param_1 => 'param1', :param_2 => 'param2'} %>", tag.content
|
37
41
|
assert_equal "<%= render :partial => 'path/to/partial', :locals => {:param_1 => 'param1', :param_2 => 'param2'} %>", tag.render
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comfortable_mexican_sofa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 12
|
10
|
+
version: 1.0.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Oleg Khabarov
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-11-
|
19
|
+
date: 2010-11-03 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|