refinerycms 0.9.6.5 → 0.9.6.6
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/controllers/application.rb +1 -1
- data/app/controllers/application_controller.rb +1 -1
- data/config/environment.rb +2 -2
- data/config/environments/development.rb +1 -1
- data/config/environments/production.rb +1 -1
- data/config/preinitializer.rb +1 -1
- data/db/migrate/20100114092849_add_themes_table.rb +12 -12
- data/db/migrate/20100202034802_remove_custom_title_image_id_and_image_id_from_pages.rb +6 -6
- data/db/schema.rb +1 -1
- data/db/seeds.rb +2 -2
- data/lib/refinery_initializer.rb +1 -1
- data/public/javascripts/refinery/admin.js +61 -61
- data/readme.md +3 -3
- data/test/files/The world!.gif +0 -0
- data/test/files/car-wallpapers19.jpg +0 -0
- data/test/fixtures/images.yml +14 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/image_test.rb +19 -8
- data/test/unit/page_part_test.rb +11 -11
- data/test/unit/page_test.rb +125 -125
- data/vendor/plugins/authentication/app/controllers/users_controller.rb +20 -20
- data/vendor/plugins/authentication/app/models/user.rb +5 -5
- data/vendor/plugins/authentication/app/views/user_mailer/reset_notification.html.erb +2 -2
- data/vendor/plugins/authentication/app/views/users/forgot.html.erb +1 -1
- data/vendor/plugins/authentication/app/views/users/reset.html.erb +2 -2
- data/vendor/plugins/authentication/config/routes.rb +4 -4
- data/vendor/plugins/dashboard/app/helpers/admin/dashboard_helper.rb +1 -1
- data/vendor/plugins/dashboard/app/views/admin/dashboard/_recent_activity.html.erb +1 -1
- data/vendor/plugins/dashboard/rails/init.rb +1 -1
- data/vendor/plugins/images/app/models/image.rb +14 -14
- data/vendor/plugins/images/app/views/admin/images/_form.html.erb +1 -8
- data/vendor/plugins/images/app/views/admin/images/insert.html.erb +1 -1
- data/vendor/plugins/inquiries/app/views/admin/inquiries/_inquiry.html.erb +3 -3
- data/vendor/plugins/inquiries/app/views/inquiries/new.html.erb +1 -1
- data/vendor/plugins/inquiries/app/views/inquiries/thank_you.html.erb +1 -1
- data/vendor/plugins/news/app/controllers/admin/news_items_controller.rb +1 -1
- data/vendor/plugins/news/app/controllers/news_items_controller.rb +1 -1
- data/vendor/plugins/news/app/views/news_items/index.html.erb +1 -1
- data/vendor/plugins/news/app/views/news_items/show.html.erb +1 -1
- data/vendor/plugins/pages/app/controllers/admin/pages_controller.rb +1 -1
- data/vendor/plugins/pages/app/models/page.rb +42 -42
- data/vendor/plugins/pages/app/models/page_part.rb +1 -1
- data/vendor/plugins/pages/app/presenters/page_presenter.rb +1 -1
- data/vendor/plugins/pages/app/views/admin/page_dialogs/_page_link.html.erb +1 -1
- data/vendor/plugins/pages/app/views/admin/pages/_form.html.erb +1 -1
- data/vendor/plugins/pages/app/views/admin/pages/_list.html.erb +1 -1
- data/vendor/plugins/pages/app/views/admin/pages/_page_part_field.html.erb +1 -1
- data/vendor/plugins/pages/app/views/pages/home.html.erb +1 -1
- data/vendor/plugins/pages/app/views/pages/show.html.erb +1 -1
- data/vendor/plugins/pages/rails/init.rb +5 -5
- data/vendor/plugins/rails_indexes/lib/indexer.rb +49 -47
- data/vendor/plugins/rails_indexes/tasks/indexer.rake +5 -3
- data/vendor/plugins/rails_indexes/test/fixtures/app/controllers/users_controller.rb +3 -3
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/address.rb +2 -2
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/company.rb +4 -4
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/country.rb +1 -1
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/freelancer.rb +1 -1
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/gift.rb +4 -4
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/god.rb +1 -1
- data/vendor/plugins/rails_indexes/test/fixtures/app/models/user.rb +7 -6
- data/vendor/plugins/rails_indexes/test/fixtures/app/sweepers/user_sweeper.rb +1 -1
- data/vendor/plugins/rails_indexes/test/fixtures/schema.rb +9 -9
- data/vendor/plugins/rails_indexes/test/rails_indexes_test.rb +18 -18
- data/vendor/plugins/refinery/app/views/admin/_head.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/layouts/application.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/_content_page.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/_head.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/_header.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/_menu.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb +5 -5
- data/vendor/plugins/refinery/app/views/shared/_submenu.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/admin/_continue_editing.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/admin/_error_messages_for.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/admin/_form_actions.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/admin/_image_picker.html.erb +27 -13
- data/vendor/plugins/refinery/app/views/shared/admin/_resource_picker.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/admin/_search.html.erb +1 -1
- data/vendor/plugins/refinery/app/views/shared/admin/_sortable_list.html.erb +1 -1
- data/vendor/plugins/refinery/lib/generators/refinery/templates/model.rb +1 -1
- data/vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb +1 -1
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_sortable_list.html.erb +1 -1
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/index.html.erb +2 -2
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/index.html.erb +1 -1
- data/vendor/plugins/refinery/lib/generators/refinery/templates/views/show.html.erb +1 -1
- data/vendor/plugins/refinery/lib/refinery/activity.rb +1 -1
- data/vendor/plugins/refinery/lib/refinery/application_controller.rb +4 -4
- data/vendor/plugins/refinery/lib/refinery/application_helper.rb +1 -1
- data/vendor/plugins/refinery/lib/refinery/base_presenter.rb +1 -1
- data/vendor/plugins/refinery/lib/refinery/initializer.rb +1 -1
- data/vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb +1 -1
- data/vendor/plugins/resources/app/models/resource.rb +8 -8
- data/vendor/plugins/resources/app/views/admin/resources/_form.html.erb +1 -1
- data/vendor/plugins/resources/app/views/admin/resources/index.html.erb +1 -1
- data/vendor/plugins/resources/app/views/admin/resources/insert.html.erb +1 -1
- data/vendor/plugins/resources/config/routes.rb +2 -2
- data/vendor/plugins/resources/rails/init.rb +1 -1
- data/vendor/plugins/themes/app/controllers/admin/themes_controller.rb +17 -17
- data/vendor/plugins/themes/app/models/theme.rb +40 -40
- data/vendor/plugins/themes/app/views/admin/themes/_form.html.erb +1 -1
- data/vendor/plugins/themes/config/routes.rb +2 -2
- data/vendor/plugins/themes/lib/theme_server.rb +26 -0
- data/vendor/plugins/themes/rails/init.rb +3 -1
- metadata +6 -3
- data/vendor/plugins/themes/app/controllers/themes_controller.rb +0 -45
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.6.
|
|
1
|
+
0.9.6.6
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# This file is here to support web servers who load Rails in the old fashion e.g. some builds of Phusion Passenger.
|
|
2
2
|
# This will simply load the application controller using the new style if this file is ever loaded.
|
|
3
|
-
require_dependency 'application_controller'
|
|
3
|
+
require_dependency 'application_controller'
|
data/config/environment.rb
CHANGED
|
@@ -64,7 +64,7 @@ eval("#{(defined? Refinery::Initializer) ? Refinery : Rails}::Initializer").run
|
|
|
64
64
|
|
|
65
65
|
#===REFINERY REQUIRED GEMS===
|
|
66
66
|
config.gem "rake", :version => ">= 0.8.3", :lib => "rake"
|
|
67
|
-
|
|
67
|
+
config.gem "rubyzip", :version => ">= 0.9.1", :lib => "zip/zip"
|
|
68
68
|
config.gem "friendly_id", :version => ">= 2.2.2", :lib => "friendly_id"
|
|
69
69
|
config.gem "will_paginate", :version => ">= 2.3.11", :lib => "will_paginate", :source => "http://gemcutter.org"
|
|
70
70
|
config.gem "rails", :version => ">= 2.3.5", :lib => "rails"
|
|
@@ -72,4 +72,4 @@ eval("#{(defined? Refinery::Initializer) ? Refinery : Rails}::Initializer").run
|
|
|
72
72
|
config.gem "slim_scrooge", :version => ">= 1.0.3", :lib => "slim_scrooge", :source => "http://gemcutter.org" unless RUBY_PLATFORM =~ /mswin|mingw/ # kill gem when windows is running.
|
|
73
73
|
config.gem "hpricot", :version => ">= 0.8.1", :lib => "hpricot", :source => "http://gemcutter.org"
|
|
74
74
|
#===REFINERY END OF REQUIRED GEMS===
|
|
75
|
-
end
|
|
75
|
+
end
|
|
@@ -24,4 +24,4 @@ config.log_level = :warn
|
|
|
24
24
|
# Set to true in order to use Amazon's Simple Storage Service on your production machine
|
|
25
25
|
# instead of the default file system for resources and images
|
|
26
26
|
# Make sure to your bucket info is correct in amazon_s3.yml
|
|
27
|
-
USE_S3_BACKEND = false
|
|
27
|
+
USE_S3_BACKEND = false
|
data/config/preinitializer.rb
CHANGED
|
@@ -25,4 +25,4 @@ REFINERY_ROOT = Rails.root.to_s unless defined? REFINERY_ROOT
|
|
|
25
25
|
|
|
26
26
|
# Set to true in your environment specific file (e.g. production.rb) to use Amazon's Simple
|
|
27
27
|
# Storage Service instead of the default file system for resources and images
|
|
28
|
-
USE_S3_BACKEND = false unless defined?(USE_S3_BACKEND)
|
|
28
|
+
USE_S3_BACKEND = false unless defined?(USE_S3_BACKEND)
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
class AddThemesTable < ActiveRecord::Migration
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
def self.up
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
create_table "themes", :force => true do |t|
|
|
5
|
+
t.integer "size"
|
|
6
|
+
t.string "content_type"
|
|
7
|
+
t.string "filename"
|
|
8
|
+
t.string "title"
|
|
9
|
+
t.text "description"
|
|
10
|
+
t.text "license"
|
|
11
|
+
t.timestamps
|
|
12
|
+
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def self.down
|
|
16
|
-
|
|
16
|
+
drop_table :themes
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
end
|
|
19
|
+
end
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
class RemoveCustomTitleImageIdAndImageIdFromPages < ActiveRecord::Migration
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
def self.up
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
remove_column :pages, :custom_title_image_id
|
|
5
|
+
remove_column :pages, :image_id
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
def self.down
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
add_column :pages, :custom_title_image_id, :integer
|
|
10
|
+
add_column :pages, :image_id, :integer
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
end
|
|
13
|
+
end
|
data/db/schema.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead of editing this file,
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead of editing this file,
|
|
2
2
|
# please use the migrations feature of Active Record to incrementally modify your database, and
|
|
3
3
|
# then regenerate this schema definition.
|
|
4
4
|
#
|
data/db/seeds.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{:name => "activity_show_limit", :value => 18},
|
|
4
4
|
{:name => "preferred_image_view", :value => :grid},
|
|
5
5
|
{:name => "analytics_page_code", :value => "UA-xxxxxx-x"},
|
|
6
|
-
|
|
6
|
+
{:name => "theme", :value => "demolicious"},
|
|
7
7
|
{:name => "image_thumbnails", :value => {
|
|
8
8
|
:dialog_thumb => 'c106x106',
|
|
9
9
|
:grid => 'c135x135',
|
|
@@ -126,4 +126,4 @@ Dir[File.join(%W(#{REFINERY_ROOT} themes *.zip))].each do |theme|
|
|
|
126
126
|
"filename" => theme.split('/').last,
|
|
127
127
|
'tempfile' => File.open(theme)
|
|
128
128
|
}).read_theme
|
|
129
|
-
end
|
|
129
|
+
end
|
data/lib/refinery_initializer.rb
CHANGED
|
@@ -225,13 +225,9 @@ var link_dialog = {
|
|
|
225
225
|
$('.link_list li').click(function(e){
|
|
226
226
|
e.preventDefault();
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
$('.link_list li.linked').removeClass('linked');
|
|
229
229
|
$(this).addClass('linked');
|
|
230
230
|
|
|
231
|
-
function remove_linked_class(){
|
|
232
|
-
$('.link_list li.linked').removeClass('linked');
|
|
233
|
-
}
|
|
234
|
-
|
|
235
231
|
var link = $(this).children('a.page_link').get(0);
|
|
236
232
|
var port = (window.location.port.length > 0 ? (":" + window.location.port) : "");
|
|
237
233
|
var url = link.href.replace(window.location.protocol + "//" + window.location.hostname + port, "");
|
|
@@ -441,14 +437,17 @@ var page_options = {
|
|
|
441
437
|
}
|
|
442
438
|
|
|
443
439
|
var image_dialog = {
|
|
444
|
-
|
|
440
|
+
callback: null
|
|
441
|
+
|
|
442
|
+
, init: function(callback){
|
|
443
|
+
this.callback = callback;
|
|
445
444
|
this.init_tabs();
|
|
446
445
|
this.init_select();
|
|
447
|
-
this.
|
|
448
|
-
this
|
|
449
|
-
}
|
|
446
|
+
this.init_actions();
|
|
447
|
+
return this;
|
|
448
|
+
}
|
|
450
449
|
|
|
451
|
-
init_tabs: function(){
|
|
450
|
+
, init_tabs: function(){
|
|
452
451
|
var radios = $('#dialog_menu_left input:radio');
|
|
453
452
|
var selected = radios.parent().filter(".selected_radio").find('input:radio').first() || radios.first();
|
|
454
453
|
|
|
@@ -458,16 +457,16 @@ var image_dialog = {
|
|
|
458
457
|
|
|
459
458
|
selected.attr('checked', 'true');
|
|
460
459
|
link_dialog.switch_area(selected);
|
|
461
|
-
}
|
|
460
|
+
}
|
|
462
461
|
|
|
463
|
-
switch_area: function(radio){
|
|
462
|
+
, switch_area: function(radio){
|
|
464
463
|
$('#dialog_menu_left .selected_radio').removeClass('selected_radio');
|
|
465
464
|
$(radio).parent().addClass('selected_radio');
|
|
466
465
|
$('#dialog_main .dialog_area').hide();
|
|
467
466
|
$('#' + radio.value + '_area').show();
|
|
468
|
-
}
|
|
467
|
+
}
|
|
469
468
|
|
|
470
|
-
init_select: function(){
|
|
469
|
+
, init_select: function(){
|
|
471
470
|
$('#existing_image_area_content ul li img').click(function(){
|
|
472
471
|
image_dialog.set_image(this);
|
|
473
472
|
});
|
|
@@ -475,9 +474,9 @@ var image_dialog = {
|
|
|
475
474
|
if ((selected_image = $('#existing_image_area_content ul li.selected img')).length > 0) {
|
|
476
475
|
image_dialog.set_image(selected_image.first());
|
|
477
476
|
}
|
|
478
|
-
}
|
|
477
|
+
}
|
|
479
478
|
|
|
480
|
-
set_image: function(img){
|
|
479
|
+
, set_image: function(img){
|
|
481
480
|
if ($(img).length > 0) {
|
|
482
481
|
$('#existing_image_area_content ul li.selected').removeClass('selected');
|
|
483
482
|
|
|
@@ -499,39 +498,38 @@ var image_dialog = {
|
|
|
499
498
|
}
|
|
500
499
|
catch(e){}
|
|
501
500
|
}
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
init_submit: function(){
|
|
505
|
-
$('#dialog-form-actions #submit_button').click(function(e){
|
|
506
|
-
e.preventDefault();
|
|
507
|
-
if(img_selected = $('#existing_image_area_content ul li.selected img').get(0)) {
|
|
508
|
-
parent.image_picker.changed(img_selected);
|
|
509
|
-
}
|
|
501
|
+
}
|
|
510
502
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
503
|
+
, submit_image_choice: function(e) {
|
|
504
|
+
e.preventDefault();
|
|
505
|
+
if((img_selected = $('#existing_image_area_content ul li.selected img').get(0)) && typeof(this.callback) == "function") {
|
|
506
|
+
this.callback(img_selected);
|
|
507
|
+
}
|
|
515
508
|
|
|
516
|
-
|
|
517
|
-
e.preventDefault();
|
|
509
|
+
if(parent && typeof(parent.tb_remove) == "function"){
|
|
518
510
|
parent.tb_remove();
|
|
519
|
-
}
|
|
520
|
-
},
|
|
511
|
+
}
|
|
521
512
|
|
|
522
|
-
|
|
523
|
-
$('#TB_title .close_dialog, #dialog_container .close_dialog').click(function(e) {
|
|
524
|
-
e.preventDefault();
|
|
513
|
+
}
|
|
525
514
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
515
|
+
, cancel_image_dialog: function(e) {
|
|
516
|
+
e.preventDefault();
|
|
517
|
+
// if we're in a frame
|
|
518
|
+
if(parent && typeof(parent.tb_remove) == "function"){
|
|
519
|
+
parent.tb_remove();
|
|
529
520
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
521
|
+
} // if we're not in a frame
|
|
522
|
+
else if(typeof(tb_remove) == 'function'){
|
|
523
|
+
tb_remove();
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
, init_actions: function(){
|
|
528
|
+
var _this = this;
|
|
529
|
+
$('#dialog-form-actions #submit_button').click($.proxy(_this.submit_image_choice, _this));
|
|
530
|
+
$('#dialog-form-actions #cancel_button, #TB_title .close_dialog, #dialog_container .close_dialog').click(
|
|
531
|
+
$.proxy(_this.cancel_image_dialog, _this)
|
|
532
|
+
);
|
|
535
533
|
}
|
|
536
534
|
}
|
|
537
535
|
|
|
@@ -600,43 +598,45 @@ var list_reorder = {
|
|
|
600
598
|
var image_picker = {
|
|
601
599
|
options: {
|
|
602
600
|
selected: '',
|
|
603
|
-
thumbnail: '',
|
|
604
|
-
|
|
601
|
+
thumbnail: 'dialog_thumb',
|
|
602
|
+
field: '#image',
|
|
603
|
+
image_display: '#current_picked_image',
|
|
604
|
+
no_image_message: '#no_picked_image_selected',
|
|
605
|
+
image_container: '#current_image_container',
|
|
606
|
+
remove_image_button: '#remove_picked_image',
|
|
607
|
+
image_toggler: null
|
|
605
608
|
}
|
|
606
609
|
|
|
607
610
|
, init: function(new_options){
|
|
608
611
|
this.options = $.extend(this.options, new_options);
|
|
609
|
-
$(
|
|
612
|
+
$(this.options.remove_image_button).click(function(e){
|
|
610
613
|
e.preventDefault();
|
|
611
|
-
$(
|
|
614
|
+
$(this.options.image_display).removeClass('brown_border')
|
|
612
615
|
.attr({'src': '', 'width': '', 'height': ''})
|
|
613
616
|
.css({'width': 'auto', 'height': 'auto'})
|
|
614
617
|
.hide();
|
|
615
|
-
$(
|
|
616
|
-
$(
|
|
618
|
+
$(this.options.field).val('');
|
|
619
|
+
$(this.options.no_image_message).show();
|
|
617
620
|
$(this).hide();
|
|
618
621
|
});
|
|
619
622
|
|
|
620
|
-
if(this.options.
|
|
621
|
-
$(
|
|
623
|
+
if(this.options.image_toggler != null){
|
|
624
|
+
$(this.options.image_toggler).click(function(e){
|
|
622
625
|
$(this).html(($(this).html() == 'Show' ? 'Hide' : 'Show'));
|
|
623
|
-
$(
|
|
626
|
+
$(this.options.image_container).toggle();
|
|
624
627
|
e.preventDefault();
|
|
625
628
|
});
|
|
626
629
|
}
|
|
627
630
|
|
|
628
631
|
}
|
|
629
632
|
|
|
630
|
-
, changed: function(image){
|
|
631
|
-
|
|
632
|
-
$('#custom_title_field').val(image.id.replace("image_", ""));
|
|
633
|
+
, changed: function(image) {
|
|
634
|
+
$(this.options.field).val(image.id.replace("image_", ""));
|
|
633
635
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
$('#remove_picked_image').show();
|
|
639
|
-
$('#no_picked_image_selected').hide();
|
|
636
|
+
image.src = image.src.replace('_dialog_thumb', '_' + this.options.thumbnail);
|
|
637
|
+
$(this.options.image_display).attr('src', image.src).addClass('brown_border').show();
|
|
638
|
+
$(this.options.remove_image_button).show();
|
|
639
|
+
$(this.options.no_image_message).hide();
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
642
|
|
data/readme.md
CHANGED
|
@@ -92,7 +92,7 @@ You will be prompted to setup your first user.
|
|
|
92
92
|
If you're using [Heroku](http://heroku.com/) you will want to put
|
|
93
93
|
|
|
94
94
|
USE_S3_BACKEND = true
|
|
95
|
-
|
|
95
|
+
|
|
96
96
|
in your ``config/production.rb`` file to make Refinery store files uploaded on Amazon S3.
|
|
97
97
|
|
|
98
98
|
## Updating to the latest Refinery
|
|
@@ -161,12 +161,12 @@ This will pull in all of the updated files in the project and may result in some
|
|
|
161
161
|
Extend Refinery easily by running the Refinery generator
|
|
162
162
|
|
|
163
163
|
ruby script/generate refinery
|
|
164
|
-
|
|
164
|
+
|
|
165
165
|
to get help on how to use that. Or read the full documentation on [writing plugins for Refinery](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/refinery/plugins.md)
|
|
166
166
|
|
|
167
167
|
### What about a portfolio?
|
|
168
168
|
|
|
169
|
-
Check out the [portfolio plugin gem](http://github.com/resolve/portfolio)
|
|
169
|
+
Check out the [portfolio plugin gem](http://github.com/resolve/refinery-portfolio)
|
|
170
170
|
|
|
171
171
|
## License
|
|
172
172
|
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
the_world:
|
|
2
|
+
content_type: image/gif
|
|
3
|
+
filename: The%20world!.gif
|
|
4
|
+
width: 614
|
|
5
|
+
height: 340
|
|
6
|
+
size: 17535
|
|
7
|
+
# TODO: image_type? What's that used for?
|
|
8
|
+
|
|
9
|
+
our_car:
|
|
10
|
+
content_type: image/jpg
|
|
11
|
+
filename: car-wallpapers19.jpg
|
|
12
|
+
width: 640
|
|
13
|
+
height: 300
|
|
14
|
+
size: 87647
|
data/test/test_helper.rb
CHANGED
|
@@ -16,7 +16,7 @@ class ActiveSupport::TestCase
|
|
|
16
16
|
# don't care one way or the other, switching from MyISAM to InnoDB tables
|
|
17
17
|
# is recommended.
|
|
18
18
|
#
|
|
19
|
-
# The only drawback to using transactional fixtures is when you actually
|
|
19
|
+
# The only drawback to using transactional fixtures is when you actually
|
|
20
20
|
# need to test transactions. Since your test is bracketed by a transaction,
|
|
21
21
|
# any transactions started in your code will be automatically rolled back.
|
|
22
22
|
self.use_transactional_fixtures = true
|
data/test/unit/image_test.rb
CHANGED
|
@@ -2,13 +2,24 @@ require 'test_helper'
|
|
|
2
2
|
|
|
3
3
|
class ImageTest < ActiveSupport::TestCase
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
fixtures :images
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def test_per_page
|
|
11
|
-
|
|
12
|
-
end
|
|
7
|
+
def test_titles
|
|
8
|
+
assert_equal "The%20world!.gif", images(:the_world).filename
|
|
9
|
+
assert_equal "The World!", images(:the_world).title
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
assert_equal "car-wallpapers19.jpg", images(:our_car).filename
|
|
12
|
+
assert_equal "Car Wallpapers19", images(:our_car).title
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def test_per_page
|
|
16
|
+
assert_equal 18, Image.per_page(dialog = true)
|
|
17
|
+
assert_equal 20, Image.per_page # dialog = false
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def test_attachment_fu_options
|
|
21
|
+
assert_equal 50.megabytes, Image.attachment_options[:max_size]
|
|
22
|
+
assert_equal 'Rmagick', Image.attachment_options[:processor]
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
data/test/unit/page_part_test.rb
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
require 'test_helper'
|
|
2
2
|
|
|
3
3
|
class PagePartTest < ActiveSupport::TestCase
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
|
|
5
|
+
fixtures :page_parts
|
|
6
|
+
|
|
7
|
+
def setup
|
|
8
|
+
@new_page_part = PagePart.new
|
|
9
|
+
end
|
|
10
|
+
|
|
11
11
|
def test_should_not_save_page_part_without_title
|
|
12
|
-
|
|
12
|
+
assert !@new_page_part.save, "Saved the page part without a title"
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def test_alias_content_body_works
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
assert_equal page_parts(:home_page_body).body, page_parts(:home_page_body).content
|
|
17
|
+
end
|
|
18
18
|
|
|
19
|
-
end
|
|
19
|
+
end
|