tranzito_utils 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb78c800e3456adce936194b836803b02e77994e2cd637d47cea8260e0c3590a
4
- data.tar.gz: 27be769e8d072a649c56d62f60d3091da75bd17960ce892b0a25c3667b250b71
3
+ metadata.gz: a6516dd9d39fe6ad64de9b010625861da771f1d2727778448192681229e97f51
4
+ data.tar.gz: 78e25c61c6542958f486d7108428505db65b03addb44a41fbca5c14807f689f0
5
5
  SHA512:
6
- metadata.gz: 5bc96af7a0c51372dfde74ee3dbbc62fc78db0cd75ebf14d2eeedcf97bc410707de040f6f45e59ddd816afbdd5351434c5df3b0557a2a7c0a2fc10649b353dfb
7
- data.tar.gz: 1f5af425e1c6c2632a5f1be8079288ff38166f62c6639f1caea8c57153b741f05c8af20b3b9a9e23514c97fce83756b98ecf194bef2826a863fcc8d712c21b35
6
+ metadata.gz: a636eaea774add3a7397be4639aa4963b1c091766c8db5225c3468a49e7c98db08a44d69731472c491b57af7aa029216e1527307e55bebe0ffa4d423015fd09e
7
+ data.tar.gz: 5f5099d219334b8d62345fa43f2dc644993e5d9261946680b5b52ae825a23c57a1ff978bf04bd8feadc43f2e9e58109769a170e606daeb0c02a6f8904a0f1136
data/README.md CHANGED
@@ -117,7 +117,7 @@ window.timeParser.localize()
117
117
 
118
118
  As for `PeriodSelector`, you can use it by initializing like this
119
119
  ```
120
- if ($('#timeSelectionBtnGroup').length) {
120
+ if (document.getElementById('timeSelectionBtnGroup')) {
121
121
  const periodSelector = new PeriodSelector()
122
122
  periodSelector.init()
123
123
  }
@@ -2,7 +2,7 @@
2
2
  - include_future ||= false
3
3
  - prepend_text ||= nil
4
4
 
5
- #timeSelectionBtnGroup.text-right{ role: "group", class: @period == "custom" ? "custom-period-selected" : "", "data-nosubmit" => "#{skip_submission}" }
5
+ #timeSelectionBtnGroup.text-right{ role: "group", class: (@period == "custom" ? "custom-period-selected" : ""), "data-nosubmit" => "#{skip_submission}" }
6
6
  - if prepend_text.present?
7
7
  %span.mr-2.less-strong.d-block.d-lg-inline-block
8
8
  = prepend_text
@@ -2,7 +2,7 @@
2
2
 
3
3
  module TranzitoUtils
4
4
  module SortableHelper
5
- DEFAULT_SEARCH_KEYS = [:direction, :sort, :user_id, :period, :start_time, :end_time, :per_page].freeze
5
+ DEFAULT_SEARCH_KEYS = %i[direction sort period start_time end_time per_page user_id query].freeze
6
6
 
7
7
  def sortable(column, title = nil, html_options = {})
8
8
  if title.is_a?(Hash) # If title is a hash, it wasn't passed
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TranzitoUtils
4
- module ParamsNormalizer
4
+ module Normalize
5
5
  def self.boolean(param = nil)
6
6
  return false if param.blank?
7
7
  ActiveRecord::Type::Boolean.new.cast(param.to_s.strip)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TranzitoUtils
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.3"
5
5
  end
@@ -17,5 +17,5 @@ require "tranzito_utils/concerns/sortable_table"
17
17
  require "tranzito_utils/helpers/graphing_helper"
18
18
  require "tranzito_utils/helpers/sortable_helper"
19
19
  require "tranzito_utils/services/time_parser"
20
- require "tranzito_utils/services/params_normalizer"
20
+ require "tranzito_utils/services/normalize"
21
21
  require "tranzito_utils/gem"
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tranzito_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
- - willbarrett
7
+ - willbarrettdev
8
8
  - sethherr
9
9
  - hafiz-ahmed
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-09-28 00:00:00.000000000 Z
13
+ date: 2022-09-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -47,7 +47,7 @@ files:
47
47
  - lib/tranzito_utils/gem.rb
48
48
  - lib/tranzito_utils/helpers/graphing_helper.rb
49
49
  - lib/tranzito_utils/helpers/sortable_helper.rb
50
- - lib/tranzito_utils/services/params_normalizer.rb
50
+ - lib/tranzito_utils/services/normalize.rb
51
51
  - lib/tranzito_utils/services/time_parser.rb
52
52
  - lib/tranzito_utils/version.rb
53
53
  homepage: https://github.com/Tranzito/tranzito_utils