widget_list 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
- <tr class="summary">
2
- <td id="<!--LIST_NAME-->_list_description" class="header" style="text-align: left;padding-bottom: 2px;padding-top: 7px;font-size: 14px;" colspan="<!--COLSPAN-->"><!--LIST_DESCRIPTION--></td>
1
+ <tr class="summary">
2
+ <td id="<!--LIST_NAME-->_list_description" class="header" style="text-align: left;padding-bottom: 2px;padding-top: 7px;font-size: 14px;-moz-border-radius-topright:<!--CORNER_RADIUS-->;-webkit-border-top-right-radius:<!--CORNER_RADIUS-->;border-top-right-radius:<!--CORNER_RADIUS-->;-moz-border-radius-topleft:<!--CORNER_RADIUS-->;-webkit-border-top-left-radius:<!--CORNER_RADIUS-->;border-top-left-radius:<!--CORNER_RADIUS-->;" colspan="<!--COLSPAN-->"><!--LIST_DESCRIPTION--></td>
3
3
  </tr>
data/lib/widget_list.rb CHANGED
@@ -78,6 +78,7 @@ module WidgetList
78
78
  @fill['<!--VIEW_OPTIONS-->'] = model_options
79
79
  @fill['<!--TITLE_VALUE-->'] = (!@isEditing) ? '' : page_config['title']
80
80
  @fill['<!--DESC_VALUE-->'] = (!@isEditing) ? '' : page_config['listDescription']
81
+ @fill['<!--PRIMARY_CHECKED-->'] = (!@isEditing) ? 'checked' : page_config['primaryDatabase']
81
82
 
82
83
  #
83
84
  # FIELD LEVEL
@@ -274,13 +275,22 @@ module WidgetList
274
275
  return WidgetList::Utils::fill(@fill , ac.render_to_string(:partial => 'widget_list/administration/output') )
275
276
  end
276
277
 
278
+ def add_pointer(key,subtract=0)
279
+ whitespace = 31 - subtract
280
+ "['#{key}'] " + "".ljust(whitespace - key.length) + " = "
281
+ end
282
+
283
+ def add_conditional(key,conditional)
284
+ whitespace = 19
285
+ "'#{key}' " + "".ljust(whitespace - key.length) + " #{conditional}"
286
+ end
287
+
277
288
  def translate_config_to_code()
278
289
  config_id, page_config = get_configuration()
279
290
  fields,fields_hidden,fields_function,buttons,footer_buttons,group_by,drill_downs = normalize_configs(page_config)
280
291
  drill_down_code = ''
281
292
  case_statements = ''
282
293
  case_statements2 = ''
283
- drill_down_links = ''
284
294
  view_code = ''
285
295
  export_code = ''
286
296
  visible_field_code = ''
@@ -296,20 +306,21 @@ module WidgetList
296
306
  #@todo - (groupByFilter == 'none') ? 'a.name' : 'MAX(a.name)'
297
307
 
298
308
  drill_downs.each { |field|
299
- drill_down_links+= "
300
- list_parms['fieldFunction']['#{field[1]['column_to_show']}'] = WidgetList::List::build_drill_down(
301
- :list_id => list_parms['name'],
302
- :drill_down_name => '#{field[0]}',
303
- :data_to_pass_from_view => '#{field[1]['column_to_show'].gsub(/_linked/,'')}',
304
- :column_to_show => '#{field[1]['column_to_show'].gsub(/_linked/,'')}',
305
- :column_alias => '#{field[1]['column_to_show']}'
306
- )"
309
+ field_function_code += "
310
+ list_parms['fieldFunction']#{add_pointer(field[1]['column_to_show'],7)} WidgetList::List::build_drill_down(
311
+ :list_id => list_parms['name'],
312
+ :drill_down_name => '#{field[0]}',
313
+ :data_to_pass_from_view => '#{field[1]['column_to_show'].gsub(/_linked/,'')}',
314
+ :column_to_show => '#{field[1]['column_to_show'].gsub(/_linked/,'')}',
315
+ :column_alias => '#{field[1]['column_to_show']}',
316
+ :primary_database => #{page_config['primaryDatabase'] == '1' ? 'true' : 'false'}
317
+ )"
307
318
  case_statements += <<-EOD
308
319
 
