datagrid 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -2
- data/VERSION +1 -1
- data/datagrid.gemspec +6 -48
- data/lib/datagrid/columns.rb +21 -21
- metadata +4 -200
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a86d3d1a93e184496486be98659d834991d87789
|
4
|
+
data.tar.gz: 04571cb15dee9f818907c3832bdecbe65d3a1002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 520a31aecb53d6afedd645e0442504b0f9d581a6e3d076e5f0cd3cc1629c3b5dd88c0aa9dc49046c483d78ab5227131e1f7eeb64b7f9c90aa638ed1b20fd5372
|
7
|
+
data.tar.gz: acb8a306c7f666a4cab3a7d31a78264ca351b754ae2aded735feaf9e7feddf8675d77e2a31515d846c3ad1c90866517d93e563abf2cf1150ad9cec33e1abab65
|
data/Gemfile
CHANGED
@@ -5,10 +5,9 @@ gem "rails", ">= 3.2.22.2"
|
|
5
5
|
group :development do
|
6
6
|
|
7
7
|
gem "bundler"
|
8
|
-
gem "jeweler",
|
8
|
+
gem "jeweler", ">= 2.1.2"
|
9
9
|
|
10
10
|
|
11
|
-
gem "debugger", :platform => :ruby_19
|
12
11
|
gem "pry-byebug", :platform => [:ruby_20, :ruby_21, :ruby_22, :ruby_23] & Bundler::Dsl::VALID_PLATFORMS
|
13
12
|
|
14
13
|
gem "rspec", ">= 3"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.1
|
data/datagrid.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: datagrid 1.5.
|
5
|
+
# stub: datagrid 1.5.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "datagrid".freeze
|
9
|
-
s.version = "1.5.
|
9
|
+
s.version = "1.5.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Bogdan Gusiev".freeze]
|
14
|
-
s.date = "2016-10-
|
14
|
+
s.date = "2016-10-25"
|
15
15
|
s.description = "This allows you to easily build datagrid aka data tables with sortable columns and filters".freeze
|
16
16
|
s.email = "agresso@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
@@ -137,22 +137,8 @@ Gem::Specification.new do |s|
|
|
137
137
|
|
138
138
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
139
139
|
s.add_runtime_dependency(%q<rails>.freeze, [">= 3.2.22.2"])
|
140
|
-
s.add_runtime_dependency(%q<bundler>.freeze, [">= 0"])
|
141
|
-
s.add_runtime_dependency(%q<jeweler>.freeze, [">= 0"])
|
142
|
-
s.add_runtime_dependency(%q<debugger>.freeze, [">= 0"])
|
143
|
-
s.add_runtime_dependency(%q<pry-byebug>.freeze, [">= 0"])
|
144
|
-
s.add_runtime_dependency(%q<rspec>.freeze, [">= 3"])
|
145
|
-
s.add_runtime_dependency(%q<nokogiri>.freeze, [">= 0"])
|
146
|
-
s.add_runtime_dependency(%q<sqlite3>.freeze, [">= 0"])
|
147
|
-
s.add_runtime_dependency(%q<sequel>.freeze, [">= 0"])
|
148
|
-
s.add_runtime_dependency(%q<mongoid>.freeze, ["= 3.1.7"])
|
149
|
-
s.add_runtime_dependency(%q<mongo_mapper>.freeze, ["~> 0.13.0"])
|
150
|
-
s.add_runtime_dependency(%q<bson>.freeze, [">= 0"])
|
151
|
-
s.add_runtime_dependency(%q<bson_ext>.freeze, [">= 0"])
|
152
|
-
s.add_development_dependency(%q<rails>.freeze, [">= 3.2.22.2"])
|
153
140
|
s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
|
154
|
-
s.add_development_dependency(%q<jeweler>.freeze, [">=
|
155
|
-
s.add_development_dependency(%q<debugger>.freeze, [">= 0"])
|
141
|
+
s.add_development_dependency(%q<jeweler>.freeze, [">= 2.1.2"])
|
156
142
|
s.add_development_dependency(%q<pry-byebug>.freeze, [">= 0"])
|
157
143
|
s.add_development_dependency(%q<rspec>.freeze, [">= 3"])
|
158
144
|
s.add_development_dependency(%q<nokogiri>.freeze, [">= 0"])
|
@@ -165,21 +151,7 @@ Gem::Specification.new do |s|
|
|
165
151
|
else
|
166
152
|
s.add_dependency(%q<rails>.freeze, [">= 3.2.22.2"])
|
167
153
|
s.add_dependency(%q<bundler>.freeze, [">= 0"])
|
168
|
-
s.add_dependency(%q<jeweler>.freeze, [">=
|
169
|
-
s.add_dependency(%q<debugger>.freeze, [">= 0"])
|
170
|
-
s.add_dependency(%q<pry-byebug>.freeze, [">= 0"])
|
171
|
-
s.add_dependency(%q<rspec>.freeze, [">= 3"])
|
172
|
-
s.add_dependency(%q<nokogiri>.freeze, [">= 0"])
|
173
|
-
s.add_dependency(%q<sqlite3>.freeze, [">= 0"])
|
174
|
-
s.add_dependency(%q<sequel>.freeze, [">= 0"])
|
175
|
-
s.add_dependency(%q<mongoid>.freeze, ["= 3.1.7"])
|
176
|
-
s.add_dependency(%q<mongo_mapper>.freeze, ["~> 0.13.0"])
|
177
|
-
s.add_dependency(%q<bson>.freeze, [">= 0"])
|
178
|
-
s.add_dependency(%q<bson_ext>.freeze, [">= 0"])
|
179
|
-
s.add_dependency(%q<rails>.freeze, [">= 3.2.22.2"])
|
180
|
-
s.add_dependency(%q<bundler>.freeze, [">= 0"])
|
181
|
-
s.add_dependency(%q<jeweler>.freeze, [">= 0"])
|
182
|
-
s.add_dependency(%q<debugger>.freeze, [">= 0"])
|
154
|
+
s.add_dependency(%q<jeweler>.freeze, [">= 2.1.2"])
|
183
155
|
s.add_dependency(%q<pry-byebug>.freeze, [">= 0"])
|
184
156
|
s.add_dependency(%q<rspec>.freeze, [">= 3"])
|
185
157
|
s.add_dependency(%q<nokogiri>.freeze, [">= 0"])
|
@@ -193,21 +165,7 @@ Gem::Specification.new do |s|
|
|
193
165
|
else
|
194
166
|
s.add_dependency(%q<rails>.freeze, [">= 3.2.22.2"])
|
195
167
|
s.add_dependency(%q<bundler>.freeze, [">= 0"])
|
196
|
-
s.add_dependency(%q<jeweler>.freeze, [">=
|
197
|
-
s.add_dependency(%q<debugger>.freeze, [">= 0"])
|
198
|
-
s.add_dependency(%q<pry-byebug>.freeze, [">= 0"])
|
199
|
-
s.add_dependency(%q<rspec>.freeze, [">= 3"])
|
200
|
-
s.add_dependency(%q<nokogiri>.freeze, [">= 0"])
|
201
|
-
s.add_dependency(%q<sqlite3>.freeze, [">= 0"])
|
202
|
-
s.add_dependency(%q<sequel>.freeze, [">= 0"])
|
203
|
-
s.add_dependency(%q<mongoid>.freeze, ["= 3.1.7"])
|
204
|
-
s.add_dependency(%q<mongo_mapper>.freeze, ["~> 0.13.0"])
|
205
|
-
s.add_dependency(%q<bson>.freeze, [">= 0"])
|
206
|
-
s.add_dependency(%q<bson_ext>.freeze, [">= 0"])
|
207
|
-
s.add_dependency(%q<rails>.freeze, [">= 3.2.22.2"])
|
208
|
-
s.add_dependency(%q<bundler>.freeze, [">= 0"])
|
209
|
-
s.add_dependency(%q<jeweler>.freeze, [">= 0"])
|
210
|
-
s.add_dependency(%q<debugger>.freeze, [">= 0"])
|
168
|
+
s.add_dependency(%q<jeweler>.freeze, [">= 2.1.2"])
|
211
169
|
s.add_dependency(%q<pry-byebug>.freeze, [">= 0"])
|
212
170
|
s.add_dependency(%q<rspec>.freeze, [">= 3"])
|
213
171
|
s.add_dependency(%q<nokogiri>.freeze, [">= 0"])
|
data/lib/datagrid/columns.rb
CHANGED
@@ -96,30 +96,30 @@ module Datagrid
|
|
96
96
|
#
|
97
97
|
# Arguments:
|
98
98
|
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
99
|
+
# * <tt>name</tt> - column name
|
100
|
+
# * <tt>query</tt> - a string representing the query to select this column (supports only ActiveRecord)
|
101
|
+
# * <tt>options</tt> - hash of options
|
102
|
+
# * <tt>block</tt> - proc to calculate a column value
|
103
103
|
#
|
104
104
|
# Available options:
|
105
105
|
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
106
|
+
# * <tt>:html</tt> - determines if current column should be present in html table and how is it formatted
|
107
|
+
# * <tt>:order</tt> - determines if this column could be sortable and how.
|
108
|
+
# The value of order is explicitly passed to ORM ordering method.
|
109
|
+
# Ex: <tt>"created_at, id"</tt> for ActiveRecord, <tt>[:created_at, :id]</tt> for Mongoid
|
110
|
+
# * <tt>:order_desc</tt> - determines a descending order for given column
|
111
|
+
# (only in case when <tt>:order</tt> can not be easily reversed by ORM)
|
112
|
+
# * <tt>:order_by_value</tt> - used in case it is easier to perform ordering at ruby level not on database level.
|
113
|
+
# Warning: using ruby to order large datasets is very unrecommended.
|
114
|
+
# If set to true - datagrid will use column value to order by this column
|
115
|
+
# If block is given - datagrid will use value returned from block
|
116
|
+
# * <tt>:mandatory</tt> - if true, column will never be hidden with #column_names selection
|
117
|
+
# * <tt>:url</tt> - a proc with one argument, pass this option to easily convert the value into an URL
|
118
|
+
# * <tt>:before</tt> - determines the position of this column, by adding it before the column passed here
|
119
|
+
# * <tt>:after</tt> - determines the position of this column, by adding it after the column passed here
|
120
|
+
# * <tt>:if</tt> - the column is shown if the reult of calling this argument is true
|
121
|
+
# * <tt>:unless</tt> - the column is shown unless the reult of calling this argument is true
|
122
|
+
# * <tt>:preload</tt> - spefies which associations of the scope should be preloaded for this column
|
123
123
|
#
|
124
124
|
# See: https://github.com/bogdan/datagrid/wiki/Columns for examples
|
125
125
|
def column(name, options_or_query = {}, options = {}, &block)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datagrid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Gusiev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,188 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.2.22.2
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: jeweler
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: debugger
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry-byebug
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '3'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '3'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: nokogiri
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: sqlite3
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: sequel
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: mongoid
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - '='
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: 3.1.7
|
146
|
-
type: :runtime
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - '='
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: 3.1.7
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: mongo_mapper
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: 0.13.0
|
160
|
-
type: :runtime
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 0.13.0
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: bson
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :runtime
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: bson_ext
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - ">="
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
188
|
-
type: :runtime
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - ">="
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0'
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: rails
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - ">="
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: 3.2.22.2
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - ">="
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: 3.2.22.2
|
209
27
|
- !ruby/object:Gem::Dependency
|
210
28
|
name: bundler
|
211
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,28 +44,14 @@ dependencies:
|
|
226
44
|
requirements:
|
227
45
|
- - ">="
|
228
46
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
230
|
-
type: :development
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - ">="
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: '0'
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: debugger
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
240
|
-
requirements:
|
241
|
-
- - ">="
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
version: '0'
|
47
|
+
version: 2.1.2
|
244
48
|
type: :development
|
245
49
|
prerelease: false
|
246
50
|
version_requirements: !ruby/object:Gem::Requirement
|
247
51
|
requirements:
|
248
52
|
- - ">="
|
249
53
|
- !ruby/object:Gem::Version
|
250
|
-
version:
|
54
|
+
version: 2.1.2
|
251
55
|
- !ruby/object:Gem::Dependency
|
252
56
|
name: pry-byebug
|
253
57
|
requirement: !ruby/object:Gem::Requirement
|