colrapi 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +1 -1
- data/.gitignore +2 -1
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/colrapi.gemspec +2 -8
- data/lib/colrapi/request.rb +2 -1
- data/lib/colrapi/version.rb +1 -1
- data/lib/colrapi.rb +3 -2
- metadata +25 -20
- data/Gemfile.lock +0 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd57d805f97201c9f050d7af940ebcca77e853f7b43ca5c7282225789817a083
|
4
|
+
data.tar.gz: d86a91635ea40384db919990728e4f14e164b6915910ba066b0fd6439743fe6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82125cb4367f4ced07316de2c1bec8ae2401b176ff9844f23fbb5400d4304667dec532070f0d1b7d5b021ec86646167e649df7c89859339b37c6bed7ec91da8e
|
7
|
+
data.tar.gz: 9159517b23fc36d214d6e0c1fc611c15d027c2dc58409c859f8c3486728305526d2ec1508c564ebc7ad6bc1bf21e047d989ea08dce8346bdecbee15c05b34ca9
|
data/.github/workflows/main.yml
CHANGED
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -29,7 +29,7 @@ In development, this is it for now:
|
|
29
29
|
|
30
30
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
31
31
|
|
32
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, update the `CHANGELOG.md`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
33
33
|
|
34
34
|
## Contributing
|
35
35
|
|
data/colrapi.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = "colrapi (a play on Kholrabi) is a low-level wrapper around the Catalog of Life API."
|
13
13
|
s.homepage = "https://github.com/SpeciesFileGroup/colrapi"
|
14
14
|
s.license = "NCSA"
|
15
|
-
s.required_ruby_version = ">= 2.
|
15
|
+
s.required_ruby_version = ">= 2.5.0"
|
16
16
|
|
17
17
|
# s.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'"
|
18
18
|
|
@@ -33,22 +33,16 @@ Gem::Specification.new do |s|
|
|
33
33
|
# s.add_dependency "example-gem", "~> 1.0"
|
34
34
|
|
35
35
|
s.add_development_dependency "bundler", "~> 2.1", ">= 2.1.4"
|
36
|
-
# s.add_development_dependency "codecov", "~> 0.5.0"
|
37
|
-
# s.add_development_dependency "json", "~> 2.3", ">= 2.3.1"
|
38
36
|
s.add_development_dependency "rake", "~> 13.0", ">= 13.0.1"
|
39
|
-
# s.add_development_dependency "standard", "~> 1.0"
|
40
|
-
# s.add_development_dependency "simplecov", "~> 0.21.2"
|
41
37
|
s.add_development_dependency "test-unit", "~> 3.3", ">= 3.3.6"
|
42
38
|
s.add_development_dependency "vcr", "~> 6.0"
|
43
39
|
s.add_development_dependency "webmock", "~> 3.18"
|
40
|
+
s.add_development_dependency "rexml", "~> 3.3", ">= 3.3.6"
|
44
41
|
|
45
42
|
s.add_runtime_dependency "faraday", "~> 2.2"
|
46
43
|
s.add_runtime_dependency "faraday-follow_redirects", ">= 0.1", "< 0.4"
|
47
44
|
s.add_runtime_dependency "multi_json", "~> 1.15"
|
48
45
|
|
49
|
-
# TODO: comment out
|
50
|
-
s.add_development_dependency "byebug"
|
51
|
-
|
52
46
|
# s.add_runtime_dependency "thor", "~> 1.0", ">= 1.0.1"
|
53
47
|
|
54
48
|
# For more information and examples about making a new gem, checkout our
|
data/lib/colrapi/request.rb
CHANGED
@@ -17,6 +17,7 @@ module Colrapi
|
|
17
17
|
@url = args[:url]
|
18
18
|
@q = Array(args[:q]) if args[:q]
|
19
19
|
@id = args[:id]
|
20
|
+
@attempt = args[:attempt]
|
20
21
|
@format = args[:format]
|
21
22
|
@regexp = args[:regexp]
|
22
23
|
@content = Array(args[:content]) if args[:content]
|
@@ -108,7 +109,7 @@ module Colrapi
|
|
108
109
|
|
109
110
|
def perform
|
110
111
|
|
111
|
-
args = { q: @q, regex: @regexp, content: @content, name: @name, authorship: @authorship, code: @code, type: @type,
|
112
|
+
args = { q: @q, regex: @regexp, attempt: @attempt, content: @content, name: @name, authorship: @authorship, code: @code, type: @type,
|
112
113
|
rank: @rank, minRank: @min_rank, maxRank: @max_rank, parentRank: @parent_rank, projectKey: @project_id,
|
113
114
|
term: @term, termOp: @term_operator, status: @status, decisionMode: @decision_mode,
|
114
115
|
alias: @short_title, private: @private, releasedFrom: @released_from, contributesTo: @contributes_to,
|
data/lib/colrapi/version.rb
CHANGED
data/lib/colrapi.rb
CHANGED
@@ -25,11 +25,12 @@ module Colrapi
|
|
25
25
|
# Get a dataset's original archive
|
26
26
|
#
|
27
27
|
# @param dataset_id [String] The dataset id
|
28
|
+
# @param attempt [Integer] Returns archive for a past import attempt number
|
28
29
|
#
|
29
30
|
# @return [Binary] An archive of the original dataset
|
30
|
-
def self.archive(dataset_id, verbose: false)
|
31
|
+
def self.archive(dataset_id, attempt: nil, verbose: false)
|
31
32
|
endpoint = "dataset/#{dataset_id}/archive"
|
32
|
-
Request.new(endpoint: endpoint, verbose: verbose).perform
|
33
|
+
Request.new(endpoint: endpoint, attempt: attempt, verbose: verbose).perform
|
33
34
|
end
|
34
35
|
|
35
36
|
# Get dataset metadata
|
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.2
|
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:
|
11
|
+
date: 2024-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,6 +98,26 @@ dependencies:
|
|
98
98
|
- - "~>"
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '3.18'
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
name: rexml
|
103
|
+
requirement: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - "~>"
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '3.3'
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.3.6
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.3'
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 3.3.6
|
101
121
|
- !ruby/object:Gem::Dependency
|
102
122
|
name: faraday
|
103
123
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,20 +166,6 @@ dependencies:
|
|
146
166
|
- - "~>"
|
147
167
|
- !ruby/object:Gem::Version
|
148
168
|
version: '1.15'
|
149
|
-
- !ruby/object:Gem::Dependency
|
150
|
-
name: byebug
|
151
|
-
requirement: !ruby/object:Gem::Requirement
|
152
|
-
requirements:
|
153
|
-
- - ">="
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
version: '0'
|
156
|
-
type: :development
|
157
|
-
prerelease: false
|
158
|
-
version_requirements: !ruby/object:Gem::Requirement
|
159
|
-
requirements:
|
160
|
-
- - ">="
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
version: '0'
|
163
169
|
description: colrapi (a play on Kholrabi) is a low-level wrapper around the Catalog
|
164
170
|
of Life API.
|
165
171
|
email:
|
@@ -173,7 +179,6 @@ files:
|
|
173
179
|
- CHANGELOG.md
|
174
180
|
- CODE_OF_CONDUCT.md
|
175
181
|
- Gemfile
|
176
|
-
- Gemfile.lock
|
177
182
|
- LICENSE.txt
|
178
183
|
- README.md
|
179
184
|
- Rakefile
|
@@ -193,7 +198,7 @@ licenses:
|
|
193
198
|
metadata:
|
194
199
|
homepage_uri: https://github.com/SpeciesFileGroup/colrapi
|
195
200
|
source_code_uri: https://github.com/SpeciesFileGroup/colrapi
|
196
|
-
changelog_uri: https://github.com/SpeciesFileGroup/colrapi/releases/tag/v0.1.
|
201
|
+
changelog_uri: https://github.com/SpeciesFileGroup/colrapi/releases/tag/v0.1.2
|
197
202
|
post_install_message:
|
198
203
|
rdoc_options: []
|
199
204
|
require_paths:
|
@@ -202,14 +207,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
202
207
|
requirements:
|
203
208
|
- - ">="
|
204
209
|
- !ruby/object:Gem::Version
|
205
|
-
version: 2.
|
210
|
+
version: 2.5.0
|
206
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
212
|
requirements:
|
208
213
|
- - ">="
|
209
214
|
- !ruby/object:Gem::Version
|
210
215
|
version: '0'
|
211
216
|
requirements: []
|
212
|
-
rubygems_version: 3.
|
217
|
+
rubygems_version: 3.5.11
|
213
218
|
signing_key:
|
214
219
|
specification_version: 4
|
215
220
|
summary: Catalog of Life Client
|
data/Gemfile.lock
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
colrapi (0.1.1)
|
5
|
-
faraday (~> 2.2)
|
6
|
-
faraday-follow_redirects (>= 0.1, < 0.4)
|
7
|
-
multi_json (~> 1.15)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
addressable (2.8.1)
|
13
|
-
public_suffix (>= 2.0.2, < 6.0)
|
14
|
-
byebug (11.1.3)
|
15
|
-
crack (0.4.5)
|
16
|
-
rexml
|
17
|
-
faraday (2.7.4)
|
18
|
-
faraday-net_http (>= 2.0, < 3.1)
|
19
|
-
ruby2_keywords (>= 0.0.4)
|
20
|
-
faraday-follow_redirects (0.3.0)
|
21
|
-
faraday (>= 1, < 3)
|
22
|
-
faraday-net_http (3.0.2)
|
23
|
-
hashdiff (1.0.1)
|
24
|
-
minitest (5.15.0)
|
25
|
-
multi_json (1.15.0)
|
26
|
-
power_assert (2.0.1)
|
27
|
-
public_suffix (5.0.1)
|
28
|
-
rake (13.0.6)
|
29
|
-
rexml (3.2.5)
|
30
|
-
ruby2_keywords (0.0.5)
|
31
|
-
rubyzip (2.3.2)
|
32
|
-
test-unit (3.5.3)
|
33
|
-
power_assert
|
34
|
-
vcr (6.0.0)
|
35
|
-
webmock (3.18.1)
|
36
|
-
addressable (>= 2.8.0)
|
37
|
-
crack (>= 0.3.2)
|
38
|
-
hashdiff (>= 0.4.0, < 2.0.0)
|
39
|
-
|
40
|
-
PLATFORMS
|
41
|
-
x86_64-linux
|
42
|
-
|
43
|
-
DEPENDENCIES
|
44
|
-
bundler (~> 2.1, >= 2.1.4)
|
45
|
-
byebug
|
46
|
-
colrapi!
|
47
|
-
minitest (~> 5.0)
|
48
|
-
rake (~> 13.0)
|
49
|
-
rubyzip
|
50
|
-
test-unit (~> 3.3, >= 3.3.6)
|
51
|
-
vcr (~> 6.0)
|
52
|
-
webmock (~> 3.18)
|
53
|
-
|
54
|
-
BUNDLED WITH
|
55
|
-
2.3.24
|