refinerycms-core 2.0.3 → 2.0.4

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.
Files changed (34) hide show
  1. data/app/assets/javascripts/refinery/admin.js.erb +33 -31
  2. data/app/assets/javascripts/refinery/boot_wym.js.erb +1 -1
  3. data/app/assets/javascripts/refinery/modal_dialogs.js.erb +31 -31
  4. data/app/assets/javascripts/refinery/submit_continue.js.coffee.erb +3 -0
  5. data/app/controllers/refinery/admin/dialogs_controller.rb +4 -0
  6. data/app/controllers/refinery/admin_controller.rb +1 -0
  7. data/app/helpers/refinery/image_helper.rb +9 -11
  8. data/app/views/refinery/admin/_form_actions.html.erb +1 -1
  9. data/config/locales/cs.yml +2 -2
  10. data/config/routes.rb +1 -1
  11. data/lib/generators/refinery/core/templates/config/initializers/refinery/core.rb.erb +3 -0
  12. data/lib/generators/refinery/engine/templates/Gemfile +37 -35
  13. data/lib/generators/refinery/engine/templates/Guardfile +1 -1
  14. data/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb +22 -10
  15. data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_singular_name.html.erb +5 -4
  16. data/lib/generators/refinery/engine/templates/spec/spec_helper.rb +8 -1
  17. data/lib/refinery/admin/base_controller.rb +7 -5
  18. data/lib/refinery/application_controller.rb +7 -1
  19. data/lib/refinery/core/configuration.rb +13 -6
  20. data/lib/refinery/core/engine.rb +6 -2
  21. data/lib/refinery/core.rb +27 -11
  22. data/lib/refinery/crud.rb +1 -1
  23. data/lib/refinery/menu.rb +0 -4
  24. data/lib/refinery/version.rb +1 -1
  25. data/refinerycms-core.gemspec +2 -2
  26. data/spec/controllers/refinery/admin/refinery_core_controller_spec.rb +1 -1
  27. data/spec/lib/refinery/activity_spec.rb +26 -18
  28. data/spec/lib/refinery/application_controller_spec.rb +61 -28
  29. data/spec/lib/refinery/core/configuration_spec.rb +37 -0
  30. data/spec/lib/refinery/core_spec.rb +48 -17
  31. data/spec/lib/refinery/menu_spec.rb +37 -0
  32. data/spec/requests/refinery/admin/controller_restriction_spec.rb +27 -0
  33. metadata +14 -8
  34. data/app/helpers/application_helper.rb +0 -5
@@ -63,38 +63,40 @@ $.fn.applyMinimumHeightFromChildren = function() {
63
63
  }
64
64
 
