Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: resolve/refinerycms
...
head fork: resolve/refinerycms
  • 14 commits
  • 26 files changed
  • 0 commit comments
  • 4 contributors
Commits on Mar 15, 2011
@BanzaiMan BanzaiMan Add missing critical single quotes 5d0da04
@BanzaiMan BanzaiMan No need for this patch 26d1c91
@parndt parndt Merge remote branch 'BanzaiMan/japanese' 8cac9b4
@parndt parndt Don't cache when logged in. 1cb139c
scambra fix typo in sortable list view a395740
Commits on Mar 16, 2011
@atj atj Check Refinery::I18n is defined in site bar helper and partial 57ef8bc
@parndt parndt wrapped up site bar translation locale logic into a method. c686251
@parndt parndt On initial database creation we don't need to remove the custom title…
… as it's removed by the very next migration (and AR doesn't reload in between different migrations so it would break it)
25eb532
@parndt parndt Removed join to translations table which should a) run faster and b) …
…not display duplicate entries in the results and c) Closes GH-532
7f73043
@parndt parndt Prevented index action on pages backend from inheriting the locale fr…
…om the 'just-saved' @page variable but instead use the locale that was intended.
39f63d3
@parndt parndt Removed config/settings.rb file so that we don't overwrite other peop…
…les'. Plus now we have config.after_initialize to handle this stuff gracefully through Rails. Closes GH-534.
59c3f35
@parndt parndt Avoid potential conflicts with 'refine' in Ruby 2.0 13ea3d7
@parndt parndt Create a default features/support/paths.rb file in the Rails.root for…
… the developer to write their own paths specific to the application and not any engine. Closes GH-531
6186edf
@parndt parndt Preparing for a 0.9.9.10 soon. 57db6aa
Showing with 97 additions and 108 deletions.
  1. +27 −27 Gemfile.lock
  2. +3 −3 authentication/refinerycms-authentication.gemspec
  3. +1 −1  base/lib/refinery/version.rb
  4. +2 −2 base/refinerycms-base.gemspec
  5. +0 −2  config/settings.rb
  6. +1 −1  core/app/views/shared/_menu.html.erb
  7. +1 −1  core/app/views/shared/_site_bar.html.erb
  8. +0 −2  core/lib/generators/templates/config/settings.rb
  9. +2 −9 core/lib/refinery/application.rb
  10. +10 −2 core/lib/refinery/helpers/site_bar_helper.rb
  11. +4 −5 core/refinerycms-core.gemspec
  12. +3 −3 dashboard/refinerycms-dashboard.gemspec
  13. +0 −7 db/migrate/20110307025652_translate_custom_title_on_pages.rb
  14. +3 −3 images/refinerycms-images.gemspec
  15. +11 −5 pages/app/controllers/admin/pages_controller.rb
  16. +1 −1  pages/app/models/page.rb
  17. +1 −1  pages/app/views/admin/pages/_sortable_list.html.erb
  18. +1 −1  pages/app/views/admin/pages/index.html.erb
  19. +0 −7 pages/db/migrate/20110307025652_translate_custom_title_on_pages.rb
  20. +3 −3 pages/refinerycms-pages.gemspec
  21. +10 −11 refinerycms.gemspec
  22. +3 −3 resources/refinerycms-resources.gemspec
  23. +3 −3 settings/refinerycms-settings.gemspec
  24. +2 −2 testing/features/support/paths.rb
  25. +2 −0  testing/lib/generators/refinerycms_testing_generator.rb
  26. +3 −3 testing/refinerycms-testing.gemspec
