sunrise-cms 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +6 -0
- data/README.md +1 -1
- data/app/assets/javascripts/sunrise/manage.js.coffee +13 -1
- data/app/controllers/sunrise/application_controller.rb +2 -0
- data/app/controllers/sunrise/dashboard_controller.rb +4 -3
- data/app/helpers/sunrise/dashboard_helper.rb +36 -0
- data/app/views/sunrise/dashboard/_activity.html.erb +16 -0
- data/app/views/sunrise/dashboard/index.html.erb +32 -32
- data/config/locales/sunrise/en.yml +10 -2
- data/config/locales/sunrise/ru.yml +10 -6
- data/config/locales/sunrise/uk.yml +10 -6
- data/db/migrate/20111216144915_create_structures.rb +4 -3
- data/lib/generators/sunrise/templates/config/nginx-config +1 -1
- data/lib/generators/sunrise/templates/config/seeds.rb +2 -3
- data/lib/generators/sunrise/templates/config/sunrise.rb +43 -10
- data/lib/generators/sunrise/templates/models/active_record/asset.rb +1 -1
- data/lib/generators/sunrise/templates/models/active_record/settings.rb +3 -0
- data/lib/generators/sunrise/templates/models/active_record/structure.rb +2 -1
- data/lib/generators/sunrise/templates/models/active_record/user.rb +2 -1
- data/lib/generators/sunrise/templates/models/mongoid/asset.rb +2 -1
- data/lib/generators/sunrise/templates/models/mongoid/settings.rb +3 -0
- data/lib/generators/sunrise/templates/models/mongoid/structure.rb +2 -2
- data/lib/generators/sunrise/templates/models/mongoid/user.rb +2 -2
- data/lib/generators/sunrise/templates/models/sunrise/sunrise_structure.rb +2 -2
- data/lib/sunrise/config.rb +2 -10
- data/lib/sunrise/models/ability.rb +1 -1
- data/lib/sunrise/models/structure.rb +6 -5
- data/lib/sunrise/utils.rb +3 -3
- data/lib/sunrise/version.rb +1 -1
- data/spec/controllers/sunrise/dashboard_controller_spec.rb +4 -2
- data/spec/controllers/sunrise/manager_controller_spec.rb +1 -1
- data/spec/dummy/app/helpers/application_helper.rb +10 -0
- data/spec/dummy/app/models/active_record/post.rb +4 -0
- data/spec/dummy/app/models/mongoid/post.rb +2 -2
- data/spec/dummy/app/views/public_activity/post/_create.html.erb +5 -0
- data/spec/dummy/app/views/public_activity/post/_destroy.html.erb +5 -0
- data/spec/dummy/app/views/public_activity/post/_update.html.erb +5 -0
- data/spec/dummy/config/routes.rb +1 -0
- data/spec/dummy/db/migrate/20130214090723_create_activities.rb +23 -0
- data/spec/dummy/log/development.log +1 -0
- data/spec/dummy/log/test.log +30059 -0
- data/spec/models/structure_spec.rb +1 -1
- data/spec/orm/active_record.rb +0 -3
- data/spec/orm/mongoid.rb +12 -1
- data/spec/requests/dashboard_spec.rb +5 -2
- data/spec/requests/manager/default/create_spec.rb +2 -2
- data/spec/requests/manager/default/edit_spec.rb +2 -2
- data/spec/requests/manager/default/new_spec.rb +1 -1
- data/spec/requests/manager/default/update_spec.rb +2 -2
- data/vendor/assets/images/gravatar-140.png +0 -0
- data/vendor/assets/images/sunrise/audit/{action.png → key.png} +0 -0
- data/vendor/assets/images/sunrise/audit/{user.png → owner.png} +0 -0
- data/vendor/assets/images/sunrise/audit/{auditable.png → trackable.png} +0 -0
- data/vendor/assets/images/sunrise/icons/commented.svg +8 -0
- data/vendor/assets/images/sunrise/icons/create.svg +3 -0
- data/vendor/assets/images/sunrise/icons/destroy.svg +7 -0
- data/vendor/assets/images/sunrise/icons/update.svg +10 -0
- metadata +39 -79
- data/app/views/sunrise/dashboard/_event.html.erb +0 -15
- data/lib/generators/sunrise/templates/models/mongoid/history_tracker.rb +0 -31
- data/spec/factories/audit_factory.rb +0 -24
- data/spec/tmp/app/models/defaults/ability.rb +0 -18
- data/spec/tmp/app/models/defaults/asset.rb +0 -7
- data/spec/tmp/app/models/defaults/attachment_file.rb +0 -5
- data/spec/tmp/app/models/defaults/avatar.rb +0 -7
- data/spec/tmp/app/models/defaults/picture.rb +0 -7
- data/spec/tmp/app/models/defaults/position_type.rb +0 -7
- data/spec/tmp/app/models/defaults/role_type.rb +0 -8
- data/spec/tmp/app/models/defaults/settings.rb +0 -3
- data/spec/tmp/app/models/defaults/structure.rb +0 -9
- data/spec/tmp/app/models/defaults/structure_type.rb +0 -9
- data/spec/tmp/app/models/defaults/user.rb +0 -13
- data/spec/tmp/app/models/sunrise/sunrise_navigation.rb +0 -14
- data/spec/tmp/app/models/sunrise/sunrise_page.rb +0 -10
- data/spec/tmp/app/models/sunrise/sunrise_structure.rb +0 -35
- data/spec/tmp/app/models/sunrise/sunrise_user.rb +0 -50
- data/spec/tmp/app/uploaders/attachment_file_uploader.rb +0 -5
- data/spec/tmp/app/uploaders/avatar_uploader.rb +0 -15
- data/spec/tmp/app/uploaders/picture_uploader.rb +0 -15
- data/spec/tmp/app/views/layouts/application.html.erb +0 -22
- data/spec/tmp/app/views/pages/show.html.erb +0 -2
- data/spec/tmp/app/views/shared/_notice.html.erb +0 -17
- data/spec/tmp/config/application.rb +0 -63
- data/spec/tmp/config/database.yml.sample +0 -34
- data/spec/tmp/config/initializers/sunrise.rb +0 -18
- data/spec/tmp/config/logrotate-config.sample +0 -9
- data/spec/tmp/config/nginx-config.sample +0 -99
- data/spec/tmp/config/routes.rb +0 -9
- data/spec/tmp/db/seeds.rb +0 -31
- data/spec/tmp/spec/controllers/pages_controller_spec.rb +0 -22
- data/spec/tmp/spec/controllers/welcome_controller_spec.rb +0 -18
- data/spec/tmp/spec/factories/structure_factory.rb +0 -22
- data/spec/tmp/spec/factories/user_factory.rb +0 -61
- data/spec/tmp/spec/spec_helper.rb +0 -37
- data/spec/tmp/spec/support/helpers/controller_macros.rb +0 -52
data/spec/orm/active_record.rb
CHANGED
@@ -3,6 +3,3 @@ require 'active_record'
|
|
3
3
|
|
4
4
|
ActiveRecord::Migrator.migrate File.expand_path("../../dummy/db/migrate/", __FILE__)
|
5
5
|
ActiveRecord::Migrator.migrate File.expand_path("../../../db/migrate/", __FILE__)
|
6
|
-
|
7
|
-
require "audited-activerecord"
|
8
|
-
Audited.audit_class = Audited::Adapters::ActiveRecord::Audit
|
data/spec/orm/mongoid.rb
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
-
require
|
1
|
+
require "mongoid"
|
2
2
|
require "database_cleaner"
|
3
|
+
require "public_activity"
|
3
4
|
|
4
5
|
DatabaseCleaner[:mongoid].strategy = :truncation
|
6
|
+
|
7
|
+
PublicActivity::Config.set do
|
8
|
+
orm :mongoid
|
9
|
+
end
|
10
|
+
|
11
|
+
# Hook for rspec-rails
|
12
|
+
module ActiveRecord
|
13
|
+
module TestFixtures
|
14
|
+
end
|
15
|
+
end
|
@@ -4,7 +4,10 @@ describe "Sunrise Manager Dashboard" do
|
|
4
4
|
subject { page }
|
5
5
|
before(:all) do
|
6
6
|
@admin = FactoryGirl.create(:admin_user, :email => "#{Time.now.to_i}@gmail.com")
|
7
|
-
|
7
|
+
|
8
|
+
@post = FactoryGirl.create(:post)
|
9
|
+
@user = FactoryGirl.create(:redactor_user)
|
10
|
+
@event = @post.create_activity :key => 'post.create', :owner => @user
|
8
11
|
end
|
9
12
|
|
10
13
|
context "admin" do
|
@@ -20,7 +23,7 @@ describe "Sunrise Manager Dashboard" do
|
|
20
23
|
end
|
21
24
|
|
22
25
|
it "should render records" do
|
23
|
-
dom_id = ["
|
26
|
+
dom_id = ["activity", @event.id].join('_')
|
24
27
|
should have_selector("#" + dom_id)
|
25
28
|
end
|
26
29
|
end
|
@@ -12,8 +12,8 @@ describe "Sunrise Manager New" do
|
|
12
12
|
visit new_path(:model_name => "structures")
|
13
13
|
|
14
14
|
fill_in "structure[title]", :with => "Good day"
|
15
|
-
select(StructureType.page.title, :from => "structure[
|
16
|
-
select(PositionType.menu.title, :from => "structure[
|
15
|
+
select(StructureType.page.title, :from => "structure[structure_type_id]")
|
16
|
+
select(PositionType.menu.title, :from => "structure[position_type_id]")
|
17
17
|
check('structure[is_visible]')
|
18
18
|
|
19
19
|
click_button "submit-button-hidden"
|
@@ -38,8 +38,8 @@ describe "Sunrise Manager Edit" do
|
|
38
38
|
should have_selector "input[@name='structure[redirect_url]']"
|
39
39
|
should have_selector "input[@name='structure[slug]']"
|
40
40
|
should have_selector "#structure_parent_id"
|
41
|
-
should have_selector "#
|
42
|
-
should have_selector "#
|
41
|
+
should have_selector "#structure_structure_type_id"
|
42
|
+
should have_selector "#structure_position_type_id"
|
43
43
|
should have_selector "input[@name='structure[is_visible]']"
|
44
44
|
end
|
45
45
|
end
|
@@ -26,7 +26,7 @@ describe "Sunrise Manager New" do
|
|
26
26
|
|
27
27
|
it "should generate field to edit" do
|
28
28
|
SunriseStructure.config.edit.fields.each do |f|
|
29
|
-
if ['
|
29
|
+
if ['structure_type_id', 'parent_id', 'position_type_id'].include?(f.name)
|
30
30
|
should have_selector "select[@name='structure[#{f.name}]']"
|
31
31
|
else
|
32
32
|
should have_selector "input[@name='structure[#{f.name}]']"
|
@@ -19,8 +19,8 @@ describe "Sunrise Manager Edit" do
|
|
19
19
|
#save_and_open_page
|
20
20
|
|
21
21
|
fill_in "structure[title]", :with => "Title updated"
|
22
|
-
select(StructureType.posts.title, :from => "
|
23
|
-
select(PositionType.default.title, :from => "
|
22
|
+
select(StructureType.posts.title, :from => "structure_structure_type_id")
|
23
|
+
select(PositionType.default.title, :from => "structure_position_type_id")
|
24
24
|
uncheck('structure[is_visible]')
|
25
25
|
|
26
26
|
click_button "submit-button-hidden"
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
|
2
|
+
<g id="Layer_1" display="none">
|
3
|
+
<path display="inline" d="M66.015,81.127L53.93,63H16V18h68v45H69.64L66.015,81.127z M20,59h36.07l7.915,11.873L66.36,59H80V22H20 V59z"/>
|
4
|
+
</g>
|
5
|
+
<g id="Layer_2">
|
6
|
+
<path fill="#BBB" d="M72,18H28c-6.627,0-12,5.373-12,12v21c0,6.627,5.373,12,12,12h26.025l10.843,16.407L68.357,63H72c6.627,0,12-5.373,12-12 V30C84,23.373,78.627,18,72,18z"/>
|
7
|
+
</g>
|
8
|
+
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
|
2
|
+
<polygon style="fill:#BBB;" points="100,37.5 62.5,37.5 62.5,0 37.5,0 37.5,37.5 0,37.5 0,62.5 37.5,62.5 37.5,100 62.5,100 62.5,62.5 100,62.5 "/>
|
3
|
+
</svg>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
|
2
|
+
<g id="Captions">
|
3
|
+
</g>
|
4
|
+
<g id="Your_Icon">
|
5
|
+
<path style="fill:#BBB;" d="M74.977,19.731H57.126c0.016-0.155,0.023-0.313,0.023-0.472c0-2.602-2.109-4.712-4.713-4.712h-4.872 c-2.602,0-4.712,2.11-4.712,4.712c0,0.159,0.008,0.317,0.023,0.472H25.023c-2.603,0-4.712,2.11-4.712,4.712 s2.109,4.711,4.712,4.711h0.591v52.013c0,2.405,1.802,4.384,4.127,4.673C30.124,85.94,30.522,86,30.937,86h38.127 c0.413,0,0.811-0.06,1.191-0.158c2.328-0.287,4.133-2.268,4.133-4.674V29.155h0.589c2.602,0,4.712-2.109,4.712-4.711 S77.578,19.731,74.977,19.731z M53.636,76.575h-7.54v-47.42h7.54V76.575z M41.384,29.155v47.42h-6.345v-47.42H41.384z M64.963,76.575h-6.615v-47.42h6.615V76.575z"/>
|
6
|
+
</g>
|
7
|
+
</svg>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
4
|
+
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
+
width="100px" height="100px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
|
6
|
+
<path fill="#BBB" d="M4.744,4.743c-6.325,6.325-6.325,16.578,0,22.903L27.646,4.743C21.322-1.582,11.068-1.582,4.744,4.743z"/>
|
7
|
+
<path fill="#BBB" d="M60.893,83.794L100,100L83.795,60.893l-49.881-49.88L11.012,33.914L60.893,83.794z M66.105,73.646
|
8
|
+
c2.082-2.084,6.023-1.517,6.893-0.647c-0.868-0.868-1.436-4.812,0.646-6.894s6.242-2.822,6.242-2.822l9.312,22.47l-3.446,3.446
|
9
|
+
l-22.47-9.311C63.282,79.889,64.023,75.729,66.105,73.646z"/>
|
10
|
+
</svg>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunrise-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -268,6 +268,22 @@ dependencies:
|
|
268
268
|
- - ! '>='
|
269
269
|
- !ruby/object:Gem::Version
|
270
270
|
version: '0'
|
271
|
+
- !ruby/object:Gem::Dependency
|
272
|
+
name: public_activity
|
273
|
+
requirement: !ruby/object:Gem::Requirement
|
274
|
+
none: false
|
275
|
+
requirements:
|
276
|
+
- - ! '>='
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 1.0.0
|
279
|
+
type: :runtime
|
280
|
+
prerelease: false
|
281
|
+
version_requirements: !ruby/object:Gem::Requirement
|
282
|
+
none: false
|
283
|
+
requirements:
|
284
|
+
- - ! '>='
|
285
|
+
- !ruby/object:Gem::Version
|
286
|
+
version: 1.0.0
|
271
287
|
- !ruby/object:Gem::Dependency
|
272
288
|
name: rspec-rails
|
273
289
|
requirement: !ruby/object:Gem::Requirement
|
@@ -339,7 +355,7 @@ dependencies:
|
|
339
355
|
requirements:
|
340
356
|
- - ~>
|
341
357
|
- !ruby/object:Gem::Version
|
342
|
-
version: 4.
|
358
|
+
version: 4.2.0
|
343
359
|
type: :development
|
344
360
|
prerelease: false
|
345
361
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -347,7 +363,7 @@ dependencies:
|
|
347
363
|
requirements:
|
348
364
|
- - ~>
|
349
365
|
- !ruby/object:Gem::Version
|
350
|
-
version: 4.
|
366
|
+
version: 4.2.0
|
351
367
|
- !ruby/object:Gem::Dependency
|
352
368
|
name: capybara
|
353
369
|
requirement: !ruby/object:Gem::Requirement
|
@@ -375,7 +391,7 @@ files:
|
|
375
391
|
- app/views/layouts/sunrise/application.html.erb
|
376
392
|
- app/views/sunrise/dashboard/_header.html.erb
|
377
393
|
- app/views/sunrise/dashboard/index.html.erb
|
378
|
-
- app/views/sunrise/dashboard/
|
394
|
+
- app/views/sunrise/dashboard/_activity.html.erb
|
379
395
|
- app/views/sunrise/settings/_header_edit.html.erb
|
380
396
|
- app/views/sunrise/settings/_form.html.erb
|
381
397
|
- app/views/sunrise/settings/edit.html.erb
|
@@ -432,6 +448,7 @@ files:
|
|
432
448
|
- app/assets/javascripts/sunrise/jquery.ddmenu.js.coffee
|
433
449
|
- app/helpers/sunrise/manager_helper.rb
|
434
450
|
- app/helpers/sunrise/application_helper.rb
|
451
|
+
- app/helpers/sunrise/dashboard_helper.rb
|
435
452
|
- app/helpers/sunrise/structure_helper.rb
|
436
453
|
- app/controllers/sunrise/manager_controller.rb
|
437
454
|
- app/controllers/sunrise/application_controller.rb
|
@@ -529,7 +546,6 @@ files:
|
|
529
546
|
- lib/generators/sunrise/templates/models/mongoid/role_type.rb
|
530
547
|
- lib/generators/sunrise/templates/models/mongoid/avatar.rb
|
531
548
|
- lib/generators/sunrise/templates/models/mongoid/asset.rb
|
532
|
-
- lib/generators/sunrise/templates/models/mongoid/history_tracker.rb
|
533
549
|
- lib/generators/sunrise/templates/models/mongoid/settings.rb
|
534
550
|
- lib/generators/sunrise/templates/models/mongoid/position_type.rb
|
535
551
|
- lib/generators/sunrise/templates/models/mongoid/picture.rb
|
@@ -582,6 +598,10 @@ files:
|
|
582
598
|
- vendor/assets/images/sunrise/treeview-gray-line2.gif
|
583
599
|
- vendor/assets/images/sunrise/ico_opt.jpg
|
584
600
|
- vendor/assets/images/sunrise/ico_edit.jpg
|
601
|
+
- vendor/assets/images/sunrise/icons/update.svg
|
602
|
+
- vendor/assets/images/sunrise/icons/destroy.svg
|
603
|
+
- vendor/assets/images/sunrise/icons/create.svg
|
604
|
+
- vendor/assets/images/sunrise/icons/commented.svg
|
585
605
|
- vendor/assets/images/sunrise/top_arr_down.png
|
586
606
|
- vendor/assets/images/sunrise/tab_table.png
|
587
607
|
- vendor/assets/images/sunrise/page_arr_hover.png
|
@@ -596,9 +616,9 @@ files:
|
|
596
616
|
- vendor/assets/images/sunrise/ico_del.png
|
597
617
|
- vendor/assets/images/sunrise/audit/created_at.png
|
598
618
|
- vendor/assets/images/sunrise/audit/remote_address.png
|
599
|
-
- vendor/assets/images/sunrise/audit/
|
600
|
-
- vendor/assets/images/sunrise/audit/
|
601
|
-
- vendor/assets/images/sunrise/audit/
|
619
|
+
- vendor/assets/images/sunrise/audit/trackable.png
|
620
|
+
- vendor/assets/images/sunrise/audit/key.png
|
621
|
+
- vendor/assets/images/sunrise/audit/owner.png
|
602
622
|
- vendor/assets/images/sunrise/chosen-sprite.png
|
603
623
|
- vendor/assets/images/sunrise/right_but_bg.png
|
604
624
|
- vendor/assets/images/sunrise/tree_dnd1.png
|
@@ -629,6 +649,7 @@ files:
|
|
629
649
|
- vendor/assets/images/smoothness/ui-bg_flat_75_ffffff_40x100.png
|
630
650
|
- vendor/assets/images/smoothness/ui-bg_glass_75_dadada_1x400.png
|
631
651
|
- vendor/assets/images/smoothness/ui-icons_454545_256x240.png
|
652
|
+
- vendor/assets/images/gravatar-140.png
|
632
653
|
- vendor/assets/javascripts/jquery-ui-timepicker-addon.js
|
633
654
|
- vendor/assets/javascripts/jquery.tmpl.min.js
|
634
655
|
- vendor/assets/javascripts/chosen.jquery.js
|
@@ -640,40 +661,6 @@ files:
|
|
640
661
|
- Rakefile
|
641
662
|
- README.md
|
642
663
|
- CHANGELOG.rdoc
|
643
|
-
- spec/tmp/spec/support/helpers/controller_macros.rb
|
644
|
-
- spec/tmp/spec/spec_helper.rb
|
645
|
-
- spec/tmp/spec/factories/structure_factory.rb
|
646
|
-
- spec/tmp/spec/factories/user_factory.rb
|
647
|
-
- spec/tmp/spec/controllers/pages_controller_spec.rb
|
648
|
-
- spec/tmp/spec/controllers/welcome_controller_spec.rb
|
649
|
-
- spec/tmp/app/views/layouts/application.html.erb
|
650
|
-
- spec/tmp/app/views/pages/show.html.erb
|
651
|
-
- spec/tmp/app/views/shared/_notice.html.erb
|
652
|
-
- spec/tmp/app/models/defaults/role_type.rb
|
653
|
-
- spec/tmp/app/models/defaults/avatar.rb
|
654
|
-
- spec/tmp/app/models/defaults/asset.rb
|
655
|
-
- spec/tmp/app/models/defaults/settings.rb
|
656
|
-
- spec/tmp/app/models/defaults/position_type.rb
|
657
|
-
- spec/tmp/app/models/defaults/picture.rb
|
658
|
-
- spec/tmp/app/models/defaults/structure.rb
|
659
|
-
- spec/tmp/app/models/defaults/attachment_file.rb
|
660
|
-
- spec/tmp/app/models/defaults/ability.rb
|
661
|
-
- spec/tmp/app/models/defaults/structure_type.rb
|
662
|
-
- spec/tmp/app/models/defaults/user.rb
|
663
|
-
- spec/tmp/app/models/sunrise/sunrise_user.rb
|
664
|
-
- spec/tmp/app/models/sunrise/sunrise_page.rb
|
665
|
-
- spec/tmp/app/models/sunrise/sunrise_navigation.rb
|
666
|
-
- spec/tmp/app/models/sunrise/sunrise_structure.rb
|
667
|
-
- spec/tmp/app/uploaders/attachment_file_uploader.rb
|
668
|
-
- spec/tmp/app/uploaders/picture_uploader.rb
|
669
|
-
- spec/tmp/app/uploaders/avatar_uploader.rb
|
670
|
-
- spec/tmp/config/routes.rb
|
671
|
-
- spec/tmp/config/application.rb
|
672
|
-
- spec/tmp/config/database.yml.sample
|
673
|
-
- spec/tmp/config/nginx-config.sample
|
674
|
-
- spec/tmp/config/logrotate-config.sample
|
675
|
-
- spec/tmp/config/initializers/sunrise.rb
|
676
|
-
- spec/tmp/db/seeds.rb
|
677
664
|
- spec/support/hooks/structure.rb
|
678
665
|
- spec/support/helpers/controller_macros.rb
|
679
666
|
- spec/support/helpers/controller_helper.rb
|
@@ -704,6 +691,9 @@ files:
|
|
704
691
|
- spec/dummy/public/404.html
|
705
692
|
- spec/dummy/public/422.html
|
706
693
|
- spec/dummy/app/views/layouts/application.html.erb
|
694
|
+
- spec/dummy/app/views/public_activity/post/_create.html.erb
|
695
|
+
- spec/dummy/app/views/public_activity/post/_update.html.erb
|
696
|
+
- spec/dummy/app/views/public_activity/post/_destroy.html.erb
|
707
697
|
- spec/dummy/app/views/welcome/index.html.erb
|
708
698
|
- spec/dummy/app/views/sunrise/manager/users/thumbs/_record.html.erb
|
709
699
|
- spec/dummy/app/models/active_record/post.rb
|
@@ -739,6 +729,7 @@ files:
|
|
739
729
|
- spec/dummy/config/mongoid.yml
|
740
730
|
- spec/dummy/db/migrate/20111227143901_create_page_parts.rb
|
741
731
|
- spec/dummy/db/migrate/20111228152051_create_posts.rb
|
732
|
+
- spec/dummy/db/migrate/20130214090723_create_activities.rb
|
742
733
|
- spec/dummy/db/migrate/20120105114018_create_meta_tags.rb
|
743
734
|
- spec/dummy/db/migrate/20111227111941_install_acts_as_audited.rb
|
744
735
|
- spec/dummy/script/rails
|
@@ -778,7 +769,6 @@ files:
|
|
778
769
|
- spec/factories/asset_factory.rb
|
779
770
|
- spec/factories/user_factory.rb
|
780
771
|
- spec/factories/post_factory.rb
|
781
|
-
- spec/factories/audit_factory.rb
|
782
772
|
- spec/sunrise_spec.rb
|
783
773
|
- spec/controllers/sunrise/dashboard_controller_spec.rb
|
784
774
|
- spec/controllers/sunrise/shared_controller_spec.rb
|
@@ -809,40 +799,6 @@ signing_key:
|
|
809
799
|
specification_version: 3
|
810
800
|
summary: Rails CMS
|
811
801
|
test_files:
|
812
|
-
- spec/tmp/spec/support/helpers/controller_macros.rb
|
813
|
-
- spec/tmp/spec/spec_helper.rb
|
814
|
-
- spec/tmp/spec/factories/structure_factory.rb
|
815
|
-
- spec/tmp/spec/factories/user_factory.rb
|
816
|
-
- spec/tmp/spec/controllers/pages_controller_spec.rb
|
817
|
-
- spec/tmp/spec/controllers/welcome_controller_spec.rb
|
818
|
-
- spec/tmp/app/views/layouts/application.html.erb
|
819
|
-
- spec/tmp/app/views/pages/show.html.erb
|
820
|
-
- spec/tmp/app/views/shared/_notice.html.erb
|
821
|
-
- spec/tmp/app/models/defaults/role_type.rb
|
822
|
-
- spec/tmp/app/models/defaults/avatar.rb
|
823
|
-
- spec/tmp/app/models/defaults/asset.rb
|
824
|
-
- spec/tmp/app/models/defaults/settings.rb
|
825
|
-
- spec/tmp/app/models/defaults/position_type.rb
|
826
|
-
- spec/tmp/app/models/defaults/picture.rb
|
827
|
-
- spec/tmp/app/models/defaults/structure.rb
|
828
|
-
- spec/tmp/app/models/defaults/attachment_file.rb
|
829
|
-
- spec/tmp/app/models/defaults/ability.rb
|
830
|
-
- spec/tmp/app/models/defaults/structure_type.rb
|
831
|
-
- spec/tmp/app/models/defaults/user.rb
|
832
|
-
- spec/tmp/app/models/sunrise/sunrise_user.rb
|
833
|
-
- spec/tmp/app/models/sunrise/sunrise_page.rb
|
834
|
-
- spec/tmp/app/models/sunrise/sunrise_navigation.rb
|
835
|
-
- spec/tmp/app/models/sunrise/sunrise_structure.rb
|
836
|
-
- spec/tmp/app/uploaders/attachment_file_uploader.rb
|
837
|
-
- spec/tmp/app/uploaders/picture_uploader.rb
|
838
|
-
- spec/tmp/app/uploaders/avatar_uploader.rb
|
839
|
-
- spec/tmp/config/routes.rb
|
840
|
-
- spec/tmp/config/application.rb
|
841
|
-
- spec/tmp/config/database.yml.sample
|
842
|
-
- spec/tmp/config/nginx-config.sample
|
843
|
-
- spec/tmp/config/logrotate-config.sample
|
844
|
-
- spec/tmp/config/initializers/sunrise.rb
|
845
|
-
- spec/tmp/db/seeds.rb
|
846
802
|
- spec/support/hooks/structure.rb
|
847
803
|
- spec/support/helpers/controller_macros.rb
|
848
804
|
- spec/support/helpers/controller_helper.rb
|
@@ -873,6 +829,9 @@ test_files:
|
|
873
829
|
- spec/dummy/public/404.html
|
874
830
|
- spec/dummy/public/422.html
|
875
831
|
- spec/dummy/app/views/layouts/application.html.erb
|
832
|
+
- spec/dummy/app/views/public_activity/post/_create.html.erb
|
833
|
+
- spec/dummy/app/views/public_activity/post/_update.html.erb
|
834
|
+
- spec/dummy/app/views/public_activity/post/_destroy.html.erb
|
876
835
|
- spec/dummy/app/views/welcome/index.html.erb
|
877
836
|
- spec/dummy/app/views/sunrise/manager/users/thumbs/_record.html.erb
|
878
837
|
- spec/dummy/app/models/active_record/post.rb
|
@@ -908,6 +867,7 @@ test_files:
|
|
908
867
|
- spec/dummy/config/mongoid.yml
|
909
868
|
- spec/dummy/db/migrate/20111227143901_create_page_parts.rb
|
910
869
|
- spec/dummy/db/migrate/20111228152051_create_posts.rb
|
870
|
+
- spec/dummy/db/migrate/20130214090723_create_activities.rb
|
911
871
|
- spec/dummy/db/migrate/20120105114018_create_meta_tags.rb
|
912
872
|
- spec/dummy/db/migrate/20111227111941_install_acts_as_audited.rb
|
913
873
|
- spec/dummy/script/rails
|
@@ -947,9 +907,9 @@ test_files:
|
|
947
907
|
- spec/factories/asset_factory.rb
|
948
908
|
- spec/factories/user_factory.rb
|
949
909
|
- spec/factories/post_factory.rb
|
950
|
-
- spec/factories/audit_factory.rb
|
951
910
|
- spec/sunrise_spec.rb
|
952
911
|
- spec/controllers/sunrise/dashboard_controller_spec.rb
|
953
912
|
- spec/controllers/sunrise/shared_controller_spec.rb
|
954
913
|
- spec/controllers/sunrise/settings_controller_spec.rb
|
955
914
|
- spec/controllers/sunrise/manager_controller_spec.rb
|
915
|
+
has_rdoc:
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<%= content_tag(:tr, :id => ["audit", "event", event.id].join("_"), :class => "event") do -%>
|
2
|
-
<td><%= I18n.l(event.created_at, :format => "%d.%m.%Y") %></td>
|
3
|
-
<% if event.user -%>
|
4
|
-
<td><%= link_to event.user.name, edit_path(:model_name => "users", :id => event.user_id) %></td>
|
5
|
-
<% else -%>
|
6
|
-
<td><%= event.username || [event.user_type, event.user_id].join('#') %></td>
|
7
|
-
<% end -%>
|
8
|
-
<td><%= event.action %></td>
|
9
|
-
<td>
|
10
|
-
<%= link_to_if ['create', 'update'].include?(event.action),
|
11
|
-
[event.auditable_type, event.auditable_id].join('#'),
|
12
|
-
edit_path(:model_name => event.auditable_type.tableize, :id => event.auditable_id) %>
|
13
|
-
</td>
|
14
|
-
<td><%= event.remote_address %></td>
|
15
|
-
<% end -%>
|
@@ -1,31 +0,0 @@
|
|
1
|
-
class HistoryTracker
|
2
|
-
include Mongoid::History::Tracker
|
3
|
-
|
4
|
-
def user
|
5
|
-
@user ||= modifier
|
6
|
-
end
|
7
|
-
|
8
|
-
def username
|
9
|
-
user.try(:name)
|
10
|
-
end
|
11
|
-
|
12
|
-
def user_type
|
13
|
-
"User"
|
14
|
-
end
|
15
|
-
|
16
|
-
def user_id
|
17
|
-
user.try(:id)
|
18
|
-
end
|
19
|
-
|
20
|
-
def auditable_type
|
21
|
-
"Post"
|
22
|
-
end
|
23
|
-
|
24
|
-
def auditable_id
|
25
|
-
1
|
26
|
-
end
|
27
|
-
|
28
|
-
def remote_address
|
29
|
-
nil
|
30
|
-
end
|
31
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
if Object.const_defined?("Audited")
|
3
|
-
FactoryGirl.define do
|
4
|
-
factory :audit, :class => Audited.audit_class do |a|
|
5
|
-
a.action "create"
|
6
|
-
a.audited_changes :title => "Updated"
|
7
|
-
a.association :user, :factory => :default_user
|
8
|
-
a.association :auditable, :factory => :post
|
9
|
-
end
|
10
|
-
end
|
11
|
-
else
|
12
|
-
FactoryGirl.define do
|
13
|
-
factory :audit, :class => HistoryTracker do
|
14
|
-
action "create"
|
15
|
-
modified :title => "Updated"
|
16
|
-
original :title => "original"
|
17
|
-
version 1
|
18
|
-
|
19
|
-
after(:build) do |a|
|
20
|
-
a.trackable = FactoryGirl.create(:post)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|