refinerycms 0.9.7.4 → 0.9.7.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -41,7 +41,7 @@ end
41
41
 
42
42
  #===REQUIRED FOR REFINERY GEM INSTALL===
43
43
  # Leave the gem below disabled (commented out) if you're not using the gem install method.
44
- # gem 'refinerycms', '= 0.9.7.3'
44
+ # gem 'refinerycms', '= 0.9.7.5'
45
45
  #===END OF REFINERY GEM INSTALL REQUIREMENTS===
46
46
 
47
47
  # Bundle gems for certain environments:
@@ -0,0 +1,116 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ require 'yaml'
5
+
6
+ refinery_root = (defined?(REFINERY_ROOT) && REFINERY_ROOT.is_a?(Pathname) ? REFINERY_ROOT : Pathname.new(File.expand_path(File.dirname(__FILE__) << "/..")))
7
+ unless (app_path = ARGV.shift).nil? or app_path.length == 0
8
+ puts "--------Updating--------\n\n"
9
+ # if "" or "." or "./" is specified then get the current directory otherwise accept the specified app_path.
10
+ if (app_path.length <= 2 and ((is_current_dir = app_path =~ /(\.(\/)?)/).nil? or is_current_dir < 2))
11
+ rails_root = Dir.getwd
12
+ else
13
+ rails_root = app_path =~ /^\// ? app_path : File.expand_path(File.join(Dir.getwd, app_path.gsub(/^\.\//, '')))
14
+ end
15
+ rails_root = Pathname.new(rails_root.to_s)
16
+
17
+ FileUtils::cp refinery_root.join('Gemfile').to_s, rails_root.join('Gemfile').to_s, :verbose => true
18
+ FileUtils::cp refinery_root.join('config', 'preinitializer.rb').to_s, rails_root.join('config', 'preinitializer.rb').to_s, :verbose => true
19
+
20
+ # try to figure out the database adapter..
21
+ db_adapter = 'sqlite3'
22
+ if rails_root.join('config', 'database.yml').exist?
23
+ db_config = YAML::load(rails_root.join('config', 'database.yml').open('r').read)
24
+ if db_config.keys.include?("development") && db_config["development"].keys.include?("adapter")
25
+ db_adapter = db_config["development"]["adapter"]
26
+ end
27
+ end
28
+
29
+ db_adapter = 'sqlite3' unless %w(sqlite3 mysql postgresql).include?(db_adapter)
30
+
31
+ # read in the Gemfile and write it back out with the refinerycms gem enabled.
32
+ (lines = refinery_root.join('Gemfile').open('r').read.split("\n")).each do |line|
33
+ line.gsub!(/\#*\s?gem 'refinerycms'/, "gem 'refinerycms'")
34
+
35
+ # Ensure that the correct database gem libraries are included for the database adapter
36
+ # that the user has specified in the refinery install command.
37
+ if line =~ /\#db\_adapter\=/
38
+ if line =~ %r{#db_adapter=#{db_adapter}}
39
+ line.gsub!(/^(\#*\s?gem)/, 'gem')
40
+ else
41
+ line.gsub!(/^(\s?gem)/, '# gem')
42
+ end
43
+ end
44
+ end
45
+
46
+ # write the new content into the file.
47
+ app_gemfile = File.open(File.join(%W(#{rails_root} Gemfile)), "w")
48
+ app_gemfile.puts(lines.join("\n"))
49
+ app_gemfile.close
50
+
51
+ # backup the config file.
52
+ app_config_file = 'application.rb'
53
+ 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
54
+
55
+ # copy the new config file.
56
+ FileUtils.cp refinery_root.join('config', app_config_file).cleanpath.to_s, rails_root.join('config', app_config_file).cleanpath.to_s, :verbose => true
57
+
58
+ unless File.exist?(rails_root.join('config', 'settings.rb'))
59
+ FileUtils.cp refinery_root.join('config', 'settings.rb').cleanpath.to_s, rails_root.join('config', 'settings.rb').cleanpath.to_s, :verbose => true
60
+ end
61
+
62
+ unless (aai_config_file = rails_root.join('config', 'acts_as_indexed_config.rb')).exist?
63
+ FileUtils::cp refinery_root.join('config', 'acts_as_indexed_config.rb').to_s, aai_config_file.to_s, :verbose => true
64
+ end
65
+
66
+ # update routes files
67
+ puts "\nNow I'm verifying and updating your routing in your files and your plugins...\n"
68
+ Dir[rails_root.join('**', 'config', 'routes.rb')].map{|f| Pathname.new(f)}.each do |routes_file|
69
+ open_routes_file = routes_file.open('r')
70
+ lines = open_routes_file.read.split("\n")
71
+ original_lines = lines.dup
72
+ open_routes_file.close
73
+ lines.each do |line|
74
+ line.gsub!("map.namespace(:admin) do |admin|", "map.namespace(:admin, :path_prefix => 'refinery') do |admin|")
75
+ line.gsub!("map.connect 'admin/*path', :controller => 'admin/base', :action => 'error_404'",
76
+ "map.redirect 'admin/*path', :controller => 'admin/base'")
77
+ line.gsub!("map.connect '*path', :controller => 'application', :action => 'error_404'",
78
+ "map.connect 'refinery/*path', :controller => 'admin/base', :action => 'error_404'\n\n # Marketable URLs\n map.connect '*path', :controller => 'pages', :action => 'show'")
79
+ end
80
+ lines = lines.join("\n").split("\n")
81
+ open_routes_file = routes_file.open("w")
82
+ open_routes_file.puts(lines.join("\n"))
83
+ open_routes_file.close
84
+ puts "Made modifications to routes in #{routes_file} please ensure they are still valid." if original_lines != lines
85
+ end
86
+
87
+ puts "\nCopied files required to support the new RefineryCMS version 0.9.7"
88
+ puts "I backed up your config/application.rb file to #{rails_root.join('config', "#{app_config_file.gsub('.rb', '')}.autobackupbyrefineryupgrade.rb").cleanpath.to_s}"
89
+ puts "\nI think your database adapter is #{db_adapter} so that is what will be installed by bundler.\n\n"
90
+
91
+ # automate..
92
+ Dir.chdir(rails_root) do
93
+ puts "Installing gem requirements using bundler..\n"
94
+ puts (cmd="bundle install --without test")
95
+ puts `#{cmd}`
96
+
97
+ if rails_root.join('config', 'database.yml').exist?
98
+ puts "\n\nUpdating some core refinery files..\n"
99
+ puts (cmd="rake -f '#{File.join(rails_root, 'Rakefile')}' refinery:update from_installer=true")
100
+ puts `#{cmd}`
101
+
102
+ puts "\n\nMigrating your database..\n"
103
+ puts (cmd="rake -f '#{File.join(rails_root, 'Rakefile')}' db:migrate")
104
+ puts `#{cmd}`
105
+ else
106
+ puts "\nYour config/database.yml file is missing so I can't run a task that is required."
107
+ puts "Once you have your database file in place or are confident it will work without it please run:"
108
+ puts "\nrake refinery:update"
109
+ end
110
+ end
111
+
112
+ puts "\n--------Update complete--------\n\n"
113
+
114
+ else
115
+ puts "\nPlease specify the path for the RefineryCMS application you want to upgrade. i.e. refinery-upgrade-096-to-097 /path/to/project"
116
+ end
@@ -1,3 +1,11 @@
1
+ ## 0.9.7.5 [08 July 2010]
2
+
3
+ - 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]
4
+ - 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]
5
+ - Fixed a broken migration that would mean pages were missing upon upgrading [Jesper Hvirring Henriksen]
6
+ - More pt-BR translation keys translated [Kivanio Barbosa]
7
+ - [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.4...0.9.7.5)
8
+
1
9
  ## 0.9.7.4 [07 July 2010]
2
10
 
3
11
  - Fixed critical issue in the i18n routing pattern that was matching prefixes like /news/ as a locale incorrectly. [Philip Arndt]
@@ -6,7 +6,7 @@ class UpdateLinkUrlOnPagesFromInquiriesNewToContact < ActiveRecord::Migration
6
6
  :menu_match => "^/(inquiries|contact).*$"
7
7
  })
8
8
  end
9
- Page.find_all_by_menu_match('^/inquiries/thank_you$') do |page|
9
+ Page.find_all_by_menu_match('^/inquiries/thank_you$').each do |page|
10
10
  page.update_attributes({
11
11
  :link_url => '/contact/thank_you',
12
12
  :menu_match => '^/(inquiries|contact)/thank_you$'
@@ -15,7 +15,7 @@ class UpdateLinkUrlOnPagesFromInquiriesNewToContact < ActiveRecord::Migration
15
15
  end
16
16
 
17
17
  def self.down
18
- Page.find_all_by_link_url('/contact/thank_you') do |page|
18
+ Page.find_all_by_link_url('/contact/thank_you').each do |page|
19
19
  page.update_attributes({
20
20
  :link_url => nil,
21
21
  :menu_match => '^/inquiries/thank_you$'
@@ -0,0 +1,9 @@
1
+ class EnsureUserPluginsUseNameAndNotTitle < ActiveRecord::Migration
2
+ def self.up
3
+ rename_column :user_plugins, :title, :name if UserPlugin.table_exists? and UserPlugin.column_names.include?('title') and !UserPlugin.column_names.include?('name')
4
+ end
5
+
6
+ def self.down
7
+ # We don't need to go backwards, there already is one that should handle that..
8
+ end
9
+ end
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.homepage = %q{http://refinerycms.com}
19
19
  s.authors = %w(Resolve\\ Digital David\\ Jones Philip\\ Arndt)
20
20
  s.require_paths = %w(lib)
21
- s.executables = %w(refinery)
21
+ s.executables = %w(refinery refinery-upgrade-096-to-097)
22
22
 
23
23
  s.files = [
24
24
  '#{files.join("',\n '")}'
@@ -15,7 +15,7 @@ pt-BR:
15
15
  or: ou
16
16
  replace_image: Substituir por esta...
17
17
  current_image: Imagem atual
18
- maximum_image_size: "The maximum image size is {{megabytes}} megabytes."
18
+ maximum_image_size: "O tamanho máximo permitido é de {{megabytes}} megabytes."
19
19
  index:
20
20
  create_new_image: Criar Nova Imagem
21
21
  no_images_yet: Ainda não existem imagens.<br/> Clique em "Criar Nova Imagem" para adicionar sua primeira imagem.
@@ -46,6 +46,8 @@ pt-BR:
46
46
  no_inquiries: "Urra! Não exitem mensagens abertas porque você lidou com todas elas."
47
47
  closed_inquiries: Mensagens fechadas
48
48
  havent_closed_any_inquiries: "Você ainda não fechou nenhuma mensagem."
49
+ spam:
50
+ no_spam: Urra! Não existem mensagens de spam.
49
51
  show:
50
52
  details: Detalhes
51
53
  click_to_email: Clique para enviar email
@@ -20,16 +20,15 @@ pt-BR:
20
20
  meta_description_help: Meta palavras-chave
21
21
  meta_description_help: Meta descrição
22
22
  show_in_menu: Mostrar no menu
23
- admin:
23
+ admin:
24
24
  pages:
25
25
  page:
26
26
  view_live: Vizualizar essa página agora <br/><em>(irá abrir uma nova janela)</em>
27
27
  edit_this_page: Editar essa página
28
- confirm_delete_page_title: Deletar essa página
28
+ confirm_delete_page_title: Remover essa página
29
29
  confirm_delete_page_message: "Você tem certeza que quer deletar a página '{{title}}'?"
30
30
  hidden: oculta
31
31
  draft: rascunho
32
-
33
32
  form_advanced_options:
34
33
  create_content_section: Criar seção de conteúdo
35
34
  delete_content_section: Remover seção de conteúdo
@@ -48,14 +47,26 @@ pt-BR:
48
47
  save_as_draft: Salvar como Rascunho
49
48
  save: Salvar
50
49
  cancel: Cancelar
50
+ show_in_menu_title: Mostrar no menu
51
+ show_in_menu_description: Mostra esta página no menu do site
52
+ 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."
53
+ skip_to_first_child: Pular esta página
54
+ skip_to_first_child_label: Redieciona os visitante para a primeira página a baixo desta no menu.
55
+ 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."
56
+ link_url: "Redirecionar esta página para outro site ou página"
57
+ 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."
58
+ parent_page: Página pai
59
+ 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."
60
+ custom_title: Título opcional
61
+ 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."
51
62
  form_advanced_options_seo:
52
63
  seo: Otimização de Motor de Busca
53
64
  seo_override_title: Se você quiser sobrescrever o título padrão do navegador, faça isso aqui.
54
65
  seo_override_title_help: Se você quiser substituir o título do navegador padrão, fazê-lo aqui.
55
66
  meta_keywords_title: Meta palavras-chave
56
- meta_description_help: Entre entre 5-10 palavras-chave que se relacionam a esta página. Separe as palavras-chave por vírgula.
67
+ meta_keywords_help: Digite entre 5-10 palavras-chave que se relacionam a esta página. Separe as palavras-chave por vírgula.
57
68
  meta_description_title: Meta descrição
58
- meta_description_help: Entre duas ou três sentenças concisas descrevendo sobre o que é essa página.
69
+ meta_description_help: Digite duas ou três sentenças concisas descrevendo sobre o que é essa página.
59
70
  js:
60
71
  content_section:
61
72
  create: Criar Seção de Conteúdo
@@ -40,7 +40,10 @@ pt-BR:
40
40
  or_cancel: ou
41
41
  cancel: Cancelar
42
42
  or_continue: ou
43
+ delete: Remover
43
44
  cancel_lose_changes: "Cancelar irá fazer com que você perca as alterações que tenha feito a este {{object_name}}"
45
+ previous: Anterior
46
+ next: Próximo
44
47
  image_picker:
45
48
  none_selected: "Atualmente não existe nenhum {{what}} selecionado, por favor clique aqui para adicionar um."
46
49
  remove_current: "Remover {{what}} atual"
@@ -24,15 +24,8 @@ module Refinery
24
24
  end
25
25
 
26
26
  class Version
27
- MAJOR = 0
28
- MINOR = 9
29
- TINY = 7
30
- BUILD = 4
31
-
32
- STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
33
-
34
27
  def self.to_s
35
- STRING
28
+ %q{0.9.7.5}
36
29
  end
37
30
  end
38
31
 
@@ -12,7 +12,7 @@ module Refinery
12
12
 
13
13
  class Configuration < Rails::Configuration
14
14
  def default_plugin_paths
15
- paths = super.push(Refinery.root.join("vendor", "plugins").to_s).uniq
15
+ super.push(Refinery.root.join("vendor", "plugins").to_s).uniq
16
16
  end
17
17
  end
18
18
 
@@ -21,22 +21,21 @@ module Refinery
21
21
  # call Rails' add_plugin_load_paths
22
22
  super
23
23
 
24
- # 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.
25
- search_for = Regexp.new(Refinery.root.join("vendor", "plugins", ".+?", "lib").to_s)
26
-
27
24
  # find all the plugin paths
28
25
  paths = plugins.collect{ |plugin| plugin.load_paths }.flatten
29
26
 
30
27
  # just use lib paths from Refinery engines
31
- paths = paths.reject{|path| path.scan(search_for).empty? or path.include?('/rails-') }
32
-
28
+ paths = paths.reject{|path| path.scan(/lib$/).empty? or path.include?('/rails-') }
29
+
33
30
  # reject Refinery lib paths if they're already included in this app.
34
31
  paths = paths.reject{ |path| path.include?(Refinery.root.to_s) } unless Refinery.is_a_gem
35
32
  paths.uniq!
36
33
 
37
- ($refinery_gem_plugin_lib_paths = paths).each do |path|
38
- $LOAD_PATH.unshift path
39
- end
34
+ # Save the paths to a global variable so that the application can access them too
35
+ # and unshift them onto the load path.
36
+ ($refinery_gem_plugin_lib_paths = paths).each { |path| $LOAD_PATH.unshift(path) }
37
+
38
+ # Ensure we haven't caused any duplication
40
39
  $LOAD_PATH.uniq!
41
40
  end
42
41
  end
@@ -6,18 +6,40 @@ pt-BR:
6
6
  refinery_setting:
7
7
  name: Nome
8
8
  value: Valor
9
+ restricted: Restrito
9
10
  admin:
10
11
  refinery_settings:
11
- form:
12
- restart_may_be_in_order: <strong>Por favor note</strong> que você pode precisar reiniciar o website para que esta configuração tenha efeito.
13
- index:
14
- new: Criar nova configuração
15
- empty_set: Ainda não há configurações.
16
- create_first: "Clique em '{{link}}' para adicionar sua primeira configuração."
17
12
  refinery_setting:
18
13
  edit: 'Editar esta configuração'
19
14
  confirm: 'Tem certeza que deseja remover esta configuração para sempre?'
20
15
  remove: 'Remover esta configuração para sempre'
16
+ index:
17
+ new: Criar nova configuração
18
+ empty_set: Ainda não há configurações.
19
+ create_first: "Clique em '{{link}}' para adicionar sua primeira configuração."
20
+ form:
21
+ restart_may_be_in_order: <strong>Por favor note</strong> que você pode precisar reiniciar o website para que esta configuração tenha efeito.
22
+ yes_make_this_setting_restricted: "Permitir acesso apenas à super-usuários."
23
+ help:
24
+ restricted: Isso faz com que essa opção só seja vista ou editada por super-usuários (como você).
25
+ help:
26
+ activity_show_limit: This limits the number of items that can display in the Dashboard listing.
27
+ 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.
28
+ image_dialogue_sizes: This setting applies to the Insert Image dialogue. You must implement the different thumbnail sizes as well as changing this.
29
+ 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.
30
+ menu_hide_children: Hide any subpages from the menu even if they are present.
31
+ new_page_parts: Enable adding new page parts (content sections) in the page editors.
32
+ 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.
33
+ page_advanced_options_include_seo: This controls whether the SEO options are displayed in the advanced options for a page.
34
+ 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.
35
+ refinery_enable_backend_reordering: You can remove the ability to reorder the plugins' display order with this.
36
+ 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.
37
+ show_contact_privacy_link: You can hide or show the link to the privacy policy page on the contact form by the submit button.
38
+ 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.
39
+ 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.
40
+ use_google_ajax_libraries: If you want to use Google's AJAX CDN then set this to true.
41
+ use_marketable_urls: Changes urls from /pages/about to /about and automatically manages conflicts with other plugins.
42
+ 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.
21
43
  plugins:
22
44
  refinery_settings:
23
45
  title: Configuração
@@ -11,7 +11,7 @@ pt-BR:
11
11
  download_current: Baixar arquivo atual
12
12
  or: ou
13
13
  replace: ", substituir por este..."
14
- maximum_file_size: "The maximum file size is {{megabytes}} megabytes."
14
+ maximum_file_size: "O tamanho máximo permitido é de {{megabytes}} megabytes."
15
15
  resource:
16
16
  download: Baixar este arquivo ({{size}})
17
17
  edit: Editar este arquivo
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 9
9
8
  - 7
10
- - 4
11
- version: 0.9.7.4
9
+ - 5
10
+ version: 0.9.7.5
12
11
  platform: ruby
13
12
  authors:
14
13
  - Resolve Digital
@@ -18,7 +17,7 @@ autorequire:
18
17
  bindir: bin
19
18
  cert_chain: []
20
19
 
21
- date: 2010-07-07 00:00:00 +12:00
20
+ date: 2010-07-08 00:00:00 +12:00
22
21
  default_executable:
23
22
  dependencies: []
24
23
 
@@ -26,6 +25,7 @@ description: A beautiful open source Ruby on Rails content manager for small bus
26
25
  email: info@refinerycms.com
27
26
  executables:
28
27
  - refinery
28
+ - refinery-upgrade-096-to-097
29
29
  extensions: []
30
30
 
31
31
  extra_rdoc_files: []
@@ -46,6 +46,7 @@ files:
46
46
  - app/controllers/application_controller.rb
47
47
  - app/helpers/application_helper.rb
48
48
  - bin/refinery
49
+ - bin/refinery-upgrade-096-to-097
49
50
  - config/acts_as_indexed_config.rb
50
51
  - config/amazon_s3.yml.example
51
52
  - config/application.rb
@@ -94,6 +95,7 @@ files:
94
95
  - db/migrate/20100629081543_add_callback_proc_as_string_to_refinery_settings.rb
95
96
  - db/migrate/20100701053151_remove_superuser_from_users.rb
96
97
  - db/migrate/20100702022630_add_spam_to_inquiries.rb
98
+ - db/migrate/20100708014636_ensure_user_plugins_use_name_and_not_title.rb
97
99
  - db/schema.rb
98
100
  - db/seeds/inquiry_settings.rb
99
101
  - db/seeds/pages.rb
@@ -1071,27 +1073,23 @@ rdoc_options: []
1071
1073
  require_paths:
1072
1074
  - lib
1073
1075
  required_ruby_version: !ruby/object:Gem::Requirement
1074
- none: false
1075
1076
  requirements:
1076
1077
  - - ">="
1077
1078
  - !ruby/object:Gem::Version
1078
- hash: 3
1079
1079
  segments:
1080
1080
  - 0
1081
1081
  version: "0"
1082
1082
  required_rubygems_version: !ruby/object:Gem::Requirement
1083
- none: false
1084
1083
  requirements:
1085
1084
  - - ">="
1086
1085
  - !ruby/object:Gem::Version
1087
- hash: 3
1088
1086
  segments:
1089
1087
  - 0
1090
1088
  version: "0"
1091
1089
  requirements: []
1092
1090
 
1093
1091
  rubyforge_project:
1094
- rubygems_version: 1.3.7
1092
+ rubygems_version: 1.3.6
1095
1093
  signing_key:
1096
1094
  specification_version: 3
1097
1095
  summary: A beautiful open source Ruby on Rails content manager for small business.