diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
| commit | e0a7e0fec760ba12c8067a37e10c96f1f05876e2 (patch) | |
| tree | d0cf745592a46aee4d4913911fd34c7c24515220 /vendor/plugins/will_paginate/test/fixtures | |
| parent | 6424e10be5a89f175a74c71c55660412a169b8b8 (diff) | |
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
Diffstat (limited to 'vendor/plugins/will_paginate/test/fixtures')
11 files changed, 0 insertions, 164 deletions
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 @@ | |||
| 1 | class Admin < User | ||
| 2 | has_many :companies, :finder_sql => 'SELECT * FROM companies' | ||
| 3 | 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 @@ | |||
| 1 | class Developer < User | ||
| 2 | has_and_belongs_to_many :projects, :include => :topics, :order => 'projects.name' | ||
| 3 | |||
| 4 | def self.with_poor_ones(&block) | ||
| 5 | with_scope :find => { :conditions => ['salary <= ?', 80000], :order => 'salary' } do | ||
| 6 | yield | ||
| 7 | end | ||
| 8 | end | ||
| 9 | |||
| 10 | named_scope :distinct, :select => 'DISTINCT `users`.*' | ||
| 11 | named_scope :poor, :conditions => ['salary <= ?', 80000], :order => 'salary' | ||
| 12 | |||
| 13 | def self.per_page() 10 end | ||
| 14 | 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 @@ | |||
| 1 | david_action_controller: | ||
| 2 | developer_id: 1 | ||
| 3 | project_id: 2 | ||
| 4 | joined_on: 2004-10-10 | ||
| 5 | |||
| 6 | david_active_record: | ||
| 7 | developer_id: 1 | ||
| 8 | project_id: 1 | ||
| 9 | joined_on: 2004-10-10 | ||
| 10 | |||
| 11 | jamis_active_record: | ||
| 12 | developer_id: 2 | ||
| 13 | 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 @@ | |||
| 1 | class Project < ActiveRecord::Base | ||
| 2 | has_and_belongs_to_many :developers, :uniq => true | ||
| 3 | |||
| 4 | has_many :topics | ||
| 5 | # :finder_sql => 'SELECT * FROM topics WHERE (topics.project_id = #{id})', | ||
| 6 | # :counter_sql => 'SELECT COUNT(*) FROM topics WHERE (topics.project_id = #{id})' | ||
| 7 | |||
| 8 | has_many :replies, :through => :topics do | ||
| 9 | def find_recent(params = {}) | ||
| 10 | with_scope :find => { :conditions => ['replies.created_at > ?', 15.minutes.ago] } do | ||
| 11 | find :all, params | ||
| 12 | end | ||
| 13 | end | ||
| 14 | end | ||
| 15 | 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 @@ | |||
| 1 | active_record: | ||
| 2 | id: 1 | ||
| 3 | name: Active Record | ||
| 4 | action_controller: | ||
| 5 | id: 2 | ||
| 6 | 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 @@ | |||
| 1 | witty_retort: | ||
| 2 | id: 1 | ||
| 3 | topic_id: 1 | ||
| 4 | content: Birdman is better! | ||
| 5 | created_at: <%= 6.hours.ago.to_s(:db) %> | ||
| 6 | |||
| 7 | another: | ||
| 8 | id: 2 | ||
| 9 | topic_id: 2 | ||
| 10 | content: Nuh uh! | ||
| 11 | created_at: <%= 1.hour.ago.to_s(:db) %> | ||
| 12 | |||
| 13 | spam: | ||
| 14 | id: 3 | ||
| 15 | topic_id: 1 | ||
| 16 | content: Nice site! | ||
| 17 | created_at: <%= 1.hour.ago.to_s(:db) %> | ||
| 18 | |||
| 19 | decisive: | ||
| 20 | id: 4 | ||
| 21 | topic_id: 4 | ||
| 22 | content: "I'm getting to the bottom of this" | ||
| 23 | created_at: <%= 30.minutes.ago.to_s(:db) %> | ||
| 24 | |||
| 25 | brave: | ||
| 26 | id: 5 | ||
| 27 | topic_id: 4 | ||
| 28 | content: "AR doesn't scare me a bit" | ||
| 29 | 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 @@ | |||
| 1 | class Reply < ActiveRecord::Base | ||
| 2 | belongs_to :topic, :include => [:replies] | ||
| 3 | |||
| 4 | named_scope :recent, :conditions => ['replies.created_at > ?', 15.minutes.ago] | ||
| 5 | |||
| 6 | validates_presence_of :content | ||
| 7 | 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 @@ | |||
| 1 | class Topic < ActiveRecord::Base | ||
| 2 | has_many :replies, :dependent => :destroy, :order => 'replies.created_at DESC' | ||
| 3 | belongs_to :project | ||
| 4 | |||
| 5 | named_scope :mentions_activerecord, :conditions => ['topics.title LIKE ?', '%ActiveRecord%'] | ||
| 6 | |||
| 7 | named_scope :with_replies_starting_with, lambda { |text| | ||
| 8 | { :conditions => "replies.content LIKE '#{text}%' ", :include => :replies } | ||
| 9 | } | ||
| 10 | 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 @@ | |||
| 1 | futurama: | ||
| 2 | id: 1 | ||
| 3 | title: Isnt futurama awesome? | ||
| 4 | subtitle: It really is, isnt it. | ||
| 5 | content: I like futurama | ||
| 6 | created_at: <%= 1.day.ago.to_s(:db) %> | ||
| 7 | updated_at: | ||
| 8 | |||
| 9 | harvey_birdman: | ||
| 10 | id: 2 | ||
| 11 | title: Harvey Birdman is the king of all men | ||
| 12 | subtitle: yup | ||
| 13 | content: He really is | ||
| 14 | created_at: <%= 2.hours.ago.to_s(:db) %> | ||
| 15 | updated_at: | ||
| 16 | |||
| 17 | rails: | ||
| 18 | id: 3 | ||
| 19 | project_id: 1 | ||
| 20 | title: Rails is nice | ||
| 21 | subtitle: It makes me happy | ||
| 22 | content: except when I have to hack internals to fix pagination. even then really. | ||
| 23 | created_at: <%= 20.minutes.ago.to_s(:db) %> | ||
| 24 | |||
| 25 | ar: | ||
| 26 | id: 4 | ||
| 27 | project_id: 1 | ||
| 28 | title: ActiveRecord sometimes freaks me out | ||
| 29 | content: "I mean, what's the deal with eager loading?" | ||
| 30 | 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 @@ | |||
| 1 | class User < ActiveRecord::Base | ||
| 2 | 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 @@ | |||
| 1 | david: | ||
| 2 | id: 1 | ||
| 3 | name: David | ||
| 4 | salary: 80000 | ||
| 5 | type: Developer | ||
| 6 | |||
| 7 | jamis: | ||
| 8 | id: 2 | ||
| 9 | name: Jamis | ||
| 10 | salary: 150000 | ||
| 11 | type: Developer | ||
| 12 | |||
| 13 | <% for digit in 3..10 %> | ||
| 14 | dev_<%= digit %>: | ||
| 15 | id: <%= digit %> | ||
| 16 | name: fixture_<%= digit %> | ||
| 17 | salary: 100000 | ||
| 18 | type: Developer | ||
| 19 | <% end %> | ||
| 20 | |||
| 21 | poor_jamis: | ||
| 22 | id: 11 | ||
| 23 | name: Jamis | ||
| 24 | salary: 9000 | ||
| 25 | type: Developer | ||
| 26 | |||
| 27 | admin: | ||
| 28 | id: 12 | ||
| 29 | name: admin | ||
| 30 | type: Admin | ||
| 31 | |||
| 32 | goofy: | ||
| 33 | id: 13 | ||
| 34 | name: Goofy | ||
| 35 | type: Admin | ||
