datagrid 0.6.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.markdown CHANGED
@@ -98,6 +98,8 @@ In common case it is `ActiveRecord::Base` (or any other supported ORM) subclass
98
98
  end
99
99
  ```
100
100
 
101
+ [More about scope](https://github.com/bogdan/datagrid/wiki/Scope)
102
+
101
103
  ### Filters
102
104
 
103
105
  Each filter definition consists of:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.6.2
data/datagrid.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "datagrid"
8
- s.version = "0.6.0"
8
+ s.version = "0.6.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bogdan Gusiev"]
12
- s.date = "2012-05-24"
12
+ s.date = "2012-06-22"
13
13
  s.description = "This allows you to easily build datagrid aka data tables with sortable columns and filters"
14
14
  s.email = "agresso@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -46,6 +46,7 @@ Gem::Specification.new do |s|
46
46
  "lib/datagrid/filters/date_filter.rb",
47
47
  "lib/datagrid/filters/default_filter.rb",
48
48
  "lib/datagrid/filters/enum_filter.rb",
49
+ "lib/datagrid/filters/float_filter.rb",
49
50
  "lib/datagrid/filters/integer_filter.rb",
50
51
  "lib/datagrid/filters/string_filter.rb",
51
52
  "lib/datagrid/form_builder.rb",
@@ -57,12 +58,14 @@ Gem::Specification.new do |s|
57
58
  "lib/tasks/datagrid_tasks.rake",
58
59
  "spec/datagrid/active_model_spec.rb",
59
60
  "spec/datagrid/columns_spec.rb",
61
+ "spec/datagrid/core_spec.rb",
60
62
  "spec/datagrid/drivers/active_record_spec.rb",
61
63
  "spec/datagrid/drivers/mongo_mapper_spec.rb",
62
64
  "spec/datagrid/drivers/mongoid_spec.rb",
63
65
  "spec/datagrid/filters/boolean_enum_filter_spec.rb",
64
66
  "spec/datagrid/filters/composite_filters_spec.rb",
65
67
  "spec/datagrid/filters/enum_filter_spec.rb",
68
+ "spec/datagrid/filters/float_filter_spec.rb",
66
69
  "spec/datagrid/filters_spec.rb",
67
70
  "spec/datagrid/form_builder_spec.rb",
68
71
  "spec/datagrid/helper_spec.rb",
data/lib/datagrid.rb CHANGED
@@ -44,7 +44,7 @@ module Datagrid
44
44
  end # InstanceMethods
45
45
 
46
46
  class ConfigurationError < StandardError; end
47
- class ArgumentError < StandardError; end
47
+ class ArgumentError < ::ArgumentError; end
48
48
 
49
49
 
50
50
  end
data/lib/datagrid/core.rb CHANGED
@@ -42,10 +42,6 @@ module Datagrid
42
42
  end
43
43
  end
44
44
 
45
- def current_scope
46
- @scope
47
- end
48
-
49
45
  def driver
50
46
  @driver ||= Drivers::AbstractDriver.guess_driver(scope).new
51
47
  end
@@ -98,17 +94,20 @@ module Datagrid
98
94
  self.assets.paginate(*args, &block)
99
95
  end
100
96
 
101
- def scope
102
- check_scope_defined!
103
- instance_eval(&self.class.current_scope)
97
+ def scope(&block)
98
+ if block_given?
99
+ @current_scope = block
100
+ else
101
+ @current_scope ? @current_scope.call : self.class.scope
102
+ end
104
103
  end
105
104
 
106
105
  def driver
107
106
  self.class.driver
108
107
  end
109
108
 
110
- def check_scope_defined!(message = nil )
111
- self.class.send :check_scope_defined!, message
109
+ def check_scope_defined!(message)
110
+ self.class.check_scope_defined!(message)
112
111
  end
113
112
 
114
113
  end # InstanceMethods
@@ -12,7 +12,7 @@ module Datagrid
12
12
  end
13
13
 
14
14
  def to_scope(scope)
15
- scope.where
15
+ scope.where(nil)
16
16
  end
17
17
 
18
18
  def where(scope, condition)
@@ -10,6 +10,7 @@ module Datagrid
10
10
  require "datagrid/filters/integer_filter"
11
11
  require "datagrid/filters/composite_filters"
12
12
  require "datagrid/filters/string_filter"
13
+ require "datagrid/filters/float_filter"
13
14
 
14
15
  FILTER_TYPES = {
15
16
  :date => Filters::DateFilter,
@@ -19,6 +20,7 @@ module Datagrid
19
20
  :boolean => Filters::BooleanFilter ,
20
21
  :integer => Filters::IntegerFilter,
21
22
  :enum => Filters::EnumFilter,
23
+ :float => Filters::FloatFilter,
22
24
  }
23
25
 
24
26
  def self.included(base)
@@ -66,8 +68,8 @@ module Datagrid
66
68
  protected
67
69
  def default_filter(attribute)
68
70
  check_scope_defined!("Scope should be defined before filters")
69
- lambda do |value, grid|
70
- grid.driver.where(self, attribute => value)
71
+ lambda do |value, scope, grid|
72
+ grid.driver.where(scope, attribute => value)
71
73
  end
72
74
  end
73
75
 
@@ -21,8 +21,10 @@ class Datagrid::Filters::BaseFilter
21
21
  return scope if value.blank? && !allow_blank?
22
22
  end
23
23
 
24
- if block.arity >= 2 || block.arity < 0
25
- scope.instance_exec(value, grid_object, &block)
24
+ if block.arity >= 3 || block.arity < 0
25
+ scope.instance_exec(value, scope, grid_object, &block)
26
+ elsif block.arity == 2
27
+ scope.instance_exec(value, scope, &block)
26
28
  else
27
29
  scope.instance_exec(value, &block)
28
30
  end
@@ -61,5 +63,13 @@ class Datagrid::Filters::BaseFilter
61
63
  options[:allow_blank]
62
64
  end
63
65
 
66
+ def form_builder_helper_name
67
+ self.class.form_builder_helper_name
68
+ end
69
+
70
+ def self.form_builder_helper_name
71
+ :"datagrid_#{self.to_s.demodulize.underscore}"
72
+ end
73
+
64
74
  end
65
75
 
@@ -16,22 +16,22 @@ module Datagrid
16
16
  from_options = normalize_composite_filter_options(from_options, field)
17
17
  to_options = normalize_composite_filter_options(to_options, field)
18
18
 
19
- filter(from_options[:name] || :"from_#{field}", :date, from_options) do |date, grid|
20
- grid.driver.greater_equal(self, field, date)
19
+ filter(from_options[:name] || :"from_#{field.to_s.tr('.', '_')}", :date, from_options) do |date, scope, grid|
20
+ grid.driver.greater_equal(scope, field, date)
21
21
  end
22
- filter(to_options[:name] || :"to_#{field}", :date, to_options) do |date, grid|
23
- grid.driver.less_equal(self, field, date)
22
+ filter(to_options[:name] || :"to_#{field.to_s.tr('.', '_')}", :date, to_options) do |date, scope, grid|
23
+ grid.driver.less_equal(scope, field, date)
24
24
  end
25
25
  end
26
26
 
27
27
  def integer_range_filters(field, from_options = {}, to_options = {})
28
28
  from_options = normalize_composite_filter_options(from_options, field)
29
29
  to_options = normalize_composite_filter_options(to_options, field)
30
- filter(from_options[:name] || :"from_#{field}", :integer, from_options) do |value, grid|
31
- grid.driver.greater_equal(self, field, value)
30
+ filter(from_options[:name] || :"from_#{field.to_s.tr('.', '_')}", :integer, from_options) do |value, scope, grid|
31
+ grid.driver.greater_equal(scope, field, value)
32
32
  end
33
- filter(to_options[:name] || :"to_#{field}", :integer, to_options) do |value, grid|
34
- grid.driver.less_equal(self, field, value)
33
+ filter(to_options[:name] || :"to_#{field.to_s.tr('.', '_')}", :integer, to_options) do |value, scope, grid|
34
+ grid.driver.less_equal(scope, field, value)
35
35
  end
36
36
  end
37
37
 
@@ -0,0 +1,6 @@
1
+ class Datagrid::Filters::FloatFilter < Datagrid::Filters::BaseFilter
2
+ def format(value)
3
+ return nil if value.blank?
4
+ value.to_f
5
+ end
6
+ end
@@ -8,7 +8,7 @@ module Datagrid
8
8
  options[:class] ||= ""
9
9
  options[:class] += " " unless options[:class].blank?
10
10
  options[:class] += "#{filter.name} #{datagrid_filter_html_class(filter)}"
11
- self.send(datagrid_filter_method(filter), filter, options)
11
+ self.send(filter.form_builder_helper_name, filter, options)
12
12
  end
13
13
 
14
14
  def datagrid_label(filter_or_attribute, options = {})
@@ -54,6 +54,10 @@ module Datagrid
54
54
  datagrid_default_filter(attribute_or_filter, options)
55
55
  end
56
56
 
57
+ def datagrid_float_filter(attribute_or_filter, options = {})
58
+ datagrid_default_filter(attribute_or_filter, options)
59
+ end
60
+
57
61
  def get_attribute(attribute_or_filter)
58
62
  attribute_or_filter.is_a?(Symbol) ? attribute_or_filter : attribute_or_filter.name
59
63
  end
@@ -71,10 +75,6 @@ module Datagrid
71
75
  filter.class.to_s.demodulize.underscore
72
76
  end
73
77
 
74
- def datagrid_filter_method(filter)
75
- :"datagrid_#{filter.class.to_s.demodulize.underscore}"
76
- end
77
-
78
78
  class Error < StandardError
79
79
  end
80
80
  end
@@ -65,11 +65,11 @@ module Datagrid
65
65
  def order_for(grid, column)
66
66
  @template.content_tag(:div, :class => "order") do
67
67
  @template.link_to(
68
- I18n.t("datagrid.table.order.asc", :default => "ASC"),
68
+ I18n.t("datagrid.table.order.asc", :default => "&uarr;".html_safe),
69
69
  @template.url_for(grid.param_name => grid.attributes.merge(:order => column.name, :descending => false)),
70
70
  :class => "order asc"
71
71
  ) + " " + @template.link_to(
72
- I18n.t("datagrid.table.order.desc", :default => "DESC"),
72
+ I18n.t("datagrid.table.order.desc", :default => "&darr;".html_safe),
73
73
  @template.url_for(grid.param_name => grid.attributes.merge(:order => column.name, :descending => true )),
74
74
  :class => "order desc"
75
75
  )
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe Datagrid::Core do
4
+
5
+ it "should support change scope on the fly" do
6
+ report = test_report do
7
+ scope { Entry }
8
+ end
9
+ report.scope do
10
+ Entry.limit(1)
11
+ end
12
+ 2.times { Entry.create }
13
+ report.assets.to_a.size.should == 1
14
+ end
15
+ end
@@ -24,6 +24,13 @@ describe Datagrid::Filters::CompositeFilters do
24
24
  report.from_shipping_date.should == 10.days.ago.to_date
25
25
  report.to_shipping_date.should == Date.today
26
26
  end
27
+ it "should support table name in field" do
28
+ report = test_report do
29
+ report = date_range_filters("entries.shipping_date", {:default => 10.days.ago.to_date}, {:default => Date.today})
30
+ end
31
+ report.from_entries_shipping_date.should == 10.days.ago.to_date
32
+ report.to_entries_shipping_date.should == Date.today
33
+ end
27
34
  end
28
35
 
29
36
  describe ".integer_range_filters" do
@@ -47,5 +54,12 @@ describe Datagrid::Filters::CompositeFilters do
47
54
  report.from_group_id.should == 0
48
55
  report.to_group_id.should == 100
49
56
  end
57
+ it "should table name in field name" do
58
+ report = test_report do
59
+ report = integer_range_filters("entries.group_id", {:default => 0}, {:default => 100})
60
+ end
61
+ report.from_entries_group_id.should == 0
62
+ report.to_entries_group_id.should == 100
63
+ end
50
64
  end
51
65
  end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe Datagrid::Filters::FloatFilter do
4
+
5
+ it "should support float values" do
6
+ g1 = Group.create!(:rating => 1.5)
7
+ g2 = Group.create!(:rating => 1.6)
8
+ report = test_report(:rating => 1.5) do
9
+ scope { Group }
10
+ filter(:rating, :float)
11
+ end
12
+ report.assets.should include(g1)
13
+ report.assets.should_not include(g2)
14
+ end
15
+ end
@@ -29,6 +29,18 @@ describe Datagrid::Filters do
29
29
  }.should raise_error(Datagrid::ArgumentError)
30
30
  end
31
31
 
32
+ it "should filter block with 2 arguments" do
33
+ report = test_report do
34
+ scope {Entry}
35
+ filter(:group_id, :integer) do |value, scope|
36
+ scope.where(group_id: value)
37
+ end
38
+ end
39
+ lambda {
40
+ report.group_id = [1,2]
41
+ }.should raise_error(Datagrid::ArgumentError)
42
+ end
43
+
32
44
 
33
45
  it "should initialize when report Scope table not exists" do
34
46
  class ModelWithoutTable < ActiveRecord::Base; end
@@ -19,6 +19,12 @@ describe Datagrid::FormBuilder do
19
19
 
20
20
  describe ".datagrid_filter" do
21
21
 
22
+ it "should work for every filter type" do
23
+ Datagrid::Filters::FILTER_TYPES.each do |type, klass|
24
+ Datagrid::FormBuilder.instance_methods.should include(klass.form_builder_helper_name)
25
+ end
26
+ end
27
+
22
28
  subject { view.datagrid_filter(_filter)}
23
29
  context "with default filter type" do
24
30
  let(:_grid) {
@@ -129,6 +135,19 @@ describe Datagrid::FormBuilder do
129
135
  let(:_filter) { :name }
130
136
  it {should equal_to_dom('<select class="name enum_filter" id="report_name" name="report[name]"></select>')}
131
137
  end
138
+ context "with float filter type" do
139
+ let(:_grid) {
140
+ test_report do
141
+ scope {Entry}
142
+ filter(:group_id, :float)
143
+ end
144
+ }
145
+ let(:_filter) { :group_id }
146
+ it { should equal_to_dom(
147
+ '<input class="group_id float_filter" id="report_group_id" name="report[group_id]" size="30" type="text"/>'
148
+ )}
149
+
150
+ end
132
151
  end
133
152
 
134
153
  describe ".datagrid_label" do
@@ -140,7 +140,7 @@ describe Datagrid::Helper do
140
140
  end
141
141
 
142
142
  describe ".datagrid_order_for" do
143
- it "should render ordreing layout" do
143
+ it "should render ordering layout" do
144
144
  class OrderedGrid
145
145
  include Datagrid
146
146
  scope { Entry }
@@ -149,7 +149,7 @@ describe Datagrid::Helper do
149
149
  grid = OrderedGrid.new(:descending => true, :order => :category)
150
150
  subject.datagrid_order_for(grid, grid.column_by_name(:category)).should equal_to_dom(<<-HTML)
151
151
  <div class="order">
152
- <a href="ordered_grid%5Bdescending%5D=false&amp;ordered_grid%5Border%5D=category" class="order asc">ASC</a> <a href="ordered_grid%5Bdescending%5D=true&amp;ordered_grid%5Border%5D=category" class="order desc">DESC</a>
152
+ <a href="ordered_grid%5Bdescending%5D=false&amp;ordered_grid%5Border%5D=category" class="order asc">&uarr;</a> <a href="ordered_grid%5Bdescending%5D=true&amp;ordered_grid%5Border%5D=category" class="order desc">&darr;</a>
153
153
  </div>
154
154
  HTML
155
155
  end
@@ -3,11 +3,11 @@ require "datagrid/rspec"
3
3
 
4
4
 
5
5
  describe SimpleReport do
6
-
6
+
7
7
  it_should_behave_like 'Datagrid'
8
-
8
+
9
9
  let(:group) { Group.create!(:name => "Pop") }
10
-
10
+
11
11
  subject do
12
12
  SimpleReport.new(
13
13
  :group_id => group.id,
@@ -37,6 +37,7 @@ describe SimpleReport do
37
37
  it "should return defined scope of objects" do
38
38
  subject.scope.should respond_to(:each)
39
39
  end
40
+
40
41
 
41
42
  context "when not defined on class level" do
42
43
  subject do
@@ -52,32 +53,6 @@ describe SimpleReport do
52
53
  end
53
54
  end
54
55
 
55
- end
56
-
57
- class SimpleReportWithContext < SimpleReport
58
- attr_accessor :current_user
59
- scope do
60
- current_user.things
61
- end
62
- end
63
-
64
- describe SimpleReportWithContext, "with context" do
65
56
 
66
- subject do
67
-
68
- SimpleReportWithContext.new(
69
- :name => "Star",
70
- :category => "first",
71
- :disabled => false,
72
- :confirmed => false
73
- )
74
- end
75
-
76
- it "should call " do
77
- current_user = Object.new
78
- current_user.should_receive(:things).and_return([])
79
- SimpleReportWithContext.new(:current_user => current_user).scope
80
- end
81
57
 
82
58
  end
83
-
@@ -22,6 +22,7 @@ ActiveRecord::Schema.define(:version => 1) do
22
22
 
23
23
  create_table :groups do |t|
24
24
  t.string :name
25
+ t.float :rating
25
26
  t.timestamps
26
27
  end
27
28
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datagrid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-24 00:00:00.000000000 Z
12
+ date: 2012-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &17705320 !ruby/object:Gem::Requirement
16
+ requirement: &18401700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17705320
24
+ version_requirements: *18401700
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &17704400 !ruby/object:Gem::Requirement
27
+ requirement: &18399960 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *17704400
35
+ version_requirements: *18399960
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &17718840 !ruby/object:Gem::Requirement
38
+ requirement: &18397320 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.1.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *17718840
46
+ version_requirements: *18397320
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &17715720 !ruby/object:Gem::Requirement
49
+ requirement: &18408680 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.6.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *17715720
57
+ version_requirements: *18408680
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: debugger
60
- requirement: &17713920 !ruby/object:Gem::Requirement
60
+ requirement: &18403120 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *17713920
68
+ version_requirements: *18403120
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
- requirement: &17711920 !ruby/object:Gem::Requirement
71
+ requirement: &18416100 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *17711920
79
+ version_requirements: *18416100
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: accept_values_for
82
- requirement: &17726920 !ruby/object:Gem::Requirement
82
+ requirement: &18414260 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *17726920
90
+ version_requirements: *18414260
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: nokogiri
93
- requirement: &17725080 !ruby/object:Gem::Requirement
93
+ requirement: &18411420 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *17725080
101
+ version_requirements: *18411420
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: sqlite3-ruby
104
- requirement: &17723640 !ruby/object:Gem::Requirement
104
+ requirement: &18426080 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *17723640
112
+ version_requirements: *18426080
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: mongoid
115
- requirement: &17723000 !ruby/object:Gem::Requirement
115
+ requirement: &18424960 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - =
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 2.2.2
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *17723000
123
+ version_requirements: *18424960
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: mongo_mapper
126
- requirement: &17722200 !ruby/object:Gem::Requirement
126
+ requirement: &18423880 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 0.11.0
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *17722200
134
+ version_requirements: *18423880
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: bson
137
- requirement: &17721480 !ruby/object:Gem::Requirement
137
+ requirement: &18421380 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - =
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 1.4.0
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *17721480
145
+ version_requirements: *18421380
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: bson_ext
148
- requirement: &17720880 !ruby/object:Gem::Requirement
148
+ requirement: &18433540 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - =
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 1.4.0
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *17720880
156
+ version_requirements: *18433540
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: fastercsv
159
- requirement: &17720180 !ruby/object:Gem::Requirement
159
+ requirement: &18429580 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,7 +164,7 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *17720180
167
+ version_requirements: *18429580
168
168
  description: This allows you to easily build datagrid aka data tables with sortable
169
169
  columns and filters
170
170
  email: agresso@gmail.com
@@ -203,6 +203,7 @@ files:
203
203
  - lib/datagrid/filters/date_filter.rb
204
204
  - lib/datagrid/filters/default_filter.rb
205
205
  - lib/datagrid/filters/enum_filter.rb
206
+ - lib/datagrid/filters/float_filter.rb
206
207
  - lib/datagrid/filters/integer_filter.rb
207
208
  - lib/datagrid/filters/string_filter.rb
208
209
  - lib/datagrid/form_builder.rb
@@ -214,12 +215,14 @@ files:
214
215
  - lib/tasks/datagrid_tasks.rake
215
216
  - spec/datagrid/active_model_spec.rb
216
217
  - spec/datagrid/columns_spec.rb
218
+ - spec/datagrid/core_spec.rb
217
219
  - spec/datagrid/drivers/active_record_spec.rb
218
220
  - spec/datagrid/drivers/mongo_mapper_spec.rb
219
221
  - spec/datagrid/drivers/mongoid_spec.rb
220
222
  - spec/datagrid/filters/boolean_enum_filter_spec.rb
221
223
  - spec/datagrid/filters/composite_filters_spec.rb
222
224
  - spec/datagrid/filters/enum_filter_spec.rb
225
+ - spec/datagrid/filters/float_filter_spec.rb
223
226
  - spec/datagrid/filters_spec.rb
224
227
  - spec/datagrid/form_builder_spec.rb
225
228
  - spec/datagrid/helper_spec.rb
@@ -248,7 +251,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
248
251
  version: '0'
249
252
  segments:
250
253
  - 0
251
- hash: -1581920802397090213
254
+ hash: -28109512857849373
252
255
  required_rubygems_version: !ruby/object:Gem::Requirement
253
256
  none: false
254
257
  requirements: