datagrid 1.6.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/datagrid.gemspec +26 -164
  4. data/lib/datagrid/columns.rb +5 -10
  5. data/lib/datagrid/filters.rb +3 -6
  6. data/lib/datagrid/filters/base_filter.rb +8 -0
  7. data/lib/datagrid/form_builder.rb +14 -13
  8. data/lib/datagrid/version.rb +3 -0
  9. metadata +10 -196
  10. data/.document +0 -5
  11. data/.rspec +0 -1
  12. data/.travis.yml +0 -23
  13. data/Gemfile +0 -33
  14. data/Rakefile +0 -43
  15. data/VERSION +0 -1
  16. data/spec/datagrid/active_model_spec.rb +0 -33
  17. data/spec/datagrid/column_names_attribute_spec.rb +0 -86
  18. data/spec/datagrid/columns/column_spec.rb +0 -19
  19. data/spec/datagrid/columns_spec.rb +0 -592
  20. data/spec/datagrid/core_spec.rb +0 -210
  21. data/spec/datagrid/drivers/active_record_spec.rb +0 -79
  22. data/spec/datagrid/drivers/array_spec.rb +0 -106
  23. data/spec/datagrid/drivers/mongo_mapper_spec.rb +0 -101
  24. data/spec/datagrid/drivers/mongoid_spec.rb +0 -109
  25. data/spec/datagrid/drivers/sequel_spec.rb +0 -111
  26. data/spec/datagrid/filters/base_filter_spec.rb +0 -19
  27. data/spec/datagrid/filters/boolean_enum_filter_spec.rb +0 -5
  28. data/spec/datagrid/filters/composite_filters_spec.rb +0 -65
  29. data/spec/datagrid/filters/date_filter_spec.rb +0 -198
  30. data/spec/datagrid/filters/date_time_filter_spec.rb +0 -157
  31. data/spec/datagrid/filters/dynamic_filter_spec.rb +0 -175
  32. data/spec/datagrid/filters/enum_filter_spec.rb +0 -51
  33. data/spec/datagrid/filters/extended_boolean_filter_spec.rb +0 -46
  34. data/spec/datagrid/filters/float_filter_spec.rb +0 -15
  35. data/spec/datagrid/filters/integer_filter_spec.rb +0 -144
  36. data/spec/datagrid/filters/string_filter_spec.rb +0 -35
  37. data/spec/datagrid/filters_spec.rb +0 -332
  38. data/spec/datagrid/form_builder_spec.rb +0 -611
  39. data/spec/datagrid/helper_spec.rb +0 -683
  40. data/spec/datagrid/ordering_spec.rb +0 -150
  41. data/spec/datagrid/scaffold_spec.rb +0 -45
  42. data/spec/datagrid/stylesheet_spec.rb +0 -12
  43. data/spec/datagrid/utils_spec.rb +0 -19
  44. data/spec/datagrid_spec.rb +0 -94
  45. data/spec/spec_helper.rb +0 -123
  46. data/spec/support/active_record.rb +0 -38
  47. data/spec/support/configuration.rb +0 -28
  48. data/spec/support/i18n_helpers.rb +0 -6
  49. data/spec/support/matchers.rb +0 -101
  50. data/spec/support/mongo_mapper.rb +0 -32
  51. data/spec/support/mongoid.rb +0 -36
  52. data/spec/support/sequel.rb +0 -39
  53. data/spec/support/simple_report.rb +0 -64
  54. data/spec/support/test_partials/_actions.html.erb +0 -1
  55. data/spec/support/test_partials/client/datagrid/_form.html.erb +0 -13
  56. data/spec/support/test_partials/client/datagrid/_head.html.erb +0 -9
  57. data/spec/support/test_partials/client/datagrid/_order_for.html.erb +0 -11
  58. data/spec/support/test_partials/client/datagrid/_row.html.erb +0 -6
  59. data/spec/support/test_partials/client/datagrid/_table.html.erb +0 -19
  60. data/spec/support/test_partials/custom_checkboxes/_enum_checkboxes.html.erb +0 -1
  61. data/spec/support/test_partials/custom_form/_form.html.erb +0 -7
  62. data/spec/support/test_partials/custom_range/_range_filter.html.erb +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76bece54343c202c79e7ca4d5e90ae1cc91d2c5a77b965a175b36df801e10bd1
4
- data.tar.gz: 68e58ec9dec5f010b43a7e078fdbf2c3c1b0923c9f2ab38c327d3665570d08fa
3
+ metadata.gz: 4accb02f36dc5af245b6dd84008c22293e9bc0f6105b7fdfebe9458b6a7fa1e1
4
+ data.tar.gz: 4ca75ebff1804e8eaba5b0e41cae04e32f63c24211baffdc501a93870e1ba7e2
5
5
  SHA512:
6
- metadata.gz: 9aeb7a29ea7df278090a6417e1f940dfe9f8b1aa57dd907f9f739c4d2bc3e613be66be28635c5cf51a70b9067a7f7da4a00e7adaf09ae8ddea0247c7f34a56b1
7
- data.tar.gz: 8660381aa1d508c624b0bc6d1c6e71ca3e6c1e89cad518733aeaee31d1968dc6382c45d1d06cbb60cd33ea1407d3e79e92e5920d93483bdfd47a31ffa1e23cef
6
+ metadata.gz: e8ab20bbbaec525f993c7e20a1ed5bd0105f6d2fc0c9ab098570401e610b7030a696c263959478b0cb4a39ecf921c81e5621bb76198cbc96060f433f23cbcaa5
7
+ data.tar.gz: 9158b9d0f26ee862292a5fdc0d9b596ee2ac70e52006cb559af1bfc043a5d43419c476e1b5a796a42a19e7bc5efcfb9e2b4e37e0fdfa9a8286c795a505aad573
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ ## 1.6.2
2
+
3
+ * Add `input_options` and `label_options` to `filter` method [#294](https://github.com/bogdan/datagrid/issues/294)
4
+ * Fix `<option>` tag rendering for Rails 6.0
5
+
6
+ ## 1.6.1 and before
7
+
8
+ Changes are not tracked
data/datagrid.gemspec CHANGED
@@ -1,179 +1,41 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
- # stub: datagrid 1.6.1 ruby lib
1
+ # frozen_string_literal: true
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "datagrid/version"
6
5
 
7
6
  Gem::Specification.new do |s|
8
- s.name = "datagrid".freeze
9
- s.version = "1.6.1"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib".freeze]
13
- s.authors = ["Bogdan Gusiev".freeze]
7
+ s.name = "datagrid"
8
+ s.version = Datagrid::VERSION
9
+ s.require_paths = ["lib"]
10
+ s.authors = ["Bogdan Gusiev"]
14
11
  s.date = "2020-09-07"
15
- s.description = "This allows you to easily build datagrid aka data tables with sortable columns and filters".freeze
16
- s.email = "agresso@gmail.com".freeze
12
+ s.summary = "Ruby gem to create datagrids"
13
+ s.description = "This allows you to easily build datagrid aka data tables with sortable columns and filters"
14
+ s.email = "agresso@gmail.com"
17
15
  s.extra_rdoc_files = [
18
16
  "LICENSE.txt",
19
17
  "Readme.markdown"
20
18
  ]
21
19
  s.files = [
22
- ".document",
23
- ".rspec",
24
- ".travis.yml",
25
- "Gemfile",
26
20
  "LICENSE.txt",
27
- "Rakefile",
21
+ "CHANGELOG.md",
28
22
  "Readme.markdown",
29
- "VERSION",
30
- "app/assets/stylesheets/datagrid.sass",
31
- "app/views/datagrid/_enum_checkboxes.html.erb",
32
- "app/views/datagrid/_form.html.erb",
33
- "app/views/datagrid/_head.html.erb",
34
- "app/views/datagrid/_order_for.html.erb",
35
- "app/views/datagrid/_range_filter.html.erb",
36
- "app/views/datagrid/_row.html.erb",
37
- "app/views/datagrid/_table.html.erb",
38
23
  "datagrid.gemspec",
39
- "lib/datagrid.rb",
40
- "lib/datagrid/active_model.rb",
41
- "lib/datagrid/column_names_attribute.rb",
42
- "lib/datagrid/columns.rb",
43
- "lib/datagrid/columns/column.rb",
44
- "lib/datagrid/configuration.rb",
45
- "lib/datagrid/core.rb",
46
- "lib/datagrid/drivers.rb",
47
- "lib/datagrid/drivers/abstract_driver.rb",
48
- "lib/datagrid/drivers/active_record.rb",
49
- "lib/datagrid/drivers/array.rb",
50
- "lib/datagrid/drivers/mongo_mapper.rb",
51
- "lib/datagrid/drivers/mongoid.rb",
52
- "lib/datagrid/drivers/sequel.rb",
53
- "lib/datagrid/engine.rb",
54
- "lib/datagrid/filters.rb",
55
- "lib/datagrid/filters/base_filter.rb",
56
- "lib/datagrid/filters/boolean_enum_filter.rb",
57
- "lib/datagrid/filters/boolean_filter.rb",
58
- "lib/datagrid/filters/composite_filters.rb",
59
- "lib/datagrid/filters/date_filter.rb",
60
- "lib/datagrid/filters/date_time_filter.rb",
61
- "lib/datagrid/filters/default_filter.rb",
62
- "lib/datagrid/filters/dynamic_filter.rb",
63
- "lib/datagrid/filters/enum_filter.rb",
64
- "lib/datagrid/filters/extended_boolean_filter.rb",
65
- "lib/datagrid/filters/float_filter.rb",
66
- "lib/datagrid/filters/integer_filter.rb",
67
- "lib/datagrid/filters/ranged_filter.rb",
68
- "lib/datagrid/filters/select_options.rb",
69
- "lib/datagrid/filters/string_filter.rb",
70
- "lib/datagrid/form_builder.rb",
71
- "lib/datagrid/helper.rb",
72
- "lib/datagrid/locale/en.yml",
73
- "lib/datagrid/ordering.rb",
74
- "lib/datagrid/renderer.rb",
75
- "lib/datagrid/rspec.rb",
76
- "lib/datagrid/scaffold.rb",
77
- "lib/datagrid/utils.rb",
78
- "lib/tasks/datagrid_tasks.rake",
79
- "spec/datagrid/active_model_spec.rb",
80
- "spec/datagrid/column_names_attribute_spec.rb",
81
- "spec/datagrid/columns/column_spec.rb",
82
- "spec/datagrid/columns_spec.rb",
83
- "spec/datagrid/core_spec.rb",
84
- "spec/datagrid/drivers/active_record_spec.rb",
85
- "spec/datagrid/drivers/array_spec.rb",
86
- "spec/datagrid/drivers/mongo_mapper_spec.rb",
87
- "spec/datagrid/drivers/mongoid_spec.rb",
88
- "spec/datagrid/drivers/sequel_spec.rb",
89
- "spec/datagrid/filters/base_filter_spec.rb",
90
- "spec/datagrid/filters/boolean_enum_filter_spec.rb",
91
- "spec/datagrid/filters/composite_filters_spec.rb",
92
- "spec/datagrid/filters/date_filter_spec.rb",
93
- "spec/datagrid/filters/date_time_filter_spec.rb",
94
- "spec/datagrid/filters/dynamic_filter_spec.rb",
95
- "spec/datagrid/filters/enum_filter_spec.rb",
96
- "spec/datagrid/filters/extended_boolean_filter_spec.rb",
97
- "spec/datagrid/filters/float_filter_spec.rb",
98
- "spec/datagrid/filters/integer_filter_spec.rb",
99
- "spec/datagrid/filters/string_filter_spec.rb",
100
- "spec/datagrid/filters_spec.rb",
101
- "spec/datagrid/form_builder_spec.rb",
102
- "spec/datagrid/helper_spec.rb",
103
- "spec/datagrid/ordering_spec.rb",
104
- "spec/datagrid/scaffold_spec.rb",
105
- "spec/datagrid/stylesheet_spec.rb",
106
- "spec/datagrid/utils_spec.rb",
107
- "spec/datagrid_spec.rb",
108
- "spec/spec_helper.rb",
109
- "spec/support/active_record.rb",
110
- "spec/support/configuration.rb",
111
- "spec/support/i18n_helpers.rb",
112
- "spec/support/matchers.rb",
113
- "spec/support/mongo_mapper.rb",
114
- "spec/support/mongoid.rb",
115
- "spec/support/sequel.rb",
116
- "spec/support/simple_report.rb",
117
- "spec/support/test_partials/_actions.html.erb",
118
- "spec/support/test_partials/client/datagrid/_form.html.erb",
119
- "spec/support/test_partials/client/datagrid/_head.html.erb",
120
- "spec/support/test_partials/client/datagrid/_order_for.html.erb",
121
- "spec/support/test_partials/client/datagrid/_row.html.erb",
122
- "spec/support/test_partials/client/datagrid/_table.html.erb",
123
- "spec/support/test_partials/custom_checkboxes/_enum_checkboxes.html.erb",
124
- "spec/support/test_partials/custom_form/_form.html.erb",
125
- "spec/support/test_partials/custom_range/_range_filter.html.erb",
126
- "templates/base.rb.erb",
127
- "templates/controller.rb.erb",
128
- "templates/grid.rb.erb",
129
- "templates/index.html.erb"
130
24
  ]
131
- s.homepage = "http://github.com/bogdan/datagrid".freeze
132
- s.licenses = ["MIT".freeze]
133
- s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze)
134
- s.rubygems_version = "3.0.8".freeze
135
- s.summary = "Ruby gem to create datagrids".freeze
136
-
137
- if s.respond_to? :specification_version then
138
- s.specification_version = 4
25
+ s.files += `git ls-files | grep -E '^(app|lib|templates)'`.split("\n")
26
+ s.homepage = "http://github.com/bogdan/datagrid"
27
+ s.licenses = ["MIT"]
28
+ s.required_ruby_version = Gem::Requirement.new(">= 2.0")
29
+ s.rubygems_version = "3.0.8"
30
+ url = 'https://github.com/bogdan/datagrid'
31
+ s.metadata = {
32
+ "homepage_uri" => url,
33
+ "bug_tracker_uri" => "#{url}/issues",
34
+ "documentation_uri" => "#{url}/wiki",
35
+ "changelog_uri" => "#{url}/blob/master/CHANGELOG.md",
36
+ "source_code_uri" => url,
37
+ }
139
38
 