309
320
  when '#{field[0]}'
310
- list_parms['filter'] << " #{field[1]['column_to_show'].gsub(/_linked/,'')} = ? "
311
- list_parms['bindVars'] << #{page_config['view']}.sanitize(filterValue)
312
- list_parms['listDescription'] = ' Filtered by #{field[1]['column_to_show'].gsub(/_linked/,'').camelize} (' + filterValue + ')'
321
+ list_parms['filter'] << " #{field[1]['column_to_show'].gsub(/_linked/,'')} = ? "
322
+ list_parms['bindVars'] << #{page_config['view']}.sanitize(filterValue)
323
+ list_parms['listDescription'] = drillDownBackLink + ' Filtered by #{field[1]['column_to_show'].gsub(/_linked/,'').camelize} (' + filterValue + ')'
313
324
  EOD
314
325
  }
315
326
 
@@ -321,6 +332,7 @@ module WidgetList
321
332
 
322
333
  drillDown, filterValue = WidgetList::List::get_filter_and_drilldown(list_parms['name'])
323
334
 
335
+ drillDownBackLink = WidgetList::List::drill_down_back(list_parms['name'])
324
336
  case drillDown#{case_statements}
325
337
  else
326
338
  list_parms['listDescription'] = '#{page_config['listDescription']}'
@@ -329,22 +341,22 @@ module WidgetList
329
341
 
330
342
  else
331
343
  drill_down_code = "
332
- list_parms['listDescription'] = '#{page_config['listDescription']}'
344
+ list_parms['listDescription'] = '#{page_config['listDescription']}'
333
345
  "
334
346
  end
335
347
 
336
348
 
337
349
  if page_config['rowButtonsOn'] == '1'
338
350
  variable_code += "
339
- button_column_name = '#{page_config['rowButtonsName']}'"
351
+ button_column_name = '#{page_config['rowButtonsName']}'"
340
352
  end
341
353
 
342
354
  #------------ VIEW ------------
343
355
 
344
356
  if page_config['useRansack'] == '1' && page_config['showSearch'] == '1'
345
357
  view_code = "
346
- list_parms['ransackSearch'] = #{page_config['view']}.search($_REQUEST[:q])
347
- list_parms['view'] = list_parms['ransackSearch'].result
358
+ list_parms#{add_pointer('ransackSearch',-10)} #{page_config['view']}.search(#{($_REQUEST.key?('iframe')) ? '$_REQUEST' : 'params'}[:q])
359
+ list_parms#{add_pointer('view',-10)} list_parms['ransackSearch'].result
348
360
  "
349
361
  if page_config['ransackAdvancedForm'] == '1'
350
362
  view_code += "
@@ -370,7 +382,7 @@ module WidgetList
370
382
 
371
383
  else
372
384
  view_code = "
373
- list_parms['view'] = #{page_config['view']}
385
+ list_parms#{add_pointer('view',-10)} #{page_config['view']}
374
386
  "
375
387
  end
376
388
 
@@ -383,7 +395,7 @@ module WidgetList
383
395
 
384
396
  if page_config['showSearch'] == '1'
385
397
  export_code += "
386
- list_parms['searchTitle'] = '#{page_config['searchTitle']}'"
398
+ list_parms['searchTitle'] = '#{page_config['searchTitle']}'"
387
399
  end
388
400
 
389
401
 
@@ -393,60 +405,21 @@ module WidgetList
393
405
  list_parms = WidgetList::List.checkbox_helper(list_parms,'#{page_config['checkboxField']}')
394
406
  "
395
407
  visible_field_code += "
396
- list_parms['fields']['checkbox'] = 'checkbox_header'"
408
+ list_parms['fields']#{add_pointer('checkbox')} 'checkbox_header'"
397
409
  end
398
410
 
399
411
  fields.each { |field,description|
400
412
  conditional = ''
401
413
  if page_config['useGrouping'] == '1' && page_config['showSearch'] == '1' && !group_by.empty?
402
414
  conditional = ' if groupByFilter == \'none\''
403
- if group_by.key?(field)
404
- conditional = " if groupByFilter == 'none' || groupByFilter == 'group_#{group_by[field].gsub(/ /,'_').downcase}'"
415
+ if group_by.key?(field) || group_by.key?(field.gsub(/_linked/,''))
416
+ conditional = " if groupByFilter == 'none' || groupByFilter == 'group_#{group_by[field.gsub(/_linked/,'')].gsub(/ /,'_').downcase}'"
405
417
  end
406
418
  end
407
419
  visible_field_code += "
408
- list_parms['fields']['#{field}'] = '#{description}' #{conditional}"
420
+ list_parms['fields']#{add_pointer(field)} #{add_conditional(description,conditional)}"
409
421
  }
