taxa 0.3.0 → 0.3.1

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: 2f22b781a534e5778cfe117a963ec4984f17eda86c757a05a21d012088644996
4
- data.tar.gz: cd39b3a350ad83c26a7d1e60fece8964b7bb68fb82907305f8aec8d6c1e434d3
3
+ metadata.gz: 0c3d0340e64965b829135fd758847296d007e8293d5229fd2485fccb40abe0be
4
+ data.tar.gz: 9c053380d21709436c7bf9b4e0a9198eecdedab7e0e578b4c50b992dcb4bd76e
5
5
  SHA512:
6
- metadata.gz: '09e294e750b886dc5a5248c66cc5c13d5ca284dfadea44fe8cdbfd3218b3f835907fe2158f1669b12741ae186f55a7b362e0c350b2735656b1582a89c99f6fe7'
7
- data.tar.gz: 7239b7a6efcc5d822bb78ea6ab1cd3bfecabf1373036fbf53b1fce8e267d26a7e946fd104a53ea36bb04d4e010dfcdd89cc6f75d307579163f58d587beaa9b66
6
+ metadata.gz: 99741a996cd69e5d57b2da6af6d0c4acf04a429db6258f6cdefbeb21d3b062aeba41a6537e7f5a3c6ff78d5941c533448b7263751ec134029bb9bad2538a29a3
7
+ data.tar.gz: 01d2cee9562d2f2845fc0866c3a8a68a279e548b5eb6f1913b41aa43110e8a13cc379b980e5ce524dc8165d5b18e7d003bd74cc09ad09425a5f466fdae8e3230
data/CHANGELOG.md CHANGED
@@ -22,3 +22,8 @@ Update JSON gem to 2.5.x
22
22
  ### Highlights
23
23
  Support for Plants of the World Online
24
24
  http://plantsoftheworldonline.org/
25
+
26
+ ## [0.3.1]
27
+
28
+ ### Highlights
29
+ Fixed a bug related to Plants of The World Online filter validation
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- taxa (0.2.1)
4
+ taxa (0.3.0)
5
5
  faraday (~> 1.1)
6
6
  json (~> 2.5)
7
7
 
@@ -10,7 +10,7 @@ module Taxa
10
10
 
11
11
  POWO_URL = 'http://www.plantsoftheworldonline.org/api/2'
12
12
 
13
- FILTERS = %w[accepted_names has_images families_f genus_f species__f infraspecific_f].freeze
13
+ FILTERS = %w[accepted_names has_images families_f genus_f species_f infraspecific_f].freeze
14
14
 
15
15
  def initialize(**options)
16
16
  @options = options
@@ -45,7 +45,7 @@ module Taxa
45
45
  def validate_search_parameters(query, page, filters)
46
46
  raise ArgumentError, 'query can not be nil' if query.nil?
47
47
 
48
- if !filters.empty? && (filters & FILTERS).empty?
48
+ if !filters.empty? && !filters.all? { |f| FILTERS.include? f }
49
49
  raise ArgumentError,
50
50
  "filter is invalid. It must be one of these: #{FILTERS.join(', ')} can not be nil"
51
51
  end
data/lib/taxa/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Taxa
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taxa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Sherman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-13 00:00:00.000000000 Z
11
+ date: 2021-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop