From e0a7e0fec760ba12c8067a37e10c96f1f05876e2 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 24 Jun 2026 04:13:16 +0200 Subject: Stage 1 complete: Rails 2.3.5 to Rails 3.2.22.5 upgrade - Converted plugins to gems (Gemfile) - Updated config structure (application.rb, boot.rb, environment.rb) - Converted routes to Rails 3 DSL - Converted named_scope to scope throughout models - Converted find(:all, :conditions) to where() chains - Fixed has_many :order to use ordering scope - Updated session store and secret token configuration - Fixed exception_notification middleware configuration - Patched Ruby 2.4 / Rails 3.2 incompatibilities: - Integer/Float duration arithmetic (ActiveSupport) - Arel visit_Integer for PostgreSQL adapter - create_database String/Integer coercion - ActionController consider_all_requests_local - Migrated taggings schema for acts-as-taggable-on - Replaced dynamic_form gem with custom form_error_messages helper - Fixed Rails 3 block helper syntax (form_for, form_tag, fields_for) - Fixed admin layout yield - Updated test suite for Rails 3 APIs --- .../plugins/will_paginate/test/fixtures/admin.rb | 3 -- .../will_paginate/test/fixtures/developer.rb | 14 --------- .../test/fixtures/developers_projects.yml | 13 -------- .../plugins/will_paginate/test/fixtures/project.rb | 15 ---------- .../will_paginate/test/fixtures/projects.yml | 6 ---- .../will_paginate/test/fixtures/replies.yml | 29 ------------------ .../plugins/will_paginate/test/fixtures/reply.rb | 7 ----- .../plugins/will_paginate/test/fixtures/topic.rb | 10 ------- .../plugins/will_paginate/test/fixtures/topics.yml | 30 ------------------- vendor/plugins/will_paginate/test/fixtures/user.rb | 2 -- .../plugins/will_paginate/test/fixtures/users.yml | 35 ---------------------- 11 files changed, 164 deletions(-) delete mode 100644 vendor/plugins/will_paginate/test/fixtures/admin.rb delete mode 100644 vendor/plugins/will_paginate/test/fixtures/developer.rb delete mode 100644 vendor/plugins/will_paginate/test/fixtures/developers_projects.yml delete mode 100644 vendor/plugins/will_paginate/test/fixtures/project.rb delete mode 100644 vendor/plugins/will_paginate/test/fixtures/projects.yml delete mode 100644 vendor/plugins/will_paginate/test/fixtures/replies.yml delete mode 100644 vendor/plugins/will_paginate/test/fixtures/reply.rb delete mode 100644 vendor/plugins/will_paginate/test/fixtures/topic.rb delete mode 100644 vendor/plugins/will_paginate/test/fixtures/topics.yml delete mode 100644 vendor/plugins/will_paginate/test/fixtures/user.rb delete mode 100644 vendor/plugins/will_paginate/test/fixtures/users.yml (limited to 'vendor/plugins/will_paginate/test/fixtures') diff --git a/vendor/plugins/will_paginate/test/fixtures/admin.rb b/vendor/plugins/will_paginate/test/fixtures/admin.rb deleted file mode 100644 index 1d5e7f36..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/admin.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Admin < User - has_many :companies, :finder_sql => 'SELECT * FROM companies' -end diff --git a/vendor/plugins/will_paginate/test/fixtures/developer.rb b/vendor/plugins/will_paginate/test/fixtures/developer.rb deleted file mode 100644 index 0224f4bf..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/developer.rb +++ /dev/null @@ -1,14 +0,0 @@ -class Developer < User - has_and_belongs_to_many :projects, :include => :topics, :order => 'projects.name' - - def self.with_poor_ones(&block) - with_scope :find => { :conditions => ['salary <= ?', 80000], :order => 'salary' } do - yield - end - end - - named_scope :distinct, :select => 'DISTINCT `users`.*' - named_scope :poor, :conditions => ['salary <= ?', 80000], :order => 'salary' - - def self.per_page() 10 end -end diff --git a/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml b/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml deleted file mode 100644 index cee359c7..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml +++ /dev/null @@ -1,13 +0,0 @@ -david_action_controller: - developer_id: 1 - project_id: 2 - joined_on: 2004-10-10 - -david_active_record: - developer_id: 1 - project_id: 1 - joined_on: 2004-10-10 - -jamis_active_record: - developer_id: 2 - project_id: 1 \ No newline at end of file diff --git a/vendor/plugins/will_paginate/test/fixtures/project.rb b/vendor/plugins/will_paginate/test/fixtures/project.rb deleted file mode 100644 index 0f85ef5e..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/project.rb +++ /dev/null @@ -1,15 +0,0 @@ -class Project < ActiveRecord::Base - has_and_belongs_to_many :developers, :uniq => true - - has_many :topics - # :finder_sql => 'SELECT * FROM topics WHERE (topics.project_id = #{id})', - # :counter_sql => 'SELECT COUNT(*) FROM topics WHERE (topics.project_id = #{id})' - - has_many :replies, :through => :topics do - def find_recent(params = {}) - with_scope :find => { :conditions => ['replies.created_at > ?', 15.minutes.ago] } do - find :all, params - end - end - end -end diff --git a/vendor/plugins/will_paginate/test/fixtures/projects.yml b/vendor/plugins/will_paginate/test/fixtures/projects.yml deleted file mode 100644 index 74f3c32f..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/projects.yml +++ /dev/null @@ -1,6 +0,0 @@ -active_record: - id: 1 - name: Active Record -action_controller: - id: 2 - name: Active Controller diff --git a/vendor/plugins/will_paginate/test/fixtures/replies.yml b/vendor/plugins/will_paginate/test/fixtures/replies.yml deleted file mode 100644 index 9a83c004..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/replies.yml +++ /dev/null @@ -1,29 +0,0 @@ -witty_retort: - id: 1 - topic_id: 1 - content: Birdman is better! - created_at: <%= 6.hours.ago.to_s(:db) %> - -another: - id: 2 - topic_id: 2 - content: Nuh uh! - created_at: <%= 1.hour.ago.to_s(:db) %> - -spam: - id: 3 - topic_id: 1 - content: Nice site! - created_at: <%= 1.hour.ago.to_s(:db) %> - -decisive: - id: 4 - topic_id: 4 - content: "I'm getting to the bottom of this" - created_at: <%= 30.minutes.ago.to_s(:db) %> - -brave: - id: 5 - topic_id: 4 - content: "AR doesn't scare me a bit" - created_at: <%= 10.minutes.ago.to_s(:db) %> diff --git a/vendor/plugins/will_paginate/test/fixtures/reply.rb b/vendor/plugins/will_paginate/test/fixtures/reply.rb deleted file mode 100644 index ecaf3c1f..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/reply.rb +++ /dev/null @@ -1,7 +0,0 @@ -class Reply < ActiveRecord::Base - belongs_to :topic, :include => [:replies] - - named_scope :recent, :conditions => ['replies.created_at > ?', 15.minutes.ago] - - validates_presence_of :content -end diff --git a/vendor/plugins/will_paginate/test/fixtures/topic.rb b/vendor/plugins/will_paginate/test/fixtures/topic.rb deleted file mode 100644 index 2c2ce722..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/topic.rb +++ /dev/null @@ -1,10 +0,0 @@ -class Topic < ActiveRecord::Base - has_many :replies, :dependent => :destroy, :order => 'replies.created_at DESC' - belongs_to :project - - named_scope :mentions_activerecord, :conditions => ['topics.title LIKE ?', '%ActiveRecord%'] - - named_scope :with_replies_starting_with, lambda { |text| - { :conditions => "replies.content LIKE '#{text}%' ", :include => :replies } - } -end diff --git a/vendor/plugins/will_paginate/test/fixtures/topics.yml b/vendor/plugins/will_paginate/test/fixtures/topics.yml deleted file mode 100644 index 0a269047..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/topics.yml +++ /dev/null @@ -1,30 +0,0 @@ -futurama: - id: 1 - title: Isnt futurama awesome? - subtitle: It really is, isnt it. - content: I like futurama - created_at: <%= 1.day.ago.to_s(:db) %> - updated_at: - -harvey_birdman: - id: 2 - title: Harvey Birdman is the king of all men - subtitle: yup - content: He really is - created_at: <%= 2.hours.ago.to_s(:db) %> - updated_at: - -rails: - id: 3 - project_id: 1 - title: Rails is nice - subtitle: It makes me happy - content: except when I have to hack internals to fix pagination. even then really. - created_at: <%= 20.minutes.ago.to_s(:db) %> - -ar: - id: 4 - project_id: 1 - title: ActiveRecord sometimes freaks me out - content: "I mean, what's the deal with eager loading?" - created_at: <%= 15.minutes.ago.to_s(:db) %> diff --git a/vendor/plugins/will_paginate/test/fixtures/user.rb b/vendor/plugins/will_paginate/test/fixtures/user.rb deleted file mode 100644 index 4a57cf07..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/user.rb +++ /dev/null @@ -1,2 +0,0 @@ -class User < ActiveRecord::Base -end diff --git a/vendor/plugins/will_paginate/test/fixtures/users.yml b/vendor/plugins/will_paginate/test/fixtures/users.yml deleted file mode 100644 index ed2c03ae..00000000 --- a/vendor/plugins/will_paginate/test/fixtures/users.yml +++ /dev/null @@ -1,35 +0,0 @@ -david: - id: 1 - name: David - salary: 80000 - type: Developer - -jamis: - id: 2 - name: Jamis - salary: 150000 - type: Developer - -<% for digit in 3..10 %> -dev_<%= digit %>: - id: <%= digit %> - name: fixture_<%= digit %> - salary: 100000 - type: Developer -<% end %> - -poor_jamis: - id: 11 - name: Jamis - salary: 9000 - type: Developer - -admin: - id: 12 - name: admin - type: Admin - -goofy: - id: 13 - name: Goofy - type: Admin -- cgit v1.3