with_order 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +6 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.markdown +42 -0
- data/Rakefile +1 -0
- data/changelog.markdown +2 -0
- data/lib/with_order.rb +13 -0
- data/lib/with_order/action_view_extension.rb +33 -0
- data/lib/with_order/active_record_extension.rb +22 -0
- data/lib/with_order/active_record_model_extension.rb +66 -0
- data/lib/with_order/engine.rb +4 -0
- data/lib/with_order/hash_extraction.rb +15 -0
- data/lib/with_order/version.rb +3 -0
- data/spec/active_record_model_extension_spec.rb +164 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/models/nobel_prize.rb +3 -0
- data/spec/dummy/app/models/nobel_prize_winner.rb +5 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +56 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/db/migrate/20120127203225_create_nobel_prize_winners.rb +30 -0
- data/spec/dummy/db/migrate/20120203212237_create_nobel_prizes.rb +34 -0
- data/spec/dummy/db/migrate/20120214172946_fix_einstein.rb +9 -0
- data/spec/dummy/db/schema.rb +27 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/hash_extraction_spec.rb +49 -0
- data/spec/helpers/action_view_extension_spec.rb +94 -0
- data/spec/spec_helper.rb +11 -0
- data/with_order.gemspec +25 -0
- metadata +184 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
class CreateNobelPrizeWinners < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :nobel_prize_winners do |t|
|
4
|
+
t.string :first_name
|
5
|
+
t.string :last_name
|
6
|
+
t.string :category
|
7
|
+
t.integer :year
|
8
|
+
end
|
9
|
+
|
10
|
+
[
|
11
|
+
{first_name: 'Norman', last_name: 'Borlaug', category: 'Peace', year: 1970},
|
12
|
+
{first_name: 'Paul', last_name: 'Flory', category: 'Chemistry', year: 1974},
|
13
|
+
{first_name: 'Albert', last_name: 'Eintein', category: 'Physics', year: 1921},
|
14
|
+
{first_name: 'Samuel', last_name: 'Beckett', category: 'Literature', year: 1969},
|
15
|
+
{first_name: 'Niels', last_name: 'Bohr', category: 'Physics', year: 1922},
|
16
|
+
{first_name: 'Erwin', last_name: 'Schrodinger', category: 'Physics', year: 1933},
|
17
|
+
{first_name: 'Paul', last_name: 'Dirac', category: 'Physics', year: 1933},
|
18
|
+
{first_name: 'Enrico', last_name: 'Fermi', category: 'Physics', year: 1938},
|
19
|
+
{first_name: 'Richard', last_name: 'Feynman', category: 'Physics', year: 1965},
|
20
|
+
{first_name: 'Marie', last_name: 'Curie', category: 'Chemistry', year: 1911},
|
21
|
+
{first_name: 'James', last_name: 'Watson', category: 'Physiology or Medicine', year: 1962},
|
22
|
+
{first_name: 'Bertrand', last_name: 'Russell', category: 'Literature', year: 1950},
|
23
|
+
{first_name: 'John', last_name: 'Steinbeck', category: 'Literature', year: 1962},
|
24
|
+
{first_name: 'Nelson', last_name: 'Mandela', category: 'Peace', year: 1993},
|
25
|
+
{first_name: 'Jacques', last_name: 'Monod', category: 'Physiology or Medicine', year: 1965}
|
26
|
+
].each do |winner|
|
27
|
+
NobelPrizeWinner.create(winner)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
class CreateNobelPrizes < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table :nobel_prizes do |t|
|
4
|
+
t.integer :nobel_prize_winner_id
|
5
|
+
t.string :category
|
6
|
+
t.integer :year
|
7
|
+
end
|
8
|
+
|
9
|
+
execute(
|
10
|
+
'INSERT INTO nobel_prizes("nobel_prize_winner_id", "category", "year") ' +
|
11
|
+
'SELECT id, category, year ' +
|
12
|
+
'FROM nobel_prize_winners'
|
13
|
+
)
|
14
|
+
|
15
|
+
NobelPrizeWinner.find_by_first_name_and_last_name('Marie', 'Curie').nobel_prizes.create(category: 'Physics', year: 1903)
|
16
|
+
|
17
|
+
remove_column :nobel_prize_winners, :category, :year
|
18
|
+
end
|
19
|
+
|
20
|
+
def down
|
21
|
+
add_column :nobel_prize_winners, :category, :string
|
22
|
+
add_column :nobel_prize_winners, :year, :integer
|
23
|
+
|
24
|
+
NobelPrizeWinner.find_by_first_name_and_last_name('Marie', 'Curie').nobel_prizes.order(:year).first.delete
|
25
|
+
|
26
|
+
execute(
|
27
|
+
'UPDATE nobel_prize_winners ' +
|
28
|
+
'SET category = (SELECT nobel_prizes.category FROM nobel_prizes WHERE nobel_prize_winners.id = nobel_prizes.nobel_prize_winner_id), ' +
|
29
|
+
'year = (SELECT nobel_prizes.year FROM nobel_prizes WHERE nobel_prize_winners.id = nobel_prizes.nobel_prize_winner_id)'
|
30
|
+
)
|
31
|
+
|
32
|
+
drop_table :nobel_prizes
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20120214172946) do
|
15
|
+
|
16
|
+
create_table "nobel_prize_winners", :force => true do |t|
|
17
|
+
t.string "first_name"
|
18
|
+
t.string "last_name"
|
19
|
+
end
|
20
|
+
|
21
|
+
create_table "nobel_prizes", :force => true do |t|
|
22
|
+
t.integer "nobel_prize_winner_id"
|
23
|
+
t.string "category"
|
24
|
+
t.integer "year"
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
Binary file
|
File without changes
|
File without changes
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
</div>
|
24
|
+
</body>
|
25
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WithOrder::HashExtraction do
|
4
|
+
describe '#extract_hash_value(hash, key)' do
|
5
|
+
let(:params) {{
|
6
|
+
'fizz' => 'buzz',
|
7
|
+
foo: 'bar',
|
8
|
+
one: {two: {three: 3}}
|
9
|
+
}}
|
10
|
+
subject {
|
11
|
+
class TestHashExtraction
|
12
|
+
include WithOrder::HashExtraction
|
13
|
+
end
|
14
|
+
TestHashExtraction.new
|
15
|
+
}
|
16
|
+
|
17
|
+
context 'where a regular hash key is used' do
|
18
|
+
context 'where the value is a Symbol' do
|
19
|
+
it 'returns the value from the hash' do
|
20
|
+
subject.extract_hash_value(params, :foo).should == params[:foo]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'where the value is a String' do
|
25
|
+
it 'returns the value from the hash' do
|
26
|
+
subject.extract_hash_value(params, 'fizz').should == params['fizz']
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'where the value is not found' do
|
31
|
+
it 'returns nil' do
|
32
|
+
subject.extract_hash_value(params, 'yo').should be nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context 'where a nested hash key is used' do
|
38
|
+
it 'returns the value from the hash' do
|
39
|
+
subject.extract_hash_value(params, 'one[:two][:three]').should == params[:one][:two][:three]
|
40
|
+
end
|
41
|
+
|
42
|
+
context 'where the value is not found' do
|
43
|
+
it 'returns nil' do
|
44
|
+
subject.extract_hash_value(params, 'yo[:one]').should be nil
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WithOrder::ActionViewExtension do
|
4
|
+
describe '#link_with_order(*args, &block)' do
|
5
|
+
context 'the current field ordered on is "first_name"' do
|
6
|
+
it 'reverses the existing direction if the field is "first_name"' do
|
7
|
+
helper.stub!(:params).and_return({order: 'first_name-asc'})
|
8
|
+
npw = NobelPrizeWinner.with_order(helper.params)
|
9
|
+
helper.link_with_order(
|
10
|
+
(npw.current_order[:field] == :first_name and npw.current_order[:dir] == :asc) ? 'DESC' : 'ASC',
|
11
|
+
npw,
|
12
|
+
:first_name
|
13
|
+
).should == '<a href="/assets?order=first_name-desc">DESC</a>'
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'creates an "asc" order for fields other than "first_name"' do
|
17
|
+
helper.stub!(:params).and_return({order: 'first_name-asc'})
|
18
|
+
npw = NobelPrizeWinner.with_order(helper.params)
|
19
|
+
helper.link_with_order(
|
20
|
+
(npw.current_order[:field] == :last_name and npw.current_order[:dir] == :asc) ? 'DESC' : 'ASC',
|
21
|
+
npw,
|
22
|
+
:last_name
|
23
|
+
).should == '<a href="/assets?order=last_name-asc">ASC</a>'
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'defaults to "desc" if no direction is given' do
|
27
|
+
helper.stub!(:params).and_return({order: 'first_name'})
|
28
|
+
npw = NobelPrizeWinner.with_order(helper.params)
|
29
|
+
helper.link_with_order(
|
30
|
+
(npw.current_order[:field] == :first_name and npw.current_order[:dir] == :asc) ? 'DESC' : 'ASC',
|
31
|
+
npw,
|
32
|
+
:first_name
|
33
|
+
).should == '<a href="/assets?order=first_name-desc">DESC</a>'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context 'options' do
|
38
|
+
context ':dir' do
|
39
|
+
it 'locks in the direction of the param value' do
|
40
|
+
helper.stub!(:params).and_return({order: 'first_name-asc'})
|
41
|
+
npw = NobelPrizeWinner.with_order(helper.params)
|
42
|
+
helper.link_with_order(
|
43
|
+
'ASC',
|
44
|
+
npw,
|
45
|
+
:first_name,
|
46
|
+
{dir: :asc}
|
47
|
+
).should == '<a href="/assets?order=first_name-asc">ASC</a>'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'passes other options to #link_to' do
|
52
|
+
helper.stub!(:params).and_return({order: 'first_name-asc'})
|
53
|
+
npw = NobelPrizeWinner.with_order(helper.params)
|
54
|
+
helper.link_with_order(
|
55
|
+
'ASC',
|
56
|
+
npw,
|
57
|
+
:first_name,
|
58
|
+
{dir: :asc, remote: true}
|
59
|
+
).should == '<a href="/assets?order=first_name-asc" data-remote="true">ASC</a>'
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
context '#current_order on the scope includes a :param_namespace' do
|
64
|
+
it 'namespaces the :order param' do
|
65
|
+
helper.stub!(:params).and_return({foo: {order: 'first_name-asc'}})
|
66
|
+
npw = NobelPrizeWinner.with_order(helper.params, {param_namespace: :foo})
|
67
|
+
helper.link_with_order(
|
68
|
+
(npw.current_order[:field] == :first_name and npw.current_order[:dir] == :asc) ? 'DESC' : 'ASC',
|
69
|
+
npw,
|
70
|
+
:first_name
|
71
|
+
).should == '<a href="/assets?foo%5Border%5D=first_name-desc">DESC</a>'
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'works when no params are given' do
|
75
|
+
helper.stub!(:params).and_return({})
|
76
|
+
npw = NobelPrizeWinner.with_order(helper.params, {param_namespace: :foo})
|
77
|
+
helper.link_with_order(
|
78
|
+
(npw.current_order[:field] == :first_name and npw.current_order[:dir] == :asc) ? 'DESC' : 'ASC',
|
79
|
+
npw,
|
80
|
+
:first_name
|
81
|
+
).should == '<a href="/assets?foo%5Border%5D=first_name-asc">ASC</a>'
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'accepts blocks' do
|
86
|
+
helper.stub!(:params).and_return({order: 'first_name-asc'})
|
87
|
+
npw = NobelPrizeWinner.with_order(helper.params)
|
88
|
+
output = helper.link_with_order(npw, :first_name, {remote: true}) do
|
89
|
+
(npw.current_order[:field] == :first_name and npw.current_order[:dir] == :asc) ? 'DESC' : 'ASC'
|
90
|
+
end
|
91
|
+
output.should == '<a href="/assets?order=first_name-desc" data-remote="true">DESC</a>'
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV['RAILS_ENV'] = 'test'
|
3
|
+
|
4
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
5
|
+
|
6
|
+
require 'rspec/rails'
|
7
|
+
|
8
|
+
Rails.backtrace_cleaner.remove_silencers!
|
9
|
+
|
10
|
+
# Load support files
|
11
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
data/with_order.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/with_order/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.name = 'with_order'
|
6
|
+
gem.version = WithOrder::VERSION
|
7
|
+
|
8
|
+
gem.authors = ['Aaron Lasseigne']
|
9
|
+
gem.email = ['aaron.lasseigne@gmail.com']
|
10
|
+
gem.summary = %q{Add ordering to lists, tables, etc.}
|
11
|
+
gem.description = %q{Add ordering to lists, tables, etc.}
|
12
|
+
gem.homepage = 'https://github.com/AaronLasseigne/with_order'
|
13
|
+
|
14
|
+
gem.rubyforge_project = 'with_order'
|
15
|
+
|
16
|
+
gem.files = `git ls-files`.split("\n")
|
17
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
gem.require_paths = ['lib']
|
20
|
+
|
21
|
+
gem.add_dependency 'rails', '>= 3.1'
|
22
|
+
|
23
|
+
gem.add_development_dependency 'rspec-rails'
|
24
|
+
gem.add_development_dependency 'sqlite3'
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: with_order
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Aaron Lasseigne
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-03-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: &70225821556240 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.1'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70225821556240
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec-rails
|
27
|
+
requirement: &70225821555820 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70225821555820
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: sqlite3
|
38
|
+
requirement: &70225821555360 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70225821555360
|
47
|
+
description: Add ordering to lists, tables, etc.
|
48
|
+
email:
|
49
|
+
- aaron.lasseigne@gmail.com
|
50
|
+
executables: []
|
51
|
+
extensions: []
|
52
|
+
extra_rdoc_files: []
|
53
|
+
files:
|
54
|
+
- .gitignore
|
55
|
+
- Gemfile
|
56
|
+
- LICENSE
|
57
|
+
- README.markdown
|
58
|
+
- Rakefile
|
59
|
+
- changelog.markdown
|
60
|
+
- lib/with_order.rb
|
61
|
+
- lib/with_order/action_view_extension.rb
|
62
|
+
- lib/with_order/active_record_extension.rb
|
63
|
+
- lib/with_order/active_record_model_extension.rb
|
64
|
+
- lib/with_order/engine.rb
|
65
|
+
- lib/with_order/hash_extraction.rb
|
66
|
+
- lib/with_order/version.rb
|
67
|
+
- spec/active_record_model_extension_spec.rb
|
68
|
+
- spec/dummy/README.rdoc
|
69
|
+
- spec/dummy/Rakefile
|
70
|
+
- spec/dummy/app/assets/javascripts/application.js
|
71
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
72
|
+
- spec/dummy/app/controllers/application_controller.rb
|
73
|
+
- spec/dummy/app/helpers/application_helper.rb
|
74
|
+
- spec/dummy/app/mailers/.gitkeep
|
75
|
+
- spec/dummy/app/models/.gitkeep
|
76
|
+
- spec/dummy/app/models/nobel_prize.rb
|
77
|
+
- spec/dummy/app/models/nobel_prize_winner.rb
|
78
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
79
|
+
- spec/dummy/config.ru
|
80
|
+
- spec/dummy/config/application.rb
|
81
|
+
- spec/dummy/config/boot.rb
|
82
|
+
- spec/dummy/config/database.yml
|
83
|
+
- spec/dummy/config/environment.rb
|
84
|
+
- spec/dummy/config/environments/development.rb
|
85
|
+
- spec/dummy/config/environments/production.rb
|
86
|
+
- spec/dummy/config/environments/test.rb
|
87
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
88
|
+
- spec/dummy/config/initializers/inflections.rb
|
89
|
+
- spec/dummy/config/initializers/mime_types.rb
|
90
|
+
- spec/dummy/config/initializers/secret_token.rb
|
91
|
+
- spec/dummy/config/initializers/session_store.rb
|
92
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
93
|
+
- spec/dummy/config/locales/en.yml
|
94
|
+
- spec/dummy/config/routes.rb
|
95
|
+
- spec/dummy/db/migrate/20120127203225_create_nobel_prize_winners.rb
|
96
|
+
- spec/dummy/db/migrate/20120203212237_create_nobel_prizes.rb
|
97
|
+
- spec/dummy/db/migrate/20120214172946_fix_einstein.rb
|
98
|
+
- spec/dummy/db/schema.rb
|
99
|
+
- spec/dummy/db/test.sqlite3
|
100
|
+
- spec/dummy/lib/assets/.gitkeep
|
101
|
+
- spec/dummy/log/.gitkeep
|
102
|
+
- spec/dummy/public/404.html
|
103
|
+
- spec/dummy/public/422.html
|
104
|
+
- spec/dummy/public/500.html
|
105
|
+
- spec/dummy/public/favicon.ico
|
106
|
+
- spec/dummy/script/rails
|
107
|
+
- spec/hash_extraction_spec.rb
|
108
|
+
- spec/helpers/action_view_extension_spec.rb
|
109
|
+
- spec/spec_helper.rb
|
110
|
+
- with_order.gemspec
|
111
|
+
homepage: https://github.com/AaronLasseigne/with_order
|
112
|
+
licenses: []
|
113
|
+
post_install_message:
|
114
|
+
rdoc_options: []
|
115
|
+
require_paths:
|
116
|
+
- lib
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ! '>='
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
segments:
|
124
|
+
- 0
|
125
|
+
hash: -4155710535676147031
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
none: false
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
segments:
|
133
|
+
- 0
|
134
|
+
hash: -4155710535676147031
|
135
|
+
requirements: []
|
136
|
+
rubyforge_project: with_order
|
137
|
+
rubygems_version: 1.8.11
|
138
|
+
signing_key:
|
139
|
+
specification_version: 3
|
140
|
+
summary: Add ordering to lists, tables, etc.
|
141
|
+
test_files:
|
142
|
+
- spec/active_record_model_extension_spec.rb
|
143
|
+
- spec/dummy/README.rdoc
|
144
|
+
- spec/dummy/Rakefile
|
145
|
+
- spec/dummy/app/assets/javascripts/application.js
|
146
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
147
|
+
- spec/dummy/app/controllers/application_controller.rb
|
148
|
+
- spec/dummy/app/helpers/application_helper.rb
|
149
|
+
- spec/dummy/app/mailers/.gitkeep
|
150
|
+
- spec/dummy/app/models/.gitkeep
|
151
|
+
- spec/dummy/app/models/nobel_prize.rb
|
152
|
+
- spec/dummy/app/models/nobel_prize_winner.rb
|
153
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
154
|
+
- spec/dummy/config.ru
|
155
|
+
- spec/dummy/config/application.rb
|
156
|
+
- spec/dummy/config/boot.rb
|
157
|
+
- spec/dummy/config/database.yml
|
158
|
+
- spec/dummy/config/environment.rb
|
159
|
+
- spec/dummy/config/environments/development.rb
|
160
|
+
- spec/dummy/config/environments/production.rb
|
161
|
+
- spec/dummy/config/environments/test.rb
|
162
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
163
|
+
- spec/dummy/config/initializers/inflections.rb
|
164
|
+
- spec/dummy/config/initializers/mime_types.rb
|
165
|
+
- spec/dummy/config/initializers/secret_token.rb
|
166
|
+
- spec/dummy/config/initializers/session_store.rb
|
167
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
168
|
+
- spec/dummy/config/locales/en.yml
|
169
|
+
- spec/dummy/config/routes.rb
|
170
|
+
- spec/dummy/db/migrate/20120127203225_create_nobel_prize_winners.rb
|
171
|
+
- spec/dummy/db/migrate/20120203212237_create_nobel_prizes.rb
|
172
|
+
- spec/dummy/db/migrate/20120214172946_fix_einstein.rb
|
173
|
+
- spec/dummy/db/schema.rb
|
174
|
+
- spec/dummy/db/test.sqlite3
|
175
|
+
- spec/dummy/lib/assets/.gitkeep
|
176
|
+
- spec/dummy/log/.gitkeep
|
177
|
+
- spec/dummy/public/404.html
|
178
|
+
- spec/dummy/public/422.html
|
179
|
+
- spec/dummy/public/500.html
|
180
|
+
- spec/dummy/public/favicon.ico
|
181
|
+
- spec/dummy/script/rails
|
182
|
+
- spec/hash_extraction_spec.rb
|
183
|
+
- spec/helpers/action_view_extension_spec.rb
|
184
|
+
- spec/spec_helper.rb
|