Permalink
Browse files

Upgraded to Rails 2.3.9. Using bundler.

  • Loading branch information...
1 parent fb83752 commit 239430881b4d5a8e2eae42adb5317d28056d3a73 Dimitrij Denissenko committed Sep 7, 2010
Showing with 1,243 additions and 3,465 deletions.
  1. +2 −0 .bundle/config
  2. +28 −0 Gemfile
  3. +46 −0 Gemfile.lock
  4. +1 −1 app/controllers/accounts_controller.rb
  5. +2 −2 app/controllers/admin/repositories_controller.rb
  6. +2 −2 app/controllers/admin/ticket_property_values_controller.rb
  7. +4 −4 app/controllers/browse_controller.rb
  8. +1 −1 app/controllers/projects_controller.rb
  9. +1 −1 app/helpers/admin/setup_helper.rb
  10. +1 −1 app/helpers/admin/ticket_property_values_helper.rb
  11. +34 −36 app/helpers/application_helper.rb
  12. +2 −2 app/helpers/browse_helper.rb
  13. +2 −2 app/helpers/changesets_helper.rb
  14. +1 −1 app/helpers/format_helper.rb
  15. +3 −3 app/helpers/navigation_helper.rb
  16. +1 −1 app/helpers/rss_helper.rb
  17. +3 −3 app/helpers/tickets_helper.rb
  18. +2 −2 app/models/changeset.rb
  19. +1 −1 app/models/milestone.rb
  20. +1 −1 app/models/repository/abstract.rb
  21. +1 −1 app/models/secure_token.rb
  22. +2 −2 app/models/ticket.rb
  23. +1 −1 app/models/ticket_change.rb
  24. +3 −3 app/models/ticket_filter/collection.rb
  25. +1 −1 app/models/user.rb
  26. +1 −1 app/views/browse/_node.html.erb
  27. +1 −1 app/views/browse/diff.html.erb
  28. +1 −1 app/views/notifications/account_activation_note.text.plain.erb
  29. +2 −2 app/views/notifications/account_validation.text.plain.erb
  30. +2 −2 app/views/notifications/password_reset_instructions.text.plain.erb
  31. +2 −2 app/views/notifications/ticket_creation_note.text.plain.erb
  32. +3 −3 app/views/notifications/ticket_update_note.text.plain.erb
  33. +1 −1 app/views/rss/_feed.html.erb
  34. +1 −1 app/views/search/index.html.erb
  35. +2 −2 app/views/sessions/logged_in.html.erb
  36. +1 −1 app/views/tickets/_ticket.html.erb
  37. +0 −16 config/environment.rb
  38. +5 −4 config/initializers/a.defaults/i18n.rb
  39. +34 −0 config/preinitializer.rb
  40. +1 −1 db/seeds.rb
  41. +6 −6 extensions/agile_pm/lib/stories_helper.rb
  42. +4 −4 extensions/agile_pm/locales/app/cs-CZ.yml
  43. +4 −4 extensions/agile_pm/locales/app/de-DE.yml
  44. +4 −4 extensions/agile_pm/locales/app/en-GB.yml
  45. +4 −4 extensions/agile_pm/locales/app/es-AR.yml
  46. +4 −4 extensions/agile_pm/locales/app/es-ES.yml
  47. +4 −4 extensions/agile_pm/locales/app/fr-FR.yml
  48. +4 −4 extensions/agile_pm/locales/app/ja-JP.yml
  49. +4 −4 extensions/agile_pm/locales/app/pt-BR.yml
  50. +4 −4 extensions/agile_pm/locales/app/ru-RU.yml
  51. +1 −1 extensions/agile_pm/models/story_progress_update.rb
  52. +1 −1 extensions/agile_pm/models/story_revision.rb
  53. +2 −2 extensions/agile_pm/views/stories/_full.html.erb
  54. +2 −2 extensions/agile_pm/views/stories/charts/_story_line.html.erb
  55. +1 −1 extensions/agile_pm/views/stories/revise_hours.js.rjs
  56. +3 −3 extensions/retro_blog/locales/app/cs-CZ.yml
  57. +3 −3 extensions/retro_blog/locales/app/de-DE.yml
  58. +3 −3 extensions/retro_blog/locales/app/en-GB.yml
  59. +3 −3 extensions/retro_blog/locales/app/es-AR.yml
  60. +3 −3 extensions/retro_blog/locales/app/es-ES.yml
  61. +3 −3 extensions/retro_blog/locales/app/fr-FR.yml
  62. +3 −3 extensions/retro_blog/locales/app/ja-JP.yml
  63. +4 −4 extensions/retro_blog/locales/app/pt-BR.yml
  64. +4 −4 extensions/retro_blog/locales/app/ru-RU.yml
  65. +1 −1 extensions/retro_blog/models/blog_post.rb
  66. +3 −3 extensions/retro_blog/views/blog/_post.html.erb
  67. +2 −2 extensions/retro_wiki/lib/wiki_helper.rb
  68. +4 −4 extensions/retro_wiki/locales/app/cs-CZ.yml
  69. +4 −4 extensions/retro_wiki/locales/app/de-DE.yml
  70. +4 −4 extensions/retro_wiki/locales/app/en-GB.yml
  71. +4 −4 extensions/retro_wiki/locales/app/es-AR.yml
  72. +4 −4 extensions/retro_wiki/locales/app/es-ES.yml
  73. +4 −4 extensions/retro_wiki/locales/app/fr-FR.yml
  74. +4 −4 extensions/retro_wiki/locales/app/ja-JP.yml
  75. +5 −5 extensions/retro_wiki/locales/app/pt-BR.yml
  76. +5 −5 extensions/retro_wiki/locales/app/ru-RU.yml
  77. +1 −1 extensions/retro_wiki/models/wiki_page.rb
  78. +2 −2 extensions/retro_wiki/views/wiki/show.html.erb
  79. +2 −2 lib/retrospectiva/access_manager/secure_controller.rb
  80. +1 −1 lib/retrospectiva/extension_manager/core_ext/dependencies.rb
  81. +2 −2 lib/retrospectiva/extension_manager/extension_installer.rb
  82. +3 −3 lib/retrospectiva/previewable/base.rb
  83. +1 −1 lib/routing_filter/central_project.rb
  84. +44 −44 locales/app/cs-CZ.yml
  85. +44 −44 locales/app/de-DE.yml
  86. +44 −44 locales/app/en-GB.yml
  87. +44 −44 locales/app/es-AR.yml
  88. +44 −44 locales/app/es-ES.yml
  89. +44 −44 locales/app/fr-FR.yml
  90. +47 −47 locales/app/ja-JP.yml
  91. +44 −44 locales/app/pt-BR.yml
  92. +44 −44 locales/app/ru-RU.yml
  93. +1 −1 spec/helpers/changesets_helper_spec.rb
  94. +1 −1 spec/models/ticket_change_spec.rb
  95. +1 −1 spec/models/ticket_spec.rb
  96. +40 −0 spec/support/depreciations.rb
  97. 0 vendor/plugins/packr/{ → lib}/tasks/packr_tasks.rake
  98. +7 −8 vendor/plugins/retro_i18n/lib/retro_i18n/patches.rb
  99. +20 −20 vendor/plugins/retro_i18n/locales/bn-IN.yml
  100. +20 −20 vendor/plugins/retro_i18n/locales/ca-ES.yml
  101. +20 −20 vendor/plugins/retro_i18n/locales/cs-CZ.rb
  102. +24 −24 vendor/plugins/retro_i18n/locales/da-DK.yml
  103. +21 −21 vendor/plugins/retro_i18n/locales/de-DE.yml
  104. +22 −22 vendor/plugins/retro_i18n/locales/en-GB.yml
  105. +19 −19 vendor/plugins/retro_i18n/locales/es-AR.yml
  106. +21 −21 vendor/plugins/retro_i18n/locales/es-ES.yml
  107. +22 −22 vendor/plugins/retro_i18n/locales/fi-FI.yml
  108. +21 −21 vendor/plugins/retro_i18n/locales/fr-FR.yml
  109. +20 −20 vendor/plugins/retro_i18n/locales/it-IT.yml
  110. +24 −24 vendor/plugins/retro_i18n/locales/ja-JP.yml
  111. +19 −19 vendor/plugins/retro_i18n/locales/nb-NO.yml
  112. +20 −20 vendor/plugins/retro_i18n/locales/nl-NL.yml
  113. +21 −21 vendor/plugins/retro_i18n/locales/pt-BR.yml
  114. +63 −63 vendor/plugins/retro_i18n/locales/ru-RU.yml
  115. +22 −22 vendor/plugins/retro_i18n/locales/sv-SE.yml
  116. +21 −21 vendor/plugins/retro_i18n/locales/zh-CN.yml
  117. +20 −20 vendor/plugins/retro_i18n/locales/zh-TW.yml
  118. +0 −4 vendor/plugins/retro_search/tasks/retro_search_tasks.rake
  119. +3 −3 vendor/plugins/routing-filter/lib/routing_filter.rb
  120. +1 −1 vendor/plugins/routing-filter/lib/routing_filter/force_extension.rb
  121. +2 −2 vendor/plugins/routing-filter/lib/routing_filter/locale.rb
  122. +2 −2 vendor/plugins/routing-filter/lib/routing_filter/pagination.rb
  123. +2 −2 vendor/plugins/routing-filter/spec/spec_helper.rb
  124. +1 −1 vendor/plugins/wiki_engine/lib/wiki_engine.rb
  125. +5 −14 vendor/plugins/wiki_engine/lib/wiki_engine/redcloth.rb
  126. +0 −726 vendor/plugins/wiki_engine/lib/wiki_engine/redcloth_native/base.rb
  127. +0 −1,001 vendor/plugins/wiki_engine/lib/wiki_engine/redcloth_native/docbook.rb
  128. +0 −8 vendor/plugins/wiki_engine/lib/wiki_engine/redcloth_native/formatters.rb
  129. +0 −134 vendor/plugins/wiki_engine/lib/wiki_engine/redcloth_native/markdown.rb
  130. +0 −449 vendor/plugins/wiki_engine/lib/wiki_engine/redcloth_native/textile.rb
  131. +0 −19 vendor/plugins/wiki_engine/lib/wiki_engine/redcloth_native/textile_doc.rb
  132. +1 −1 vendor/plugins/wiki_engine/lib/wiki_engine/retro.rb
  133. +0 −4 vendor/plugins/wiki_engine/tasks/wiki_engine_tasks.rake
