nasturtium 0.1.1 → 0.1.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: 8219cbaf74a811b7c5c8257d17a3c6cbc95fe452dc21c26290fd6189aabb509f
4
- data.tar.gz: 80c40be4ef84799d44c2211f5505eda93a2e05140d7b1f432db1e8bf49dbfd5a
3
+ metadata.gz: 00fbcc67e682c17e4b44ad8b8d67d0b1ae09245bce3b13047bbc7965182d0316
4
+ data.tar.gz: 35c4853c81836fb2d3e048ba0d9034452574e2de7a3a2584a4a6ecb308eccb95
5
5
  SHA512:
6
- metadata.gz: e3e8b331104404dee82f7022e0290894eac791d21a91d14b09fe17f978710649b767de70d72675d89fcfa3756f29fd82025ffcb83192237a6821503b178d8673
7
- data.tar.gz: 4627a27547643ff9eb5bb362dfc242dcf4b994109d5f1fe9062ddfe1e1180645686a013bf2d08d35206bedd1b42a11d315e9ed33e115e4f714fb5781dc0cdf74
6
+ metadata.gz: 5314e8c36ec73652a28a33a24d69f0c99cd70975f43a4eb008f8a75bd98f77c2c2f0ae85e1b2c7603b6900789a481e98ad3aa74301ab34b42c721f5666e32dbf
7
+ data.tar.gz: f5b0478301b6b21dece20e84543c2288c90cd781b9f59abbb58ede58b0c69d7ac923d10ca007ca4776a281c0c035a32a16ae9d15b6be1f9adf887c2b917b6e3c
@@ -5,12 +5,15 @@ on: [push,pull_request]
5
5
  jobs:
6
6
  build:
7
7
  runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ ruby-version: ['3.3.4', '4.0.0']
8
11
  steps:
9
12
  - uses: actions/checkout@v2
10
- - name: Set up Ruby
13
+ - name: Set up Ruby ${{ matrix.ruby-version }}
11
14
  uses: ruby/setup-ruby@v1
12
15
  with:
13
- ruby-version: 3.3.4
16
+ ruby-version: ${{ matrix.ruby-version }}
14
17
  bundler-cache: true
15
18
  - name: Run the default task
16
19
  run: bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.2] - 2026-06-17
4
+ - Allow Ruby 4.0.0:
5
+ - Relaxed `required_ruby_version` to `>= 2.5.0, < 5.0`
6
+ - Added Ruby 4.0.0 to the CI matrix
7
+ - Bumped `faraday-follow_redirects` upper bound to allow 0.5+ (which lifts the Ruby < 4 cap)
8
+ - Dropped the `bundler` development dependency
9
+ - Fixed `elseif` typo in `Faraday::NasturtiumErrors` middleware that crashed error parsing on non-message error bodies; hardened `error_body` against unexpected shapes
10
+ - Updated tests to match current iNaturalist API responses (taxonomy drift, fuzzy autocomplete, post-endpoint 404s on empty projects)
11
+ - Updated license from NCSA to MIT
12
+
3
13
  ## [0.1.1] - 2024-09-11
4
14
  - Removed Gemfile.lock
5
15
  - Bumped development depency versions to avoid CVE-2024-43398
data/LICENSE.txt CHANGED
@@ -1,13 +1,10 @@
1
- Copyright © 2023 Species File Group. All rights reserved.
1
+ The MIT License (MIT)
2
2
 
3
- Developed by: Species File Group
4
- Illinois Natural History Survey
5
- https://github.com/SpeciesFileGroup/nasturtium
3
+ Copyright © 2024 Species File Group
6
4
 
7
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
6
 
9
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
10
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution.
11
- Neither the names of <Name of Development Group, Name of Institution>, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
10
 
13
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
data/README.md CHANGED
@@ -527,7 +527,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/Specie
527
527
 
528
528
  ## License
529
529
 
