colrapi 0.1.3 → 0.1.4
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 +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/colrapi/request.rb +2 -2
- data/lib/colrapi/version.rb +1 -1
- data/lib/colrapi.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d96f3b1aeaf8a629d768a2c7ed41bd77fb9df97c73282d149a679c97161b249f
|
4
|
+
data.tar.gz: 28f0950d39f06e58346fc3a84ab0db4675dbc7c3b19d4c05e538999133b72d88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f268ff2f3862eff6e3e9366ad145a3a58f393c53a4088e334c6cf9fba27431735b2e6d4ad98d40f99a6c995108e0ae9eaa1cfde347bd6e35beb7b43f3e8bb717
|
7
|
+
data.tar.gz: 00d408991f607b6bd044b20d295a9ba40e625e23a17c40388f79d1ce09162ca4a3220e5ed482e4742ed26816a5a366f302468512d6bc091f6ea54bb3d79c3903
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
## [Unreleased]
|
2
|
-
|
2
|
+
|
3
|
+
## [0.1.4] - 2025-03-05
|
4
|
+
- Fixed authentication
|
5
|
+
- Kept depreciated ChecklistBank preview endpoint functionality by using /dataset/{dataset_id}LRC.json instead (now requires a token)
|
3
6
|
|
4
7
|
## [0.1.3] - 2025-03-04
|
5
8
|
- Added environment and highest_taxon_id to name_usage_search
|
9
|
+
- Updated license from NCSA to MIT
|
6
10
|
|
7
11
|
## [0.1.2] - 2024-09-11
|
8
12
|
- Removed Gemfile.lock
|
data/lib/colrapi/request.rb
CHANGED
@@ -139,7 +139,7 @@ module Colrapi
|
|
139
139
|
conn = if verbose
|
140
140
|
Faraday.new(url: Colrapi.base_url, request: { params_encoder: Faraday::FlatParamsEncoder }) do |f|
|
141
141
|
if !@user.nil? and !@password.nil?
|
142
|
-
f.request
|
142
|
+
f.request :authorization, :basic, @user, @password
|
143
143
|
end
|
144
144
|
f.response :logger
|
145
145
|
f.use Faraday::ColrapiErrors::Middleware
|
@@ -148,7 +148,7 @@ module Colrapi
|
|
148
148
|
else
|
149
149
|
Faraday.new(url: Colrapi.base_url, request: { params_encoder: Faraday::FlatParamsEncoder }) do |f|
|
150
150
|
if !@user.nil? and !@password.nil?
|
151
|
-
f.request
|
151
|
+
f.request :authorization, :basic, @user, @password
|
152
152
|
end
|
153
153
|
f.use Faraday::ColrapiErrors::Middleware
|
154
154
|
f.adapter Faraday.default_adapter
|
data/lib/colrapi/version.rb
CHANGED
data/lib/colrapi.rb
CHANGED
@@ -693,11 +693,12 @@ module Colrapi
|
|
693
693
|
# (Note: you can also use 3LRC where 3 is the project_id as an ID on any endpoint with dataset_id or project_id
|
694
694
|
# to get data from the latest release candidate, or 3LR gets the latest release)
|
695
695
|
# @param project_id [String] The project id
|
696
|
+
# @param token [String, nil] The authentication token from retrieved with Colrapi.user_login(user, password)
|
696
697
|
#
|
697
698
|
# @param verbose [Boolean] Print headers to STDOUT
|
698
699
|
# @return [Array, Boolean] An array of hashes
|
699
|
-
def self.preview(project_id, verbose: false)
|
700
|
-
Request.new(endpoint: "dataset/#{project_id}
|
700
|
+
def self.preview(project_id, token, verbose: false)
|
701
|
+
Request.new(endpoint: "dataset/#{project_id}LRC.json", token: token, verbose: verbose).perform
|
701
702
|
end
|
702
703
|
|
703
704
|
# Get a reference with @reference_id from dataset @dataset_id via the reference route
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: colrapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Yoder, Geoff Ower
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -198,7 +198,7 @@ licenses:
|
|
198
198
|
metadata:
|
199
199
|
homepage_uri: https://github.com/SpeciesFileGroup/colrapi
|
200
200
|
source_code_uri: https://github.com/SpeciesFileGroup/colrapi
|
201
|
-
changelog_uri: https://github.com/SpeciesFileGroup/colrapi/releases/tag/v0.1.
|
201
|
+
changelog_uri: https://github.com/SpeciesFileGroup/colrapi/releases/tag/v0.1.4
|
202
202
|
post_install_message:
|
203
203
|
rdoc_options: []
|
204
204
|
require_paths:
|