comfortable_mexican_sofa 1.0.32 → 1.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. data/VERSION +1 -1
  2. data/comfortable_mexican_sofa.gemspec +2 -2
  3. data/lib/comfortable_mexican_sofa/cms_tag/field_datetime.rb +1 -1
  4. data/lib/comfortable_mexican_sofa/cms_tag/field_integer.rb +1 -1
  5. data/lib/comfortable_mexican_sofa/cms_tag/field_string.rb +1 -1
  6. data/lib/comfortable_mexican_sofa/cms_tag/field_text.rb +1 -1
  7. data/lib/comfortable_mexican_sofa/cms_tag/helper.rb +1 -1
  8. data/lib/comfortable_mexican_sofa/cms_tag/page_datetime.rb +1 -1
  9. data/lib/comfortable_mexican_sofa/cms_tag/page_integer.rb +1 -1
  10. data/lib/comfortable_mexican_sofa/cms_tag/page_rich_text.rb +1 -1
  11. data/lib/comfortable_mexican_sofa/cms_tag/page_string.rb +1 -1
  12. data/lib/comfortable_mexican_sofa/cms_tag/page_text.rb +1 -1
  13. data/lib/comfortable_mexican_sofa/cms_tag/partial.rb +1 -1
  14. data/lib/comfortable_mexican_sofa/cms_tag/snippet.rb +1 -1
  15. data/public/javascripts/comfortable_mexican_sofa/cms.js +3 -2
  16. data/test/unit/cms_tags/field_datetime_test.rb +6 -7
  17. data/test/unit/cms_tags/field_integer_test.rb +6 -7
  18. data/test/unit/cms_tags/field_string_test.rb +8 -8
  19. data/test/unit/cms_tags/field_text_test.rb +6 -7
  20. data/test/unit/cms_tags/helper_test.rb +4 -1
  21. data/test/unit/cms_tags/page_datetime_test.rb +6 -7
  22. data/test/unit/cms_tags/page_integer_test.rb +6 -7
  23. data/test/unit/cms_tags/page_rich_text.rb +6 -7
  24. data/test/unit/cms_tags/page_string_test.rb +6 -7
  25. data/test/unit/cms_tags/page_text_test.rb +8 -8
  26. data/test/unit/cms_tags/partial_test.rb +6 -6
  27. data/test/unit/cms_tags/snippet_test.rb +6 -7
  28. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.32
1
+ 1.0.33
@@ -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.32"
8
+ s.version = "1.0.33"
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-29}
12
+ s.date = %q{2010-12-03}
13
13
  s.description = %q{}
14
14
  s.email = %q{oleg@theworkinggroup.ca}
15
15
  s.extra_rdoc_files = [
@@ -3,7 +3,7 @@ class CmsTag::FieldDateTime < CmsBlock
3
3
  include CmsTag
4
4
 
5
5
  def self.regex_tag_signature(label = nil)
6
- label ||= /\w+/
6
+ label ||= /[\w\-]+/
7
7
  /\{\{\s*cms:field:(#{label}):datetime\s*\}\}/
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ class CmsTag::FieldInteger < CmsBlock
3
3
  include CmsTag
4
4
 
5
5
  def self.regex_tag_signature(label = nil)
6
- label ||= /\w+/
6
+ label ||= /[\w\-]+/
7
7
  /\{\{\s*cms:field:(#{label}):integer\s*\}\}/
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ class CmsTag::FieldString < CmsBlock
3
3
  include CmsTag
4
4
 
5
5
  def self.regex_tag_signature(label = nil)
6
- label ||= /\w+/
6
+ label ||= /[\w\-]+/
7
7
  /\{\{\s*cms:field:(#{label}):?(?:string)?\s*\}\}/
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ class CmsTag::FieldText < CmsBlock
3
3
  include CmsTag
4
4
 
5
5
  def self.regex_tag_signature(label = nil)
6
- label ||= /\w+/
6
+ label ||= /[\w\-]+/
7
7
  /\{\{\s*cms:field:(#{label}):?(?:text)?\s*?\}\}/
8
8
  end
9
9
 
@@ -5,7 +5,7 @@ class CmsTag::Helper
5
5
  include CmsTag
6
6
 
7
7
  def self.regex_tag_signature(label = nil)
8
- label ||= /\w+/
8
+ label ||= /[\w\-]+/
9
9
  /\{\{\s*cms:helper:(#{label}):?(.*?)\s*\}\}/
10
10
  end
11
11
 
@@ -3,7 +3,7 @@ class CmsTag::PageDateTime < CmsBlock
3
3
  include CmsTag
4
4
 
5
5
  def self.regex_tag_signature(label = nil)
6
- label ||= /\w+/
6
+ label ||= /[\w\-]+/
7
7
  /\{\{\s*cms:page:(#{label}):datetime\s*\}\}/
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ class CmsTag::PageInteger < CmsBlock
3
3
  include CmsTag
4
4
 
5
5
  def self.regex_tag_signature(label = nil)
6
- label ||= /\w+/
6
+ label ||= /[\w\-]+/
7
7
  /\{\{\s*cms:page:(#{label}):integer\s*\}\}/
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ class CmsTag::PageRichText < CmsBlock
3
3
  include CmsTag
4
4
 
5
5
  def self.regex_tag_signature(label = nil)
6
- label ||= /\w+/
6
+ label ||= /[\w\-]+/
7
7
  /\{\{\s*cms:page:(#{label}):rich_text\s*\}\}/
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ class CmsTag::PageString < CmsBlock
3
3
  include CmsTag
4
4
 
5
5
  def self.regex_tag_signature(label = nil)
6
- label ||= /\w+/
6
+ label ||= /[\w\-]+/
7
7
  /\{\{\s*cms:page:(#{label}):string\s*\}\}/
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ class CmsTag::PageText < CmsBlock
3
3
  include CmsTag
4
4
 
5
5
  def self.regex_tag_signature(label = nil)
6
- label ||= /\w+/
6
+ label ||= /[\w\-]+/
7
7
  /\{\{\s*cms:page:(#{label}):?(?:text)?\s*\}\}/
8
8
  end
9
9
 
@@ -5,7 +5,7 @@ class CmsTag::Partial
5
5
  include CmsTag
6
6
 
7
7
  def self.regex_tag_signature(label = nil)
8
- label ||= /[\w\/]+/
8
+ label ||= /[\w\/\-]+/
9
9
  /\{\{\s*cms:partial:(#{label}):?(.*?)\s*\}\}/
10
10
  end
11
11
 
@@ -7,7 +7,7 @@ class CmsTag::Snippet < CmsSnippet
7
7
  end
8
8
 
9
9
  def self.regex_tag_signature(label = nil)
10
- label ||= /\w+/
10
+ label ||= /[\w\-]+/
11
11
  /\{\{\s*cms:snippet:(#{label})\s*\}\}/
12
12
  end
13
13
 
@@ -52,7 +52,6 @@ $.CMS = function(){
52
52
  $('.form_element.cms_tag_page_rich_text textarea').tinymce({
53
53
  theme : "advanced",
54
54
  plugins: "",
55
- theme_advanced_blockformats : "p,div,h1,h2,h3,h4,h5,h6,blockquote,dt,dd,code,samp",
56
55
  theme_advanced_buttons1 : "formatselect,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,link,unlink,anchor,image,|,code",
57
56
  theme_advanced_buttons2 : "",
58
57
  theme_advanced_buttons3 : "",
@@ -78,7 +77,9 @@ $.CMS = function(){
78
77
  });
79
78
 
80
79
  $('ul.sortable').each(function(){
81
- $(this).sortable({ handle: 'div.dragger',
80
+ $(this).sortable({
81
+ handle: 'div.dragger',
82
+ axis: 'y',
82
83
  update: function() {
83
84
  $.post(current_path + '/reorder', '_method=put&'+$(this).sortable('serialize'));
84
85
  }
@@ -3,13 +3,12 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class FieldDateTimeTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:field:content:datetime }}',
8
- '{{cms:field:content:datetime}}'
9
- ].each do |tag_signature|
10
- assert tag = CmsTag::FieldDateTime.initialize_tag(cms_pages(:default), tag_signature)
11
- assert_equal 'content', tag.label
12
- end
6
+ assert tag = CmsTag::FieldDateTime.initialize_tag(cms_pages(:default), '{{ cms:field:content:datetime }}')
7
+ assert_equal 'content', tag.label
8
+ assert tag = CmsTag::FieldDateTime.initialize_tag(cms_pages(:default), '{{cms:field:content:datetime}}')
9
+ assert_equal 'content', tag.label
10
+ assert tag = CmsTag::FieldDateTime.initialize_tag(cms_pages(:default), '{{cms:field:dash-content:datetime}}')
11
+ assert_equal 'dash-content', tag.label
13
12
  end
14
13
 
15
14
  def test_initialize_tag_failure
@@ -3,13 +3,12 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class FieldIntegerTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:field:content:integer }}',
8
- '{{cms:field:content:integer}}'
9
- ].each do |tag_signature|
10
- assert tag = CmsTag::FieldInteger.initialize_tag(cms_pages(:default), tag_signature)
11
- assert_equal 'content', tag.label
12
- end
6
+ assert tag = CmsTag::FieldInteger.initialize_tag(cms_pages(:default), '{{ cms:field:content:integer }}')
7
+ assert_equal 'content', tag.label
8
+ assert tag = CmsTag::FieldInteger.initialize_tag(cms_pages(:default), '{{cms:field:content:integer}}')
9
+ assert_equal 'content', tag.label
10
+ assert tag = CmsTag::FieldInteger.initialize_tag(cms_pages(:default), '{{cms:field:dash-content:integer}}')
11
+ assert_equal 'dash-content', tag.label
13
12
  end
14
13
 
15
14
  def test_initialize_tag_failure
@@ -3,14 +3,14 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class FieldStringTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:field:content:string }}',
8
- '{{cms:field:content:string}}',
9
- '{{cms:field:content}}'
10
- ].each do |tag_signature|
11
- assert tag = CmsTag::FieldString.initialize_tag(cms_pages(:default), tag_signature)
12
- assert_equal 'content', tag.label
13
- end
6
+ assert tag = CmsTag::FieldString.initialize_tag(cms_pages(:default), '{{ cms:field:content:string }}')
7
+ assert_equal 'content', tag.label
8
+ assert tag = CmsTag::FieldString.initialize_tag(cms_pages(:default), '{{cms:field:content:string}}')
9
+ assert_equal 'content', tag.label
10
+ assert tag = CmsTag::FieldString.initialize_tag(cms_pages(:default), '{{cms:field:content}}')
11
+ assert_equal 'content', tag.label
12
+ assert tag = CmsTag::FieldString.initialize_tag(cms_pages(:default), '{{cms:field:dash-content}}')
13
+ assert_equal 'dash-content', tag.label
14
14
  end
15
15
 
16
16
  def test_initialize_tag_failure
@@ -3,13 +3,12 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class FieldTextTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:field:content:text }}',
8
- '{{cms:field:content:text}}'
9
- ].each do |tag_signature|
10
- assert tag = CmsTag::FieldText.initialize_tag(cms_pages(:default), tag_signature)
11
- assert_equal 'content', tag.label
12
- end
6
+ assert tag = CmsTag::FieldText.initialize_tag(cms_pages(:default), '{{ cms:field:content:text }}')
7
+ assert_equal 'content', tag.label
8
+ assert tag = CmsTag::FieldText.initialize_tag(cms_pages(:default), '{{cms:field:content:text}}')
9
+ assert_equal 'content', tag.label
10
+ assert tag = CmsTag::FieldText.initialize_tag(cms_pages(:default), '{{cms:field:dash-content:text}}')
11
+ assert_equal 'dash-content', tag.label
13
12
  end
14
13
 
15
14
  def test_initialize_tag_failure
@@ -3,7 +3,10 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class HelperTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- assert CmsTag::Helper.initialize_tag(cms_pages(:default), '{{ cms:helper:method_name }}')
6
+ assert tag = CmsTag::Helper.initialize_tag(cms_pages(:default), '{{ cms:helper:method_name }}')
7
+ assert_equal 'method_name', tag.label
8
+ assert tag = CmsTag::Helper.initialize_tag(cms_pages(:default), '{{ cms:helper:method-name }}')
9
+ assert_equal 'method-name', tag.label
7
10
  end
8
11
 
9
12
  def test_initialize_tag_with_parameters
@@ -3,13 +3,12 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class PageDateTimeTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:page:content:datetime }}',
8
- '{{cms:page:content:datetime}}'
9
- ].each do |tag_signature|
10
- assert tag = CmsTag::PageDateTime.initialize_tag(cms_pages(:default), tag_signature)
11
- assert_equal 'content', tag.label
12
- end
6
+ assert tag = CmsTag::PageDateTime.initialize_tag(cms_pages(:default), '{{ cms:page:content:datetime }}')
7
+ assert_equal 'content', tag.label
8
+ assert tag = CmsTag::PageDateTime.initialize_tag(cms_pages(:default), '{{cms:page:content:datetime}}')
9
+ assert_equal 'content', tag.label
10
+ assert tag = CmsTag::PageDateTime.initialize_tag(cms_pages(:default), '{{cms:page:dash-content:datetime}}')
11
+ assert_equal 'dash-content', tag.label
13
12
  end
14
13
 
15
14
  def test_initialize_tag_failure
@@ -3,13 +3,12 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class PageIntegerTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:page:content:integer }}',
8
- '{{cms:page:content:integer}}'
9
- ].each do |tag_signature|
10
- assert tag = CmsTag::PageInteger.initialize_tag(cms_pages(:default), tag_signature)
11
- assert_equal 'content', tag.label
12
- end
6
+ assert tag = CmsTag::PageInteger.initialize_tag(cms_pages(:default), '{{ cms:page:content:integer }}')
7
+ assert_equal 'content', tag.label
8
+ assert tag = CmsTag::PageInteger.initialize_tag(cms_pages(:default), '{{cms:page:content:integer}}')
9
+ assert_equal 'content', tag.label
10
+ assert tag = CmsTag::PageInteger.initialize_tag(cms_pages(:default), '{{cms:page:dash-content:integer}}')
11
+ assert_equal 'dash-content', tag.label
13
12
  end
14
13
 
15
14
  def test_initialize_tag_failure
@@ -3,13 +3,12 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class PageRichTextTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:page:content:rich_text }}',
8
- '{{cms:page:content:rich_text}}'
9
- ].each do |tag_signature|
10
- assert tag = CmsTag::PageRichText.initialize_tag(cms_pages(:default), tag_signature)
11
- assert_equal 'content', tag.label
12
- end
6
+ assert tag = CmsTag::PageRichText.initialize_tag(cms_pages(:default), '{{ cms:page:content:rich_text }}')
7
+ assert_equal 'content', tag.label
8
+ assert tag = CmsTag::PageRichText.initialize_tag(cms_pages(:default), '{{cms:page:content:rich_text}}')
9
+ assert_equal 'content', tag.label
10
+ assert tag = CmsTag::PageRichText.initialize_tag(cms_pages(:default), '{{cms:page:dash-content:rich_text}}')
11
+ assert_equal 'dash-content', tag.label
13
12
  end
14
13
 
15
14
  def test_initialize_tag_failure
@@ -3,13 +3,12 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class PageStringTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:page:content:string }}',
8
- '{{cms:page:content:string}}'
9
- ].each do |tag_signature|
10
- assert tag = CmsTag::PageString.initialize_tag(cms_pages(:default), tag_signature)
11
- assert_equal 'content', tag.label
12
- end
6
+ assert tag = CmsTag::PageString.initialize_tag(cms_pages(:default), '{{ cms:page:content:string }}')
7
+ assert_equal 'content', tag.label
8
+ assert tag = CmsTag::PageString.initialize_tag(cms_pages(:default), '{{cms:page:content:string}}')
9
+ assert_equal 'content', tag.label
10
+ assert tag = CmsTag::PageString.initialize_tag(cms_pages(:default), '{{cms:page:dash-content:string}}')
11
+ assert_equal 'dash-content', tag.label
13
12
  end
14
13
 
15
14
  def test_initialize_tag_failure
@@ -3,14 +3,14 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class PageTextTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:page:content:text }}',
8
- '{{cms:page:content}}',
9
- '{{cms:page:content:text}}'
10
- ].each do |tag_signature|
11
- assert tag = CmsTag::PageText.initialize_tag(cms_pages(:default), tag_signature)
12
- assert_equal 'content', tag.label
13
- end
6
+ assert tag = CmsTag::PageText.initialize_tag(cms_pages(:default), '{{ cms:page:content:text }}')
7
+ assert_equal 'content', tag.label
8
+ assert tag = CmsTag::PageText.initialize_tag(cms_pages(:default), '{{cms:page:content}}')
9
+ assert_equal 'content', tag.label
10
+ assert tag = CmsTag::PageText.initialize_tag(cms_pages(:default), '{{cms:page:content:text}}')
11
+ assert_equal 'content', tag.label
12
+ assert tag = CmsTag::PageText.initialize_tag(cms_pages(:default), '{{cms:page:dash-content}}')
13
+ assert_equal 'dash-content', tag.label
14
14
  end
15
15
 
16
16
  def test_initialize_tag_failure
@@ -3,12 +3,12 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class PartialTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:partial:partial_name }}',
8
- '{{cms:partial:path/to/partial}}'
9
- ].each do |tag_signature|
10
- assert tag = CmsTag::Partial.initialize_tag(cms_pages(:default), tag_signature)
11
- end
6
+ assert tag = CmsTag::Partial.initialize_tag(cms_pages(:default), '{{ cms:partial:partial_name }}')
7
+ assert_equal 'partial_name', tag.label
8
+ assert tag = CmsTag::Partial.initialize_tag(cms_pages(:default), '{{cms:partial:path/to/partial}}')
9
+ assert_equal 'path/to/partial', tag.label
10
+ assert tag = CmsTag::Partial.initialize_tag(cms_pages(:default), '{{cms:partial:path/to/dashed-partial}}')
11
+ assert_equal 'path/to/dashed-partial', tag.label
12
12
  end
13
13
 
14
14
  def test_initialize_tag_with_parameters
@@ -3,13 +3,12 @@ require File.expand_path('../../test_helper', File.dirname(__FILE__))
3
3
  class SnippetTest < ActiveSupport::TestCase
4
4
 
5
5
  def test_initialize_tag
6
- [
7
- '{{ cms:snippet:label }}',
8
- '{{cms:snippet:label}}'
9
- ].each do |tag_signature|
10
- assert tag = CmsTag::Snippet.initialize_tag(cms_pages(:default), tag_signature)
11
- assert_equal 'label', tag.slug
12
- end
6
+ assert tag = CmsTag::Snippet.initialize_tag(cms_pages(:default), '{{ cms:snippet:label }}')
7
+ assert_equal 'label', tag.slug
8
+ assert tag = CmsTag::Snippet.initialize_tag(cms_pages(:default), '{{cms:snippet:label}}')
9
+ assert_equal 'label', tag.slug
10
+ assert tag = CmsTag::Snippet.initialize_tag(cms_pages(:default), '{{cms:snippet:dash-label}}')
11
+ assert_equal 'dash-label', tag.slug
13
12
  end
14
13
 
15
14
  def test_initialize_tag_failure
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: 87
4
+ hash: 85
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 32
10
- version: 1.0.32
9
+ - 33
10
+ version: 1.0.33
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-29 00:00:00 -05:00
19
+ date: 2010-12-03 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency