all_sorts 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/README.md +2 -1
- data/all_sorts.gemspec +1 -1
- data/lib/all_sorts/version.rb +1 -1
- metadata +111 -128
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3e8e78771d7c698a747fc9c85467c43332a9d116
|
4
|
+
data.tar.gz: 96ba32ab8ddbd71d0eae9487c629dd9b58e586c9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 24ee1d1020242db15d2dba0b95d6b9c41d1c266f5d66709bd12dbc04daeb6f652171e7df42d0b821140e6ce832cb6f15c70e81e9c7cdb62b7f4d41386a05d6ed
|
7
|
+
data.tar.gz: f625eff266d758752ba2beaf980340f81d88915a14b1ff38bb4af808a599c33206dd2479867a5e964b2ce135904103dca95d31d9798d98b5d98474dd9ab8a8da
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -26,7 +26,8 @@ the records may be ordered.
|
|
26
26
|
* http://whatever.com/wherever/?sort_1_name=asc
|
27
27
|
* http://whatever.com/wherever/?sort_1_name=asc&sort_2_salary=desc
|
28
28
|
|
29
|
-
##
|
29
|
+
## Model
|
30
|
+
In the model you can limit which fields are filterable. This is optional. If this isn't in your model, all fields are filterable.
|
30
31
|
``` ruby
|
31
32
|
class User < ActiveRecord::Base
|
32
33
|
sortable_fields :name, :salary
|
data/all_sorts.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.version = AllSorts::VERSION
|
7
7
|
gem.author = "Phil Spitler"
|
8
8
|
gem.email = 'pspitler@gmail.com'
|
9
|
-
gem.homepage = 'https://github.com/philspitler/
|
9
|
+
gem.homepage = 'https://github.com/philspitler/allsorts'
|
10
10
|
gem.summary = 'A DSL for sorting active record results based on hash keys with the term _sort_ in them.'
|
11
11
|
gem.description = ''
|
12
12
|
|
data/lib/all_sorts/version.rb
CHANGED
metadata
CHANGED
@@ -1,134 +1,124 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: all_sorts
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 1
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
version: 1.0.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Phil Spitler
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-05-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
21
14
|
name: maruku
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
- 6
|
31
|
-
version: "0.6"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.6'
|
32
20
|
type: :development
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: rake
|
36
21
|
prerelease: false
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.9'
|
46
34
|
type: :development
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: rspec
|
50
35
|
prerelease: false
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.9'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.6'
|
60
48
|
type: :development
|
61
|
-
version_requirements: *id003
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: simplecov
|
64
49
|
prerelease: false
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.4'
|
74
62
|
type: :development
|
75
|
-
version_requirements: *id004
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
name: yard
|
78
63
|
prerelease: false
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: yard
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.7'
|
88
76
|
type: :development
|
89
|
-
version_requirements: *id005
|
90
|
-
- !ruby/object:Gem::Dependency
|
91
|
-
name: sqlite3
|
92
77
|
prerelease: false
|
93
|
-
|
94
|
-
|
95
|
-
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.7'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sqlite3
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
96
87
|
- - ">="
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
99
|
-
- 0
|
100
|
-
version: "0"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
101
90
|
type: :development
|
102
|
-
version_requirements: *id006
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: activerecord
|
105
91
|
prerelease: false
|
106
|
-
|
107
|
-
|
108
|
-
requirements:
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
109
94
|
- - ">="
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: activerecord
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
115
103
|
version: 3.0.1
|
116
104
|
type: :runtime
|
117
|
-
|
118
|
-
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.0.1
|
111
|
+
description: ''
|
119
112
|
email: pspitler@gmail.com
|
120
113
|
executables: []
|
121
|
-
|
122
114
|
extensions: []
|
123
|
-
|
124
115
|
extra_rdoc_files: []
|
125
|
-
|
126
|
-
|
127
|
-
- .
|
128
|
-
- .
|
129
|
-
- .
|
130
|
-
- .
|
131
|
-
- .yardopts
|
116
|
+
files:
|
117
|
+
- ".autotest"
|
118
|
+
- ".gemtest"
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rspec"
|
121
|
+
- ".yardopts"
|
132
122
|
- Gemfile
|
133
123
|
- LICENSE.md
|
134
124
|
- README.md
|
@@ -144,39 +134,31 @@ files:
|
|
144
134
|
- spec/fixtures/user.rb
|
145
135
|
- spec/fixtures/users.yml
|
146
136
|
- spec/helper.rb
|
147
|
-
|
148
|
-
homepage: https://github.com/philspitler/all_sorts
|
137
|
+
homepage: https://github.com/philspitler/allsorts
|
149
138
|
licenses: []
|
150
|
-
|
139
|
+
metadata: {}
|
151
140
|
post_install_message:
|
152
141
|
rdoc_options: []
|
153
|
-
|
154
|
-
require_paths:
|
142
|
+
require_paths:
|
155
143
|
- lib
|
156
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
-
|
158
|
-
requirements:
|
144
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
159
146
|
- - ">="
|
160
|
-
- !ruby/object:Gem::Version
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
-
none: false
|
166
|
-
requirements:
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
167
151
|
- - ">="
|
168
|
-
- !ruby/object:Gem::Version
|
169
|
-
|
170
|
-
- 0
|
171
|
-
version: "0"
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
172
154
|
requirements: []
|
173
|
-
|
174
155
|
rubyforge_project:
|
175
|
-
rubygems_version:
|
156
|
+
rubygems_version: 2.2.2
|
176
157
|
signing_key:
|
177
|
-
specification_version:
|
178
|
-
summary: A DSL for sorting active record results based on hash keys with the term
|
179
|
-
|
158
|
+
specification_version: 4
|
159
|
+
summary: A DSL for sorting active record results based on hash keys with the term
|
160
|
+
_sort_ in them.
|
161
|
+
test_files:
|
180
162
|
- spec/all_sorts_spec.rb
|
181
163
|
- spec/finders/activerecord_test_connector.rb
|
182
164
|
- spec/fixtures/post.rb
|
@@ -185,3 +167,4 @@ test_files:
|
|
185
167
|
- spec/fixtures/user.rb
|
186
168
|
- spec/fixtures/users.yml
|
187
169
|
- spec/helper.rb
|
170
|
+
has_rdoc:
|