activeadmin_cms 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG +3 -0
- data/app/admin/manage_pages.rb +4 -1
- data/app/assets/javascripts/activeadmin_cms/editor/ace.js +31 -12
- data/app/assets/javascripts/activeadmin_cms/helpers/assets_uploader.js +3 -1
- data/app/assets/stylesheets/activeadmin_cms/base.css +1 -22
- data/app/assets/stylesheets/activeadmin_cms/editor/ace.css.scss +13 -0
- data/app/assets/stylesheets/activeadmin_cms/partials/uploader.css.scss +72 -0
- data/app/services/activeadmin_cms/pages_service.rb +2 -0
- data/app/views/admin/pages/_form.html.slim +39 -21
- data/db/migrate/20131024214930_add_js_and_css_to_pages.rb +8 -0
- data/lib/activeadmin_cms/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +6 -2
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +16 -0
- data/test/dummy/log/test.log +109 -0
- metadata +5 -3
- data/app/assets/stylesheets/activeadmin_cms/editor/ace.css +0 -8
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjExZTBjOTk0ZmNiODRjNzU4ZWVhNWIwMzliZjU4NGM0N2FkYzMwYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzUwYmNiMDUyZjkxNzk3M2Q3MDM3YzUyZDg5ZjE5OWI2OTM5YTA1Yw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2VhZDVlNTRjZTRkNmIxOWVlMjExNzQyYzVkNzI2Yzg5Y2I3ZTE4NDQzYzk0
|
10
|
+
MDg3Y2JhYWIzNGUxZjM5MWRiNDZmNWI0YzdkNGYxYzkxZTc2NTZjZTFkZTdl
|
11
|
+
MjdhZjZmOTk2MzRiNmJiNDM1M2NkOWQwZGJkZDVkMzQ5MzNmNWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGI3YTMwYzE4NGVjZmNhYmFmN2VhNGQ2N2ZjYmM3MTQzMjNiYjlkYzhjNGFm
|
14
|
+
ODJjOTczZGViOWQwMTc3ZTRmYTUxODYxMDZhMTI0ZDNhNDI5MDY1MTBiM2Qx
|
15
|
+
Yzg5MDYyN2NlMGIxMjU3ZjQ1NGY2NDJhNmI4NjdmMjA5OGFmM2M=
|
data/CHANGELOG
CHANGED
data/app/admin/manage_pages.rb
CHANGED
@@ -71,7 +71,10 @@ ActiveAdmin.register ActiveadminCms::Page, as: 'Page' do
|
|
71
71
|
|
72
72
|
controller do
|
73
73
|
def permitted_params
|
74
|
-
params.permit page: [
|
74
|
+
params.permit page: [
|
75
|
+
:draft_content, :draft_js_content, :draft_css_content,
|
76
|
+
:title, :category, :asset_ids, :slug
|
77
|
+
]
|
75
78
|
end
|
76
79
|
end
|
77
80
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
//= require ace/ace
|
2
|
-
//= require ace/theme-
|
2
|
+
//= require ace/theme-chrome.js
|
3
3
|
//= require ace/mode-html.js
|
4
4
|
//= require_self
|
5
5
|
|
@@ -7,21 +7,40 @@ if (!window.EditorWrapper) {
|
|
7
7
|
window.EditorWrapper = {}
|
8
8
|
}
|
9
9
|
|
10
|
+
var addEditor = function (id, content_id, lang) {
|
11
|
+
var $content = $('#' + content_id)
|
12
|
+
$content.hide()
|
13
|
+
var editor = ace.edit(id)
|
14
|
+
var session = editor.getSession()
|
15
|
+
editor.setTheme("ace/theme/chrome");
|
16
|
+
editor.setFontSize("16px");
|
17
|
+
session.setMode("ace/mode/" + lang);
|
18
|
+
session.setUseWrapMode(true);
|
19
|
+
session.setTabSize(2);
|
20
|
+
editor.on('change', function (e) {
|
21
|
+
$content.val(editor.getValue())
|
22
|
+
})
|
23
|
+
editor.setValue($content.val())
|
24
|
+
return editor;
|
25
|
+
}
|
26
|
+
|
10
27
|
$(function (){
|
11
|
-
if ($('#editor').length) {
|
12
|
-
var $content = $('#page_draft_content')
|
13
|
-
$content.hide()
|
14
|
-
var editor = ace.edit("editor")
|
15
|
-
editor.setTheme("ace/theme/tomorrow");
|
16
|
-
editor.getSession().setMode("ace/mode/html");
|
17
|
-
editor.getSession().setUseWrapMode(true);
|
18
|
-
editor.setFontSize("16px");
|
19
|
-
editor.on('change', function (e) {
|
20
|
-
$content.val(editor.getValue())
|
21
|
-
})
|
22
28
|
|
29
|
+
// html editor
|
30
|
+
if ($('#html-editor').length) {
|
31
|
+
var editor = addEditor("html-editor", "page_draft_content", "html")
|
23
32
|
window.EditorWrapper.insert = function (data) {
|
24
33
|
editor.insert(data);
|
25
34
|
}
|
26
35
|
}
|
36
|
+
|
37
|
+
// css editor
|
38
|
+
if ($('#css-editor').length) {
|
39
|
+
addEditor("css-editor", "page_draft_css_content", "css")
|
40
|
+
}
|
41
|
+
|
42
|
+
// js editor
|
43
|
+
if ($('#js-editor').length) {
|
44
|
+
addEditor("js-editor", "page_draft_js_content", "javascript")
|
45
|
+
}
|
27
46
|
})
|
@@ -40,8 +40,10 @@ $(function () {
|
|
40
40
|
var assetIds = getAssetIds()
|
41
41
|
assetIds.splice( assetIds.indexOf($el.data('id')), 1 );
|
42
42
|
setAssetIds(assetIds)
|
43
|
+
return false;
|
43
44
|
})
|
44
45
|
$(document).on('click', '#uploader-images .asset', function () {
|
45
|
-
EditorWrapper.insert($(this).data('url'))
|
46
|
+
EditorWrapper.insert($(this).data('url'));
|
47
|
+
return false;
|
46
48
|
})
|
47
49
|
})
|
@@ -1,23 +1,2 @@
|
|
1
1
|
//= require activeadmin_cms/editor/ace
|
2
|
-
|
3
|
-
#active_admin_content #assets-container {
|
4
|
-
padding: 10px;
|
5
|
-
}
|
6
|
-
|
7
|
-
#active_admin_content #assets-container #uploader-images li {
|
8
|
-
display: inline-block;
|
9
|
-
width: 100px;
|
10
|
-
height: 100px;
|
11
|
-
position: relative;
|
12
|
-
cursor: pointer;
|
13
|
-
}
|
14
|
-
|
15
|
-
#active_admin_content #assets-container #uploader-images li .delete {
|
16
|
-
position: absolute;
|
17
|
-
top: 5px;
|
18
|
-
right: 5px;
|
19
|
-
cursor: pointer;
|
20
|
-
background: #fff;
|
21
|
-
font-size: 16px;
|
22
|
-
padding: 2px 6px;
|
23
|
-
}
|
2
|
+
//= require activeadmin_cms/partials/uploader
|
@@ -0,0 +1,72 @@
|
|
1
|
+
#activeadmin-cms-page {
|
2
|
+
span.editor-label {
|
3
|
+
text-align: center;
|
4
|
+
width: 100%;
|
5
|
+
display: block;
|
6
|
+
font-weight: bold;
|
7
|
+
}
|
8
|
+
#page_slug_input {
|
9
|
+
abbr { display: none; }
|
10
|
+
label { margin-top: 8px; }
|
11
|
+
input { width: 78%; box-sizing: border-box; }
|
12
|
+
}
|
13
|
+
#page_title_input, #page_category_input, #page_slug_input {
|
14
|
+
padding: 5px 10px;
|
15
|
+
label {
|
16
|
+
text-align: right;
|
17
|
+
margin-right: 2%;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
#page_draft_content_input,
|
22
|
+
#page_draft_css_content_input,
|
23
|
+
#page_draft_js_content_input {
|
24
|
+
display: none;
|
25
|
+
}
|
26
|
+
|
27
|
+
#assets-container {
|
28
|
+
padding: 10px;
|
29
|
+
margin-left: 50px;
|
30
|
+
|
31
|
+
#uploader-images li {
|
32
|
+
display: inline-block;
|
33
|
+
width: 100px;
|
34
|
+
height: 100px;
|
35
|
+
position: relative;
|
36
|
+
cursor: pointer;
|
37
|
+
margin-right: 5px;
|
38
|
+
|
39
|
+
.delete {
|
40
|
+
position: absolute;
|
41
|
+
top: 5px;
|
42
|
+
right: 5px;
|
43
|
+
cursor: pointer;
|
44
|
+
background: #fff;
|
45
|
+
font-size: 16px;
|
46
|
+
padding: 2px 6px;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
#uploader {
|
52
|
+
position: relative;
|
53
|
+
width: 100%;
|
54
|
+
padding: 20px 0;
|
55
|
+
text-align: center;
|
56
|
+
|
57
|
+
.button {
|
58
|
+
margin-top: 10px;
|
59
|
+
}
|
60
|
+
|
61
|
+
input {
|
62
|
+
position: absolute;
|
63
|
+
top: 50px;
|
64
|
+
left: 50%;
|
65
|
+
width: 164px;
|
66
|
+
margin-left: -82px;
|
67
|
+
opacity: 0;
|
68
|
+
height: 42px;
|
69
|
+
cursor: pointer;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
@@ -1,26 +1,44 @@
|
|
1
1
|
- config = ActiveadminCms::Engine.config
|
2
|
-
|
3
|
-
=
|
4
|
-
= f.
|
5
|
-
|
2
|
+
#activeadmin-cms-page
|
3
|
+
= semantic_form_for [:admin, @page] do |f|
|
4
|
+
= f.inputs do
|
5
|
+
= f.input :title, placeholder: 'Page title'
|
6
|
+
= f.input :slug, label: "http://#{request.host}/"
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
- if config.page_categories.any?
|
9
|
+
= f.input :category, collection: config.page_categories, include_blank: false
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
= f.input :draft_content, label: false
|
12
|
+
li#html-editor-container.editor-container
|
13
|
+
- if config.page_editor_backend = 'ace_editor'
|
14
|
+
#html-editor.editor
|
14
15
|
|
15
|
-
|
16
|
-
li#assets-container
|
17
|
-
ul#uploader-images
|
18
|
-
- @page.assets.each do |asset|
|
19
|
-
li.asset data-id=(asset.id) data-url=(asset.image_url)
|
20
|
-
span.delete x
|
21
|
-
= image_tag asset.image_thumb_url, width: 100, height: 100
|
22
|
-
input#uploader-file type="file"
|
16
|
+
= f.input :asset_ids, as: :hidden
|
23
17
|
#uploader
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
.description
|
19
|
+
' Drag & drop asset here or
|
20
|
+
br
|
21
|
+
= link_to 'choose from computer', '#', class: 'button'
|
22
|
+
input#uploader-file type="file"
|
23
|
+
li#assets-container
|
24
|
+
ul#uploader-images
|
25
|
+
- @page.assets.each do |asset|
|
26
|
+
li.asset data-id=(asset.id) data-url=(asset.image_url)
|
27
|
+
span.delete x
|
28
|
+
= image_tag asset.image_thumb_url, width: 100, height: 100
|
29
|
+
|
30
|
+
span.editor-label CSS Editor
|
31
|
+
= f.input :draft_css_content, label: false
|
32
|
+
li#css-editor-container.editor-container
|
33
|
+
- if config.page_editor_backend = 'ace_editor'
|
34
|
+
#css-editor.editor
|
35
|
+
|
36
|
+
span.editor-label JS Editor
|
37
|
+
= f.input :draft_js_content, label: false
|
38
|
+
li#js-editor-container.editor-container
|
39
|
+
- if config.page_editor_backend = 'ace_editor'
|
40
|
+
#js-editor.editor
|
41
|
+
|
42
|
+
= f.actions
|
43
|
+
= f.submit('Save')
|
44
|
+
= f.submit('Save & Publish')
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class AddJsAndCssToPages < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_column :activeadmin_cms_pages, :js_content, :text
|
4
|
+
add_column :activeadmin_cms_pages, :css_content, :text
|
5
|
+
add_column :activeadmin_cms_pages, :draft_js_content, :text
|
6
|
+
add_column :activeadmin_cms_pages, :draft_css_content, :text
|
7
|
+
end
|
8
|
+
end
|
Binary file
|
data/test/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20131024214930) do
|
15
15
|
|
16
16
|
create_table "activeadmin_cms_assets", force: true do |t|
|
17
17
|
t.integer "content_id"
|
@@ -31,10 +31,14 @@ ActiveRecord::Schema.define(version: 20131020224503) do
|
|
31
31
|
t.string "category"
|
32
32
|
t.text "content"
|
33
33
|
t.text "draft_content"
|
34
|
-
t.boolean "published",
|
34
|
+
t.boolean "published", default: false
|
35
35
|
t.datetime "created_at"
|
36
36
|
t.datetime "updated_at"
|
37
37
|
t.string "slug"
|
38
|
+
t.text "js_content"
|
39
|
+
t.text "css_content"
|
40
|
+
t.text "draft_js_content"
|
41
|
+
t.text "draft_css_content"
|
38
42
|
end
|
39
43
|
|
40
44
|
add_index "activeadmin_cms_pages", ["category"], name: "index_activeadmin_cms_pages_on_category"
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -68,3 +68,19 @@ Migrating to CreateActiveadminCmsAssets (20131020224503)
|
|
68
68
|
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20131020224503"]]
|
69
69
|
[1m[35m (1.0ms)[0m commit transaction
|
70
70
|
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
71
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
72
|
+
Migrating to AddJsAndCssToPages (20131024214930)
|
73
|
+
[1m[35m (0.1ms)[0m begin transaction
|
74
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "pages" ADD "js_content" text[0m
|
75
|
+
SQLite3::SQLException: no such table: pages: ALTER TABLE "pages" ADD "js_content" text
|
76
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
77
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
78
|
+
Migrating to AddJsAndCssToPages (20131024214930)
|
79
|
+
[1m[35m (0.1ms)[0m begin transaction
|
80
|
+
[1m[36m (0.5ms)[0m [1mALTER TABLE "activeadmin_cms_pages" ADD "js_content" text[0m
|
81
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "activeadmin_cms_pages" ADD "css_content" text
|
82
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "activeadmin_cms_pages" ADD "draft_js_content" text[0m
|
83
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "activeadmin_cms_pages" ADD "draft_css_content" text
|
84
|
+
[1m[36mSQL (21.5ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20131024214930"]]
|
85
|
+
[1m[35m (0.9ms)[0m commit transaction
|
86
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
data/test/dummy/log/test.log
CHANGED
@@ -858,3 +858,112 @@ ActiveadminCmsTest: test_truth
|
|
858
858
|
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
859
859
|
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
860
860
|
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
861
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
862
|
+
-----------------------------------------------------
|
863
|
+
#publish: test_0001_should change status to published
|
864
|
+
-----------------------------------------------------
|
865
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
866
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
867
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
868
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
869
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
870
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
871
|
+
-----------------------------------------------------
|
872
|
+
#publish: test_0001_should change status to published
|
873
|
+
-----------------------------------------------------
|
874
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
875
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
876
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
877
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
878
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
879
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
880
|
+
--------------------------------------------------
|
881
|
+
#publish: test_0002_should move content from draft
|
882
|
+
--------------------------------------------------
|
883
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
884
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
885
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
886
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
887
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
888
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
889
|
+
------------------------------
|
890
|
+
ActiveadminCmsTest: test_truth
|
891
|
+
------------------------------
|
892
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
893
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
894
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
895
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
896
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
897
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "activeadmin_cms_assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content_id" integer, "content_type" varchar(255), "image_file_name" varchar(255), "image_content_type" varchar(255), "image_file_size" integer, "image_updated_at" datetime, "created_at" datetime, "updated_at" datetime) [0m
|
898
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_activeadmin_cms_assets_on_content_type_and_content_id" ON "activeadmin_cms_assets" ("content_type", "content_id")
|
899
|
+
[1m[36m (1.4ms)[0m [1mCREATE TABLE "activeadmin_cms_pages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "category" varchar(255), "content" text, "draft_content" text, "published" boolean DEFAULT 'f', "created_at" datetime, "updated_at" datetime, "slug" varchar(255), "js_content" text, "css_content" text, "draft_js_content" text, "draft_css_content" text) [0m
|
900
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_activeadmin_cms_pages_on_category" ON "activeadmin_cms_pages" ("category")
|
901
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_activeadmin_cms_pages_on_slug" ON "activeadmin_cms_pages" ("slug")[0m
|
902
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "activeadmin_cms_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "content" text, "published" boolean DEFAULT 'f', "created_at" datetime, "updated_at" datetime)
|
903
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
904
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
905
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
906
|
+
[1m[35m (1.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131024214930')
|
907
|
+
[1m[36m (1.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131020140024')[0m
|
908
|
+
[1m[35m (1.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131020152912')
|
909
|
+
[1m[36m (1.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131020181730')[0m
|
910
|
+
[1m[35m (1.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131020224503')
|
911
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
912
|
+
[1m[36m (1.3ms)[0m [1mDELETE FROM "activeadmin_cms_assets";[0m
|
913
|
+
[1m[35m (0.1ms)[0m SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
|
914
|
+
[1m[36m (0.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'activeadmin_cms_assets';[0m
|
915
|
+
[1m[35m (5.8ms)[0m DELETE FROM "activeadmin_cms_pages";
|
916
|
+
[1m[36m (0.1ms)[0m [1mSELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';[0m
|
917
|
+
[1m[35m (0.1ms)[0m DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
|
918
|
+
[1m[36m (1.3ms)[0m [1mDELETE FROM "activeadmin_cms_posts";[0m
|
919
|
+
[1m[35m (0.2ms)[0m SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
|
920
|
+
[1m[36m (0.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';[0m
|
921
|
+
[1m[35m (0.1ms)[0m begin transaction
|
922
|
+
-----------------------------------------------------
|
923
|
+
#publish: test_0001_should change status to published
|
924
|
+
-----------------------------------------------------
|
925
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
926
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
927
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
928
|
+
[1m[35mSQL (30.5ms)[0m INSERT INTO "activeadmin_cms_posts" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00], ["title", "Foo post"], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
|
929
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "activeadmin_cms_posts" SET "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_posts"."id" = 1[0m [["published", true], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
|
930
|
+
[1m[35mActiveadminCms::Post Load (0.1ms)[0m SELECT "activeadmin_cms_posts".* FROM "activeadmin_cms_posts" WHERE "activeadmin_cms_posts"."id" = ? LIMIT 1 [["id", 1]]
|
931
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
932
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
933
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
934
|
+
-----------------------------------------------------
|
935
|
+
#publish: test_0001_should change status to published
|
936
|
+
-----------------------------------------------------
|
937
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
938
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
939
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
940
|
+
[1m[36mActiveadminCms::Page Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."slug" = 'slug-1' LIMIT 1[0m
|
941
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "slug", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "Foo content"], ["created_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00], ["slug", "slug-1"], ["title", "Foo page"], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
|
942
|
+
[1m[36mActiveadminCms::Page Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "activeadmin_cms_pages" WHERE ("activeadmin_cms_pages"."slug" = 'slug-1' AND "activeadmin_cms_pages"."id" != 1) LIMIT 1[0m
|
943
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
|
944
|
+
[1m[36mActiveadminCms::Page Load (0.1ms)[0m [1mSELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1[0m [["id", 1]]
|
945
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
946
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
947
|
+
[1m[35m (0.0ms)[0m begin transaction
|
948
|
+
--------------------------------------------------
|
949
|
+
#publish: test_0002_should move content from draft
|
950
|
+
--------------------------------------------------
|
951
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
952
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
953
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
954
|
+
[1m[35mActiveadminCms::Page Exists (0.1ms)[0m SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."slug" = 'slug-2' LIMIT 1
|
955
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "activeadmin_cms_pages" ("content", "created_at", "slug", "title", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["content", "Foo content"], ["created_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00], ["slug", "slug-2"], ["title", "Foo page"], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
|
956
|
+
[1m[35mActiveadminCms::Page Exists (0.1ms)[0m SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE ("activeadmin_cms_pages"."slug" = 'slug-2' AND "activeadmin_cms_pages"."id" != 1) LIMIT 1
|
957
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "activeadmin_cms_pages" SET "draft_content" = ?, "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1[0m [["draft_content", "new content"], ["content", "new content"], ["published", true], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
|
958
|
+
[1m[35mActiveadminCms::Page Load (0.0ms)[0m SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
|
959
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
960
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
961
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
962
|
+
------------------------------
|
963
|
+
ActiveadminCmsTest: test_truth
|
964
|
+
------------------------------
|
965
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
966
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
967
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
968
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
969
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Iskander Haziev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -219,7 +219,8 @@ files:
|
|
219
219
|
- app/assets/javascripts/activeadmin_cms/editor/ace.js
|
220
220
|
- app/assets/javascripts/activeadmin_cms/helpers/assets_uploader.js
|
221
221
|
- app/assets/stylesheets/activeadmin_cms/base.css
|
222
|
-
- app/assets/stylesheets/activeadmin_cms/editor/ace.css
|
222
|
+
- app/assets/stylesheets/activeadmin_cms/editor/ace.css.scss
|
223
|
+
- app/assets/stylesheets/activeadmin_cms/partials/uploader.css.scss
|
223
224
|
- app/controllers/activeadmin_cms/application_controller.rb
|
224
225
|
- app/controllers/activeadmin_cms/assets_controller.rb
|
225
226
|
- app/models/activeadmin_cms/asset.rb
|
@@ -240,6 +241,7 @@ files:
|
|
240
241
|
- db/migrate/20131020152912_create_activeadmin_cms_pages.rb
|
241
242
|
- db/migrate/20131020181730_add_slug_to_activeadmin_cms_pages.rb
|
242
243
|
- db/migrate/20131020224503_create_activeadmin_cms_assets.rb
|
244
|
+
- db/migrate/20131024214930_add_js_and_css_to_pages.rb
|
243
245
|
- lib/activeadmin_cms/engine.rb
|
244
246
|
- lib/activeadmin_cms/version.rb
|
245
247
|
- lib/activeadmin_cms.rb
|