140
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
141
- s.add_runtime_dependency(%q<rails>.freeze, [">= 4.0"])
142
- s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
143
- s.add_development_dependency(%q<jeweler>.freeze, [">= 2.1.2"])
144
- s.add_development_dependency(%q<pry-byebug>.freeze, [">= 0"])
145
- s.add_development_dependency(%q<rspec>.freeze, [">= 3"])
146
- s.add_development_dependency(%q<nokogiri>.freeze, [">= 0"])
147
- s.add_development_dependency(%q<sqlite3>.freeze, ["~> 1.4"])
148
- s.add_development_dependency(%q<sequel>.freeze, [">= 0"])
149
- s.add_development_dependency(%q<mongoid>.freeze, [">= 0"])
150
- s.add_development_dependency(%q<bson>.freeze, [">= 0"])
151
- s.add_development_dependency(%q<bson_ext>.freeze, [">= 0"])
152
- else
153
- s.add_dependency(%q<rails>.freeze, [">= 4.0"])
154
- s.add_dependency(%q<bundler>.freeze, [">= 0"])
155
- s.add_dependency(%q<jeweler>.freeze, [">= 2.1.2"])
156
- s.add_dependency(%q<pry-byebug>.freeze, [">= 0"])
157
- s.add_dependency(%q<rspec>.freeze, [">= 3"])
158
- s.add_dependency(%q<nokogiri>.freeze, [">= 0"])
159
- s.add_dependency(%q<sqlite3>.freeze, ["~> 1.4"])
160
- s.add_dependency(%q<sequel>.freeze, [">= 0"])
161
- s.add_dependency(%q<mongoid>.freeze, [">= 0"])
162
- s.add_dependency(%q<bson>.freeze, [">= 0"])
163
- s.add_dependency(%q<bson_ext>.freeze, [">= 0"])
164
- end
165
- else
166
- s.add_dependency(%q<rails>.freeze, [">= 4.0"])
167
- s.add_dependency(%q<bundler>.freeze, [">= 0"])
168
- s.add_dependency(%q<jeweler>.freeze, [">= 2.1.2"])
169
- s.add_dependency(%q<pry-byebug>.freeze, [">= 0"])
170
- s.add_dependency(%q<rspec>.freeze, [">= 3"])
171
- s.add_dependency(%q<nokogiri>.freeze, [">= 0"])
172
- s.add_dependency(%q<sqlite3>.freeze, ["~> 1.4"])
173
- s.add_dependency(%q<sequel>.freeze, [">= 0"])
174
- s.add_dependency(%q<mongoid>.freeze, [">= 0"])
175
- s.add_dependency(%q<bson>.freeze, [">= 0"])
176
- s.add_dependency(%q<bson_ext>.freeze, [">= 0"])
177
- end
39
+ s.add_dependency(%q<rails>, [">= 4.0"])
178
40
  end
