activeadmin-selleo-cms 0.0.14 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/app/admin/active_admin/views_helper.rb +8 -8
  2. data/app/admin/activeadmin_selleo_cms/asset.rb +1 -8
  3. data/app/admin/activeadmin_selleo_cms/page.rb +8 -6
  4. data/app/admin/activeadmin_selleo_cms/section.rb +44 -0
  5. data/app/assets/javascripts/activeadmin-selleo-cms/custom.js +1 -1
  6. data/app/assets/javascripts/ckeditor/config.js +171 -0
  7. data/app/controllers/cms_controller.rb +12 -0
  8. data/app/controllers/locales_controller.rb +6 -0
  9. data/app/controllers/pages_controller.rb +36 -0
  10. data/app/controllers/searches_controller.rb +6 -0
  11. data/app/helpers/pages_helper.rb +40 -0
  12. data/app/models/activeadmin_selleo_cms/icon.rb +1 -1
  13. data/app/models/activeadmin_selleo_cms/layout.rb +43 -2
  14. data/app/models/activeadmin_selleo_cms/page.rb +63 -10
  15. data/app/models/activeadmin_selleo_cms/section.rb +16 -0
  16. data/app/views/admin/assets/destroy.js.erb +1 -0
  17. data/app/views/admin/pages/_form.html.haml +11 -15
  18. data/app/views/admin/pages/_translated_fields.html.haml +11 -1
  19. data/app/views/admin/sections/_form.html.haml +36 -0
  20. data/app/views/pages/show.html.haml +5 -0
  21. data/app/views/{activeadmin_selleo_cms/searches → searches}/show.html.haml +0 -0
  22. data/config/initializers/active_admin.rb +6 -0
  23. data/config/initializers/i18n.rb +2 -0
  24. data/config/locales/cms.en.yml +2 -1
  25. data/config/routes.rb +12 -3
  26. data/db/migrate/20121129142932_create_activeadmin_selleo_cms_pages.rb +1 -1
  27. data/db/migrate/20130108153415_add_redirect_to_first_sub_page.rb +10 -0
  28. data/db/migrate/20130109132745_add_fields_to_page.rb +9 -0
  29. data/lib/activeadmin-selleo-cms/engine.rb +4 -0
  30. data/lib/activeadmin-selleo-cms/version.rb +1 -1
  31. data/lib/tasks/rebuild.rake +20 -0
  32. data/spec/dummy/app/views/layouts/application.html.erb +1 -5
  33. data/spec/dummy/app/views/layouts/cms.html.erb +11 -3
  34. data/spec/dummy/app/views/layouts/haml.html.haml +1 -0
  35. data/spec/dummy/db/migrate/{20130103215140_create_activeadmin_selleo_cms_pages.activeadmin_selleo_cms.rb → 20130117150800_create_activeadmin_selleo_cms_pages.activeadmin_selleo_cms.rb} +1 -1
  36. data/spec/dummy/db/migrate/{20130103215141_create_activeadmin_selleo_cms_locales.activeadmin_selleo_cms.rb → 20130117150801_create_activeadmin_selleo_cms_locales.activeadmin_selleo_cms.rb} +0 -0
  37. data/spec/dummy/db/migrate/{20130103215142_create_ckeditor_assets.activeadmin_selleo_cms.rb → 20130117150802_create_ckeditor_assets.activeadmin_selleo_cms.rb} +0 -0
  38. data/spec/dummy/db/migrate/{20130103215143_create_activeadmin_selleo_cms_sections.activeadmin_selleo_cms.rb → 20130117150803_create_activeadmin_selleo_cms_sections.activeadmin_selleo_cms.rb} +0 -0
  39. data/spec/dummy/db/migrate/{20130103215144_create_activeadmin_selleo_cms_searches.activeadmin_selleo_cms.rb → 20130117150804_create_activeadmin_selleo_cms_searches.activeadmin_selleo_cms.rb} +0 -0
  40. data/spec/dummy/db/migrate/{20130103215145_create_translations.activeadmin_selleo_cms.rb → 20130117150805_create_translations.activeadmin_selleo_cms.rb} +0 -0
  41. data/spec/dummy/db/migrate/{20130103215146_create_activeadmin_selleo_cms_assets.activeadmin_selleo_cms.rb → 20130117150806_create_activeadmin_selleo_cms_assets.activeadmin_selleo_cms.rb} +0 -0
  42. data/spec/dummy/db/migrate/20130117150807_add_redirect_to_first_sub_page.activeadmin_selleo_cms.rb +11 -0
  43. data/spec/dummy/db/migrate/20130117150808_add_fields_to_page.activeadmin_selleo_cms.rb +10 -0
  44. data/spec/dummy/db/schema.rb +9 -7
  45. data/spec/dummy/db/snapshots/test_database.sql +2 -2
  46. data/spec/dummy/log/test.log +125756 -0
  47. data/spec/dummy/tmp/cache/assets/CB7/190/sprockets%2F136a9350fa75f3336af293952861ed6d +0 -0
  48. data/spec/dummy/tmp/cache/assets/CD3/3E0/sprockets%2F373fa62090ab111ae606b963e1b8c793 +0 -0
  49. data/spec/dummy/tmp/cache/assets/D2C/2E0/sprockets%2Fa031c32e27ced12f81d4326f8b52fb23 +0 -0
  50. data/spec/dummy/tmp/cache/assets/D63/6C0/sprockets%2F1ae1f1cf9d92d0e61b7006171a39fd4d +0 -0
  51. data/spec/dummy/tmp/cache/assets/DB2/EA0/sprockets%2Ffead656b8b83fbae9f69435c33b4649d +0 -0
  52. data/spec/dummy/tmp/cache/assets/E37/3E0/sprockets%2F9e6d2d17ed6da64a2f1876d4cdfefcd1 +0 -0
  53. data/spec/dummy/tmp/capybara/capybara-201301081556598147527968.html +13 -0
  54. data/spec/dummy/tmp/capybara/capybara-201301081558042145012026.html +23 -0
  55. data/spec/dummy/tmp/capybara/capybara-201301081559296090328502.html +24 -0
  56. data/spec/dummy/tmp/capybara/capybara-201301101624594727125473.html +13 -0
  57. data/spec/dummy/tmp/capybara/capybara-201301101625068619114008.html +13 -0
  58. data/spec/dummy/tmp/capybara/capybara-201301101625104331710400.html +13 -0
  59. data/spec/dummy/tmp/capybara/capybara-201301101625154735808799.html +13 -0
  60. data/spec/factories/pages.rb +4 -2
  61. data/spec/models/activeadmin_selleo_cms/layout_spec.rb +4 -0
  62. data/spec/models/activeadmin_selleo_cms/page_spec.rb +98 -3
  63. data/spec/requests/pages_spec.rb +8 -0
  64. data/spec/spec_helper.rb +3 -2
  65. data/spec/support/pages_helper.rb +5 -2
  66. metadata +90 -41
  67. data/app/controllers/activeadmin_selleo_cms/application_controller.rb +0 -13
  68. data/app/controllers/activeadmin_selleo_cms/locales_controller.rb +0 -8
  69. data/app/controllers/activeadmin_selleo_cms/pages_controller.rb +0 -15
  70. data/app/controllers/activeadmin_selleo_cms/searches_controller.rb +0 -8
  71. data/app/helpers/activeadmin_selleo_cms/application_helper.rb +0 -31
  72. data/app/views/activeadmin_selleo_cms/pages/show.html.haml +0 -3
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Internal Server Error</title></head>
3
+ <body>
4
+ <h1>Internal Server Error</h1>
5
+ undefined method `layout' for nil:NilClass
6
+ <hr />
7
+ <address>
8
+ WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) at
9
+ 127.0.0.1:53368
10
+ </address>
11
+
12
+
13
+ </body></html>
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html xmlns="http://www.w3.org/1999/xhtml"><head>
3
+ <title>CMS</title>
4
+ <link type="text/css" rel="stylesheet" media="all" href="/assets/application.css" />
5
+ <script type="text/javascript" src="/assets/application.js"></script>
6
+
7
+ </head>
8
+ <body>
9
+
10
+ <ul>
11
+ </ul>
12
+
13
+ <h1></h1>
14
+
15
+
16
+
17
+ <hr />
18
+
19
+
20
+
21
+
22
+
23
+ </body></html>
@@ -0,0 +1,24 @@
1
+ <!DOCTYPE html>
2
+ <html xmlns="http://www.w3.org/1999/xhtml"><head>
3
+ <title>CMS</title>
4
+ <link type="text/css" rel="stylesheet" media="all" href="/assets/application.css" />
5
+ <script type="text/javascript" src="/assets/application.js"></script>
6
+
7
+ </head>
8
+ <body>
9
+
10
+ <ul>
11
+ <a href="/en/child">Parent</a>
12
+ </ul>
13
+
14
+ <h1></h1>
15
+
16
+
17
+
18
+ <hr />
19
+
20
+
21
+
22
+
23
+
24
+ </body></html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Internal Server Error</title></head>
3
+ <body>
4
+ <h1>Internal Server Error</h1>
5
+ stack level too deep
6
+ <hr />
7
+ <address>
8
+ WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) at
9
+ 127.0.0.1:35532
10
+ </address>
11
+
12
+
13
+ </body></html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Internal Server Error</title></head>
3
+ <body>
4
+ <h1>Internal Server Error</h1>
5
+ stack level too deep
6
+ <hr />
7
+ <address>
8
+ WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) at
9
+ 127.0.0.1:35532
10
+ </address>
11
+
12
+
13
+ </body></html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Internal Server Error</title></head>
3
+ <body>
4
+ <h1>Internal Server Error</h1>
5
+ stack level too deep
6
+ <hr />
7
+ <address>
8
+ WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) at
9
+ 127.0.0.1:35532
10
+ </address>
11
+
12
+
13
+ </body></html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
2
+ <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Internal Server Error</title></head>
3
+ <body>
4
+ <h1>Internal Server Error</h1>
5
+ stack level too deep
6
+ <hr />
7
+ <address>
8
+ WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) at
9
+ 127.0.0.1:35532
10
+ </address>
11
+
12
+
13
+ </body></html>
@@ -1,6 +1,8 @@
1
1
  FactoryGirl.define do
2
2
  factory :page, class: ActiveadminSelleoCms::Page do
3
- title "Sample page"
4
- layout "cms"
3
+ title "Sample page"
4
+ is_published true
5
+ show_in_menu true
6
+ layout_name "cms"
5
7
  end
6
8
  end
@@ -8,6 +8,10 @@ module ActiveadminSelleoCms
8
8
  Layout.all.should include("application", "cms")
9
9
  end
10
10
 
11
+ it "should not return filenames of layouts other than erb" do
12
+ Layout.all.should_not include("haml-layout")
13
+ end
14
+
11
15
  end
12
16
 
13
17
  end
@@ -12,7 +12,7 @@ module ActiveadminSelleoCms
12
12
  end
13
13
 
14
14
  it "should maintain the published_at date" do
15
- page = FactoryGirl.create(:page)
15
+ page = FactoryGirl.create(:page, is_published: false)
16
16
  page.published_at.should be_nil
17
17
  page.update_attribute(:is_published, true)
18
18
  page.published_at.should be_a_kind_of ActiveSupport::TimeWithZone
@@ -20,9 +20,9 @@ module ActiveadminSelleoCms
20
20
  page.published_at.should be_nil
21
21
  end
22
22
 
23
- it "should set default layout" do
23
+ it "should set default layout name" do
24
24
  page = FactoryGirl.create(:page)
25
- page.layout.should_not be_blank
25
+ page.layout_name.should_not be_blank
26
26
  end
27
27
 
28
28
  it "should return all section names" do
@@ -45,6 +45,101 @@ module ActiveadminSelleoCms
45
45
  page.translated_attribute(:title, :pl).should == "Title_PL"
46
46
  end
47
47
 
48
+ it "should retrun nested path" do
49
+ parent = FactoryGirl.create(:page, title: 'Parent')
50
+ parent.to_param.should == "parent"
51
+ child = FactoryGirl.create(:page, title: 'Child', parent: parent)
52
+ child.to_param.should == "parent/child"
53
+ grand = FactoryGirl.create(:page, title: 'Grand', parent: child)
54
+ grand.to_param.should == "parent/child/grand"
55
+ end
56
+
57
+ it "should not be possible to create 2 pages with the same title for same parent" do
58
+ FactoryGirl.create(:page, title: 'Parent')
59
+ expect { FactoryGirl.create(:page, title: 'Parent') }.to raise_error
60
+ end
61
+
62
+ it "should be possible to create 2 pages with the same title for same parent but in different languages" do
63
+ FactoryGirl.create(:page, title: 'Same title')
64
+ I18n.locale = :pl
65
+ FactoryGirl.create(:page, title: 'Same title')
66
+ end
67
+
68
+ it "should be posbbile to create 2 pages with the same name for different parents" do
69
+ parent1 = FactoryGirl.create(:page, title: 'Parent 1')
70
+ parent2 = FactoryGirl.create(:page, title: 'Parent 2')
71
+ FactoryGirl.create(:page, title: 'Same title')
72
+ FactoryGirl.create(:page, title: 'Same title', parent: parent1)
73
+ FactoryGirl.create(:page, title: 'Same title', parent: parent2)
74
+ end
75
+
76
+ it "should be possible to create and update page with nested translations" do
77
+ page = Page.create(translations_attributes: { "0" => { title: "Title EN", slug: "title-en", locale: "en" }, "1" => { locale: "da" } } )
78
+ page.translations.count.should == 2
79
+ page_en_translation = page.translations.where(locale: 'en').first
80
+ page_en_translation.title.should == "Title EN"
81
+ page_da_translation = page.translations.where(locale: 'da').first
82
+ page_da_translation.title.should be_nil
83
+
84
+ attrs = { translations_attributes: {} }
85
+ attrs[:translations_attributes][page_en_translation.id] = { title: "Updated EN", id: page_en_translation.id }
86
+ attrs[:translations_attributes][page_da_translation.id] = { title: "New DA", id: page_da_translation.id, slug: 'new-da' }
87
+
88
+ page.update_attributes(attrs)
89
+ page.reload
90
+ page.translations.count.should == 2
91
+
92
+ page.translations.where(locale: 'en').first.title.should == "Updated EN"
93
+ page.translations.where(locale: 'da').first.title.should == "New DA"
94
+
95
+ attrs = { translations_attributes: {} }
96
+ attrs[:translations_attributes][page_da_translation.id] = { title: "Updated DA", id: page_da_translation.id }
97
+
98
+ page.update_attributes(attrs)
99
+ page.reload
100
+ page.translations.count.should == 2
101
+
102
+ page.translations.where(locale: 'da').first.title.should == "Updated DA"
103
+ end
104
+
105
+ it "should be possible to create and update page with nested sections" do
106
+ page = Page.create(
107
+ translations_attributes: { "0" => { title: "Title EN", slug: "title-en", locale: "en" }, "1" => { locale: "da" } },
108
+ sections_attributes: { "0" => { name: 'header', translations_attributes: { "0" => { body: 'Header EN', locale: 'en' }, "1" => { locale: 'da' } } } }
109
+ )
110
+ page.sections.count.should == 1
111
+ page.sections.first.translations.count.should == 2
112
+ page_section = page.sections.first
113
+ page_en_section_translation = page_section.translations.where(locale: 'en').first
114
+ page_en_section_translation.body.should == "Header EN"
115
+ page_da_section_translation = page_section.translations.where(locale: 'da').first
116
+ page_da_section_translation.body.should be_nil
117
+
118
+ attrs = { sections_attributes: { page_section.id => { id: page_section.id, translations_attributes: {} } } }
119
+ attrs[:sections_attributes][page_section.id][:translations_attributes][page_en_section_translation.id] = { body: "Updated EN header", id: page_en_section_translation.id }
120
+ attrs[:sections_attributes][page_section.id][:translations_attributes][page_da_section_translation.id] = { body: "New DA header", id: page_da_section_translation.id }
121
+
122
+ page.update_attributes(attrs)
123
+ page.reload
124
+ page.sections.count.should == 1
125
+ page.sections.first.translations.count.should == 2
126
+ page_section = page.sections.first
127
+
128
+ page_section.translations.where(locale: 'en').first.body.should == "Updated EN header"
129
+ page_section.translations.where(locale: 'da').first.body.should == "New DA header"
130
+
131
+ attrs = { sections_attributes: { page_section.id => { id: page_section.id, translations_attributes: {} } } }
132
+ attrs[:sections_attributes][page_section.id][:translations_attributes][page_da_section_translation.id] = { body: "Updated DA header", id: page_da_section_translation.id }
133
+
134
+ page.update_attributes(attrs)
135
+ page.reload
136
+ page.sections.count.should == 1
137
+ page.sections.first.translations.count.should == 2
138
+ page_section = page.sections.first
139
+
140
+ page_section.translations.where(locale: 'da').first.body.should == "Updated DA header"
141
+ end
142
+
48
143
  end
49
144
 
50
145
  end
@@ -67,4 +67,12 @@ feature "Page management" do
67
67
  page.should have_content "Some footer text"
68
68
  end
69
69
 
70
+ scenario "I should be redirected to first sub page", js: true do
71
+ login_admin
72
+ parent = FactoryGirl.create(:page, title: "Parent", redirect_to_first_sub_page: true)
73
+ FactoryGirl.create(:page, title: "Child", parent: parent)
74
+ visit '/en/parent'
75
+ page.should have_css "a[href*='child']"
76
+ end
77
+
70
78
  end
data/spec/spec_helper.rb CHANGED
@@ -31,6 +31,7 @@ Spork.prefork do
31
31
  end
32
32
 
33
33
  RSpec.configure do |config|
34
+ config.include Capybara::DSL
34
35
  # ## Mock Framework
35
36
  #
36
37
  # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
@@ -86,8 +87,8 @@ Spork.each_run do
86
87
  # This code will be run each time you run your specs.
87
88
  Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
88
89
 
89
- headless = Headless.new
90
- headless.start
90
+ #headless = Headless.new
91
+ #headless.start
91
92
  end
92
93
 
93
94
  # --- Instructions ---
@@ -1,10 +1,11 @@
1
1
  def create_page
2
2
  click_link 'Pages'
3
3
  click_link 'New Page'
4
- select 'cms', from: 'page_layout'
4
+ select 'cms', from: 'page_layout_name'
5
5
  check "page_is_published"
6
6
  within "#lang-en" do
7
7
  find(:css, 'input[id$="_title"]').set('Sample page')
8
+ find(:css, 'input[id$="_slug"]').set('sample-page')
8
9
  sections = all(:css, 'textarea[id$="_body"]')
9
10
  fill_in_ckeditor sections[0]['id'], with: "Some header text"
10
11
  fill_in_ckeditor sections[1]['id'], with: "Some content text"
@@ -17,10 +18,11 @@ end
17
18
  def create_link_url_page(link_url="http://example.org")
18
19
  click_link 'Pages'
19
20
  click_link 'New Page'
20
- select 'cms', from: 'page_layout'
21
+ select 'cms', from: 'page_layout_name'
21
22
  check "page_is_link_url"
22
23
  within "#lang-en" do
23
24
  find(:css, 'input[id$="_title"]').set('Sample page')
25
+ find(:css, 'input[id$="_slug"]').set('sample-page')
24
26
  find(:css, '[id$="_body"]').should_not be_visible
25
27
  find(:css, '[id$="_browser_title"]').should_not be_visible
26
28
  find(:css, '[id$="_meta_keywords"]').should_not be_visible
@@ -53,6 +55,7 @@ def translate_page(locale)
53
55
  click_link locale.name
54
56
  within "#lang-pl" do
55
57
  find(:css, 'input[id$="_title"]').set('Sample polish page')
58
+ find(:css, 'input[id$="_slug"]').set('sample-polish-page')
56
59
  sections = all(:css, 'textarea[id$="_body"]')
57
60
  fill_in_ckeditor sections[0]['id'], with: "Some polish header text"
58
61
  fill_in_ckeditor sections[1]['id'], with: "Some polish content text"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-selleo-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-07 00:00:00.000000000 Z
12
+ date: 2013-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 3.2.8
21
+ version: 3.2.11
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 3.2.8
29
+ version: 3.2.11
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: jquery-rails
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -48,49 +48,49 @@ dependencies:
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - ! '>='
51
+ - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: '0'
53
+ version: 0.5.1
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - ! '>='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.5.1
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: globalize3
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
- - - ! '>='
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: 0.3.0
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ! '>='
75
+ - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: '0'
77
+ version: 0.3.0
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: ckeditor
80
80
  requirement: !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
83
- - - ! '>='
83
+ - - '='
84
84
  - !ruby/object:Gem::Version
85
- version: '0'
85
+ version: 3.7.3
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
- - - ! '>='
91
+ - - '='
92
92
  - !ruby/object:Gem::Version
93
- version: '0'
93
+ version: 3.7.3
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: paperclip
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -203,6 +203,22 @@ dependencies:
203
203
  - - ! '>='
204
204
  - !ruby/object:Gem::Version
205
205
  version: '0'
206
+ - !ruby/object:Gem::Dependency
207
+ name: nokogiri
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ type: :runtime
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
206
222
  - !ruby/object:Gem::Dependency
207
223
  name: pg
208
224
  requirement: !ruby/object:Gem::Requirement
@@ -256,17 +272,17 @@ dependencies:
256
272
  requirement: !ruby/object:Gem::Requirement
257
273
  none: false
258
274
  requirements:
259
- - - ! '>='
275
+ - - '='
260
276
  - !ruby/object:Gem::Version
261
- version: '0'
277
+ version: 1.1.4
262
278
  type: :development
263
279
  prerelease: false
264
280
  version_requirements: !ruby/object:Gem::Requirement
265
281
  none: false
266
282
  requirements:
267
- - - ! '>='
283
+ - - '='
268
284
  - !ruby/object:Gem::Version
269
- version: '0'
285
+ version: 1.1.4
270
286
  - !ruby/object:Gem::Dependency
271
287
  name: capybara-webkit
272
288
  requirement: !ruby/object:Gem::Requirement
@@ -338,22 +354,25 @@ executables: []
338
354
  extensions: []
339
355
  extra_rdoc_files: []
340
356
  files:
341
- - app/controllers/activeadmin_selleo_cms/application_controller.rb
342
- - app/controllers/activeadmin_selleo_cms/pages_controller.rb
343
- - app/controllers/activeadmin_selleo_cms/locales_controller.rb
344
- - app/controllers/activeadmin_selleo_cms/searches_controller.rb
357
+ - app/controllers/pages_controller.rb
358
+ - app/controllers/locales_controller.rb
359
+ - app/controllers/cms_controller.rb
360
+ - app/controllers/searches_controller.rb
345
361
  - app/admin/translation.rb
362
+ - app/admin/activeadmin_selleo_cms/section.rb
346
363
  - app/admin/activeadmin_selleo_cms/locale.rb
347
364
  - app/admin/activeadmin_selleo_cms/page.rb
348
365
  - app/admin/activeadmin_selleo_cms/asset.rb
349
366
  - app/admin/active_admin/views_helper.rb
350
367
  - app/views/layouts/activeadmin_selleo_cms/application.html.erb
368
+ - app/views/admin/sections/_form.html.haml
351
369
  - app/views/admin/pages/_form.html.haml
352
370
  - app/views/admin/pages/_translated_fields.html.haml
353
371
  - app/views/admin/pages/_js.html.haml
372
+ - app/views/admin/assets/destroy.js.erb
354
373
  - app/views/admin/translations/update.js.haml
355
- - app/views/activeadmin_selleo_cms/pages/show.html.haml
356
- - app/views/activeadmin_selleo_cms/searches/show.html.haml
374
+ - app/views/pages/show.html.haml
375
+ - app/views/searches/show.html.haml
357
376
  - app/views/active_admin/resource/update.js
358
377
  - app/models/translation.rb
359
378
  - app/models/activeadmin_selleo_cms/section.rb
@@ -374,7 +393,8 @@ files:
374
393
  - app/assets/javascripts/activeadmin-selleo-cms/application.js
375
394
  - app/assets/javascripts/activeadmin-selleo-cms/jquery.mjs.nestedSortable.js
376
395
  - app/assets/javascripts/activeadmin-selleo-cms/custom.js
377
- - app/helpers/activeadmin_selleo_cms/application_helper.rb
396
+ - app/assets/javascripts/ckeditor/config.js
397
+ - app/helpers/pages_helper.rb
378
398
  - app/modules/activeadmin_selleo_cms/content_translation.rb
379
399
  - app/modules/active_admin/views/index_as_list.rb
380
400
  - config/locales/cms.en.yml
@@ -390,9 +410,12 @@ files:
390
410
  - db/migrate/20121204112326_create_ckeditor_assets.rb
391
411
  - db/migrate/20121221164723_create_activeadmin_selleo_cms_searches.rb
392
412
  - db/migrate/20130102113712_create_activeadmin_selleo_cms_assets.rb
413
+ - db/migrate/20130108153415_add_redirect_to_first_sub_page.rb
414
+ - db/migrate/20130109132745_add_fields_to_page.rb
393
415
  - lib/activeadmin-selleo-cms/application.rb
394
416
  - lib/activeadmin-selleo-cms/version.rb
395
417
  - lib/activeadmin-selleo-cms/engine.rb
418
+ - lib/tasks/rebuild.rake
396
419
  - lib/tasks/i18n.rake
397
420
  - lib/tasks/activeadmin-selleo-cms_tasks.rake
398
421
  - lib/activeadmin-selleo-cms.rb
@@ -404,6 +427,7 @@ files:
404
427
  - spec/spec_helper.rb
405
428
  - spec/dummy/app/controllers/application_controller.rb
406
429
  - spec/dummy/app/admin/dashboard.rb
430
+ - spec/dummy/app/views/layouts/haml.html.haml
407
431
  - spec/dummy/app/views/layouts/cms.html.erb
408
432
  - spec/dummy/app/views/layouts/application.html.erb
409
433
  - spec/dummy/app/views/layouts/_partial.html.erb
@@ -452,12 +476,16 @@ files:
452
476
  - spec/dummy/tmp/capybara/capybara-201301041352463545367297.html
453
477
  - spec/dummy/tmp/capybara/capybara-201301041352462005375483.html
454
478
  - spec/dummy/tmp/capybara/capybara-201301040151281386048187.html
479
+ - spec/dummy/tmp/capybara/capybara-201301101625104331710400.html
455
480
  - spec/dummy/tmp/capybara/capybara-201301040954511418542703.html
456
481
  - spec/dummy/tmp/capybara/capybara-201301041417132357034971.html
457
482
  - spec/dummy/tmp/capybara/capybara-201301040159522441835098.html
458
483
  - spec/dummy/tmp/capybara/capybara-201301032118074870597832.html
484
+ - spec/dummy/tmp/capybara/capybara-201301101625068619114008.html
459
485
  - spec/dummy/tmp/capybara/capybara-20130104015422353959105.html
460
486
  - spec/dummy/tmp/capybara/capybara-201301040152309282813931.html
487
+ - spec/dummy/tmp/capybara/capybara-201301081556598147527968.html
488
+ - spec/dummy/tmp/capybara/capybara-201301081559296090328502.html
461
489
  - spec/dummy/tmp/capybara/capybara-201301040152373722934447.html
462
490
  - spec/dummy/tmp/capybara/capybara-201301032027589597215180.html
463
491
  - spec/dummy/tmp/capybara/capybara-20130104014931374261732.html
@@ -465,10 +493,12 @@ files:
465
493
  - spec/dummy/tmp/capybara/capybara-201301040152222147584295.html
466
494
  - spec/dummy/tmp/capybara/capybara-201301032131032952827250.html
467
495
  - spec/dummy/tmp/capybara/capybara-201301031512251370155161.html
496
+ - spec/dummy/tmp/capybara/capybara-201301101625154735808799.html
468
497
  - spec/dummy/tmp/capybara/capybara-201301040159255570831585.html
469
498
  - spec/dummy/tmp/capybara/capybara-201301041417131187394181.html
470
499
  - spec/dummy/tmp/capybara/capybara-201301032215468728814736.html
471
500
  - spec/dummy/tmp/capybara/capybara-201301040150394365123513.html
501
+ - spec/dummy/tmp/capybara/capybara-201301101624594727125473.html
472
502
  - spec/dummy/tmp/capybara/capybara-201301040150004731622440.html
473
503
  - spec/dummy/tmp/capybara/capybara-201301041332318106214804.html
474
504
  - spec/dummy/tmp/capybara/capybara-201301032029132270486030.html
@@ -488,6 +518,7 @@ files:
488
518
  - spec/dummy/tmp/capybara/capybara-201301041357311120034810.html
489
519
  - spec/dummy/tmp/capybara/capybara-201301040150205672162843.html
490
520
  - spec/dummy/tmp/capybara/capybara-201301032121244184496341.html
521
+ - spec/dummy/tmp/capybara/capybara-201301081558042145012026.html
491
522
  - spec/dummy/tmp/capybara/capybara-201301040153265188680798.html
492
523
  - spec/dummy/tmp/capybara/capybara-201301032029119597215180.html
493
524
  - spec/dummy/tmp/capybara/capybara-201301032133364184496341.html
@@ -550,6 +581,7 @@ files:
550
581
  - spec/dummy/tmp/cache/assets/D22/680/sprockets%2Fcf818773783b496be6d1714cfec6255c
551
582
  - spec/dummy/tmp/cache/assets/C18/210/sprockets%2F2220d4c30976465067544cb53b611c96
552
583
  - spec/dummy/tmp/cache/assets/CC9/4D0/sprockets%2Fc67ec56f7a3055a2adc521104d010468
584
+ - spec/dummy/tmp/cache/assets/CB7/190/sprockets%2F136a9350fa75f3336af293952861ed6d
553
585
  - spec/dummy/tmp/cache/assets/CB7/560/sprockets%2F6b546755f89f0405c9868ab44ace0061
554
586
  - spec/dummy/tmp/cache/assets/E21/260/sprockets%2F23b6b9ebcadbe7faa065be373c3fe170
555
587
  - spec/dummy/tmp/cache/assets/E24/020/sprockets%2Ff1f0a4d3a314b6ea80e4dbffdca877e2
@@ -575,6 +607,7 @@ files:
575
607
  - spec/dummy/tmp/cache/assets/D6F/E60/sprockets%2Fbdf6d9753ab6f55b7b053045ef6f0d32
576
608
  - spec/dummy/tmp/cache/assets/D4A/590/sprockets%2F04a391c78c98e62f9370fdbb3d4287ae
577
609
  - spec/dummy/tmp/cache/assets/CD6/930/sprockets%2Fb62a24129369fea572b674303a7fa12f
610
+ - spec/dummy/tmp/cache/assets/D2C/2E0/sprockets%2Fa031c32e27ced12f81d4326f8b52fb23
578
611
  - spec/dummy/tmp/cache/assets/CE4/FA0/sprockets%2F7e368c6b5219ea20b7424af404a7e798
579
612
  - spec/dummy/tmp/cache/assets/D88/8B0/sprockets%2Fe8cfac368dd4073cbad83998b9482b89
580
613
  - spec/dummy/tmp/cache/assets/D88/870/sprockets%2F88a3dac647de305e483e0df7e78ef399
@@ -585,6 +618,7 @@ files:
585
618
  - spec/dummy/tmp/cache/assets/DDE/420/sprockets%2Ffb8b186d5bf0307f86f65fc787d2adeb
586
619
  - spec/dummy/tmp/cache/assets/CD3/840/sprockets%2F9c1434de079056a20fa5210eee2618f3
587
620
  - spec/dummy/tmp/cache/assets/CD3/3E0/sprockets%2F373fa62090ab111ae606b963e1b8c793
621
+ - spec/dummy/tmp/cache/assets/E37/3E0/sprockets%2F9e6d2d17ed6da64a2f1876d4cdfefcd1
588
622
  - spec/dummy/tmp/cache/assets/DA8/8A0/sprockets%2F667a6cf5379d3aac318f91abb4fd9d54
589
623
  - spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
590
624
  - spec/dummy/tmp/cache/assets/CDF/540/sprockets%2F832aed134af8672c16d8ee2027f01785
@@ -705,15 +739,17 @@ files:
705
739
  - spec/dummy/public/500.html
706
740
  - spec/dummy/public/favicon.ico
707
741
  - spec/dummy/db/snapshots/test_database.sql
708
- - spec/dummy/db/migrate/20130103215141_create_activeadmin_selleo_cms_locales.activeadmin_selleo_cms.rb
742
+ - spec/dummy/db/migrate/20130117150808_add_fields_to_page.activeadmin_selleo_cms.rb
709
743
  - spec/dummy/db/migrate/20130103123301_create_admin_notes.rb
710
- - spec/dummy/db/migrate/20130103215140_create_activeadmin_selleo_cms_pages.activeadmin_selleo_cms.rb
711
- - spec/dummy/db/migrate/20130103215144_create_activeadmin_selleo_cms_searches.activeadmin_selleo_cms.rb
712
- - spec/dummy/db/migrate/20130103215145_create_translations.activeadmin_selleo_cms.rb
744
+ - spec/dummy/db/migrate/20130117150801_create_activeadmin_selleo_cms_locales.activeadmin_selleo_cms.rb
745
+ - spec/dummy/db/migrate/20130117150800_create_activeadmin_selleo_cms_pages.activeadmin_selleo_cms.rb
713
746
  - spec/dummy/db/migrate/20130103123302_move_admin_notes_to_comments.rb
714
- - spec/dummy/db/migrate/20130103215146_create_activeadmin_selleo_cms_assets.activeadmin_selleo_cms.rb
715
- - spec/dummy/db/migrate/20130103215142_create_ckeditor_assets.activeadmin_selleo_cms.rb
716
- - spec/dummy/db/migrate/20130103215143_create_activeadmin_selleo_cms_sections.activeadmin_selleo_cms.rb
747
+ - spec/dummy/db/migrate/20130117150804_create_activeadmin_selleo_cms_searches.activeadmin_selleo_cms.rb
748
+ - spec/dummy/db/migrate/20130117150806_create_activeadmin_selleo_cms_assets.activeadmin_selleo_cms.rb
749
+ - spec/dummy/db/migrate/20130117150803_create_activeadmin_selleo_cms_sections.activeadmin_selleo_cms.rb
750
+ - spec/dummy/db/migrate/20130117150802_create_ckeditor_assets.activeadmin_selleo_cms.rb
751
+ - spec/dummy/db/migrate/20130117150807_add_redirect_to_first_sub_page.activeadmin_selleo_cms.rb
752
+ - spec/dummy/db/migrate/20130117150805_create_translations.activeadmin_selleo_cms.rb
717
753
  - spec/dummy/db/migrate/20130103123235_devise_create_users.rb
718
754
  - spec/dummy/db/schema.rb
719
755
  - spec/requests/pages_spec.rb
@@ -757,6 +793,7 @@ test_files:
757
793
  - spec/spec_helper.rb
758
794
  - spec/dummy/app/controllers/application_controller.rb
759
795
  - spec/dummy/app/admin/dashboard.rb
796
+ - spec/dummy/app/views/layouts/haml.html.haml
760
797
  - spec/dummy/app/views/layouts/cms.html.erb
761
798
  - spec/dummy/app/views/layouts/application.html.erb
762
799
  - spec/dummy/app/views/layouts/_partial.html.erb
@@ -805,12 +842,16 @@ test_files:
805
842
  - spec/dummy/tmp/capybara/capybara-201301041352463545367297.html
806
843
  - spec/dummy/tmp/capybara/capybara-201301041352462005375483.html
807
844
  - spec/dummy/tmp/capybara/capybara-201301040151281386048187.html
845
+ - spec/dummy/tmp/capybara/capybara-201301101625104331710400.html
808
846
  - spec/dummy/tmp/capybara/capybara-201301040954511418542703.html
809
847
  - spec/dummy/tmp/capybara/capybara-201301041417132357034971.html
810
848
  - spec/dummy/tmp/capybara/capybara-201301040159522441835098.html
811
849
  - spec/dummy/tmp/capybara/capybara-201301032118074870597832.html
850
+ - spec/dummy/tmp/capybara/capybara-201301101625068619114008.html
812
851
  - spec/dummy/tmp/capybara/capybara-20130104015422353959105.html
813
852
  - spec/dummy/tmp/capybara/capybara-201301040152309282813931.html
853
+ - spec/dummy/tmp/capybara/capybara-201301081556598147527968.html
854
+ - spec/dummy/tmp/capybara/capybara-201301081559296090328502.html
814
855
  - spec/dummy/tmp/capybara/capybara-201301040152373722934447.html
815
856
  - spec/dummy/tmp/capybara/capybara-201301032027589597215180.html
816
857
  - spec/dummy/tmp/capybara/capybara-20130104014931374261732.html
@@ -818,10 +859,12 @@ test_files:
818
859
  - spec/dummy/tmp/capybara/capybara-201301040152222147584295.html
819
860
  - spec/dummy/tmp/capybara/capybara-201301032131032952827250.html
820
861
  - spec/dummy/tmp/capybara/capybara-201301031512251370155161.html
862
+ - spec/dummy/tmp/capybara/capybara-201301101625154735808799.html
821
863
  - spec/dummy/tmp/capybara/capybara-201301040159255570831585.html
822
864
  - spec/dummy/tmp/capybara/capybara-201301041417131187394181.html
823
865
  - spec/dummy/tmp/capybara/capybara-201301032215468728814736.html
824
866
  - spec/dummy/tmp/capybara/capybara-201301040150394365123513.html
867
+ - spec/dummy/tmp/capybara/capybara-201301101624594727125473.html
825
868
  - spec/dummy/tmp/capybara/capybara-201301040150004731622440.html
826
869
  - spec/dummy/tmp/capybara/capybara-201301041332318106214804.html
827
870
  - spec/dummy/tmp/capybara/capybara-201301032029132270486030.html
@@ -841,6 +884,7 @@ test_files:
841
884
  - spec/dummy/tmp/capybara/capybara-201301041357311120034810.html
842
885
  - spec/dummy/tmp/capybara/capybara-201301040150205672162843.html
843
886
  - spec/dummy/tmp/capybara/capybara-201301032121244184496341.html
887
+ - spec/dummy/tmp/capybara/capybara-201301081558042145012026.html
844
888
  - spec/dummy/tmp/capybara/capybara-201301040153265188680798.html
845
889
  - spec/dummy/tmp/capybara/capybara-201301032029119597215180.html
846
890
  - spec/dummy/tmp/capybara/capybara-201301032133364184496341.html
@@ -903,6 +947,7 @@ test_files:
903
947
  - spec/dummy/tmp/cache/assets/D22/680/sprockets%2Fcf818773783b496be6d1714cfec6255c
904
948
  - spec/dummy/tmp/cache/assets/C18/210/sprockets%2F2220d4c30976465067544cb53b611c96
905
949
  - spec/dummy/tmp/cache/assets/CC9/4D0/sprockets%2Fc67ec56f7a3055a2adc521104d010468
950
+ - spec/dummy/tmp/cache/assets/CB7/190/sprockets%2F136a9350fa75f3336af293952861ed6d
906
951
  - spec/dummy/tmp/cache/assets/CB7/560/sprockets%2F6b546755f89f0405c9868ab44ace0061
907
952
  - spec/dummy/tmp/cache/assets/E21/260/sprockets%2F23b6b9ebcadbe7faa065be373c3fe170
908
953
  - spec/dummy/tmp/cache/assets/E24/020/sprockets%2Ff1f0a4d3a314b6ea80e4dbffdca877e2
@@ -928,6 +973,7 @@ test_files:
928
973
  - spec/dummy/tmp/cache/assets/D6F/E60/sprockets%2Fbdf6d9753ab6f55b7b053045ef6f0d32
929
974
  - spec/dummy/tmp/cache/assets/D4A/590/sprockets%2F04a391c78c98e62f9370fdbb3d4287ae
930
975
  - spec/dummy/tmp/cache/assets/CD6/930/sprockets%2Fb62a24129369fea572b674303a7fa12f
976
+ - spec/dummy/tmp/cache/assets/D2C/2E0/sprockets%2Fa031c32e27ced12f81d4326f8b52fb23
931
977
  - spec/dummy/tmp/cache/assets/CE4/FA0/sprockets%2F7e368c6b5219ea20b7424af404a7e798
932
978
  - spec/dummy/tmp/cache/assets/D88/8B0/sprockets%2Fe8cfac368dd4073cbad83998b9482b89
933
979
  - spec/dummy/tmp/cache/assets/D88/870/sprockets%2F88a3dac647de305e483e0df7e78ef399
@@ -938,6 +984,7 @@ test_files:
938
984
  - spec/dummy/tmp/cache/assets/DDE/420/sprockets%2Ffb8b186d5bf0307f86f65fc787d2adeb
939
985
  - spec/dummy/tmp/cache/assets/CD3/840/sprockets%2F9c1434de079056a20fa5210eee2618f3
940
986
  - spec/dummy/tmp/cache/assets/CD3/3E0/sprockets%2F373fa62090ab111ae606b963e1b8c793
987
+ - spec/dummy/tmp/cache/assets/E37/3E0/sprockets%2F9e6d2d17ed6da64a2f1876d4cdfefcd1
941
988
  - spec/dummy/tmp/cache/assets/DA8/8A0/sprockets%2F667a6cf5379d3aac318f91abb4fd9d54
942
989
  - spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
943
990
  - spec/dummy/tmp/cache/assets/CDF/540/sprockets%2F832aed134af8672c16d8ee2027f01785
@@ -1058,15 +1105,17 @@ test_files:
1058
1105
  - spec/dummy/public/500.html
1059
1106
  - spec/dummy/public/favicon.ico
1060
1107
  - spec/dummy/db/snapshots/test_database.sql
1061
- - spec/dummy/db/migrate/20130103215141_create_activeadmin_selleo_cms_locales.activeadmin_selleo_cms.rb
1108
+ - spec/dummy/db/migrate/20130117150808_add_fields_to_page.activeadmin_selleo_cms.rb
1062
1109
  - spec/dummy/db/migrate/20130103123301_create_admin_notes.rb
1063
- - spec/dummy/db/migrate/20130103215140_create_activeadmin_selleo_cms_pages.activeadmin_selleo_cms.rb
1064
- - spec/dummy/db/migrate/20130103215144_create_activeadmin_selleo_cms_searches.activeadmin_selleo_cms.rb
1065
- - spec/dummy/db/migrate/20130103215145_create_translations.activeadmin_selleo_cms.rb
1110
+ - spec/dummy/db/migrate/20130117150801_create_activeadmin_selleo_cms_locales.activeadmin_selleo_cms.rb
1111
+ - spec/dummy/db/migrate/20130117150800_create_activeadmin_selleo_cms_pages.activeadmin_selleo_cms.rb
1066
1112
  - spec/dummy/db/migrate/20130103123302_move_admin_notes_to_comments.rb
1067
- - spec/dummy/db/migrate/20130103215146_create_activeadmin_selleo_cms_assets.activeadmin_selleo_cms.rb
1068
- - spec/dummy/db/migrate/20130103215142_create_ckeditor_assets.activeadmin_selleo_cms.rb
1069
- - spec/dummy/db/migrate/20130103215143_create_activeadmin_selleo_cms_sections.activeadmin_selleo_cms.rb
1113
+ - spec/dummy/db/migrate/20130117150804_create_activeadmin_selleo_cms_searches.activeadmin_selleo_cms.rb
1114
+ - spec/dummy/db/migrate/20130117150806_create_activeadmin_selleo_cms_assets.activeadmin_selleo_cms.rb
1115
+ - spec/dummy/db/migrate/20130117150803_create_activeadmin_selleo_cms_sections.activeadmin_selleo_cms.rb
1116
+ - spec/dummy/db/migrate/20130117150802_create_ckeditor_assets.activeadmin_selleo_cms.rb
1117
+ - spec/dummy/db/migrate/20130117150807_add_redirect_to_first_sub_page.activeadmin_selleo_cms.rb
1118
+ - spec/dummy/db/migrate/20130117150805_create_translations.activeadmin_selleo_cms.rb
1070
1119
  - spec/dummy/db/migrate/20130103123235_devise_create_users.rb
1071
1120
  - spec/dummy/db/schema.rb
1072
1121
  - spec/requests/pages_spec.rb