410
422
 
411
- #------------ BUTTONS ------------
412
-
413
- if page_config['rowButtonsOn'] == '1'
414
- visible_field_code += "
415
- list_parms['fields'][button_column_name.downcase] = button_column_name.capitalize"
416
-
417
- button_code += "
418
- mini_buttons = {}
419
- "
420
-
421
- buttons.each { |field|
422
- button_code += "
423
- mini_buttons['button_#{field[0].downcase}'] = {'page' => '#{field[1]['url']}',
424
- 'text' => '#{field[0]}',
425
- 'function' => 'Redirect',
426
- 'innerClass' => '#{field[1]['class']}',
427
- 'tags' => {'all'=>'all'}
428
- }
429
- "
430
- }
431
-
432
- button_code += "
433
- list_parms['buttons'] = {button_column_name.downcase => mini_buttons}
434
- "
435
- end
436
-
437
-
438
-
439
- #------------ FOOTER ------------
440
- if page_config['footerOn'] == '1' && !footer_buttons.empty?
441
- btns = []
442
- footer_buttons.each {|field|
443
- btns << " WidgetList::Widgets::widget_button('#{field[0]}', {'page' => '#{field[1]['url']}','innerClass' => '#{field[1]['class']}'})"
444
- }
445
-
446
- button_code += "
447
- list_parms['customFooter'] = " + btns.join(' + ')
448
- end
449
-
450
423
 
451
424
 
452
425
 
@@ -454,13 +427,21 @@ module WidgetList
454
427
 
455
428
  if page_config['useGrouping'] == '1' && page_config['showSearch'] == '1' && !group_by.empty?
456
429
  variable_code += "
457
- groupByDesc = '' # Initialize a variable you can use in listDescription to show what the current grouping selection is
458
- groupByFilter = 'none' # This variable should be used to control business logic based on the grouping and is a short hand key rather than using what is returned from get_group_by_selection
430
+ groupByDesc = '' # Initialize a variable you can use in listDescription to show what the current grouping selection is
431
+ groupByFilter = 'none' # This variable should be used to control business logic based on the grouping and is a short hand key rather than using what is returned from get_group_by_selection
459
432
  "
460
433
 
461
434
  visible_field_code += "
462
- list_parms['fields']['cnt'] = 'Count' if groupByFilter != 'none'
463
- list_parms['fieldFunction']['cnt'] = 'TO_CHAR(COUNT(1))' if groupByFilter != 'none'"
435
+ list_parms['fields']#{add_pointer('cnt')} #{add_conditional('Count'," if groupByFilter != 'none'")}
436
+ "
437
+ if WidgetList::List.get_db_type(page_config['primaryDatabase'] == '1' ? true : false) == 'oracle'
438
+ count = 'TO_CHAR(COUNT(1))'
439
+ else
440
+ count = 'COUNT(1)'
441
+ end
442
+
443
+ field_function_code += "
444
+ list_parms['fieldFunction']#{add_pointer('cnt',7)} #{add_conditional(count," if groupByFilter != 'none'")}"
464
445
  descriptions = []
