completion-kit 0.29.1 → 0.29.2

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: f314f2989362808e829e3f1bbbfc5718eca193aa4602ae4b4b3e72bc6c9251c1
4
- data.tar.gz: b9322db963ff8bb00660e09309940f692cab0fff289c8069b3be68ecf81db429
3
+ metadata.gz: 42452b381d4fc71c13e22db8f1a2de1bbb7faf5ca58a0f69c85749a83fe6ee75
4
+ data.tar.gz: cef7fb6d834775c2f57da1db2b477ddcdf9f320fda0dee8adde5a9f893c7a44a
5
5
  SHA512:
6
- metadata.gz: bff1f44883f8a652ffde54da844bd626db029e432e91f5f79648b926b34ada993599b0a04176bfc842bd1c7da786dc9a05af5744779ba6e3fdca677e213639d1
7
- data.tar.gz: bff0d10f9a3f7ccc857d52b5038ac06e4ccbc6e15e73195ff18c95a2f0223c4d223bdd17749f36d6933d7bb5925e3dd9e522cf4e012b26ac76a9c9b78c40a0c6
6
+ metadata.gz: dfa72fd88d8b8a15ae4257d7243cb1d6e5d98d2f01a3c3ae82ae32df6c220d65c8e5d19930a73ac25ec89d2b7e649f8c584f81af4f77b82d877e156bb6dec3d3
7
+ data.tar.gz: 07c0331b7324b48b4ab269dd7b8e1191fce51e489889633792b16d438910947f7fc235c6cc2143b3701068b911536aad8c692b2ed836dac1bf13c5e330691185
@@ -45,10 +45,10 @@ module CompletionKit
45
45
 
46
46
  def paginate(scope)
47
47
  total = scope.count
48
- limit = (params[:limit].presence || PAGINATION_DEFAULT_LIMIT).to_i
48
+ limit = params[:limit].to_s.to_i
49
49
  limit = PAGINATION_DEFAULT_LIMIT if limit <= 0
50
50
  limit = PAGINATION_MAX_LIMIT if limit > PAGINATION_MAX_LIMIT
51
- offset = params[:offset].to_i
51
+ offset = params[:offset].to_s.to_i
52
52
  offset = 0 if offset < 0
53
53
  response.set_header("X-Total-Count", total.to_s)
54
54
  response.set_header("X-Limit", limit.to_s)
@@ -48,7 +48,7 @@ module CompletionKit
48
48
  return
49
49
  end
50
50
 
51
- generator = MetricVariantGenerator.new(@metric, count: params[:count].to_i, model: params[:model])
51
+ generator = MetricVariantGenerator.new(@metric, count: params[:count].to_s.to_i, model: params[:model])
52
52
  variants = generator.call
53
53
  MetricVersion.drafts.where(metric_id: @metric.id, source: "suggestion").destroy_all
54
54
  if variants.empty?
@@ -126,7 +126,7 @@
126
126
  <% pred = predecessor_of[v] %>
127
127
  <% next unless v.change_summary_against(pred) %>
128
128
  <% vs = v.validation_summary %>
129
- <dialog id="ck-mvdiff-<%= v.id %>" class="ck-modal" aria-labelledby="ck-mvdiff-title-<%= v.id %>" data-ck-dialog<%= " data-ck-dialog-autoopen" if params[:show_change].to_i == v.id %>>
129
+ <dialog id="ck-mvdiff-<%= v.id %>" class="ck-modal" aria-labelledby="ck-mvdiff-title-<%= v.id %>" data-ck-dialog<%= " data-ck-dialog-autoopen" if params[:show_change].to_s.to_i == v.id %>>
130
130
  <article class="ck-modal__panel" tabindex="-1">
131
131
  <header class="ck-modal__header">
132
132
  <div class="ck-modal__heading">
@@ -1,3 +1,3 @@
1
1
  module CompletionKit
2
- VERSION = "0.29.1"
2
+ VERSION = "0.29.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: completion-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.1
4
+ version: 0.29.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Bastin