179
41
 
@@ -121,8 +121,8 @@ module Datagrid
121
121
  # * <tt>:preload</tt> - spefies which associations of the scope should be preloaded for this column
122
122
  #
123
123
  # See: https://github.com/bogdan/datagrid/wiki/Columns for examples
124
- def column(name, options_or_query = {}, options = {}, &block)
125
- define_column(columns_array, name, options_or_query, options, &block)
124
+ def column(name, query = nil, **options, &block)
125
+ define_column(columns_array, name, query, options, &block)
126
126
  end
127
127
 
128
128
  # Returns column definition with given name
@@ -195,12 +195,7 @@ module Datagrid
195
195
  end
196
196
  end
197
197
 
198
- def define_column(columns, name, options_or_query = {}, options = {}, &block) #:nodoc:
199
- if options_or_query.is_a?(String)
200
- query = options_or_query
201
- else
202
- options = options_or_query
203
- end
198
+ def define_column(columns, name, query = nil, **options, &block) #:nodoc:
204
199
  check_scope_defined!("Scope should be defined before columns")
205
200
  block ||= lambda do |model|
206
201
  model.send(name)
@@ -406,8 +401,8 @@ module Datagrid
406
401
  # Defines a column at instance level
407
402
  #
408
403
  # See Datagrid::Columns::ClassMethods#column for more info