465
446
  group_by.each { |field,description|
466
447
  descriptions << "'" + description + "'"
@@ -495,7 +476,50 @@ module WidgetList
495
476
  EOD
496
477
 
497
478
  grouping_code += "
498
- list_parms['groupByItems'] = " + '[' + descriptions.join(', ') + ']' + ""
479
+ list_parms['groupByItems'] = " + '[' + descriptions.join(', ') + ']' + ""
480
+ end
481
+
482
+
483
+ #------------ BUTTONS ------------
484
+
485
+ if page_config['rowButtonsOn'] == '1'
486
+ visible_field_code += "
487
+ list_parms['fields'][button_column_name.downcase] = button_column_name.capitalize"
488
+
489
+ button_code += "
490
+ #
491
+ # Buttons
492
+ #
493
+ mini_buttons = {}
494
+ "
495
+
496
+ buttons.each { |field|
497
+ button_code += "
498
+ mini_buttons['button_#{field[0].downcase}'] = {'page' => '#{field[1]['url']}',
499
+ 'text' => '#{field[0]}',
500
+ 'function' => 'Redirect',
501
+ 'innerClass' => '#{field[1]['class']}',
502
+ 'tags' => {'all'=>'all'}
503
+ }
504
+ "
505
+ }
506
+
507
+ button_code += "
508
+ list_parms['buttons'] = {button_column_name.downcase => mini_buttons}
509
+ "
510
+ end
511
+
512
+
513
+
514
+ #------------ FOOTER ------------
515
+ if page_config['footerOn'] == '1' && !footer_buttons.empty?
516
+ btns = []
517
+ footer_buttons.each {|field|
518
+ btns << " WidgetList::Widgets::widget_button('#{field[0]}', {'page' => '#{field[1]['url']}','innerClass' => '#{field[1]['class']}'})"
519
+ }
520
+
521
+ button_code += "
522
+ list_parms['customFooter'] = " + btns.join(' + ')
499
523
  end
500
524
 
501
525
 
@@ -505,7 +529,7 @@ module WidgetList
505
529
  if page_config['fieldFunctionOn'] == '1' && !fields_function.empty?
506
530
  fields_function.each { |field,command|
507
531
  field_function_code += "
508
- list_parms['fieldFunction']['#{field}'] = '#{command}'"
532
+ list_parms['fieldFunction']#{add_pointer(field,7)} '#{command}'"
509
533
  }
510
534
  end
511
535
 
@@ -524,36 +548,43 @@ module WidgetList
524
548
 
525
549
  if page_config['checkboxEnabled'] == '1'
526
550
  field_function_code += "
527
- list_parms['fieldFunction']['checkbox'] = \"''\""
551
+ list_parms['fieldFunction']#{add_pointer('checkbox',7)} \"''\""
528
552
  end
529
553
 
530
554
  <<-EOD
531
555
  begin
532
556
 
533
557
  #{variable_code}
534
- list_parms = WidgetList::List::init_config()
535
- list_parms['name'] = '#{page_config['name']}'
536
- list_parms['noDataMessage'] = '#{page_config['noDataMessage']}'
537
- list_parms['rowLimit'] = '#{page_config['rowLimit']}'
538
- list_parms['title'] = '#{page_config['title']}'
539
- list_parms['listDescription'] = '#{page_config['listDescription']}'
540
- list_parms['useSort'] = #{page_config['useSort'] == '1' ? 'true' : 'false'}
558
+ list_parms = WidgetList::List::init_config()
559
+ list_parms['name'] = '#{page_config['name']}'
560
+ list_parms['noDataMessage'] = '#{page_config['noDataMessage']}'
561
+ list_parms['rowLimit'] = #{page_config['rowLimit']}
562
+ list_parms['title'] = '#{page_config['title']}'
563
+ list_parms['useSort'] = #{page_config['useSort'] == '1' ? 'true' : 'false'}
564
+ list_parms['database'] = '#{page_config['primaryDatabase'] == '1' ? 'primary' : 'secondary'}'
541
565
  #{export_code}
542
566
 
543
567
  #{drill_down_code}
544
- #{drill_down_links}
545
568
  #{grouping_code}
546
569
 
570
+ #
571
+ # Fields
572
+ #
547
573
  #{visible_field_code}
548
574
  #{hidden_field_code}
549
575
  #{field_function_code}
550
576
 
577
+ #
578
+ # Model
579
+ #
551
580
  #{view_code}
552
581
 
553
582
  #{checkbox_code}
554
583
  #{button_code}
555
584
 
556
-
585
+ #
586
+ # Render List
587
+ #
557
588
  output_type, output = WidgetList::List.build_list(list_parms)
558
589
 
559
590
  case output_type
@@ -568,6 +599,9 @@ module WidgetList
568
599
 
569
600
  rescue Exception => e
570
601
 
602
+ #
603
+ # Rescue Errors
604
+ #
571
605
  Rails.logger.info e.to_s + "\\n\\n" + $!.backtrace.join("\\n\\n")
572
606
 
573
607
  if Rails.env == 'development'
@@ -990,7 +1024,7 @@ module WidgetList
990
1024
  {'select'=>
991
1025
  {'view' =>
992
1026
  '
993
- SELECT <!--FIELDS--> FROM <!--SOURCE--> <!--WHERE--> <!--GROUPBY--> <!--ORDERBY--> <!--LIMIT-->
1027
+ SELECT <!--FIELDS_PLAIN--> FROM <!--SOURCE--> <!--WHERE--> <!--GROUPBY--> <!--ORDERBY--> <!--LIMIT-->
994
1028
  '
995
1029
  }
996
1030
  }
@@ -2004,13 +2038,14 @@ module WidgetList
2004
2038
  'onkeyup' => (! @items['searchOnkeyup'].empty?) ? WidgetList::Utils::fill({'<!--URL-->'=>searchUrl, '<!--TARGET-->' => @items['name'], '<!--FUNCTION_ALL-->' => @items['ajaxFunctionAll']}, @items['searchOnkeyup'] + '<!--FUNCTION_ALL-->') : ''
2005
2039
  }
