comfortable_mexican_sofa 1.6.13 → 1.6.14
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.
- data/VERSION +1 -1
- data/app/models/cms/page.rb +1 -1
- data/comfortable_mexican_sofa.gemspec +2 -2
- data/config/locales/en.yml +8 -0
- data/config/locales/pt-BR.yml +4 -2
- data/test/unit/models/page_test.rb +9 -0
- metadata +9 -9
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.6.
|
|
1
|
+
1.6.14
|
data/app/models/cms/page.rb
CHANGED
|
@@ -36,7 +36,7 @@ class Cms::Page < ActiveRecord::Base
|
|
|
36
36
|
:presence => true
|
|
37
37
|
validates :slug,
|
|
38
38
|
:presence => true,
|
|
39
|
-
:format => /^\w[a-z0-9_-]*$/i,
|
|
39
|
+
:format => /^\w[\.a-z0-9_-]*$/i,
|
|
40
40
|
:uniqueness => { :scope => :parent_id },
|
|
41
41
|
:unless => lambda{ |p| p.site && (p.site.pages.count == 0 || p.site.pages.root == self) }
|
|
42
42
|
validates :layout,
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "comfortable_mexican_sofa"
|
|
8
|
-
s.version = "1.6.
|
|
8
|
+
s.version = "1.6.14"
|
|
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 = "2012-02-
|
|
12
|
+
s.date = "2012-02-24"
|
|
13
13
|
s.description = ""
|
|
14
14
|
s.email = "oleg@theworkinggroup.ca"
|
|
15
15
|
s.extra_rdoc_files = [
|
data/config/locales/en.yml
CHANGED
|
@@ -6,6 +6,7 @@ en:
|
|
|
6
6
|
slug: Slug
|
|
7
7
|
parent_id: Parent
|
|
8
8
|
content: Content
|
|
9
|
+
identifier: Identifier
|
|
9
10
|
activerecord:
|
|
10
11
|
models:
|
|
11
12
|
cms/site: Site
|
|
@@ -14,11 +15,13 @@ en:
|
|
|
14
15
|
cms/snippet: Snippet
|
|
15
16
|
attributes:
|
|
16
17
|
cms/site:
|
|
18
|
+
identifier: Identifier
|
|
17
19
|
hostname: Hostname
|
|
18
20
|
path: Path
|
|
19
21
|
locale: Language
|
|
20
22
|
is_mirrored: Mirrored
|
|
21
23
|
cms/layout:
|
|
24
|
+
identifier: Identifier
|
|
22
25
|
label: Layout Name
|
|
23
26
|
app_layout: App Layout
|
|
24
27
|
parent_id: Parent Layout
|
|
@@ -30,6 +33,11 @@ en:
|
|
|
30
33
|
slug: Slug
|
|
31
34
|
target_page_id: Redirect to Page
|
|
32
35
|
is_published: Published
|
|
36
|
+
cms/file:
|
|
37
|
+
file: File
|
|
38
|
+
description: Description
|
|
39
|
+
cms/snippet:
|
|
40
|
+
identifier: Identifier
|
|
33
41
|
|
|
34
42
|
# -- Controllers ----------------------------------------------------------
|
|
35
43
|
cms:
|
data/config/locales/pt-BR.yml
CHANGED
|
@@ -3,9 +3,9 @@ pt-BR:
|
|
|
3
3
|
# -- Models ---------------------------------------------------------------
|
|
4
4
|
attributes:
|
|
5
5
|
label: Nome
|
|
6
|
+
slug: Identificador
|
|
6
7
|
parent_id: Pai
|
|
7
8
|
content: Conteúdo
|
|
8
|
-
slug: Identificador
|
|
9
9
|
identifier: Identificador
|
|
10
10
|
activerecord:
|
|
11
11
|
models:
|
|
@@ -15,11 +15,13 @@ pt-BR:
|
|
|
15
15
|
cms/snippet: Fragmento
|
|
16
16
|
attributes:
|
|
17
17
|
cms/site:
|
|
18
|
+
identifier: Identificador
|
|
18
19
|
hostname: Nome do Host
|
|
19
20
|
path: Caminho
|
|
20
21
|
locale: Idioma
|
|
21
22
|
is_mirrored: Espelhado
|
|
22
23
|
cms/layout:
|
|
24
|
+
identifier: Identificador
|
|
23
25
|
label: Nome do Leiaute
|
|
24
26
|
app_layout: Leiaute da Aplicação
|
|
25
27
|
parent_id: Leiaute Pai
|
|
@@ -227,4 +229,4 @@ pt-BR:
|
|
|
227
229
|
image:
|
|
228
230
|
insert: Inserir Imagem
|
|
229
231
|
link:
|
|
230
|
-
create: Criar Link
|
|
232
|
+
create: Criar Link
|
|
@@ -44,6 +44,15 @@ class CmsPageTest < ActiveSupport::TestCase
|
|
|
44
44
|
assert_has_errors_on page, :target_page_id
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
def test_validation_of_slug
|
|
48
|
+
page = cms_pages(:child)
|
|
49
|
+
page.slug = 'slug.with.d0ts-and_things'
|
|
50
|
+
assert page.valid?
|
|
51
|
+
|
|
52
|
+
page.slug = 'inva lid'
|
|
53
|
+
assert page.invalid?
|
|
54
|
+
end
|
|
55
|
+
|
|
47
56
|
def test_label_assignment
|
|
48
57
|
page = cms_sites(:default).pages.new(
|
|
49
58
|
:slug => 'test',
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: comfortable_mexican_sofa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.14
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,11 +10,11 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2012-02-
|
|
13
|
+
date: 2012-02-24 00:00:00.000000000Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rails
|
|
17
|
-
requirement: &
|
|
17
|
+
requirement: &70275681873660 !ruby/object:Gem::Requirement
|
|
18
18
|
none: false
|
|
19
19
|
requirements:
|
|
20
20
|
- - ! '>='
|
|
@@ -22,10 +22,10 @@ dependencies:
|
|
|
22
22
|
version: 3.0.0
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
|
-
version_requirements: *
|
|
25
|
+
version_requirements: *70275681873660
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: active_link_to
|
|
28
|
-
requirement: &
|
|
28
|
+
requirement: &70275681865720 !ruby/object:Gem::Requirement
|
|
29
29
|
none: false
|
|
30
30
|
requirements:
|
|
31
31
|
- - ~>
|
|
@@ -33,10 +33,10 @@ dependencies:
|
|
|
33
33
|
version: 1.0.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
|
-
version_requirements: *
|
|
36
|
+
version_requirements: *70275681865720
|
|
37
37
|
- !ruby/object:Gem::Dependency
|
|
38
38
|
name: paperclip
|
|
39
|
-
requirement: &
|
|
39
|
+
requirement: &70275681864260 !ruby/object:Gem::Requirement
|
|
40
40
|
none: false
|
|
41
41
|
requirements:
|
|
42
42
|
- - ! '>='
|
|
@@ -44,7 +44,7 @@ dependencies:
|
|
|
44
44
|
version: 2.3.0
|
|
45
45
|
type: :runtime
|
|
46
46
|
prerelease: false
|
|
47
|
-
version_requirements: *
|
|
47
|
+
version_requirements: *70275681864260
|
|
48
48
|
description: ''
|
|
49
49
|
email: oleg@theworkinggroup.ca
|
|
50
50
|
executables: []
|
|
@@ -366,7 +366,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
366
366
|
version: '0'
|
|
367
367
|
segments:
|
|
368
368
|
- 0
|
|
369
|
-
hash: -
|
|
369
|
+
hash: -4525357111478288434
|
|
370
370
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
371
371
|
none: false
|
|
372
372
|
requirements:
|