65
65
  init_modal_dialogs = function(){
66
- $('a[href*="dialog=true"]').not('#dialog_container a').each(function(i, anchor) {
67
- $(anchor).data({
68
- 'dialog-width': parseInt($($(anchor).attr('href').match("width=([0-9]*)")).last().get(0), 10)||928
69
- , 'dialog-height': parseInt($($(anchor).attr('href').match("height=([0-9]*)")).last().get(0), 10)||473
70
- , 'dialog-title': ($(anchor).attr('title') || $(anchor).attr('name') || $(anchor).html() || null)
71
- }).attr('href', $(anchor).attr('href').replace(/(\&(amp\;)?)?dialog\=true/, '')
72
- .replace(/(\&(amp\;)?)?width\=\d+/, '')
73
- .replace(/(\&(amp\;)?)?height\=\d+/, '')
74
- .replace(/(\?&(amp\;)?)/, '?')
75
- .replace(/\?$/, ''))
76
- .click(function(e){
77
- $anchor = $(this);
78
- iframe_src = (iframe_src = $anchor.attr('href'))
79
- + (iframe_src.indexOf('?') > -1 ? '&' : '?')
80
- + 'app_dialog=true&dialog=true';
81
-
82
- iframe = $("<iframe id='dialog_iframe' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>");
83
- if(!$.browser.msie) { iframe.corner('8px'); }
84
- iframe.dialog({
85
- title: $anchor.data('dialog-title')
86
- , modal: true
87
- , resizable: false
88
- , autoOpen: true
89
- , width: $anchor.data('dialog-width')
90
- , height: $anchor.data('dialog-height')
91
- , open: onOpenDialog
92
- , close: onCloseDialog
93
- });
94
-
95
- iframe.attr('src', iframe_src);
96
- e.preventDefault();
66
+ $(document).on('click', 'a[href*="dialog=true"]:not(#dialog_container a)', function(e) {
67
+ var $anchor = $(this),
68
+ href = $anchor.attr('href'),
69
+ width = parseInt($(href.match("width=([0-9]*)")).last().get(0), 10)||928,
70
+ height = parseInt($(href.match("height=([0-9]*)")).last().get(0), 10)||473,
71
+ title = $anchor.attr('title') || $anchor.attr('name') || $anchor.html() || null;
72
+
73
+ href = href.replace(/(\&(amp\;)?)?dialog\=true/, '')
74
+ .replace(/(\&(amp\;)?)?width\=\d+/, '')
75
+ .replace(/(\&(amp\;)?)?height\=\d+/, '')
76
+ .replace(/(\?&(amp\;)?)/, '?')
77
+ .replace(/\?$/, '');
78
+
79
+ iframe_src = (iframe_src = href)
80
+ + (iframe_src.indexOf('?') > -1 ? '&' : '?')
81
+ + 'app_dialog=true&dialog=true';
82
+
83
+ iframe = $("<iframe id='dialog_iframe' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>");
84
+ if(!$.browser.msie) { iframe.corner('8px'); }
85
+ iframe.dialog({
86
+ title: title
87
+ , modal: true
88
+ , resizable: false
89
+ , autoOpen: true
90
+ , width: width
91
+ , height: height
92
+ , open: onOpenDialog
93
+ , close: onCloseDialog
94
+ , open: function(event, ui) {
95
+ iframe.attr('src', iframe_src);
96
+ }
97
97
  });
98
+
99
+ e.preventDefault();
98
100
  });
99
101
  };
100
102
 
@@ -158,7 +158,7 @@ var wymeditor_boot_options = $.extend({
158
158
  + "</form>"
159
159
  + "</div>"
160
160
 
161
- , dialogPath: "/refinery/dialogs/"
161
+ , dialogPath: "<%= Refinery::Core::Engine.routes.url_helpers.admin_dialogs_path %>/"
162
162
  , dialogFeatures: {
163
163
  width: 866
164
164
  , height: 455
@@ -1,36 +1,36 @@
1
1
  init_modal_dialogs = function(){
2
- $('a[href*="dialog=true"]').not('#dialog_container a').each(function(i, anchor) {
3
- $(anchor).data({
4
- 'dialog-width': parseInt($($(anchor).attr('href').match("width=([0-9]*)")).last().get(0), 10)||928
5
- , 'dialog-height': parseInt($($(anchor).attr('href').match("height=([0-9]*)")).last().get(0), 10)||473
6
- , 'dialog-title': ($(anchor).attr('title') || $(anchor).attr('name') || $(anchor).html() || null)
7
- }).attr('href', $(anchor).attr('href').replace(/(\&(amp\;)?)?dialog\=true/, '')
8
- .replace(/(\&(amp\;)?)?width\=\d+/, '')
9
- .replace(/(\&(amp\;)?)?height\=\d+/, '')
10
- .replace(/(\?&(amp\;)?)/, '?')
11
- .replace(/\?$/, ''))
12
- .click(function(e){
13
- $anchor = $(this);
14
- iframe_src = (iframe_src = $anchor.attr('href'))
15
- + (iframe_src.indexOf('?') > -1 ? '&' : '?')
16
- + 'app_dialog=true&dialog=true';
17
-
18
- iframe = $("<iframe id='dialog_iframe' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>");
19
- if(!$.browser.msie) { iframe.corner('8px'); }
20
- iframe.dialog({
21
- title: $anchor.data('dialog-title')
22
- , modal: true
23
- , resizable: false
24
- , autoOpen: true
25
- , width: $anchor.data('dialog-width')
26
- , height: $anchor.data('dialog-height')
27
- , open: onOpenDialog
28
- , close: onCloseDialog
29
- });
30
-
31
- iframe.attr('src', iframe_src);
32
- e.preventDefault();
2
+ $(document).on('click', 'a[href*="dialog=true"]:not(#dialog_container a)', function(e) {
3
+ var $anchor = $(this),
4
+ href = $anchor.attr('href'),
5
+ width = parseInt($(href.match("width=([0-9]*)")).last().get(0), 10)||928,
6
+ height = parseInt($(href.match("height=([0-9]*)")).last().get(0), 10)||473,
7
+ title = $anchor.attr('title') || $anchor.attr('name') || $anchor.html() || null;
8
+
9
+ href = href.replace(/(\&(amp\;)?)?dialog\=true/, '')
10
+ .replace(/(\&(amp\;)?)?width\=\d+/, '')
11
+ .replace(/(\&(amp\;)?)?height\=\d+/, '')
12
+ .replace(/(\?&(amp\;)?)/, '?')
13
+ .replace(/\?$/, '');
14
+
15
+ iframe_src = (iframe_src = href)
16
+ + (iframe_src.indexOf('?') > -1 ? '&' : '?')
17
+ + 'app_dialog=true&dialog=true';
18
+
19
+ iframe = $("<iframe id='dialog_iframe' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>");
20
+ if(!$.browser.msie) { iframe.corner('8px'); }
21
+ iframe.dialog({
22
+ title: title
23
+ , modal: true
24
+ , resizable: false
25
+ , autoOpen: true
26
+ , width: width
27
+ , height: height
28
+ , open: onOpenDialog
29
+ , close: onCloseDialog
33
30
  });
31
+
32
+ iframe.attr('src', iframe_src);
33
+ e.preventDefault();
34
34
  });
35
35
  };
36
36
 
@@ -7,3 +7,6 @@
7
7
  $("#editor_switch a").click (e) ->
8
8
  if $("form[data-changes-made]").length > 0
9
9
  e.preventDefault() unless confirm("<%= ::I18n.t('confirm_changes', :scope => 'refinery.js.admin') %>")
10
+
11
+ $("input[id=page_custom_slug]").change ->
12
+ $("#submit_continue_button").remove()
@@ -1,6 +1,10 @@
1
1
  module ::Refinery
2
2
  module Admin
3
3
  class DialogsController < ::Refinery::AdminController
4
+ def index
5
+ redirect_to refinery.admin_root_path
6
+ end
7
+
4
8
  def show
5
9
  @dialog_type = params[:id].downcase
6
10
 
@@ -3,6 +3,7 @@
3
3
  module Refinery
4
4
  class AdminController < ::ActionController::Base
5
5
  include ::Refinery::ApplicationController
6
+ helper ApplicationHelper
6
7
  helper Refinery::Core::Engine.helpers
7
8
  include Refinery::Admin::BaseController
8
9
 
@@ -6,18 +6,16 @@ module Refinery
6
6
  # replace all system images with a thumbnail version of them (handy for all images inside a page part)
7
7
  # for example, <%= content_fu(@page.content_for(:body), '96x96#c') %> converts all /system/images to a 96x96 cropped thumbnail
8
8
  def content_fu(content, thumbnail)
9
- content.gsub(%r{<img.+?src=['"](/system/images/.+?)/.+?/>}) do |image_match|
10
- begin
11
- uid = Dragonfly::Job.from_path(
12
- "#{image_match.match(%r{(/system/images/.+?)/})[1]}", Dragonfly[:refinery_images]
13
- ).uid
9
+ content.gsub(%r{<img.+?src=['"](/system/images/.+?)/.+?/>}) do |img|
10
+ begin
11
+ sha = img.match(%r{/system/images/(.+?)/})[1]
12
+ job = Dragonfly::Job.deserialize sha, Dragonfly[:refinery_images]
14
13
 
15
- image_fu Image.where(:image_uid => uid).first, thumbnail
16
- rescue
17
- # FAIL, don't care why but return what we found initially.
18
- image_match
19
- end
20
- end
14
+ image_fu Image.where(:image_uid => job.uid).first, thumbnail
15
+ rescue Dragonfly::Serializer::BadString
16
+ img
17
+ end
18
+ end
21
19
  end
22
20
 
23
21
  # image_fu is a helper for inserting an image that has been uploaded into a template.
@@ -13,7 +13,7 @@
13
13
  cancel_title = t('.cancel_lose_changes')
14
14
  end
15
15
  cancel_button_id ||= "cancel_button"
16
- cancel_url ||= (((back = url_for(:back)).include?('javascript') or action_name =~ /^(create|update)$/) ? refinery.send(Refinery.route_for_model(f.object.class, true)) : back)
16
+ cancel_url ||= (((back = url_for(:back)).include?('javascript') or action_name =~ /^(create|update)$/) ? refinery.send(Refinery.route_for_model(f.object.class, :plural => true)) : back)
17
17
  end
18
18
 
19
19
  continue_editing = defined?(continue_editing) ? continue_editing : (f.object.present? and f.object.persisted?)
@@ -36,8 +36,8 @@ cs:
36
36
  next: Další
37
37
  close: Zavřít
38
38
  image_picker:
39
- none_selected: Zatím není vybrán žádný %{what}, klikněte zde pro přidání.
40
- remove_current: Smazat vybraný %{what}
39
+ none_selected: Zatím není vybrán žádný obrázek, klikněte zde pro přidání.
40
+ remove_current: Smazat vybraný obrázek
41
41
  change: Klikněte zde pro vybrání obrázku
42
42
  show: Zobrazit
43
43
  resource_picker:
data/config/routes.rb CHANGED
@@ -5,7 +5,7 @@ Refinery::Core::Engine.routes.draw do
5
5
 
6
6
  namespace :admin, :path => 'refinery' do
7
7
  root :to => 'dashboard#index'
8
- resources :dialogs, :only => :show
8
+ resources :dialogs, :only => [:index, :show]
9
9
  end
10
10
 
11
11
  match '/refinery/update_menu_positions', :to => 'admin/core#update_plugin_positions'
@@ -2,6 +2,9 @@ Refinery::Core.configure do |config|
2
2
  # When true will rescue all not found errors and display a friendly error page
3
3
  config.rescue_not_found = Rails.env.production?
4
4
 
5
+ # When true this will force SSL redirection in all Refinery backend controllers.
6
+ # config.force_ssl = <%= Refinery::Core.force_ssl.inspect %>
7
+
5
8
  # When true will use Amazon's Simple Storage Service instead of
6
9
  # the default file system for storing resources and images
7
10
  config.s3_backend = !(ENV['S3_KEY'].nil? || ENV['S3_SECRET'].nil?)
@@ -2,68 +2,70 @@ source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'refinerycms', '~> 2.0.0'
5
+ gem 'refinerycms', '~> 2.0.3'
6
6
 
7
- # Refinery/rails should pull in the proper versions of these
8
- group :assets do
9
- gem 'sass-rails'
10
- gem 'coffee-rails'
11
- gem 'uglifier'
7
+ # Database Configuration
8
+ platforms :jruby do
9
+ gem 'activerecord-jdbcsqlite3-adapter'
10
+ gem 'activerecord-jdbcmysql-adapter'
11
+ gem 'activerecord-jdbcpostgresql-adapter'
12
+ gem 'jruby-openssl'
12
13
  end
13
14
 
14
- gem 'jquery-rails'
15
+ platforms :ruby do
16
+ gem 'sqlite3'
17
+ gem 'mysql2'
18
+ gem 'pg'
19
+ end
15
20
 
16
21
  group :development, :test do
17
- gem 'refinerycms-testing', '~> 2.0.0'
18
- gem 'factory_girl_rails'
19
- gem 'generator_spec'
20
-
21
- require 'rbconfig'
22
-
23
- platforms :jruby do
24
- gem 'activerecord-jdbcsqlite3-adapter'
25
- gem 'activerecord-jdbcmysql-adapter'
26
- gem 'activerecord-jdbcpostgresql-adapter'
27
- gem 'jruby-openssl'
28
- end
29
-
30
- unless defined?(JRUBY_VERSION)
31
- gem 'sqlite3'
32
- gem 'mysql2'
33
- gem 'pg'
34
- end
22
+ gem 'refinerycms-testing', '~> 2.0.3'
23
+ gem 'guard-rspec', '~> 0.7.0'
35
24
 
36
25
  platforms :mswin, :mingw do
37
- gem 'win32console'
26
+ gem 'win32console', '~> 1.3.0'
38
27
  gem 'rb-fchange', '~> 0.0.5'
39
28
  gem 'rb-notifu', '~> 0.0.4'
40
29
  end
41
30
 
42
31
  platforms :ruby do
43
- gem 'spork', '0.9.0.rc9'
44
- gem 'guard-spork'
32
+ gem 'spork', '~> 0.9.0'
33
+ gem 'guard-spork', '~> 0.5.2'
45
34
 
46
35
  unless ENV['TRAVIS']
36
+ require 'rbconfig'
47
37
  if RbConfig::CONFIG['target_os'] =~ /darwin/i
48
- gem 'rb-fsevent', '>= 0.3.9'
49
- gem 'growl', '~> 1.0.3'
38
+ gem 'rb-fsevent', '~> 0.9.0'
39
+ gem 'ruby_gntp', '~> 0.3.4'
50
40
  end
51
41
  if RbConfig::CONFIG['target_os'] =~ /linux/i
52
- gem 'rb-inotify', '>= 0.5.1'
53
- gem 'libnotify', '~> 0.1.3'
42
+ gem 'rb-inotify', '~> 0.8.8'
43
+ gem 'libnotify', '~> 0.7.2'
44
+ gem 'therubyracer', '~> 0.10.0'
54
45
  end
55
46
  end
56
47
  end
57
48
 
58
49
  platforms :jruby do
59
50
  unless ENV['TRAVIS']
51
+ require 'rbconfig'
60
52
  if RbConfig::CONFIG['target_os'] =~ /darwin/i
61
- gem 'growl', '~> 1.0.3'
53
+ gem 'ruby_gntp', '~> 0.3.4'
62
54
  end
63
55
  if RbConfig::CONFIG['target_os'] =~ /linux/i
64
- gem 'rb-inotify', '>= 0.5.1'
65
- gem 'libnotify', '~> 0.1.3'
56
+ gem 'rb-inotify', '~> 0.8.8'
57
+ gem 'libnotify', '~> 0.7.2'
66
58
  end
67
59
  end
68
60
  end
69
61
  end
62
+
63
+ # Gems used only for assets and not required
64
+ # in production environments by default.
65
+ group :assets do
66
+ gem 'sass-rails'
67
+ gem 'coffee-rails'
68
+ gem 'uglifier'
69
+ end
70
+
71
+ gem 'jquery-rails', '~> 2.0.0'
@@ -8,7 +8,7 @@ guard 'spork', :wait => 60, :cucumber => false, :rspec_env => { 'RAILS_ENV' => '
8
8
  watch(%r{^vendor/extensions/(.+)/spec/support/.+\.rb$})
9
9
  end
10
10
 
11
- guard 'rspec', :version => 2, :cli => "--color --drb --format Fuubar", :all_on_start => false, :all_after_pass => false do
11
+ guard 'rspec', :version => 2, :cli => (['~/.rspec', '.rspec'].map{|f| File.read(File.expand_path(f)).split("\n").join(' ') if File.exists?(File.expand_path(f))}.join(' ')) do
12
12
  watch(%r{^spec/.+_spec\.rb$})
13
13
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
14
14
  watch('spec/spec_helper.rb') { "spec" }
@@ -1,28 +1,40 @@
1
1
  module Refinery
2
2
  module <%= namespacing %>
3
3
  class <%= class_name %> < Refinery::Core::BaseModel
4
- <% if table_name == namespacing.underscore.pluralize -%>self.table_name = 'refinery_<%= plural_name %>'<% end -%>
5
- <% if localized? %>
6
- translates <%= localized_attributes.map{|a| ":#{a.name}"}.join(', ') %><% end %>
7
- <% if (string_attributes = attributes.select{ |a| a.type.to_s =~ /string|text/ }.uniq).any? %>
4
+ <% if table_name == namespacing.underscore.pluralize -%>
5
+ self.table_name = 'refinery_<%= plural_name %>'
6
+ <% end -%>
7
+ <% if localized? -%>
8
+
9
+ translates <%= localized_attributes.map{|a| ":#{a.name}"}.join(', ') %>
10
+
11
+ class Translation
12
+ attr_accessible :locale
13
+ end
14
+ <% end -%>
15
+ <% if (string_attributes = attributes.select{ |a| a.type.to_s =~ /string|text/ }.uniq).any? -%>
16
+
17
+ attr_accessible <%= string_attributes.first.name.to_sym.inspect %>, :position
18
+
8
19
  acts_as_indexed :fields => <%= string_attributes.map{|s| s.name.to_sym}.inspect %>
9
20
 
10
21
  validates <%= string_attributes.first.name.to_sym.inspect %>, :presence => true, :uniqueness => true
11
- <% else %>
22
+ <% else -%>
23
+
12
24
  # def title was created automatically because you didn't specify a string field
13
25
  # when you ran the refinery:engine generator. <3 <3 Refinery CMS.
14
26
  def title
15
27
  "Override def title in vendor/extensions/<%= namespacing.underscore %>/app/models/refinery/<%= namespacing.underscore %>/<%= singular_name %>.rb"
16
28
  end
17
- <% end -%>
18
- <% attributes.select{|a| a.type.to_s == 'image'}.uniq.each do |a| -%>
29
+ <% end -%>
30
+ <% attributes.select{|a| a.type.to_s == 'image'}.uniq.each do |a| -%>
19
31
 
20
32
  belongs_to :<%= a.name.gsub("_id", "") -%>, :class_name => '::Refinery::Image'
21
- <% end -%>
22
- <% attributes.select{|a| a.type.to_s == 'resource'}.uniq.each do |a| -%>
33
+ <% end -%>
34
+ <% attributes.select{|a| a.type.to_s == 'resource'}.uniq.each do |a| -%>
23
35
 
24
36
  belongs_to :<%= a.name.gsub("_id", "") %>, :class_name => '::Refinery::Resource'
25
- <% end %>
37
+ <% end -%>
26
38
  end
27
39
  end
28
40
  end
@@ -1,11 +1,12 @@
1
+ <% title_attribute = (title = attributes.detect { |a| a.type.to_s == "string" }).present? ? title.name : title -%>
1
2
  <li class='clearfix record <%%= cycle("on", "on-hover") %>' id="<%%= dom_id(<%= singular_name %>) -%>">
2
3
  <span class='title'>
3
- <%%= <%= singular_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? -%>.<%= title.name %><% else %>.title<%end %> %>
4
+ <%%= <%= singular_name %>.<%= title_attribute %> %>
4
5
  <% if localized? %>
5
6
  <%% if Refinery.i18n_enabled? and Refinery::I18n.frontend_locales.many? %>
6
7
  <span class='preview'>
7
8
  <%% <%= singular_name %>.translations.each do |translation| %>
8
- <%% if translation.title.present? %>
9
+ <%% if translation.<%= title_attribute %>.present? %>
9
10
  <%%= link_to refinery_icon_tag("flags/#{translation.locale}.png", :size => '16x11'),
10
11
  refinery.edit_<%= namespacing.underscore %>_admin_<%= singular_name %>_path(<%= singular_name %>, :switch_locale => translation.locale),
11
12
  :class => 'locale' %>
@@ -26,7 +27,7 @@
26
27
  <%%= link_to refinery_icon_tag("delete.png"), refinery.<%= namespacing.underscore %>_admin_<%= singular_name %>_path(<%= singular_name %>),
27
28
  :class => "cancel confirm-delete",
28
29
  :title => t('.delete'),
29
- :confirm => t('message', :scope => 'refinery.admin.delete', :title => <%= singular_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? %>.<%= title.name %><% else %>.title<% end %>),
30
+ :confirm => t('message', :scope => 'refinery.admin.delete', :title => <%= singular_name %>.<%= title_attribute %>),
30
31
  :method => :delete %>
31
32
  </span>
32
- </li>
33
+ </li>
@@ -2,7 +2,14 @@ def setup_environment
2
2
  # Configure Rails Environment
3
3
  ENV["RAILS_ENV"] ||= 'test'
4
4
 
5
- require File.expand_path("../dummy/config/environment", __FILE__)
5
+ if File.exist?(dummy_path = File.expand_path('../spec/dummy/config/environment.rb', __FILE__))
6
+ require dummy_path
7
+ elsif File.dirname(__FILE__) =~ %r{vendor/extensions}
8
+ # Require the path to the refinerycms application this is vendored inside.
9
+ require File.expand_path('../../../../../config/environment', __FILE__)
10
+ else
11
+ raise "Could not find a config/environment.rb file to require. Please specify this in spec/spec_helper.rb"
12
+ end
6
13
 
7
14
  require 'rspec/rails'
8
15
  require 'capybara/rspec'
@@ -1,5 +1,4 @@
1
1
  require 'action_controller'
2
- require 'application_helper'
3
2
 
4
3
  module Refinery
5
4
  module Admin
@@ -52,10 +51,13 @@ module Refinery
52
51
  end
53
52
 
54
53
  def restrict_controller
55
- # if ::Refinery::Plugins.active.reject { |plugin| params[:controller] !~ Regexp.new(plugin.menu_match)}.empty?
56
- # warn "'#{current_refinery_user.username}' tried to access '#{params[:controller]}' but was rejected."
57
- # error_404
58
- # end
54
+ # We need to remove the admin/ section since the path is silent for the
55
+ # namespace.
56
+ path = params[:controller].gsub('admin/', '')
57
+ unless ::Refinery::Plugins.active.any? {|plugin| path =~ Regexp.new(plugin.menu_match) }
58
+ logger.warn "'#{current_refinery_user.username}' tried to access '#{path}' but was rejected."
59
+ error_404
60
+ end
59
61
  end
60
62
 
61
63
  private
@@ -17,6 +17,8 @@ module Refinery
17
17
 
18
18
  send :before_filter, :refinery_user_required?
19
19
 
20
+ send :before_filter, :force_ssl?, :if => :admin?
21
+
20
22
  send :after_filter, :store_current_location!,
21
23
  :if => Proc.new {|c| send(:refinery_user?) }
22
24
 
@@ -63,12 +65,16 @@ module Refinery
63
65
 
64
66
  protected
65
67
 
68
+ def force_ssl?
69
+ redirect_to :protocol => 'https' if !request.ssl? && Refinery::Core.force_ssl
70
+ end
71
+
66
72
  # use a different model for the meta information.
67
73
  def present(model)
68
74
  @meta = presenter_for(model).new(model)
69
75
  end
70
76
 
71
- def presenter_for(model, default=BasePresenter)
77
+ def presenter_for(model, default = BasePresenter)
72
78
  return default if model.nil?
73
79
 
74
80
  "#{model.class.name}Presenter".constantize
@@ -7,7 +7,7 @@ module Refinery
7
7
  :menu_hide_children, :menu_css, :dragonfly_secret, :ie6_upgrade_message_enabled,
8
8
  :show_internet_explorer_upgrade_message, :wymeditor_whitelist_tags,
9
9
  :javascripts, :stylesheets, :s3_bucket_name, :s3_region, :s3_access_key_id,
10
- :s3_secret_access_key
10
+ :s3_secret_access_key, :force_ssl
11
11
 
12
12
  self.rescue_not_found = false
13
13
  self.s3_backend = false
@@ -27,6 +27,7 @@ module Refinery
27
27
  self.s3_region = ENV['S3_REGION']
28
28
  self.s3_access_key_id = ENV['S3_KEY']
29
29
  self.s3_secret_access_key = ENV['S3_SECRET']
30
+ self.force_ssl = false
30
31
 
31
32
  def config.register_javascript(name)
32
33
  self.javascripts << name
@@ -36,12 +37,18 @@ module Refinery
36
37
  self.stylesheets << Stylesheet.new(*args)
37
38
  end
38
39
 
39
- def self.clear_javascripts!
40
- self.javascripts = []
41
- end
40
+ class << self
41
+ def clear_javascripts!
42
+ self.javascripts = []
43
+ end
42
44
 
43
- def self.clear_stylesheets!
44
- self.stylesheets = []
45
+ def clear_stylesheets!
46
+ self.stylesheets = []
47
+ end
48
+
49
+ def site_name
50
+ ::I18n.t('site_name', :scope => 'refinery.core.config', :default => config.site_name)
51
+ end
45
52
  end
46
53
 
47
54
  # wrapper for stylesheet registration
@@ -57,7 +57,7 @@ module Refinery
57
57
  plugin.version = Refinery.version
58
58
  plugin.hide_from_menu = true
59
59
  plugin.always_allow_access = true
60
- plugin.menu_match = /refinery\/(refinery_core)$/
60
+ plugin.menu_match = /refinery\/(refinery_)?core$/
61
61
  end
62
62
  end
63
63
 
@@ -96,8 +96,12 @@ module Refinery
96
96
  end
97
97
 
98
98
  # set the manifests and assets to be precompiled
99
- initializer "refinery.assets.precompile" do |app|
99
+ initializer "refinery.assets.precompile", :group => :all do |app|
100
100
  app.config.assets.precompile += [
101
+ "home.css",
102
+ "formatting.css",
103
+ "theme.css",
104
+ "admin.js",
101
105
  "refinery/*",
102
106
  "refinery/icons/*",
103
107
  "wymeditor/lang/*",
data/lib/refinery/core.rb CHANGED
@@ -137,23 +137,39 @@ module Refinery
137
137
  Refinery::Version.to_s
138
138
  end
139
139
 
140
- # Returns string version of url helper path. We need this to temporary support namespaces
140
+ # Returns string version of url helper path. We need this to temporarily support namespaces
141
141
  # like Refinery::Image and Refinery::Blog::Post
142
142
  #
143
143
  # Example:
144
- # Refinery.route_for_model("Refinery::Image") => "admin_image_path"
145
- # Refinery.route_for_model(Refinery::Image, true) => "admin_images_path"
144
+ # Refinery.route_for_model(Refinery::Image) => "admin_image_path"
145
+ # Refinery.route_for_model(Refinery::Image, {:plural => true}) => "admin_images_path"
146
146
  # Refinery.route_for_model(Refinery::Blog::Post) => "blog_admin_post_path"
147
- # Refinery.route_for_model(Refinery::Blog::Post, true) => "blog_admin_posts_path"
148
- def route_for_model(klass, plural = false)
149
- parts = klass.to_s.underscore.split('/').delete_if { |p| p.blank? }
147
+ # Refinery.route_for_model(Refinery::Blog::Post, {:plural => true}) => "blog_admin_posts_path"
148
+ # Refinery.route_for_model(Refinery::Blog::Post, {:admin => false}) => "blog_post_path"
149
+ def route_for_model(klass, options = {})
150
+ if [TrueClass, FalseClass].include? options.class
151
+ options = {:plural => options}
152
+ Refinery.deprecate "[Refinery.route_for_model] 'plural' argument",
153
+ :when => '2.1',
154
+ :replacement => '{:plural => false}'
155
+ end
156
+
157
+ options = {:plural => false, :admin => true}.merge options
158
+
159
+ klass = klass.constantize if klass.respond_to?(:constantize)
160
+ active_name = ActiveModel::Name.new(klass, (Refinery if klass.parents.include?(Refinery)))
161
+
162
+ if options[:admin]
163
+ # Most of the time this gets rid of 'refinery'
164
+ parts = active_name.underscore.split('/').reject{|name| active_name.singular_route_key.exclude?(name)}
165
+ resource_name = parts.pop
166
+ resource_name = options[:plural] ? resource_name.pluralize : resource_name.singularize
150
167
 
151
- resource_name = plural ? parts[-1].pluralize : parts[-1]
168
+ [parts.join("_"), "admin", resource_name, "path"].reject(&:blank?).join "_"
169
+ else
170
+ path = options[:plural] ? active_name.route_key : active_name.singular_route_key
152
171
 
153
- if parts.size == 2
154
- "admin_#{resource_name}_path"
155
- elsif parts.size > 2
156
- [parts[1..-2].join("_"), "admin", resource_name, "path"].join("_")
172
+ [path, 'path'].join '_'
157
173
  end
158
174
  end
159
175
 
data/lib/refinery/crud.rb CHANGED
@@ -29,7 +29,7 @@ module Refinery
29
29
  :order => ('position ASC' if this_class.table_exists? && this_class.column_names.include?('position')),
30
30
  :paging => true,
31
31
  :per_page => false,
32
- :redirect_to_url => "refinery.#{Refinery.route_for_model(class_name.constantize, true)}",
32
+ :redirect_to_url => "refinery.#{Refinery.route_for_model(class_name.constantize, :plural => true)}",
33
33
  :searchable => true,
34
34
  :search_conditions => '',
35
35
  :sortable => true,
data/lib/refinery/menu.rb CHANGED
@@ -22,10 +22,6 @@ module Refinery
22
22
  items.map(&:title).join(' ')
23
23
  end
24
24
 
25
- def inspect
26
- items.map(&:inspect)
27
- end
28
-
29
25
  # The delegation is specified so crazily so that it works on 1.8.x and 1.9.x
30
26
  delegate *((Array.instance_methods - Object.instance_methods) << {:to => :items})
31
27
  end
@@ -2,7 +2,7 @@ module Refinery
2
2
  class Version
3
3
  @major = 2
4
4
  @minor = 0
5
- @tiny = 3
5
+ @tiny = 4
6
6
  @build = nil
7
7
 
8
8
  class << self
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.email = %q{info@refinerycms.com}
14
14
  s.homepage = %q{http://refinerycms.com}
15
15
  s.rubyforge_project = %q{refinerycms}
16
- s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
16
+ s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski', 'David Jones', 'Steven Heidel']
17
17
  s.license = %q{MIT}
18
18
  s.require_paths = %w(lib)
19
19
 
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.add_dependency 'acts_as_indexed', '~> 0.7.7'
24
24
  s.add_dependency 'friendly_id', '~> 4.0.1'
25
25
  s.add_dependency 'globalize3', '~> 0.2.0'
26
- s.add_dependency 'awesome_nested_set', '~> 2.1.0'
26
+ s.add_dependency 'awesome_nested_set', '~> 2.1.3'
27
27
  s.add_dependency 'rails', ['>= 3.1.3', '< 3.3']
28
28
  s.add_dependency 'truncate_html', '~> 0.5'
29
29
  s.add_dependency 'will_paginate', '~> 3.0.2'
@@ -5,7 +5,7 @@ module Refinery
5
5
  describe CoreController do
6
6
  login_refinery_user
7
7
 
8
- it "should update the plugin positions" do
8
+ it "updates the plugin positions" do
9
9
  plugins = refinery_user.plugins.reverse.collect(&:name)
10
10
 
11
11
  post 'update_plugin_positions', :menu => plugins
@@ -1,38 +1,46 @@
1
- require "spec_helper"
1
+ require 'spec_helper'
2
2
 
3
3
  describe Refinery::Activity do
4
4
  before { module X; module Y; class Z; end; end; end }
5
5
 
6
- let(:activity) { Refinery::Activity.new(:class_name => "X::Y::Z") }
6
+ let(:activity) { Refinery::Activity.new(:class_name => 'X::Y::Z') }
7
7
 
8
- describe "#base_class_name" do
9
- it "should return the base class name, less module nesting" do
10
- activity.base_class_name.should == "Z"
8
+ describe '#base_class_name' do
9
+ it 'returns the base class name, less module nesting' do
10
+ activity.base_class_name.should == 'Z'
11
11
  end
12
12
  end
13
13
 
14
- describe "#klass" do
15
- it "returns class constant" do
14
+ describe '#klass' do
15
+ it 'returns class constant' do
16
16
  activity.klass.should == X::Y::Z
17
17
  end
18
18
  end
19
19
 
20
- describe "#url_prefix" do
21
- it "returns edit_ by default" do
22
- activity.url_prefix.should == "edit_"
20
+ describe '#url_prefix' do
21
+ it 'returns edit_ by default' do
22
+ activity.url_prefix.should == 'edit_'
23
23
  end
24
24
 
25
- it "returns user specified prefix" do
26
- activity.url_prefix = "testy"
27
- activity.url_prefix.should == "testy_"
28
- activity.url_prefix = "testy_"
29
- activity.url_prefix.should == "testy_"
25
+ it 'returns user specified prefix' do
26
+ activity.url_prefix = 'testy'
27
+ activity.url_prefix.should == 'testy_'
28
+ activity.url_prefix = 'testy_'
29
+ activity.url_prefix.should == 'testy_'
30
30
  end
31
31
  end
32
32
 
33
- describe "#url" do
34
- it "should return the url" do
35
- activity.url.should == "refinery.edit_y_admin_z_path"
33
+ describe '#url' do
34
+ it 'returns the url' do
35
+ activity.url.should == 'refinery.edit_x_y_admin_z_path'
36
+ end
37
+ end
38
+
39
+ describe '#url with Refinery namespace' do
40
+ before { module Refinery; module Y; class Z; end; end; end }
41
+ let(:activity) { Refinery::Activity.new(:class_name => 'Refinery::Y::Z') }
42
+ it 'returns the url' do
43
+ activity.url.should == 'refinery.edit_y_admin_z_path'
36
44
  end
37
45
  end
38
46
  end
@@ -1,43 +1,76 @@
1
1
  require "spec_helper"
2
2
 
3
- describe "Refinery::ApplicationController" do
4
- describe "DummyController", :type => :controller do
5
- controller do
6
- include ::Refinery::ApplicationController
7
- end
3
+ module Refinery
4
+ describe ApplicationController do
5
+ describe "DummyController", :type => :controller do
6
+ controller do
7
+ include ::Refinery::ApplicationController
8
8
 
9
- describe ".home_page?" do
10
- it "matches root url" do
11
- controller.stub(:root_path).and_return("/")
12
- request.stub(:path).and_return("/")
13
- controller.home_page?.should be_true
9
+ def index
10
+ render :nothing => true
11
+ end
14
12
  end
15
13
 
16
- it "matches localised root url" do
17
- controller.refinery.stub(:root_path).and_return("/en/")
18
- request.stub(:path).and_return("/en")
19
- controller.home_page?.should be_true
20
- end
14
+ describe ".home_page?" do
15
+ it "matches root url" do
16
+ controller.stub(:root_path).and_return("/")
17
+ request.stub(:path).and_return("/")
18
+ controller.home_page?.should be_true
19
+ end
21
20
 
22
- it "escapes regexp" do
23
- request.stub(:path).and_return("\/huh)")
24
- expect { controller.home_page? }.to_not raise_error(RegexpError)
25
- end
26
- end
21
+ it "matches localised root url" do
22
+ controller.refinery.stub(:root_path).and_return("/en/")
23
+ request.stub(:path).and_return("/en")
24
+ controller.home_page?.should be_true
25
+ end
27
26
 
28
- describe "#presenter_for" do
29
- it "returns BasePresenter for nil" do
30
- controller.send(:presenter_for, nil).should eq(BasePresenter)
27
+ it "escapes regexp" do
28
+ request.stub(:path).and_return("\/huh)")
29
+ expect { controller.home_page? }.to_not raise_error(RegexpError)
30
+ end
31
31
  end
32
32
 
33
- it "returns BasePresenter when the instance's class does not have a presenter" do
34
- controller.send(:presenter_for, Object.new).should eq(BasePresenter)
33
+ describe "#presenter_for" do
34
+ it "returns BasePresenter for nil" do
35
+ controller.send(:presenter_for, nil).should eq(BasePresenter)
36
+ end
37
+
38
+ it "returns BasePresenter when the instance's class does not have a presenter" do
39
+ controller.send(:presenter_for, Object.new).should eq(BasePresenter)
40
+ end
41
+
42
+ it "returns the class's presenter when the instance's class has a presenter" do
43
+ controller.send(:presenter_for, Page.new).should eq(PagePresenter)
44
+ end
35
45
  end
36
46
 
37
- it "returns the class's presenter when the instance's class has a presenter" do
38
- model = Refinery::Page.new
39
- controller.send(:presenter_for, model).should eq(Refinery::PagePresenter)
47
+ describe "force_ssl" do
48
+ before(:each) do
49
+ controller.stub(:admin?).and_return(true)
50
+ controller.stub(:refinery_user_required?).and_return(false)
51
+ end
52
+
53
+ it "is false so standard HTTP is used" do
54
+ Refinery::Core.config.force_ssl = false
55
+
56
+ get :index
57
+
58
+ response.should_not be_redirect
59
+ end
60
+
61
+ it "is true so HTTPS is used" do
62
+ begin
63
+ Refinery::Core.config.force_ssl = true
64
+
65
+ get :index
66
+
67
+ response.should be_redirect
68
+ ensure
69
+ Refinery::Core.config.force_ssl = false
70
+ end
71
+ end
40
72
  end
73
+
41
74
  end
42
75
  end
43
76
  end
@@ -0,0 +1,37 @@
1
+ require 'spec_helper'
2
+
3
+ module Refinery
4
+ module Core
5
+ describe 'configuration' do
6
+ describe '.site_name' do
7
+ # reset any previously defined site name
8
+ before do
9
+ Refinery::Core.site_name = nil
10
+ end
11
+
12
+ context 'when set in configuration' do
13
+ it 'returns name set by Refinery::Core.config' do
14
+ Refinery::Core.stub(:site_name).and_return('Test Site Name')
15
+ Refinery::Core.site_name.should eq('Test Site Name')
16
+ end
17
+ end
18
+
19
+ context 'when set in locale file' do
20
+ before do
21
+ ::I18n.backend.store_translations :en, :refinery => {
22
+ :core => {
23
+ :config => {
24
+ :site_name => 'I18n Site Name'
25
+ }
26
+ }
27
+ }
28
+ end
29
+
30
+ it 'returns name set in locale' do
31
+ Refinery::Core.site_name.should eq('I18n Site Name')
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -137,39 +137,70 @@ describe Refinery do
137
137
  end
138
138
 
139
139
  describe ".route_for_model" do
140
- context "when passed Refinery::Dummy" do
140
+ context 'with Refinery::Dummy' do
141
+ module Refinery::Dummy
142
+ end
143
+
141
144
  it "returns admin_dummy_path" do
142
- Refinery.route_for_model("Refinery::Dummy").should == "admin_dummy_path"
145
+ Refinery.route_for_model(Refinery::Dummy).should == "admin_dummy_path"
143
146
  end
144
- end
145
147
 
146
- context "when passed Refinery::Dummy and true" do
147
- it "returns admin_dummies_path" do
148
- Refinery.route_for_model("Refinery::Dummy", true).should == "admin_dummies_path"
148
+ context ":plural => true" do
149
+ it "returns admin_dummies_path" do
150
+ Refinery.route_for_model(Refinery::Dummy, :plural => true).should == "admin_dummies_path"
151
+ end
149
152
  end
150
153
  end
151
154
 
152
- context "when passed Refinery::DummyName" do
155
+ context 'with Refinery::DummyName' do
156
+ module Refinery::DummyName
157
+ end
158
+
153
159
  it "returns admin_dummy_name_path" do
154
- Refinery.route_for_model("Refinery::DummyName").should == "admin_dummy_name_path"
160
+ Refinery.route_for_model(Refinery::DummyName).should == "admin_dummy_name_path"
155
161
  end
156
- end
157
162
 
158
- context "when passed Refinery::DummyName and true" do
159
- it "returns admin_dummy_names_path" do
160
- Refinery.route_for_model("Refinery::DummyName", true).should == "admin_dummy_names_path"
163
+ context ":plural => true" do
164
+ it "returns admin_dummy_names_path" do
165
+ Refinery.route_for_model(Refinery::DummyName, :plural => true).should == "admin_dummy_names_path"
166
+ end
161
167
  end
162
168
  end
163
169
 
164
- context "when passed Refinery::Dummy::Name" do
170
+ context 'with Refinery::Dummy::Name' do
171
+ module Refinery::Dummy
172
+ module Name
173
+ end
174
+ end
175
+
165
176
  it "returns dummy_admin_name_path" do
166
- Refinery.route_for_model("Refinery::Dummy::Name").should == "dummy_admin_name_path"
177
+ Refinery.route_for_model(Refinery::Dummy::Name).should == "dummy_admin_name_path"
178
+ end
179
+
180
+ context ":plural => true" do
181
+ it "returns dummy_admin_names_path" do
182
+ Refinery.route_for_model(Refinery::Dummy::Name, :plural => true).should == "dummy_admin_names_path"
183
+ end
184
+ end
185
+
186
+ context ":admin => false" do
187
+ it "returns dummy_name_path" do
188
+ Refinery.route_for_model(Refinery::Dummy::Name, :admin => false).should == 'dummy_name_path'
189
+ end
190
+ end
191
+
192
+ context ":admin => false, :plural => true" do
193
+ it "returns dummy_names_path" do
194
+ Refinery.route_for_model(Refinery::Dummy::Name, :admin => false, :plural => true).should == 'dummy_names_path'
195
+ end
167
196
  end
168
197
  end
198
+ end
169
199
 
170
- context "when passed Refinery::Dummy::Name and true" do
171
- it "returns dummy_admin_names_path" do
172
- Refinery.route_for_model("Refinery::Dummy::Name", true).should == "dummy_admin_names_path"
200
+ describe Refinery::Core::Engine do
201
+ describe "#helpers" do
202
+ it "should not include ApplicationHelper" do
203
+ Refinery::Core::Engine.helpers.ancestors.map(&:name).should_not include("ApplicationHelper")
173
204
  end
174
205
  end
175
206
  end
@@ -0,0 +1,37 @@
1
+ require 'spec_helper'
2
+
3
+ module Refinery
4
+ describe Menu do
5
+
6
+ let(:menu) do
7
+ page1 = FactoryGirl.create(:page, :title => 'test1')
8
+ page2 = FactoryGirl.create(:page, :title => 'test2', :parent_id => page1.id)
9
+ Refinery::Menu.new([page1, page2])
10
+ end
11
+
12
+ describe '.initialize' do
13
+ it "returns a collection of menu item objects" do
14
+ menu.each { |item| item.should be_an_instance_of(MenuItem) }
15
+ end
16
+ end
17
+
18
+ describe '#items' do
19
+ it 'returns a collection' do
20
+ menu.items.count.should eq(2)
21
+ end
22
+ end
23
+
24
+ describe '#roots' do
25
+ it 'returns a collection of items with parent_id == nil' do
26
+ menu.roots.collect(&:parent_id).should eq([nil])
27
+ end
28
+ end
29
+
30
+ describe '#to_s' do
31
+ it 'returns string of joined page titles' do
32
+ menu.to_s.should eq('test1 test2')
33
+ end
34
+ end
35
+
36
+ end
37
+ end
@@ -0,0 +1,27 @@
1
+ require "spec_helper"
2
+
3
+ module Refinery
4
+ describe "plugin access" do
5
+ context "as refinery user" do
6
+ login_refinery_user
7
+
8
+ context "with permission" do
9
+ it "allows access" do
10
+ visit refinery.admin_pages_path
11
+ page.body.should_not include '404'
12
+ end
13
+ end
14
+
15
+ context "without permission" do
16
+ before do
17
+ Refinery::User.first.plugins = []
18
+ end
19
+
20
+ it "denies access" do
21
+ visit refinery.admin_pages_path
22
+ page.body.should include '404'
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
metadata CHANGED
@@ -1,18 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Philip Arndt
9
9
  - Uģis Ozols
10
+ - Rob Yurkowski
10
11
  - David Jones
11
12
  - Steven Heidel
12
13
  autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
- date: 2012-04-02 00:00:00.000000000 Z
16
+ date: 2012-05-14 00:00:00.000000000 Z
16
17
  dependencies:
17
18
  - !ruby/object:Gem::Dependency
18
19
  name: acts_as_indexed
@@ -69,7 +70,7 @@ dependencies:
69
70
  requirements:
70
71
  - - ~>
71
72
  - !ruby/object:Gem::Version
72
- version: 2.1.0
73
+ version: 2.1.3
73
74
  type: :runtime
74
75
  prerelease: false
75
76
  version_requirements: !ruby/object:Gem::Requirement
@@ -77,7 +78,7 @@ dependencies:
77
78
  requirements:
78
79
  - - ~>
79
80
  - !ruby/object:Gem::Version
80
- version: 2.1.0
81
+ version: 2.1.3
81
82
  - !ruby/object:Gem::Dependency
82
83
  name: rails
83
84
  requirement: !ruby/object:Gem::Requirement
@@ -436,7 +437,6 @@ files:
436
437
  - app/controllers/refinery/admin_controller.rb
437
438
  - app/controllers/refinery/fast_controller.rb
438
439
  - app/controllers/refinery/sitemap_controller.rb
439
- - app/helpers/application_helper.rb
440
440
  - app/helpers/refinery/admin/core_helper.rb
441
441
  - app/helpers/refinery/admin/dialogs_helper.rb
442
442
  - app/helpers/refinery/admin_helper.rb
@@ -668,9 +668,12 @@ files:
668
668
  - spec/lib/generators/refinery/form/form_generator_spec.rb
669
669
  - spec/lib/refinery/activity_spec.rb
670
670
  - spec/lib/refinery/application_controller_spec.rb
671
+ - spec/lib/refinery/core/configuration_spec.rb
671
672
  - spec/lib/refinery/core_spec.rb
673
+ - spec/lib/refinery/menu_spec.rb
672
674
  - spec/lib/refinery/plugin_spec.rb
673
675
  - spec/lib/refinery/plugins_spec.rb
676
+ - spec/requests/refinery/admin/controller_restriction_spec.rb
674
677
  - spec/requests/refinery/admin/custom_assets_spec.rb
675
678
  - spec/requests/refinery/admin/dialogs_spec.rb
676
679
  - spec/requests/refinery/search_spec.rb
@@ -695,7 +698,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
695
698
  version: '0'
696
699
  segments:
697
700
  - 0
698
- hash: -1981756038234182476
701
+ hash: -1126553336485468710
699
702
  required_rubygems_version: !ruby/object:Gem::Requirement
700
703
  none: false
701
704
  requirements:
@@ -704,10 +707,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
704
707
  version: '0'
705
708
  segments:
706
709
  - 0
707
- hash: -1981756038234182476
710
+ hash: -1126553336485468710
708
711
  requirements: []
709
712
  rubyforge_project: refinerycms
710
- rubygems_version: 1.8.19
713
+ rubygems_version: 1.8.22
711
714
  signing_key:
712
715
  specification_version: 3
713
716
  summary: Core extension for Refinery CMS
@@ -728,9 +731,12 @@ test_files:
728
731
  - spec/lib/generators/refinery/form/form_generator_spec.rb
729
732
  - spec/lib/refinery/activity_spec.rb
730
733
  - spec/lib/refinery/application_controller_spec.rb
734
+ - spec/lib/refinery/core/configuration_spec.rb
731
735
  - spec/lib/refinery/core_spec.rb
736
+ - spec/lib/refinery/menu_spec.rb
732
737
  - spec/lib/refinery/plugin_spec.rb
733
738
  - spec/lib/refinery/plugins_spec.rb
739
+ - spec/requests/refinery/admin/controller_restriction_spec.rb
734
740
  - spec/requests/refinery/admin/custom_assets_spec.rb
735
741
  - spec/requests/refinery/admin/dialogs_spec.rb
736
742
  - spec/requests/refinery/search_spec.rb
@@ -1,5 +0,0 @@
1
- # Methods added to this helper will be available to all templates in the application.
2
-
3
- module ::ApplicationHelper
4
-
5
- end