2006
2040
 
2007
- @headerPieces['searchBar'] = WidgetList::Widgets::widget_input(list_search)
2008
- @templateFill['<!--FILTER_HEADER-->'] = @headerPieces['searchBar']
2009
-
2041
+ fillRansack = {}
2010
2042
  if @items['ransackSearch'] != false
2011
- @templateFill['<!--RANSACK-->'] = ActionController::Base.new.render_to_string(:partial => 'widget_list/ransack_fields', :locals => { 'search_object' => @items['ransackSearch'], 'url' => '--JUMP_URL--'})
2043
+ fillRansack['<!--RANSACK-->'] = ActionController::Base.new.render_to_string(:partial => 'widget_list/ransack_fields', :locals => { 'search_object' => @items['ransackSearch'], 'url' => '--JUMP_URL--'})
2012
2044
  end
2013
2045
 
2046
+ @headerPieces['searchBar'] = WidgetList::Utils::fill(fillRansack,WidgetList::Widgets::widget_input(list_search))
2047
+ @templateFill['<!--FILTER_HEADER-->'] = @headerPieces['searchBar']
2048
+
2014
2049
  end
2015
2050
 
2016
2051
  #
@@ -2432,12 +2467,11 @@ module WidgetList
2432
2467
  end
2433
2468
 
2434
2469
  #Add in radius
2435
- if ii == @items['fields'].length - 1
2470
+ if ii == @items['fields'].length - 1 && @items['listDescription'] == ''
2436
2471
  colWidthStyle += '-moz-border-radius-topright:' + get_radius_value() + ';-webkit-border-top-right-radius:' + get_radius_value() + ';border-top-right-radius:' + get_radius_value() + ';'
2437
-
2438
2472
  end
2439
2473
 
2440
- if ii == 0
2474
+ if ii == 0 && @items['listDescription'] == ''
2441
2475
  colWidthStyle += '-moz-border-radius-topleft:' + get_radius_value() + ';-webkit-border-top-left-radius:' + get_radius_value() + ';border-top-left-radius:' + get_radius_value() + ';'
2442
2476
  end
2443
2477
 
@@ -2870,14 +2904,17 @@ module WidgetList
2870
2904
 
2871
2905
  page = buttonAttribs['page'].dup
2872
2906
  if buttonAttribs.key?('tags')
2907
+ tags = buttonAttribs['tags'].dup
2908
+ all_wildcard = false
2873
2909
  if buttonAttribs['tags'].first[0] == 'all'