409
- def column(name, options_or_query = {}, options = {}, &block)
410
- self.class.define_column(columns_array, name, options_or_query, options, &block)
404
+ def column(name, query = nil, **options, &block)
405
+ self.class.define_column(columns_array, name, query, options, &block)
411
406
  end
412
407
 
413
408
  def initialize(*) #:nodoc:
@@ -90,14 +90,11 @@ module Datagrid
90
90
  # Accepts a block or a symbol with an instance method name
91
91
  # * <tt>:unless</tt> - specify the reverse condition when the filter can be dislayed and used.
92
92
  # Accepts a block or a symbol with an instance method name
93
+ # * <tt>:input_options</tt> - options passed when rendering html input tag attributes
94
+ # * <tt>:label_options</tt> - options passed when rendering html label tag attributes
93
95
  #
94
96
  # See: https://github.com/bogdan/datagrid/wiki/Filters for examples
95
- def filter(name, type = :default, options = {}, &block)
96
- if type.is_a?(Hash)
97
- options = type
98
- type = :default
99
- end
100
-
97
+ def filter(name, type = :default, **options, &block)
101
98
  klass = type.is_a?(Class) ? type : FILTER_TYPES[type]
102
99
  raise ConfigurationError, "filter class #{type.inspect} not found" unless klass
103
100
 
@@ -84,6 +84,14 @@ class Datagrid::Filters::BaseFilter #:nodoc:
84
84
  options[:allow_blank]
85
85
  end
86
86
 
87
+ def input_options
88
+ options[:input_options] || {}
89
+ end
90
+
91
+ def label_options
92
+ options[:label_options] || {}
93
+ end
94
+
87
95
  def form_builder_helper_name
88
96
  self.class.form_builder_helper_name
89
97
  end
@@ -4,19 +4,21 @@ module Datagrid
4
4
  module FormBuilder
5
5
 
6
6
  # Returns a form input html for the corresponding filter name
7
- def datagrid_filter(filter_or_attribute, options = {}, &block)
7
+ def datagrid_filter(filter_or_attribute, **options, &block)
8
8
  filter = datagrid_get_filter(filter_or_attribute)
9
- options = add_html_classes(options, filter.name, datagrid_filter_html_class(filter))
9
+ options = {
10
+ **filter.input_options,
11
+ **add_html_classes(options, filter.name, datagrid_filter_html_class(filter))
12
+ }
10
13
  # Prevent partials option from appearing in HTML attributes
11
14
  options.delete(:partials) # Legacy option
12
15
  self.send(filter.form_builder_helper_name, filter, options, &block)
13
16
  end
14
17
 
15
18
  # Returns a form label html for the corresponding filter name
16
- def datagrid_label(filter_or_attribute, options_or_text = {}, options = {}, &block)
19
+ def datagrid_label(filter_or_attribute, text = nil, **options, &block)
17
20
  filter = datagrid_get_filter(filter_or_attribute)
18
- text, options = options_or_text.is_a?(Hash) ? [filter.header, options_or_text] : [options_or_text, options]
19
- label(filter.name, text, options, &block)
21
+ label(filter.name, text || filter.header, **filter.label_options, **options, &block)
20
22
  end
21
23
 
22
24
  protected
@@ -42,7 +44,7 @@ module Datagrid
42
44
 
43
45
  def datagrid_default_filter(attribute_or_filter, options = {})
44
46
  filter = datagrid_get_filter(attribute_or_filter)
45
- text_field filter.name, options.reverse_merge(:value => object.filter_value_as_string(filter))
47
+ text_field filter.name, value: object.filter_value_as_string(filter), **options
46
48
  end
47
49
 
48
50
  def datagrid_enum_filter(attribute_or_filter, options = {}, &block)
@@ -65,16 +67,15 @@ module Datagrid
65
67
  }
66
68
  )
67
69
  else
68
- if !options.has_key?(:multiple) && filter.multiple?
69
- options[:multiple] = true
70
- end
71
70
  select(
72
71
  filter.name,
73
72
  object.select_options(filter) || [],
74
73
  {:include_blank => filter.include_blank,
75
74
  :prompt => filter.prompt,
76
75
  :include_hidden => false},
77
- options, &block
76
+ multiple: filter.multiple?,
77
+ **options,
78
+ &block
78
79
  )
79
80
  end
80
81
  end
@@ -119,7 +120,7 @@ module Datagrid
119
120
  {:include_blank => false, :include_hidden => false, :prompt => false, :selected => operation },
120
121
  add_html_classes(options, "operation")
121
122
  )
122
- value_input = text_field(filter.name, add_html_classes(options, "value").merge(:value => value))
123
+ value_input = text_field(filter.name, **add_html_classes(options, "value"), value: value)
123
124
  [field_input, operation_input, value_input].join("\n").html_safe
124
125
  end
125
126
 
@@ -129,7 +130,7 @@ module Datagrid
129
130
  # select options format may vary
130
131
  value = value.last if value.is_a?(Array)
131
132
  # don't render any visible input when there is nothing to choose from
132
- hidden_field(name, html_options.merge(value: value))
133
+ hidden_field(name, **html_options, value: value)
133
134
  else
134
135
  select(name, variants, select_options, html_options)
135
136
  end
@@ -177,7 +178,7 @@ module Datagrid
177
178
  end
178
179
 
179
180
  def datagrid_get_attribute(attribute_or_filter)
180
- Utils.string_like?(attribute_or_filter) ? attribute_or_filter : attribute_or_filter.name
181
+ Utils.string_like?(attribute_or_filter) ? attribute_or_filter : attribute_or_filter.name
181
182
  end
182
183
 
183
184
  def datagrid_get_filter(attribute_or_filter)
@@ -0,0 +1,3 @@
1
+ module Datagrid
2
+ VERSION = "1.6.2"
3
+ end
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: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdan Gusiev
@@ -24,146 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.0'
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: :development
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: 2.1.2
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 2.1.2
55
- - !ruby/object:Gem::Dependency
56
- name: pry-byebug
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
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: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '3'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '3'
83
- - !ruby/object:Gem::Dependency
84
- name: nokogiri
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: sqlite3
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.4'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.4'
111
- - !ruby/object:Gem::Dependency
112
- name: sequel
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
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: mongoid
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
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: bson
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: bson_ext
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
27
  description: This allows you to easily build datagrid aka data tables with sortable
168
28
  columns and filters
169
29
  email: agresso@gmail.com
@@ -173,14 +33,9 @@ extra_rdoc_files:
173
33
  - LICENSE.txt
174
34
  - Readme.markdown
175
35
  files:
176
- - ".document"
177
- - ".rspec"
178
- - ".travis.yml"
179
- - Gemfile
36
+ - CHANGELOG.md
180
37
  - LICENSE.txt
181
- - Rakefile
182
38
  - Readme.markdown
183
- - VERSION
184
39
  - app/assets/stylesheets/datagrid.sass
185
40
  - app/views/datagrid/_enum_checkboxes.html.erb
186
41
  - app/views/datagrid/_form.html.erb
@@ -229,54 +84,8 @@ files:
229
84
  - lib/datagrid/rspec.rb
230
85
  - lib/datagrid/scaffold.rb
231
86
  - lib/datagrid/utils.rb
87
+ - lib/datagrid/version.rb
232
88
  - lib/tasks/datagrid_tasks.rake
233
- - spec/datagrid/active_model_spec.rb
234
- - spec/datagrid/column_names_attribute_spec.rb
235
- - spec/datagrid/columns/column_spec.rb
236
- - spec/datagrid/columns_spec.rb
237
- - spec/datagrid/core_spec.rb
238
- - spec/datagrid/drivers/active_record_spec.rb
239
- - spec/datagrid/drivers/array_spec.rb
240
- - spec/datagrid/drivers/mongo_mapper_spec.rb
241
- - spec/datagrid/drivers/mongoid_spec.rb
242
- - spec/datagrid/drivers/sequel_spec.rb
243
- - spec/datagrid/filters/base_filter_spec.rb
244
- - spec/datagrid/filters/boolean_enum_filter_spec.rb
245
- - spec/datagrid/filters/composite_filters_spec.rb
246
- - spec/datagrid/filters/date_filter_spec.rb
247
- - spec/datagrid/filters/date_time_filter_spec.rb
248
- - spec/datagrid/filters/dynamic_filter_spec.rb
249
- - spec/datagrid/filters/enum_filter_spec.rb
250
- - spec/datagrid/filters/extended_boolean_filter_spec.rb
251
- - spec/datagrid/filters/float_filter_spec.rb
252
- - spec/datagrid/filters/integer_filter_spec.rb
253
- - spec/datagrid/filters/string_filter_spec.rb
254
- - spec/datagrid/filters_spec.rb
255
- - spec/datagrid/form_builder_spec.rb
256
- - spec/datagrid/helper_spec.rb
257
- - spec/datagrid/ordering_spec.rb
258
- - spec/datagrid/scaffold_spec.rb
259
- - spec/datagrid/stylesheet_spec.rb
260
- - spec/datagrid/utils_spec.rb
261
- - spec/datagrid_spec.rb
262
- - spec/spec_helper.rb
263
- - spec/support/active_record.rb
264
- - spec/support/configuration.rb
265
- - spec/support/i18n_helpers.rb
266
- - spec/support/matchers.rb
267
- - spec/support/mongo_mapper.rb
268
- - spec/support/mongoid.rb
269
- - spec/support/sequel.rb
270
- - spec/support/simple_report.rb
271
- - spec/support/test_partials/_actions.html.erb
272
- - spec/support/test_partials/client/datagrid/_form.html.erb
273
- - spec/support/test_partials/client/datagrid/_head.html.erb
274
- - spec/support/test_partials/client/datagrid/_order_for.html.erb
275
- - spec/support/test_partials/client/datagrid/_row.html.erb
276
- - spec/support/test_partials/client/datagrid/_table.html.erb
277
- - spec/support/test_partials/custom_checkboxes/_enum_checkboxes.html.erb
278
- - spec/support/test_partials/custom_form/_form.html.erb
279
- - spec/support/test_partials/custom_range/_range_filter.html.erb
280
89
  - templates/base.rb.erb
281
90
  - templates/controller.rb.erb
282
91
  - templates/grid.rb.erb
@@ -284,7 +93,12 @@ files:
284
93
  homepage: http://github.com/bogdan/datagrid
285
94
  licenses:
286
95
  - MIT
287
- metadata: {}
96
+ metadata:
97
+ homepage_uri: https://github.com/bogdan/datagrid
98
+ bug_tracker_uri: https://github.com/bogdan/datagrid/issues
99
+ documentation_uri: https://github.com/bogdan/datagrid/wiki
100
+ changelog_uri: https://github.com/bogdan/datagrid/blob/master/CHANGELOG.md
101
+ source_code_uri: https://github.com/bogdan/datagrid
288
102
  post_install_message:
289
103
  rdoc_options: []
290
104
  require_paths:
@@ -300,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
114
  - !ruby/object:Gem::Version
301
115
  version: '0'
302
116
  requirements: []
303
- rubygems_version: 3.0.8
117
+ rubygems_version: 3.2.0
304
118
  signing_key:
305
119
  specification_version: 4
306
120
  summary: Ruby gem to create datagrids