View
54 Gemfile.lock
@@ -1,47 +1,47 @@
PATH
remote: .
specs:
- refinerycms (0.9.9.9)
+ refinerycms (0.9.9.10)
bundler (~> 1.0)
- refinerycms-authentication (~> 0.9.9.9)
- refinerycms-base (~> 0.9.9.9)
- refinerycms-core (~> 0.9.9.9)
- refinerycms-dashboard (~> 0.9.9.9)
- refinerycms-images (~> 0.9.9.9)
- refinerycms-pages (~> 0.9.9.9)
- refinerycms-resources (~> 0.9.9.9)
- refinerycms-settings (~> 0.9.9.9)
- refinerycms-authentication (0.9.9.9)
+ refinerycms-authentication (~> 0.9.9.10)
+ refinerycms-base (~> 0.9.9.10)
+ refinerycms-core (~> 0.9.9.10)
+ refinerycms-dashboard (~> 0.9.9.10)
+ refinerycms-images (~> 0.9.9.10)
+ refinerycms-pages (~> 0.9.9.10)
+ refinerycms-resources (~> 0.9.9.10)
+ refinerycms-settings (~> 0.9.9.10)
+ refinerycms-authentication (0.9.9.10)
devise (~> 1.1)
- refinerycms-core (~> 0.9.9.9)
- refinerycms-base (0.9.9.9)
- refinerycms-core (0.9.9.9)
+ refinerycms-core (~> 0.9.9.10)
+ refinerycms-base (0.9.9.10)
+ refinerycms-core (0.9.9.10)
acts_as_indexed (~> 0.7)
friendly_id_globalize3 (~> 3.2.1)
globalize3 (>= 0.1.0.beta)
moretea-awesome_nested_set (~> 1.4)
rails (~> 3.0.5)
rdoc (>= 2.5.11)
- refinerycms-base (~> 0.9.9.9)
+ refinerycms-base (~> 0.9.9.10)
refinerycms-generators (~> 1.0)
- refinerycms-settings (~> 0.9.9.9)
+ refinerycms-settings (~> 0.9.9.10)
truncate_html (~> 0.5)
will_paginate (~> 3.0.pre)
- refinerycms-dashboard (0.9.9.9)
- refinerycms-core (~> 0.9.9.9)
- refinerycms-images (0.9.9.9)
+ refinerycms-dashboard (0.9.9.10)
+ refinerycms-core (~> 0.9.9.10)
+ refinerycms-images (0.9.9.10)
dragonfly (~> 0.8.2)
rack-cache (>= 0.5.3)
- refinerycms-core (~> 0.9.9.9)
- refinerycms-pages (0.9.9.9)
- refinerycms-core (~> 0.9.9.9)
- refinerycms-resources (0.9.9.9)
+ refinerycms-core (~> 0.9.9.10)
+ refinerycms-pages (0.9.9.10)
+ refinerycms-core (~> 0.9.9.10)
+ refinerycms-resources (0.9.9.10)
dragonfly (~> 0.8.2)
rack-cache (>= 0.5.3)
- refinerycms-core (~> 0.9.9.9)
- refinerycms-settings (0.9.9.9)
- refinerycms-base (~> 0.9.9.9)
- refinerycms-testing (0.9.9.9)
+ refinerycms-core (~> 0.9.9.10)
+ refinerycms-settings (0.9.9.10)
+ refinerycms-base (~> 0.9.9.10)
+ refinerycms-testing (0.9.9.10)
autotest
autotest-notification
autotest-rails
@@ -54,7 +54,7 @@ PATH
json_pure
launchy
rack-test (~> 0.5.6)
- refinerycms-core (~> 0.9.9.9)
+ refinerycms-core (~> 0.9.9.10)
rspec-rails (~> 2.5)
GEM
View
6 authentication/refinerycms-authentication.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-authentication}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.summary = %q{Authentication engine for Refinery CMS}
s.description = %q{The default authentication engine for Refinery CMS}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.require_paths = %w(lib)
s.executables = %w()
- s.add_dependency 'refinerycms-core', '~> 0.9.9.9'
+ s.add_dependency 'refinerycms-core', '~> 0.9.9.10'
s.add_dependency 'devise', '~> 1.1'
s.files = [
View
2  base/lib/refinery/version.rb
@@ -3,7 +3,7 @@ class Version
@major = 0
@minor = 9
@tiny = 9
- @build = 9
+ @build = 10
class << self
attr_reader :major, :minor, :tiny, :build
View
4 base/refinerycms-base.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-base}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.summary = %q{Base engine for Refinery CMS}
s.description = %q{The basic base for Refinery CMS Refinery CMS}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
View
2  config/settings.rb
@@ -1,2 +0,0 @@
-# Other settings go here as below.
-# These settings are ones that are set for all environments and need to be set AFTER the refinery boot process.
View
2  core/app/views/shared/_menu.html.erb
@@ -5,7 +5,7 @@
# Select top menu items unless 'roots' is supplied.
collection ||= @menu_pages.includes(:slugs)
caching = ((defined?(cache_menu) && cache_menu) || RefinerySetting.find_or_set(:cache_menu, false)) && File.writable?(Rails.cache.cache_path)
- cache_if(caching, [Refinery.base_cache_key, "pages_menus", dom_id, Globalize.locale, request.path].join('_')) do
+ cache_if(caching && !logged_in?, [Refinery.base_cache_key, "pages_menus", dom_id, Globalize.locale, request.path].join('_')) do
if (roots ||= collection.select{|p| p.parent_id.nil?}).present?
# In order to match items that aren't shown in menu and highlight their associations.
# This can be supplied if the logic is different in your case.
View
2  core/app/views/shared/_site_bar.html.erb
@@ -18,7 +18,7 @@
<%= RefinerySetting.find_or_set(:site_name, 'Company Name') %>
</span>
- <%= link_to t('.log_out', :locale => ::Refinery::I18n.current_locale),
+ <%= link_to t('.log_out', site_bar_translate_locale_args),
destroy_user_session_path, :id => 'logout' %>
</div>
</div>
View
2  core/lib/generators/templates/config/settings.rb
@@ -1,2 +0,0 @@
-# Other settings go here as below.
-# These settings are ones that are set for all environments and need to be set AFTER the refinery boot process.
View
11 core/lib/refinery/application.rb
@@ -3,7 +3,7 @@
module Refinery
module Application
class << self
- def refine!
+ def refinery!
::ApplicationHelper.send :include, ::Refinery::ApplicationHelper
[::ApplicationController, ::Admin::BaseController].each do |c|
@@ -35,14 +35,7 @@ def self.method_missing(method_sym, *arguments, &block)
# Include the refinery controllers and helpers dynamically
base.config.to_prepare do
- ::Refinery::Application.refine!
- end
-
- # load in any settings that the developer wants after the initialization.
- base.config.after_initialize do
- if (settings = Rails.root.join('config', 'settings.rb')).exist?
- require settings.to_s
- end
+ ::Refinery::Application.refinery!
end
end
end
View
12 core/lib/refinery/helpers/site_bar_helper.rb
@@ -4,13 +4,13 @@ module SiteBarHelper
# Generates the link to determine where the site bar switch button returns to.
def site_bar_switch_link
- link_to_if(admin?, t('.switch_to_your_website', :locale => ::Refinery::I18n.current_locale),
+ link_to_if(admin?, t('.switch_to_your_website', site_bar_translate_locale_args),
(if session.keys.include?(:website_return_to) and session[:website_return_to].present?
session[:website_return_to]
else
root_path(:locale => (::Refinery::I18n.default_frontend_locale if defined?(::Refinery::I18n) && ::Refinery::I18n.enabled?))
end)) do
- link_to t('.switch_to_your_website_editor', :locale => ::Refinery::I18n.current_locale),
+ link_to t('.switch_to_your_website_editor', site_bar_translate_locale_args),
(if session.keys.include?(:refinery_return_to) and session[:refinery_return_to].present?
session[:refinery_return_to]
else
@@ -19,6 +19,14 @@ def site_bar_switch_link
end
end
+ def site_bar_translate_locale_args
+ if defined?(::Refinery::I18n)
+ {:locale => ::Refinery::I18n.current_locale}
+ else
+ {}
+ end
+ end
+
end
end
end
View
9 core/refinerycms-core.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-core}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.summary = %q{Core engine for Refinery CMS}
s.description = %q{The core of Refinery CMS. This handles the common functionality and is required by most engines}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
@@ -14,8 +14,8 @@ Gem::Specification.new do |s|
s.require_paths = %w(lib)
s.executables = %w()
- s.add_dependency 'refinerycms-base', '~> 0.9.9.9'
- s.add_dependency 'refinerycms-settings', '~> 0.9.9.9'
+ s.add_dependency 'refinerycms-base', '~> 0.9.9.10'
+ s.add_dependency 'refinerycms-settings', '~> 0.9.9.10'
s.add_dependency 'refinerycms-generators', '~> 1.0'
s.add_dependency 'acts_as_indexed', '~> 0.7'
s.add_dependency 'friendly_id_globalize3', '~> 3.2.1'
@@ -136,7 +136,6 @@ Gem::Specification.new do |s|
'lib/generators/templates/config/i18n-js.yml',
'lib/generators/templates/config/initializers',
'lib/generators/templates/config/initializers/devise.rb',
- 'lib/generators/templates/config/settings.rb',
'lib/generators/templates/db',
'lib/generators/templates/db/seeds.rb',
'lib/refinery',
View
6 dashboard/refinerycms-dashboard.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-dashboard}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.summary = %q{Dashboard engine for Refinery CMS}
s.description = %q{The dashboard is usually the first engine the user sees in the backend of Refinery CMS. It displays useful information and contains links to common functionality.}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
@@ -71,5 +71,5 @@ Gem::Specification.new do |s|
'refinerycms-dashboard.gemspec'
]
- s.add_dependency 'refinerycms-core', '~> 0.9.9.9'
+ s.add_dependency 'refinerycms-core', '~> 0.9.9.10'
end
View
7 db/migrate/20110307025652_translate_custom_title_on_pages.rb
@@ -9,16 +9,9 @@ def self.up
end
end
-
- if ::Page.column_names.map(&:to_sym).include?(:custom_title)
- remove_column ::Page.table_name, :custom_title
- end
end
def self.down
- # Restore
- add_column ::Page.table_name, :custom_title, :string
-
# Re-save custom_title
::Page.all.each do |page|
::Page.update_all({
View
6 images/refinerycms-images.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-images}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.summary = %q{Images engine for Refinery CMS}
s.description = %q{Handles all image upload and processing functionality in Refinery CMS.}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
@@ -94,7 +94,7 @@ Gem::Specification.new do |s|
'spec/uploads/beach.jpeg'
]
- s.add_dependency 'refinerycms-core', '~> 0.9.9.9'
+ s.add_dependency 'refinerycms-core', '~> 0.9.9.10'
s.add_dependency 'dragonfly', '~> 0.8.2'
s.add_dependency 'rack-cache', '>= 0.5.3'
end
View
16 pages/app/controllers/admin/pages_controller.rb
@@ -20,18 +20,24 @@ def new
protected
+ # We can safely assume Refinery::I18n is defined because this method only gets
+ # Invoked when the before_filter from the plugin is run.
def globalize!
- super
+ unless action_name.to_s == 'index'
+ super
- # Check whether we need to override e.g. on the pages form.
- unless params[:switch_locale] or @page.try(:slug).nil? or !@page.persisted?
- Thread.current[:globalize_locale] = @page.slug.locale
+ # Check whether we need to override e.g. on the pages form.
+ unless params[:switch_locale] or @page.nil? or @page.slugs.where(:locale => Refinery::I18n.current_locale).nil? or !@page.persisted?
+ Thread.current[:globalize_locale] = @page.slug.locale
+ end
+ else
+ Thread.current[:globalize_locale] = nil
end
end
def show_errors_for_reserved_slug(exception)
flash[:error] = t('reserved_system_word', :scope => 'admin.pages')
- if params[:action] == 'update'
+ if action_name == 'update'
find_page
render :edit
else
View
2  pages/app/models/page.rb
@@ -40,7 +40,7 @@ class Page < ActiveRecord::Base
# This works using a query against the translated content first and then
# using all of the page_ids we further filter against this model's table.
scope :in_menu, lambda {
- where(:show_in_menu => true).joins(:translations).includes(:translations).where(
+ where(:show_in_menu => true).includes(:translations).where(
:id => Page::Translation.where(:locale => Globalize.locale).map(&:page_id)
)
}
View
2  pages/app/views/admin/pages/_sortable_list.html.erb
@@ -3,7 +3,7 @@
:collection => @pages.select{|p| p.parent_id.nil?},
:locals => {
:collection => @pages
- }, %>
+ } %>
</ul>
<%= render :partial => "/shared/admin/sortable_list",
:locals => {:continue_reordering => !!local_assigns[:continue_reordering]} %>
View
2  pages/app/views/admin/pages/index.html.erb
@@ -1,6 +1,6 @@
<section id='records' class='tree'>
<% caching = RefinerySetting.find_or_set(:cache_pages_backend, false) && File.writable?(Rails.cache.cache_path) %>
- <% cache_if(caching, [Refinery.base_cache_key, "pages_backend", Globalize.locale].join('_')) do %>
+ <% cache_if(caching && !logged_in?, [Refinery.base_cache_key, "pages_backend", Globalize.locale].join('_')) do %>
<%= render :partial => 'records' %>
<% end %>
</section>
View
7 pages/db/migrate/20110307025652_translate_custom_title_on_pages.rb
@@ -9,16 +9,9 @@ def self.up
end
end
-
- if ::Page.column_names.map(&:to_sym).include?(:custom_title)
- remove_column ::Page.table_name, :custom_title
- end
end
def self.down
- # Restore
- add_column ::Page.table_name, :custom_title, :string
-
# Re-save custom_title
::Page.all.each do |page|
::Page.update_all({
View
6 pages/refinerycms-pages.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-pages}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.summary = %q{Pages engine for Refinery CMS}
s.description = %q{The default content engine of Refinery CMS. This engine handles the administration and display of user-editable pages.}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
@@ -111,5 +111,5 @@ Gem::Specification.new do |s|
'spec/models/page_spec.rb'
]
- s.add_dependency 'refinerycms-core', '~> 0.9.9.9'
+ s.add_dependency 'refinerycms-core', '~> 0.9.9.10'
end
View
21 refinerycms.gemspec
@@ -2,9 +2,9 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.description = %q{A Ruby on Rails CMS that supports Rails 3. It's easy to extend and sticks to 'the Rails way' where possible.}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.summary = %q{A Ruby on Rails CMS that supports Rails 3}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
@@ -18,14 +18,14 @@ Gem::Specification.new do |s|
s.add_dependency 'bundler', '~> 1.0'
# Refinery CMS
- s.add_dependency 'refinerycms-authentication', '~> 0.9.9.9'
- s.add_dependency 'refinerycms-base', '~> 0.9.9.9'
- s.add_dependency 'refinerycms-core', '~> 0.9.9.9'
- s.add_dependency 'refinerycms-dashboard', '~> 0.9.9.9'
- s.add_dependency 'refinerycms-images', '~> 0.9.9.9'
- s.add_dependency 'refinerycms-pages', '~> 0.9.9.9'
- s.add_dependency 'refinerycms-resources', '~> 0.9.9.9'
- s.add_dependency 'refinerycms-settings', '~> 0.9.9.9'
+ s.add_dependency 'refinerycms-authentication', '~> 0.9.9.10'
+ s.add_dependency 'refinerycms-base', '~> 0.9.9.10'
+ s.add_dependency 'refinerycms-core', '~> 0.9.9.10'
+ s.add_dependency 'refinerycms-dashboard', '~> 0.9.9.10'
+ s.add_dependency 'refinerycms-images', '~> 0.9.9.10'
+ s.add_dependency 'refinerycms-pages', '~> 0.9.9.10'
+ s.add_dependency 'refinerycms-resources', '~> 0.9.9.10'
+ s.add_dependency 'refinerycms-settings', '~> 0.9.9.10'
s.files = [
'.gitignore',
@@ -55,7 +55,6 @@ Gem::Specification.new do |s|
'config/environments/development.rb',
'config/environments/production.rb',
'config/environments/test.rb',
- 'config/settings.rb',
'config.ru',
'lib',
'lib/refinery.rb',
View
6 resources/refinerycms-resources.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-resources}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.summary = %q{Resources engine for Refinery CMS}
s.description = %q{Handles all file upload and processing functionality in Refinery CMS.}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
@@ -87,7 +87,7 @@ Gem::Specification.new do |s|
'spec/uploads/refinery_is_awesome.txt'
]
- s.add_dependency 'refinerycms-core', '~> 0.9.9.9'
+ s.add_dependency 'refinerycms-core', '~> 0.9.9.10'
s.add_dependency 'dragonfly', '~> 0.8.2'
s.add_dependency 'rack-cache', '>= 0.5.3'
end
View
6 settings/refinerycms-settings.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-settings}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.summary = %q{Settings engine for Refinery CMS}
s.description = %q{The default settings engine that is required by Refinery CMS core. Adds programmer creatable, user editable settings for each engine.}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
@@ -83,5 +83,5 @@ Gem::Specification.new do |s|
'spec/models/refinery_setting_spec.rb'
]
- s.add_dependency 'refinerycms-base', '~> 0.9.9.9'
+ s.add_dependency 'refinerycms-base', '~> 0.9.9.10'
end
View
4 testing/features/support/paths.rb
@@ -1,4 +1,4 @@
-::Refinery::Plugins.registered.collect{|p|
+::Refinery::Plugins.registered.map{|p|
p.pathname.join('features', 'support', 'paths.rb')
}.reject{|p| !p.exist?}.each do |paths|
require paths
@@ -82,7 +82,7 @@ def path_to(page_name)
self.send(path_components.push('path').join('_').to_sym)
rescue Object => e
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
- "Now, go and add a mapping in #{__FILE__}"
+ "Now, go and add a mapping in #{Rails.root.join('features', 'support', 'paths.rb')}"
end
end
end
View
2  testing/lib/generators/refinerycms_testing_generator.rb
@@ -10,6 +10,8 @@ def generate
copy_file 'spec/spec_helper.rb', Rails.root.join('spec', 'spec_helper.rb')
copy_file 'spec/rcov.opts', Rails.root.join('spec', 'rcov.opts')
copy_file '.rspec', Rails.root.join('.rspec')
+ copy_file 'lib/generators/templates/features/support/paths.rb',
+ Rails.root.join('features', 'support', 'paths.rb')
end
end
View
6 testing/refinerycms-testing.gemspec
@@ -2,10 +2,10 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-testing}
- s.version = %q{0.9.9.9}
+ s.version = %q{0.9.9.10}
s.summary = %q{Testing plugin for Refinery CMS}
s.description = %q{This plugin adds the ability to run cucumber and rspec against the RefineryCMS gem while inside a RefineryCMS project}
- s.date = %q{2011-03-15}
+ s.date = %q{2011-03-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.require_paths = %w(lib)
s.executables = %w()
- s.add_dependency 'refinerycms-core', '~> 0.9.9.9'
+ s.add_dependency 'refinerycms-core', '~> 0.9.9.10'
# RSpec
s.add_dependency 'rspec-rails', '~> 2.5'

No commit comments for this range

Something went wrong with that request. Please try again.