View
@@ -0,0 +1,2 @@
+---
+BUNDLE_DISABLE_SHARED_GEMS: "1"
View
@@ -0,0 +1,28 @@
+source :rubygems
+
+gem "rails", "2.3.9", :require => false
+gem "will_paginate", "~> 2.3.0"
+gem "acts-as-taggable-on", "~> 2.0.0"
+gem "RedCloth", :require => "redcloth"
+gem 'i18n', "~> 0.4.0"
+
+database = begin
+ File.read(File.dirname(__FILE__) + '/config/database.yml').scan(/production.+?adapter\W+(\w+)/im).join
+rescue
+ nil
+end
+
+case database
+when /postgres/, /pg/
+ gem 'pg', :require => false
+when /sqlite/
+ gem 'sqlite3-ruby', :require => false
+else
+ gem 'mysql', :require => false
+end
+
+group :test do
+ gem "rspec", :require => "spec"
+ gem "rspec-rails", :require => "spec"
+ gem "shoulda"
+end
View
@@ -0,0 +1,46 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ RedCloth (4.2.3)
+ actionmailer (2.3.9)
+ actionpack (= 2.3.9)
+ actionpack (2.3.9)
+ activesupport (= 2.3.9)
+ rack (~> 1.1.0)
+ activerecord (2.3.9)
+ activesupport (= 2.3.9)
+ activeresource (2.3.9)
+ activesupport (= 2.3.9)
+ activesupport (2.3.9)
+ acts-as-taggable-on (2.0.6)
+ i18n (0.4.1)
+ pg (0.9.0)
+ rack (1.1.0)
+ rails (2.3.9)
+ actionmailer (= 2.3.9)
+ actionpack (= 2.3.9)
+ activerecord (= 2.3.9)
+ activeresource (= 2.3.9)
+ activesupport (= 2.3.9)
+ rake (>= 0.8.3)
+ rake (0.8.7)
+ rspec (1.3.0)
+ rspec-rails (1.3.2)
+ rack (>= 1.0.0)
+ rspec (>= 1.3.0)
+ shoulda (2.11.3)
+ will_paginate (2.3.14)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ RedCloth
+ acts-as-taggable-on (~> 2.0.0)
+ i18n (~> 0.4.0)
+ pg
+ rails (= 2.3.9)
+ rspec
+ rspec-rails
+ shoulda
+ will_paginate (~> 2.3.0)
@@ -133,7 +133,7 @@ def successful_registration
when 'email'
Notifications.queue_account_validation(@user)
flash[:notice] += [
- _('You need to activate your account within the next {{count}} hours to be able to login.', :count => config[:expiration]),
+ _('You need to activate your account within the next %{count} hours to be able to login.', :count => config[:expiration]),
_('An email including the activation code and the instructions was sent to you.')
]
redirect_to account_activate_path
@@ -67,15 +67,15 @@ def validate
klass = Repository[params[:kind]]
@result = if klass.nil? or !klass.enabled?
- _('Support for {{system}} is not enabled.', :system => params[:kind].to_s.classify)
+ _('Support for %{system} is not enabled.', :system => params[:kind].to_s.classify)
elsif !File.exists?(path)
_('Failure! Path does not exist.')
elsif !File.readable?(path) || !File.executable?(path)
_('Failure! You are not permitted to browse this path.')
else
repos = klass.new(:path => params[:path])
if repos.active?
- _('Success! Path contains a valid repository (latest revision: {{latest}}).', :latest => repos.latest_revision)
+ _('Success! Path contains a valid repository (latest revision: %{latest}).', :latest => repos.latest_revision)
else
_('Failure! Path does not contain a valid repository.')
end
@@ -28,7 +28,7 @@ def create
respond_to do |format|
if @ticket_property.save
flash[:notice] = @property_type.global? ?
- _('{{record}} was successfully created.', :record => @property_type.name) :
+ _('%{record} was successfully created.', :record => @property_type.name) :
_('Property value was successfully created.')
format.html { redirect_to admin_project_ticket_property_values_path(@project, @property_type) }
format.xml { render :xml => @ticket_property, :status => :created, :location => admin_project_ticket_property_values_path(@project, @property_type) }
@@ -79,7 +79,7 @@ def sort
protected
def param_name
- @property_type.global? ? @property_type.class_name.underscore : :ticket_property
+ @property_type.global? ? @property_type.model_name.singular : :ticket_property
end
def find_project
@@ -116,19 +116,19 @@ def fetch_node
@node = @repository.node(full_path, revision)
@changeset = Project.current.changesets.find_by_revision @node.selected_revision, :include => [:user]
rescue Repository::RevisionNotFound
- message = _('Unable to find revision {{revision}} for \'{{path}}\', showing revision {{latest}}.', :revision => revision, :path => relative_path, :latest => @repository.latest_revision)
+ message = _('Unable to find revision %{revision} for \'%{path}\', showing revision %{latest}.', :revision => revision, :path => relative_path, :latest => @repository.latest_revision)
fail_with message, params[:path]
rescue Repository::InvalidRevision
- message = _('Revision {{revision}} seems not to be valid, showing revision {{latest}}.', :revision => revision, :latest => @repository.latest_revision)
+ message = _('Revision %{revision} seems not to be valid, showing revision %{latest}.', :revision => revision, :latest => @repository.latest_revision)
fail_with message, params[:path]
rescue Repository::Abstract::Node::InvalidPathForRevision
- message = _('Path \'{{path}}\' does not exist in revision {{revision}}, showing revision {{latest}}.', :path => relative_path, :revision => revision, :latest => @repository.latest_revision)
+ message = _('Path \'%{path}\' does not exist in revision %{revision}, showing revision %{latest}.', :path => relative_path, :revision => revision, :latest => @repository.latest_revision)
fail_with message, params[:path]
rescue Repository::Abstract::Node::InvalidPath
if relative_path.split('/').blank?
render :action => 'repository_unavailable'
else
- message = _('Path \'{{path}}\' does not exist in revision {{revision}}, showing root path.', :path => relative_path, :revision => revision)
+ message = _('Path \'%{path}\' does not exist in revision %{revision}, showing root path.', :path => relative_path, :revision => revision)
fail_with message, nil
end
end
@@ -87,7 +87,7 @@ def show_html
def show_rss(project)
render_rss project.name,
- _('All news for {{project}}', :project => project.name),
+ _('All news for %{project}', :project => project.name),
project_url(project) do |items|
find_feedable_records(project).each do |record|
@@ -7,7 +7,7 @@ module Admin::SetupHelper
def setting_input(setting, f)
label = h(setting.label)
unless setting.description.blank?
- alt_text = _('Toggle description for setting \'{{name}}\'', :name => label)
+ alt_text = _("Toggle description for setting '%{name}'", :name => label)
image = image_tag('info.gif', :alt => alt_text, :title => alt_text)
link = link_to_function image, visual_effect(:toggle_appear, "#{tag_id_for(setting)}_info", :duration => 0.25)
label += ' ' + link
@@ -22,7 +22,7 @@ def link_to_destroy(value)
ticket_count = value.tickets.count
unless ticket_count.zero?
confirmation = "\n" +
- _("WARNING: There are currently {{count}} tickets assigned with this property.", :count => ticket_count) << "\n" <<
+ _("WARNING: There are currently %{count} tickets assigned with this property.", :count => ticket_count) << "\n" <<
_("They will be set back to the default value.")
end
@@ -122,8 +122,9 @@ def toggle_pagination(page, term = params[:term])
# Modification of the built-in encryption
# Uses modified version of the hivelogic enkoder (original Copyright (c) 2006, Automatic Corp.)
- def mail_to(email_address, name = nil, html_options = {})
+ def mail_to(email, name = nil, html_options = {})
html_options.symbolize_keys!
+ email = email.to_s
if html_options[:encode] == :enkoder
html_options.delete(:encode)
enkode(super)
@@ -145,7 +146,7 @@ def enkode(text)
end
result = "eval(decodeURIComponent('#{result}'))"
- logic = random_enkode_logic
+ logic = ENKODE_LOGIC.sample
result = logic[:rb].call(result)
result = "kode='#{escape_javascript(result)}';#{logic[:js]}"
result = "function hl_enkoder(){var kode='#{h(escape_javascript(result))}'.unescapeHTML();var i,c,x;while(eval(kode));};hl_enkoder();"
@@ -172,41 +173,38 @@ def site_is_secure
def token_tag
protect_against_forgery? ? enkode_token_tag(super) : ''
end
-
- def random_enkode_logic
- kodes = [{
- :rb => lambda {|s| s.reverse },
- :js => "kode=kode.split('').reverse().join('')"
- }, {
- :rb => lambda {|s|
- result = ''
- s.each_byte { |b|
- b += 3
- b -= 128 if b > 127
- result << b.chr
- }
- result
- },
- :js => (
- "x='';for(i=0;i<kode.length;i++){c=kode.charCodeAt(i)-3;" +
- "if(c<0)c+=128;x+=String.fromCharCode(c)}kode=x"
- )
- }, {
- :rb => lambda {|s|
- for i in (0..s.length/2-1)
- s[i*2],s[i*2+1] = s[i*2+1],s[i*2]
- end
- s
- },
- :js => (
- "x='';for(i=0;i<(kode.length-1);i+=2){" +
- "x+=kode.charAt(i+1)+kode.charAt(i)};" +
- "kode=x+(i<kode.length?kode.charAt(kode.length-1):'');"
- )
- }]
- kodes[rand(kodes.size)]
- end
+ ENKODE_LOGIC = [{
+ :rb => lambda {|s| s.reverse },
+ :js => "kode=kode.split('').reverse().join('')"
+ }, {
+ :rb => lambda {|s|
+ result = ''
+ s.each_byte { |b|
+ b += 3
+ b -= 128 if b > 127
+ result << b.chr
+ }
+ result
+ },
+ :js => (
+ "x='';for(i=0;i<kode.length;i++){c=kode.charCodeAt(i)-3;" +
+ "if(c<0)c+=128;x+=String.fromCharCode(c)}kode=x"
+ )
+ }, {
+ :rb => lambda {|s|
+ for i in (0..s.length/2-1)
+ s[i*2],s[i*2+1] = s[i*2+1],s[i*2]
+ end
+ s
+ },
+ :js => (
+ "x='';for(i=0;i<(kode.length-1);i+=2){" +
+ "x+=kode.charAt(i+1)+kode.charAt(i)};" +
+ "kode=x+(i<kode.length?kode.charAt(kode.length-1):'');"
+ )
+ }].freeze
+
def in_place_editor(js_class, field_id, options = {}, js_options = {})
function = "new #{js_class}("
function << "'#{field_id}', "
@@ -53,7 +53,7 @@ def link_to_diff(label, current_node, path_tokens, revision)
else
link_to label,
project_diff_path(Project.current, path_tokens, :rev => current_node.revision, :compare_with => revision),
- :title => _('Compare [{{revision_a}}] with [{{revision_b}}]', :revision_a => current_node.revision, :revision_b => revision)
+ :title => _('Compare [%{revision_a}] with [%{revision_b}]', :revision_a => current_node.revision, :revision_b => revision)
end
end
@@ -79,7 +79,7 @@ def link_to_code_line(line_number)
anchor = "ln#{line_number}"
link_to line_number.to_s,
project_browse_path(Project.current, params[:path], :rev => @node.selected_revision, :anchor => anchor),
- :title => _('Line {{number}}', :number => line_number),
+ :title => _('Line %{number}', :number => line_number),
:class => 'block', :id => anchor
end
@@ -36,9 +36,9 @@ def format_changes(changeset)
quick_diff = render :partial => 'quick_diff', :locals => { :change => change }
end
elsif change.name == 'CP'
- small = RetroI18n._('copied from {{path}}', :path => link_to_show_file(change, true))
+ small = RetroI18n._('copied from %{path}', :path => link_to_show_file(change, true))
elsif change.name == 'MV'
- small = RetroI18n._('moved from {{path}}', :path => link_to_show_file(change, true))
+ small = RetroI18n._('moved from %{path}', :path => link_to_show_file(change, true))
end
parts << "<span class=\"small\">(#{small})</span>" if small
@@ -29,7 +29,7 @@ def time_interval_in_words(to_time = 0, from_time = Time.zone.now, include_secon
from_time = from_time.to_time if from_time.respond_to?(:to_time)
to_time = to_time.to_time if to_time.respond_to?(:to_time)
interval = distance_of_time_in_words(from_time, to_time, include_seconds)
- from_time < to_time ? _('in {{period}}', :period => interval) : _('{{period}} ago', :period => interval)
+ from_time < to_time ? _('in %{period}', :period => interval) : _('%{period} ago', :period => interval)
end
def markup(text, options = {})
@@ -37,7 +37,7 @@ def link_to_changeset(label, revision, options = {})
link_to_if condition, label,
project_changeset_path(Project.current, revision, params.only(:expand_all)),
- options.reverse_merge(:title => _('Show changeset {{revision}}', :revision => h(revision)))
+ options.reverse_merge(:title => _('Show changeset %{revision}', :revision => h(revision)))
end
def link_to_browse(label, path, revision = nil)
@@ -47,7 +47,7 @@ def link_to_browse(label, path, revision = nil)
link_to_if_permitted label,
project_browse_path(Project.current, tokens, :rev => revision),
- :title => _('Browse {{title}}', :title => title)
+ :title => _('Browse %{title}', :title => title)
end
def link_to_admin_dashboard(label = nil)
@@ -70,7 +70,7 @@ def links_to_account_management
html << link_to(_('Login'), login_path)
html << link_to(_('Register'), new_account_path) if cf[:account_management] && cf[:self_registration]
else
- html << _('Logged in as {{name}}', :name => h(User.current.name))
+ html << _('Logged in as %{name}', :name => h(User.current.name))
html << link_to(_('My Account'), account_path) if cf[:account_management]
html << link_to(_('Logout'), logout_path)
end
@@ -12,7 +12,7 @@ def subscribe_to(title, url, options = {})
end
def feed_url(url)
- returning url + '.rss' do |full_url|
+ (url + '.rss').tap do |full_url|
full_url << ( '?' + { :private => User.current.private_key }.to_query ) unless User.current.public?
end
end
@@ -23,11 +23,11 @@ def tickets_path(options = {})
def ticket_update(update, tag = nil)
if !update[:old].blank? && !update[:new].blank?
- RetroI18n._('changed from {{old_value}} to {{new_value}}', :old_value => wrap_update(update[:old], tag), :new_value => wrap_update(update[:new], tag))
+ RetroI18n._('changed from %{old_value} to %{new_value}', :old_value => wrap_update(update[:old], tag), :new_value => wrap_update(update[:new], tag))
elsif update[:old].blank?
- RetroI18n._('set to {{value}}', :value => wrap_update(update[:new], tag))
+ RetroI18n._('set to %{value}', :value => wrap_update(update[:new], tag))
elsif update[:new].blank?
- RetroI18n._('reset (from {{value}})', :value => wrap_update(update[:old], tag))
+ RetroI18n._('reset (from %{value})', :value => wrap_update(update[:old], tag))
end
end
@@ -21,12 +21,12 @@ class Changeset < ActiveRecord::Base
project = options[:project] || Project.current
c.name = 'changesets'
c.title = _('Changesets')
- c.description = _('Changesets for {{project}}', :project => project.name)
+ c.description = _('Changesets for %{project}', :project => project.name)
c.link = c.route(:project_changesets_url, project)
end
r.item do |i, changeset, options|
project = options[:project] || Project.current
- i.title = _('Changeset {{revision}}', :revision => changeset.revision)
+ i.title = _('Changeset %{revision}', :revision => changeset.revision)
i.description = changeset.log
i.author = changeset.author
i.date = changeset.created_at
@@ -25,7 +25,7 @@ def count_by_state(*state_ids)
project = options[:project] || Project.current
c.name = 'milestones'
c.title = _('Milestones')
- c.description = _('Milestones for {{project}}', :project => project.name)
+ c.description = _('Milestones for %{project}', :project => project.name)
c.link = c.route(:project_milestones_url, project)
end
r.item do |i, milestone, options|
@@ -24,7 +24,7 @@ def enabled?
private
def subclasses_preloaded?
- @subclasses_preloaded ||= ActiveSupport::Dependencies.load_paths.each do |root|
+ @subclasses_preloaded ||= ActiveSupport::Dependencies.autoload_paths.each do |root|
Dir[File.join(root, 'repository', '*.rb')].each do |file|
type = File.basename(file, '.rb')
Repository[type]
@@ -19,7 +19,7 @@ def spend(token)
purge_expired!
return nil unless token.to_s.match(/^#{prefix}-(\d+)-(\w+)$/)
- returning find_by_id_and_value($1.to_i, $2) do |record|
+ find_by_id_and_value($1.to_i, $2).tap do |record|
record.destroy if record
end
end
Oops, something went wrong.

0 comments on commit 2394308

Please sign in to comment.