Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ require: rubocop-rspec
inherit_from: .rubocop_todo.yml

AllCops:
NewCops: disable
Exclude:
- 'tmp/**/*'
- 'vendor/**/*'
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.4.1
6 changes: 4 additions & 2 deletions lib/supplejack/url_formats/item_hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def initialize(params = {}, search = nil)
@h_locked = filters_of_type(:hl)
end

# rubocop:disable Metrics/AbcSize
def to_api_hash
hash = {}
text_value = text(params[:text])
Expand All @@ -23,8 +24,8 @@ def to_api_hash
hash[:record_type] = hash[:record_type].to_i unless hash[:record_type] == 'all'
hash[:page] = (params[:page] || 1).to_i
hash[:per_page] = (params[:per_page] || Supplejack.per_page).to_i
hash[:and] = and_filters if and_filters.try(:any?)
hash[:without] = without_filters if without_filters.try(:any?)
hash[:and] = and_filters if and_filters&.any?
hash[:without] = without_filters if without_filters&.any?
hash[:facets] = params[:facets] if params[:facets].present?
hash[:facet_pivots] = params[:facet_pivots] if params[:facet_pivots].present?
hash[:facets_per_page] = params[:facets_per_page].to_i if params[:facets_per_page].present?
Expand All @@ -45,6 +46,7 @@ def to_api_hash

hash
end
# rubocop:enable Metrics/AbcSize

# Returns all the active filters for the current search
# These filters are used to scope the search results
Expand Down
2 changes: 1 addition & 1 deletion lib/supplejack/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Supplejack
VERSION = '3.0.0'
VERSION = '3.0.4'
end