530
- The gem is available as open source under the terms of the [NCSA/Illinois](https://opensource.org/licenses/NCSA).
530
+ The gem is available as open source under the terms of the [MIT license](https://opensource.org/licenses/NCSA).
531
531
 
532
532
  ## Code of Conduct
533
533
 
@@ -40,24 +40,15 @@ module Faraday
40
40
  end
41
41
 
42
42
  def error_body(body)
43
- if !body.nil? && !body.empty? && body.is_a?(String)
44
- if json?(body)
45
- body = ::MultiJson.load(body)
46
- if body["message"].nil?
47
- body = nil
48
- elseif body["message"].length == 1
49
- body = body["message"]
50
- else
51
- body = body["message"].collect { |x| x["message"] }.join("; ")
52
- end
53
- end
54
- end
43
+ return nil if body.nil? || !body.is_a?(String) || body.empty?
44
+ return ": #{body}" unless json?(body)
55
45
 
56
- if body.nil?
57
- nil
58
- else
59
- ": #{body}"
60
- end
46
+ parsed = ::MultiJson.load(body)
47
+ msg = parsed["message"] || parsed["error"]
48
+ return nil if msg.nil?
49
+
50
+ msg = msg.collect { |x| x.is_a?(Hash) ? x["message"] : x.to_s }.join("; ") if msg.is_a?(Array)
51
+ ": #{msg}"
61
52
  end
62
53
 
63
54
  def error_message_500(response, body = nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nasturtium
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
data/nasturtium.gemspec CHANGED
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
11
11
  s.summary = "Nasturtium Client"
12
12
  s.description = "Nasturtium is a low-level wrapper around the iNaturalist API."
13
13
  s.homepage = "https://github.com/SpeciesFileGroup/nasturtium"
14
- s.license = "NCSA"
15
- s.required_ruby_version = ">= 2.5.0"
14
+ s.license = "MIT"
15
+ s.required_ruby_version = [">= 2.5.0", "< 5.0"]
16
16
 
17
17
  # s.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'"
18
18
 
@@ -32,7 +32,6 @@ Gem::Specification.new do |s|
32
32
  # Uncomment to register a new dependency of your gem
33
33
  # s.add_dependency "example-gem", "~> 1.0"
34
34
 
35
- s.add_development_dependency "bundler", "~> 2.1", ">= 2.1.4"
36
35
  s.add_development_dependency "rake", "~> 13.0", ">= 13.0.1"
37
36
  s.add_development_dependency "test-unit", "~> 3.3", ">= 3.3.6"
38
37
  s.add_development_dependency "vcr", "~> 6.0"
@@ -41,7 +40,7 @@ Gem::Specification.new do |s|
41
40
  #s.add_development_dependency "byebug"
42
41
 
43
42
  s.add_runtime_dependency "faraday", "~> 2.2"
44
- s.add_runtime_dependency "faraday-follow_redirects", ">= 0.1", "< 0.4"
43
+ s.add_runtime_dependency "faraday-follow_redirects", ">= 0.1", "< 0.6"
45
44
  s.add_runtime_dependency "multi_json", "~> 1.15"
46
45
 
47
46
  # s.add_runtime_dependency "thor", "~> 1.0", ">= 1.0.1"
metadata CHANGED
@@ -1,35 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nasturtium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Ower, Matt Yoder
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-09-11 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.1'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 2.1.4
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '2.1'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 2.1.4
33
12
  - !ruby/object:Gem::Dependency
34
13
  name: rake
35
14
  requirement: !ruby/object:Gem::Requirement
@@ -141,7 +120,7 @@ dependencies:
141
120
  version: '0.1'
142
121
  - - "<"
143
122
  - !ruby/object:Gem::Version
144
- version: '0.4'
123
+ version: '0.6'
145
124
  type: :runtime
146
125
  prerelease: false
147
126
  version_requirements: !ruby/object:Gem::Requirement
@@ -151,7 +130,7 @@ dependencies:
151
130
  version: '0.1'
152
131
  - - "<"
153
132
  - !ruby/object:Gem::Version
154
- version: '0.4'
133
+ version: '0.6'
155
134
  - !ruby/object:Gem::Dependency
156
135
  name: multi_json
157
136
  requirement: !ruby/object:Gem::Requirement
@@ -193,12 +172,11 @@ files:
193
172
  - nasturtium.gemspec
194
173
  homepage: https://github.com/SpeciesFileGroup/nasturtium
195
174
  licenses:
196
- - NCSA
175
+ - MIT
197
176
  metadata:
198
177
  homepage_uri: https://github.com/SpeciesFileGroup/nasturtium
199
178
  source_code_uri: https://github.com/SpeciesFileGroup/nasturtium
200
- changelog_uri: https://github.com/SpeciesFileGroup/nasturtium/releases/tag/v0.1.1
201
- post_install_message:
179
+ changelog_uri: https://github.com/SpeciesFileGroup/nasturtium/releases/tag/v0.1.2
202
180
  rdoc_options: []
203
181
  require_paths:
204
182
  - lib
@@ -207,14 +185,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
185
  - - ">="
208
186
  - !ruby/object:Gem::Version
209
187
  version: 2.5.0
188
+ - - "<"
189
+ - !ruby/object:Gem::Version
190
+ version: '5.0'
210
191
  required_rubygems_version: !ruby/object:Gem::Requirement
211
192
  requirements:
212
193
  - - ">="
213
194
  - !ruby/object:Gem::Version
214
195
  version: '0'
215
196
  requirements: []
216
- rubygems_version: 3.4.19
217
- signing_key:
197
+ rubygems_version: 4.0.3
218
198
  specification_version: 4
219
199
  summary: Nasturtium Client
220
200
  test_files: []