datagrid 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/datagrid.gemspec +6 -6
- data/lib/datagrid/renderer.rb +1 -0
- data/spec/datagrid/helper_spec.rb +17 -0
- metadata +31 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24c667cba7edebeb70344d88471bae4d2264f63a
|
4
|
+
data.tar.gz: e40ef73cdb3b643fccb14afb793feb67a95396f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5991d5a4a1cabce8cb4051ccf43fb38f87ded3de02d39f3b662dafa4d7645a3e2530fa044409032bf6cd9d2447dc77cfb2cdd0ddf598434275b3f5e35a5452b9
|
7
|
+
data.tar.gz: bf103e76c8ff87c1c521c49c63cf5d1ab4718f4f2af21413e9caf081f53701d4c6db2cadadb8b501562ca8c2bcc1c3ba9bcc371e5494883bb080dde2a95f8537
|
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.2
|
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.2.
|
5
|
+
# stub: datagrid 1.2.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "datagrid"
|
9
|
-
s.version = "1.2.
|
9
|
+
s.version = "1.2.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Bogdan Gusiev"]
|
14
|
-
s.date = "2014-05-
|
14
|
+
s.date = "2014-05-24"
|
15
15
|
s.description = "This allows you to easily build datagrid aka data tables with sortable columns and filters"
|
16
16
|
s.email = "agresso@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -130,7 +130,7 @@ Gem::Specification.new do |s|
|
|
130
130
|
s.add_development_dependency(%q<debugger>, [">= 0"])
|
131
131
|
s.add_development_dependency(%q<byebug>, [">= 0"])
|
132
132
|
s.add_development_dependency(%q<ruby-debug>, [">= 0"])
|
133
|
-
s.add_development_dependency(%q<rspec>, [">=
|
133
|
+
s.add_development_dependency(%q<rspec>, [">= 2.14"])
|
134
134
|
s.add_development_dependency(%q<nokogiri>, [">= 0"])
|
135
135
|
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
136
136
|
s.add_development_dependency(%q<mongoid>, ["= 2.2.2"])
|
@@ -145,7 +145,7 @@ Gem::Specification.new do |s|
|
|
145
145
|
s.add_dependency(%q<debugger>, [">= 0"])
|
146
146
|
s.add_dependency(%q<byebug>, [">= 0"])
|
147
147
|
s.add_dependency(%q<ruby-debug>, [">= 0"])
|
148
|
-
s.add_dependency(%q<rspec>, [">=
|
148
|
+
s.add_dependency(%q<rspec>, [">= 2.14"])
|
149
149
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
150
150
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
151
151
|
s.add_dependency(%q<mongoid>, ["= 2.2.2"])
|
@@ -161,7 +161,7 @@ Gem::Specification.new do |s|
|
|
161
161
|
s.add_dependency(%q<debugger>, [">= 0"])
|
162
162
|
s.add_dependency(%q<byebug>, [">= 0"])
|
163
163
|
s.add_dependency(%q<ruby-debug>, [">= 0"])
|
164
|
-
s.add_dependency(%q<rspec>, [">=
|
164
|
+
s.add_dependency(%q<rspec>, [">= 2.14"])
|
165
165
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
166
166
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
167
167
|
s.add_dependency(%q<mongoid>, ["= 2.2.2"])
|
data/lib/datagrid/renderer.rb
CHANGED
@@ -30,6 +30,7 @@ module Datagrid
|
|
30
30
|
options[:method] ||= :get
|
31
31
|
options[:html] ||= {}
|
32
32
|
options[:html][:class] ||= "datagrid-form #{@template.dom_class(grid)}"
|
33
|
+
options[:as] ||= grid.param_name
|
33
34
|
_render_partial('form', options[:partials], {:grid => grid, :options => options})
|
34
35
|
end
|
35
36
|
|
@@ -376,10 +376,27 @@ describe Datagrid::Helper do
|
|
376
376
|
class TestGrid
|
377
377
|
include Datagrid
|
378
378
|
scope { Entry }
|
379
|
+
filter(:id)
|
379
380
|
end
|
380
381
|
end
|
381
382
|
expect(subject.datagrid_form_for(::Ns22::TestGrid.new, :url => "grid")).to match_css_pattern(
|
382
383
|
"form.datagrid-form.ns22_test_grid" => 1,
|
384
|
+
"form.datagrid-form label[for=ns22_test_grid_id]" => 1,
|
385
|
+
"form.datagrid-form input#ns22_test_grid_id[name='ns22_test_grid[id]']" => 1,
|
386
|
+
)
|
387
|
+
end
|
388
|
+
|
389
|
+
it "should have overridable param_name method" do
|
390
|
+
class ParamNameGrid81
|
391
|
+
include Datagrid
|
392
|
+
scope { Entry }
|
393
|
+
filter(:id)
|
394
|
+
def param_name
|
395
|
+
'g'
|
396
|
+
end
|
397
|
+
end
|
398
|
+
expect(subject.datagrid_form_for(::ParamNameGrid81.new, :url => "/grid")).to match_css_pattern(
|
399
|
+
"form.datagrid-form input[name='g[id]']" => 1,
|
383
400
|
)
|
384
401
|
end
|
385
402
|
end
|
metadata
CHANGED
@@ -1,139 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datagrid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Gusiev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jeweler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: debugger
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: byebug
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: ruby-debug
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '2.14'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '2.14'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: nokogiri
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: sqlite3
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
@@ -154,14 +154,14 @@ dependencies:
|
|
154
154
|
name: mongo_mapper
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: 0.11.0
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: 0.11.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
@@ -196,14 +196,14 @@ dependencies:
|
|
196
196
|
name: fastercsv
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- -
|
199
|
+
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: '0'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- -
|
206
|
+
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
description: This allows you to easily build datagrid aka data tables with sortable
|
@@ -214,9 +214,9 @@ extensions: []
|
|
214
214
|
extra_rdoc_files:
|
215
215
|
- LICENSE.txt
|
216
216
|
files:
|
217
|
-
- .document
|
218
|
-
- .rspec
|
219
|
-
- .travis.yml
|
217
|
+
- ".document"
|
218
|
+
- ".rspec"
|
219
|
+
- ".travis.yml"
|
220
220
|
- Gemfile
|
221
221
|
- LICENSE.txt
|
222
222
|
- Rakefile
|
@@ -320,12 +320,12 @@ require_paths:
|
|
320
320
|
- lib
|
321
321
|
required_ruby_version: !ruby/object:Gem::Requirement
|
322
322
|
requirements:
|
323
|
-
- -
|
323
|
+
- - ">="
|
324
324
|
- !ruby/object:Gem::Version
|
325
325
|
version: '0'
|
326
326
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
327
327
|
requirements:
|
328
|
-
- -
|
328
|
+
- - ">="
|
329
329
|
- !ruby/object:Gem::Version
|
330
330
|
version: '0'
|
331
331
|
requirements: []
|