Top Level Namespace
Defined Under Namespace
Modules: Salad
Classes: YardDocExtractor
Constant Summary
collapse
- SFG_GEMS =
%i[
bananomia bell_pepper bok_choy checkerberry colrapi crawlyflower
hookkaido nasturtium plazucchini syconium wikimelon
].freeze
- SFG_SRC_DIR =
ENV.fetch('SFG_SRC_DIR', File.expand_path('~/src/github.com/speciesfilegroup'))
- GEMS_CONFIG =
SFG_GEMS.each_with_object({}) do |name, h|
h[name] = {
lib: gem_lib_path(name),
test: File.join(SFG_SRC_DIR, name.to_s, 'test')
}
end.freeze
Instance Method Summary
collapse
Instance Method Details
#gem_lib_path(name) ⇒ Object
166
167
168
169
170
|
# File 'lib/salad/generate_gem_help.rb', line 166
def gem_lib_path(name)
Gem::Specification.find_by_name(name.to_s).full_gem_path + "/lib/#{name}.rb"
rescue Gem::MissingSpecError
nil
end
|
#get_gem_api_url(gem_name) ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/salad/generate_gem_help.rb', line 26
def get_gem_api_url(gem_name)
urls = {
bananomia: "https://bionomia.net",
bell_pepper: "https://bels.geo-vocab.org/",
bok_choy: "https://www.biodiversitylibrary.org/api",
checkerberry: "https://verifier.globalnames.org",
colrapi: "https://www.checklistbank.org/api",
crawlyflower: "https://www.marinespecies.org/rest/",
hookkaido: "https://www.ontobee.org",
nasturtium: "https://api.inaturalist.org/v1",
plazucchini: "https://api.plazi.org",
syconium: "https://api.openalex.org",
wikimelon: "https://www.wikidata.org/w/api.php"
}
urls[gem_name] || ""
end
|
#get_gem_description(gem_name) ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/salad/generate_gem_help.rb', line 9
def get_gem_description(gem_name)
descriptions = {
bananomia: "Wrapper for Bionomia API - access specimen and collection records",
bell_pepper: "Wrapper for BELS API - georeference locality descriptions via the Biodiversity Enhanced Location Services",
bok_choy: "Wrapper for BHLnames API - access Biodiversity Heritage Library names data",
checkerberry: "Wrapper for GNverifier API - verify and search scientific names across curated databases",
colrapi: "Wrapper for Catalogue of Life (ChecklistBank) API - access global taxonomic checklists and name data",
crawlyflower: "Wrapper for WoRMS API - access World Register of Marine Species data",
hookkaido: "Wrapper for OWL Ontology API - access ontology data",
nasturtium: "Wrapper for iNaturalist API - access species observations and biodiversity data",
plazucchini: "Wrapper for Plazi TreatmentBank API - access taxonomic treatments and species data",
syconium: "Wrapper for OpenAlex API - access research publications and academic data",
wikimelon: "Wrapper for Wikidata API - access linked open knowledge data"
}
descriptions[gem_name] || "API wrapper for biodiversity data"
end
|