2874
- buttonAttribs['tags'] = {}
2875
- @results.keys.each { |tags|
2876
- buttonAttribs['tags'][tags.downcase] = tags.downcase
2910
+ all_wildcard = true
2911
+ tags = {}
2912
+ @results.keys.each { |tag|
2913
+ tags[tag.downcase] = tag.downcase
2877
2914
  }
2878
2915
  end
2879
2916
 
2880
- buttonAttribs['tags'].each { | tagName , tag |
2917
+ tags.each { | tagName , tag |
2881
2918
  if @results.key?(tag.upcase) && @results[tag.upcase][j]
2882
2919
  #
2883
2920
  # Data exists, lets check to see if page has any lowercase tags for restful URLs
@@ -2889,7 +2926,7 @@ module WidgetList
2889
2926
  #
2890
2927
  # Will build ?tagname=XXXX based on your hash passed to your page
2891
2928
  #
2892
- buttonAttribs.deep_merge!({ 'args' => { tagName => @results[tag.upcase][j] } })
2929
+ buttonAttribs.deep_merge!({ 'args' => { tagName => @results[tag.upcase][j] } }) unless all_wildcard
2893
2930
  end
2894
2931
  else
2895
2932
 
@@ -3443,8 +3480,14 @@ module WidgetList
3443
3480
 
3444
3481
  if ! sql.empty?
3445
3482
  if @items['showPagination']
3446
- if get_database._select(sql, @items['bindVars'], @items['bindVarsLegacy'], @active_record_model) > 0
3447
- rows = get_database.final_results['TOTAL'][0].to_i
3483
+ cnt = get_database._select(sql, @items['bindVars'], @items['bindVarsLegacy'], @active_record_model)
3484
+ if cnt > 0
3485
+ if cnt > get_database.final_results['TOTAL'][0].to_i
3486
+ #sometimes databases and queries run do not count(1) and group properly and instead
3487
+ rows = cnt
3488
+ else
3489
+ rows = get_database.final_results['TOTAL'][0].to_i
3490
+ end
3448
3491
  else
3449
3492
  rows = 0
3450
3493
  end
@@ -1,3 +1,3 @@
1
1
  module WidgetList
2
- VERSION = "1.2.4"
2
+ VERSION = "1.2.5"
3
3
  end
data/widget_list.gemspec CHANGED
@@ -1,38 +1,38 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'widget_list/version'
5
-
6
- Gem::Specification.new do |gem|
7
-
8
- gem.name = "widget_list"
9
-
10
- gem.version = WidgetList::VERSION
11
-
12
- gem.authors = ["David Renne"]
13
-
14
- gem.email = ["message_me_on_github@dave.com"]
15
-
16
- gem.description = %q{An Advanced and flexible ajax data grid. Supports several databases where data is pulled from either using Sequel ORM (optional even though is a dependency), Active Record Models or Raw SQL.}
17
-
18
- gem.summary = %q{In rails you have will_paginate and other gems like it using the ActiveRecord approach, but widget_list adds some awesome treats to standard boring pagers}
19
-
20
- gem.homepage = "https://github.com/davidrenne/widget_list"
21
-
22
- #
23
- # SEQUEL IS NOW OPTIONAL!! I am sure most people will be using ActiveRecord ORM
24
- # I am including it as a dependency just because it is easier to pull it down and have it available
25
- #
26
- gem.add_dependency('sequel', '3.42.0')
27
-
28
- gem.add_dependency('ransack', '0.7.2')
29
-
30
- gem.files = `git ls-files`.split($/)
31
-
32
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
33
-
34
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
35
-
36
- gem.require_paths = ["lib"]
37
-
38
- end
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'widget_list/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+
8
+ gem.name = "widget_list"
9
+
10
+ gem.version = WidgetList::VERSION
11
+
12
+ gem.authors = ["David Renne"]
13
+
14
+ gem.email = ["message_me_on_github@dave.com"]
15
+
16
+ gem.description = %q{An Advanced and flexible ajax data grid. Supports several databases where data is pulled from either using Sequel ORM (optional even though is a dependency), Active Record Models or Raw SQL.}
17
+
18
+ gem.summary = %q{In rails you have will_paginate and other gems like it using the ActiveRecord approach, but widget_list adds some awesome treats to standard boring pagers}
19
+
20
+ gem.homepage = "https://github.com/davidrenne/widget_list"
21
+
22
+ #
23
+ # SEQUEL IS NOW OPTIONAL!! I am sure most people will be using ActiveRecord ORM
24
+ # I am including it as a dependency just because it is easier to pull it down and have it available
25
+ #
26
+ gem.add_dependency('sequel', '3.42.0')
27
+
28
+ gem.add_dependency('ransack', '0.7.2')
29
+
30
+ gem.files = `git ls-files`.split($/)
31
+
32
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
33
+
34
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
35
+
36
+ gem.require_paths = ["lib"]
37
+
38
+ end