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
  • 9 commits
  • 15 files changed
  • 0 commit comments
  • 4 contributors
View
2  Gemfile
@@ -41,7 +41,7 @@ end
#===REQUIRED FOR REFINERY GEM INSTALL===
# Leave the gem below disabled (commented out) if you're not using the gem install method.
-# gem 'refinerycms', '= 0.9.7.3'
+# gem 'refinerycms', '= 0.9.7.5'
#===END OF REFINERY GEM INSTALL REQUIREMENTS===
# Bundle gems for certain environments:
View
116 bin/refinery-upgrade-096-to-097
@@ -0,0 +1,116 @@
+#!/usr/bin/env ruby
+require 'pathname'
+require 'fileutils'
+require 'yaml'
+
+refinery_root = (defined?(REFINERY_ROOT) && REFINERY_ROOT.is_a?(Pathname) ? REFINERY_ROOT : Pathname.new(File.expand_path(File.dirname(__FILE__) << "/..")))
+unless (app_path = ARGV.shift).nil? or app_path.length == 0
+ puts "--------Updating--------\n\n"
+ # if "" or "." or "./" is specified then get the current directory otherwise accept the specified app_path.
+ if (app_path.length <= 2 and ((is_current_dir = app_path =~ /(\.(\/)?)/).nil? or is_current_dir < 2))
+ rails_root = Dir.getwd
+ else
+ rails_root = app_path =~ /^\// ? app_path : File.expand_path(File.join(Dir.getwd, app_path.gsub(/^\.\//, '')))
+ end
+ rails_root = Pathname.new(rails_root.to_s)
+
+ FileUtils::cp refinery_root.join('Gemfile').to_s, rails_root.join('Gemfile').to_s, :verbose => true
+ FileUtils::cp refinery_root.join('config', 'preinitializer.rb').to_s, rails_root.join('config', 'preinitializer.rb').to_s, :verbose => true
+
+ # try to figure out the database adapter..
+ db_adapter = 'sqlite3'
+ if rails_root.join('config', 'database.yml').exist?
+ db_config = YAML::load(rails_root.join('config', 'database.yml').open('r').read)
+ if db_config.keys.include?("development") && db_config["development"].keys.include?("adapter")
+ db_adapter = db_config["development"]["adapter"]
+ end
+ end
+
+ db_adapter = 'sqlite3' unless %w(sqlite3 mysql postgresql).include?(db_adapter)
+
+ # read in the Gemfile and write it back out with the refinerycms gem enabled.
+ (lines = refinery_root.join('Gemfile').open('r').read.split("\n")).each do |line|
+ line.gsub!(/\#*\s?gem 'refinerycms'/, "gem 'refinerycms'")
+
+ # Ensure that the correct database gem libraries are included for the database adapter
+ # that the user has specified in the refinery install command.
+ if line =~ /\#db\_adapter\=/
+ if line =~ %r{#db_adapter=#{db_adapter}}
+ line.gsub!(/^(\#*\s?gem)/, 'gem')
+ else
+ line.gsub!(/^(\s?gem)/, '# gem')
+ end
+ end
+ end
+
+ # write the new content into the file.
+ app_gemfile = File.open(File.join(%W(#{rails_root} Gemfile)), "w")
+ app_gemfile.puts(lines.join("\n"))
+ app_gemfile.close
+
+ # backup the config file.
+ app_config_file = 'application.rb'
+ FileUtils.cp rails_root.join('config', app_config_file).cleanpath.to_s, rails_root.join('config', "#{app_config_file.gsub('.rb', '')}.autobackupbyrefineryupgrade.rb").cleanpath.to_s, :verbose => true
+
+ # copy the new config file.
+ FileUtils.cp refinery_root.join('config', app_config_file).cleanpath.to_s, rails_root.join('config', app_config_file).cleanpath.to_s, :verbose => true
+
+ unless File.exist?(rails_root.join('config', 'settings.rb'))
+ FileUtils.cp refinery_root.join('config', 'settings.rb').cleanpath.to_s, rails_root.join('config', 'settings.rb').cleanpath.to_s, :verbose => true
+ end
+
+ unless (aai_config_file = rails_root.join('config', 'acts_as_indexed_config.rb')).exist?
+ FileUtils::cp refinery_root.join('config', 'acts_as_indexed_config.rb').to_s, aai_config_file.to_s, :verbose => true
+ end
+
+ # update routes files
+ puts "\nNow I'm verifying and updating your routing in your files and your plugins...\n"
+ Dir[rails_root.join('**', 'config', 'routes.rb')].map{|f| Pathname.new(f)}.each do |routes_file|
+ open_routes_file = routes_file.open('r')
+ lines = open_routes_file.read.split("\n")
+ original_lines = lines.dup
+ open_routes_file.close
+ lines.each do |line|
+ line.gsub!("map.namespace(:admin) do |admin|", "map.namespace(:admin, :path_prefix => 'refinery') do |admin|")
+ line.gsub!("map.connect 'admin/*path', :controller => 'admin/base', :action => 'error_404'",
+ "map.redirect 'admin/*path', :controller => 'admin/base'")
+ line.gsub!("map.connect '*path', :controller => 'application', :action => 'error_404'",
+ "map.connect 'refinery/*path', :controller => 'admin/base', :action => 'error_404'\n\n # Marketable URLs\n map.connect '*path', :controller => 'pages', :action => 'show'")
+ end
+ lines = lines.join("\n").split("\n")
+ open_routes_file = routes_file.open("w")
+ open_routes_file.puts(lines.join("\n"))
+ open_routes_file.close
+ puts "Made modifications to routes in #{routes_file} please ensure they are still valid." if original_lines != lines
+ end
+
+ puts "\nCopied files required to support the new RefineryCMS version 0.9.7"
+ puts "I backed up your config/application.rb file to #{rails_root.join('config', "#{app_config_file.gsub('.rb', '')}.autobackupbyrefineryupgrade.rb").cleanpath.to_s}"
+ puts "\nI think your database adapter is #{db_adapter} so that is what will be installed by bundler.\n\n"
+
+ # automate..
+ Dir.chdir(rails_root) do
+ puts "Installing gem requirements using bundler..\n"
+ puts (cmd="bundle install --without test")
+ puts `#{cmd}`
+
+ if rails_root.join('config', 'database.yml').exist?
+ puts "\n\nUpdating some core refinery files..\n"
+ puts (cmd="rake -f '#{File.join(rails_root, 'Rakefile')}' refinery:update from_installer=true")
+ puts `#{cmd}`
+
+ puts "\n\nMigrating your database..\n"
+ puts (cmd="rake -f '#{File.join(rails_root, 'Rakefile')}' db:migrate")
+ puts `#{cmd}`
+ else
+ puts "\nYour config/database.yml file is missing so I can't run a task that is required."
+ puts "Once you have your database file in place or are confident it will work without it please run:"
+ puts "\nrake refinery:update"
+ end
+ end
+
+ puts "\n--------Update complete--------\n\n"
+
+else
+ puts "\nPlease specify the path for the RefineryCMS application you want to upgrade. i.e. refinery-upgrade-096-to-097 /path/to/project"
+end
View
8 changelog.md
@@ -1,3 +1,11 @@
+## 0.9.7.5 [08 July 2010]
+
+- Wrote an upgrade task for migrating from 0.9.6.x releases of RefineryCMS. Just run refinery-update-096-to-097 inside your application's directory. [Philip Arndt]
+- Improved code used to include gem rake tasks and script/generate tasks into the Refinery application to fix issue with these tasks not being found [Philip Arndt]
+- Fixed a broken migration that would mean pages were missing upon upgrading [Jesper Hvirring Henriksen]
+- More pt-BR translation keys translated [Kivanio Barbosa]
+- [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.4...0.9.7.5)
+
## 0.9.7.4 [07 July 2010]
- Fixed critical issue in the i18n routing pattern that was matching prefixes like /news/ as a locale incorrectly. [Philip Arndt]
View
4 db/migrate/20100530205942_update_link_url_on_pages_from_inquiries_new_to_contact.rb
@@ -6,7 +6,7 @@ def self.up
:menu_match => "^/(inquiries|contact).*$"
})
end
- Page.find_all_by_menu_match('^/inquiries/thank_you$') do |page|
+ Page.find_all_by_menu_match('^/inquiries/thank_you$').each do |page|
page.update_attributes({
:link_url => '/contact/thank_you',
:menu_match => '^/(inquiries|contact)/thank_you$'
@@ -15,7 +15,7 @@ def self.up
end
def self.down
- Page.find_all_by_link_url('/contact/thank_you') do |page|
+ Page.find_all_by_link_url('/contact/thank_you').each do |page|
page.update_attributes({
:link_url => nil,
:menu_match => '^/inquiries/thank_you$'
View
9 db/migrate/20100708014636_ensure_user_plugins_use_name_and_not_title.rb
@@ -0,0 +1,9 @@
+class EnsureUserPluginsUseNameAndNotTitle < ActiveRecord::Migration
+ def self.up
+ rename_column :user_plugins, :title, :name if UserPlugin.table_exists? and UserPlugin.column_names.include?('title') and !UserPlugin.column_names.include?('name')
+ end
+
+ def self.down
+ # We don't need to go backwards, there already is one that should handle that..
+ end
+end
View
2  lib/gemspec.rb
@@ -18,7 +18,7 @@
s.homepage = %q{http://refinerycms.com}
s.authors = %w(Resolve\\ Digital David\\ Jones Philip\\ Arndt)
s.require_paths = %w(lib)
- s.executables = %w(refinery)
+ s.executables = %w(refinery refinery-upgrade-096-to-097)
s.files = [
'#{files.join("',\n '")}'
View
8 refinerycms.gemspec
@@ -1,14 +1,14 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms}
- s.version = %q{0.9.7.4}
+ s.version = %q{0.9.7.5}
s.description = %q{A beautiful open source Ruby on Rails content manager for small business. Easy to extend, easy to use, lightweight and all wrapped up in a super slick UI.}
- s.date = %q{2010-07-07}
+ s.date = %q{2010-07-08}
s.summary = %q{A beautiful open source Ruby on Rails content manager for small business.}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.authors = %w(Resolve\ Digital David\ Jones Philip\ Arndt)
s.require_paths = %w(lib)
- s.executables = %w(refinery)
+ s.executables = %w(refinery refinery-upgrade-096-to-097)
s.files = [
'.gitignore',
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
'app/helpers',
'app/helpers/application_helper.rb',
'bin/refinery',
+ 'bin/refinery-upgrade-096-to-097',
'config/acts_as_indexed_config.rb',
'config/amazon_s3.yml.example',
'config/application.rb',
@@ -80,6 +81,7 @@ Gem::Specification.new do |s|
'db/migrate/20100629081543_add_callback_proc_as_string_to_refinery_settings.rb',
'db/migrate/20100701053151_remove_superuser_from_users.rb',
'db/migrate/20100702022630_add_spam_to_inquiries.rb',
+ 'db/migrate/20100708014636_ensure_user_plugins_use_name_and_not_title.rb',
'db/schema.rb',
'db/seeds',
'db/seeds/inquiry_settings.rb',
View
2  vendor/plugins/images/config/locales/pt-BR.yml
@@ -15,7 +15,7 @@ pt-BR:
or: ou
replace_image: Substituir por esta...
current_image: Imagem atual
- maximum_image_size: "The maximum image size is {{megabytes}} megabytes."
+ maximum_image_size: "O tamanho máximo permitido é de {{megabytes}} megabytes."
index:
create_new_image: Criar Nova Imagem
no_images_yet: Ainda não existem imagens.<br/> Clique em "Criar Nova Imagem" para adicionar sua primeira imagem.
View
2  vendor/plugins/inquiries/config/locales/pt-BR.yml
@@ -46,6 +46,8 @@ pt-BR:
no_inquiries: "Urra! Não exitem mensagens abertas porque você lidou com todas elas."
closed_inquiries: Mensagens fechadas
havent_closed_any_inquiries: "Você ainda não fechou nenhuma mensagem."
+ spam:
+ no_spam: Urra! Não existem mensagens de spam.
show:
details: Detalhes
click_to_email: Clique para enviar email
View
21 vendor/plugins/pages/config/locales/pt-BR.yml
@@ -20,16 +20,15 @@ pt-BR:
meta_description_help: Meta palavras-chave
meta_description_help: Meta descrição
show_in_menu: Mostrar no menu
- admin:
+ admin:
pages:
page:
view_live: Vizualizar essa página agora <br/><em>(irá abrir uma nova janela)</em>
edit_this_page: Editar essa página
- confirm_delete_page_title: Deletar essa página
+ confirm_delete_page_title: Remover essa página
confirm_delete_page_message: "Você tem certeza que quer deletar a página '{{title}}'?"
hidden: oculta
draft: rascunho
-
form_advanced_options:
create_content_section: Criar seção de conteúdo
delete_content_section: Remover seção de conteúdo
@@ -48,14 +47,26 @@ pt-BR:
save_as_draft: Salvar como Rascunho
save: Salvar
cancel: Cancelar
+ show_in_menu_title: Mostrar no menu
+ show_in_menu_description: Mostra esta página no menu do site
+ show_in_menu_help: "Desmarque está opção caso queira remover a página do menu do site. Pode ser útil caso queira linkar um outra página para esta, mas não quer que esta apareça no menu do site."
+ skip_to_first_child: Pular esta página
+ skip_to_first_child_label: Redieciona os visitante para a primeira página a baixo desta no menu.
+ skip_to_first_child_help: "Está opção faz com que o link desta página aponte para o primeiro link do menu a baixo dessa."
+ link_url: "Redirecionar esta página para outro site ou página"
+ link_url_help: "Se você quer que esta página seja redicionada para outro site ou página quando você clicar nesta página no menu, digite a URL. ex. http://google.com ou deixe em branco."
+ parent_page: Página pai
+ parent_page_help: "Se você quer colocar está página a baixo de outra página no menu, selecione qual página aqui ou deixe em branco caso queria a página na raiz do menu."
+ custom_title: Título opcional
+ custom_title_help: "Se você quer que a página tenha um título diferente do que é mostrado no menu então selecione &apos;Texto&apos; e digite o novo título."
form_advanced_options_seo:
seo: Otimização de Motor de Busca
seo_override_title: Se você quiser sobrescrever o título padrão do navegador, faça isso aqui.
seo_override_title_help: Se você quiser substituir o título do navegador padrão, fazê-lo aqui.
meta_keywords_title: Meta palavras-chave
- meta_description_help: Entre entre 5-10 palavras-chave que se relacionam a esta página. Separe as palavras-chave por vírgula.
+ meta_keywords_help: Digite entre 5-10 palavras-chave que se relacionam a esta página. Separe as palavras-chave por vírgula.
meta_description_title: Meta descrição
- meta_description_help: Entre duas ou três sentenças concisas descrevendo sobre o que é essa página.
+ meta_description_help: Digite duas ou três sentenças concisas descrevendo sobre o que é essa página.
js:
content_section:
create: Criar Seção de Conteúdo
View
3  vendor/plugins/refinery/config/locales/pt-BR.yml
@@ -40,7 +40,10 @@ pt-BR:
or_cancel: ou
cancel: Cancelar
or_continue: ou
+ delete: Remover
cancel_lose_changes: "Cancelar irá fazer com que você perca as alterações que tenha feito a este {{object_name}}"
+ previous: Anterior
+ next: Próximo
image_picker:
none_selected: "Atualmente não existe nenhum {{what}} selecionado, por favor clique aqui para adicionar um."
remove_current: "Remover {{what}} atual"
View
9 vendor/plugins/refinery/lib/refinery.rb
@@ -24,15 +24,8 @@ def version
end
class Version
- MAJOR = 0
- MINOR = 9
- TINY = 7
- BUILD = 4
-
- STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
-
def self.to_s
- STRING
+ %q{0.9.7.5}
end
end
View
17 vendor/plugins/refinery/lib/refinery/initializer.rb
@@ -12,7 +12,7 @@ module Refinery
class Configuration < Rails::Configuration
def default_plugin_paths
- paths = super.push(Refinery.root.join("vendor", "plugins").to_s).uniq
+ super.push(Refinery.root.join("vendor", "plugins").to_s).uniq
end
end
@@ -21,22 +21,21 @@ def add_plugin_load_paths
# call Rails' add_plugin_load_paths
super
- # add plugin lib paths to the $LOAD_PATH so that rake tasks etc. can be run when using a gem for refinery or gems for plugins.
- search_for = Regexp.new(Refinery.root.join("vendor", "plugins", ".+?", "lib").to_s)
-
# find all the plugin paths
paths = plugins.collect{ |plugin| plugin.load_paths }.flatten
# just use lib paths from Refinery engines
- paths = paths.reject{|path| path.scan(search_for).empty? or path.include?('/rails-') }
-
+ paths = paths.reject{|path| path.scan(/lib$/).empty? or path.include?('/rails-') }
+
# reject Refinery lib paths if they're already included in this app.
paths = paths.reject{ |path| path.include?(Refinery.root.to_s) } unless Refinery.is_a_gem
paths.uniq!
- ($refinery_gem_plugin_lib_paths = paths).each do |path|
- $LOAD_PATH.unshift path
- end
+ # Save the paths to a global variable so that the application can access them too
+ # and unshift them onto the load path.
+ ($refinery_gem_plugin_lib_paths = paths).each { |path| $LOAD_PATH.unshift(path) }
+
+ # Ensure we haven't caused any duplication
$LOAD_PATH.uniq!
end
end
View
34 vendor/plugins/refinery_settings/config/locales/pt-BR.yml
@@ -6,18 +6,40 @@ pt-BR:
refinery_setting:
name: Nome
value: Valor
+ restricted: Restrito
admin:
refinery_settings:
- form:
- restart_may_be_in_order: <strong>Por favor note</strong> que você pode precisar reiniciar o website para que esta configuração tenha efeito.
- index:
- new: Criar nova configuração
- empty_set: Ainda não há configurações.
- create_first: "Clique em '{{link}}' para adicionar sua primeira configuração."
refinery_setting:
edit: 'Editar esta configuração'
confirm: 'Tem certeza que deseja remover esta configuração para sempre?'
remove: 'Remover esta configuração para sempre'
+ index:
+ new: Criar nova configuração
+ empty_set: Ainda não há configurações.
+ create_first: "Clique em '{{link}}' para adicionar sua primeira configuração."
+ form:
+ restart_may_be_in_order: <strong>Por favor note</strong> que você pode precisar reiniciar o website para que esta configuração tenha efeito.
+ yes_make_this_setting_restricted: "Permitir acesso apenas à super-usuários."
+ help:
+ restricted: Isso faz com que essa opção só seja vista ou editada por super-usuários (como você).
+ help:
+ activity_show_limit: This limits the number of items that can display in the Dashboard listing.
+ analytics_page_code: This code activates Google Analytics tracking within your website. If the setting is left blank or set to UA-xxxxxx-x then this is disabled and no remote calls to Google Analytics are made.
+ image_dialogue_sizes: This setting applies to the Insert Image dialogue. You must implement the different thumbnail sizes as well as changing this.
+ image_thumbnails: If you modify this setting you will have to regenerate your images by running rake images:regenerate (or rake images:update if you only added more thumbnails) otherwise the setting will not apply to existing images.
+ menu_hide_children: Hide any subpages from the menu even if they are present.
+ new_page_parts: Enable adding new page parts (content sections) in the page editors.
+ page_title: Very complex options for setting the page title. Here you can set custom CSS class or a different tag or tell it to breadcrumb with pages in its ancestry.
+ page_advanced_options_include_seo: This controls whether the SEO options are displayed in the advanced options for a page.
+ preferred_image_view: This controls which view the images plugin displays existing images in - grid for 'Grid View' and list for 'List View'. There is a button to automate this process on the images plugin itself.
+ refinery_enable_backend_reordering: You can remove the ability to reorder the plugins' display order with this.
+ refinery_menu_cache_action_suffix: This controls the key that is used to cache the site menu. If you are using a theme then it is better to leave this as the default as the theme will handle it.
+ show_contact_privacy_link: You can hide or show the link to the privacy policy page on the contact form by the submit button.
+ site_name: This is the name for your website and will display in the header and in the Refinery backend and in the footer copyright statement for some themes.
+ theme: Enter the name for the theme that you want to be enabled. This will take effect immediately and must correctly identify an existing theme for this to work.
+ use_google_ajax_libraries: If you want to use Google's AJAX CDN then set this to true.
+ use_marketable_urls: Changes urls from /pages/about to /about and automatically manages conflicts with other plugins.
+ use_resource_caching: Recommended to enable this in production mode as it bundles javascript assets and stylesheet assets into single file packages to reduce the number of web requests on your site and speed it up.
plugins:
refinery_settings:
title: Configuração
View
2  vendor/plugins/resources/config/locales/pt-BR.yml
@@ -11,7 +11,7 @@ pt-BR:
download_current: Baixar arquivo atual
or: ou
replace: ", substituir por este..."
- maximum_file_size: "The maximum file size is {{megabytes}} megabytes."
+ maximum_file_size: "O tamanho máximo permitido é de {{megabytes}} megabytes."
resource:
download: Baixar este arquivo ({{size}})
edit: Editar este arquivo

No commit comments for this range

Something went wrong with that request. Please try again.