Module: AtlasRb
- Defined in:
- lib/atlas_rb.rb,
lib/atlas_rb/blob.rb,
lib/atlas_rb/mash.rb,
lib/atlas_rb/work.rb,
lib/atlas_rb/admin.rb,
lib/atlas_rb/version.rb,
lib/atlas_rb/delegate.rb,
lib/atlas_rb/file_set.rb,
lib/atlas_rb/resource.rb,
lib/atlas_rb/community.rb,
lib/atlas_rb/admin/work.rb,
lib/atlas_rb/collection.rb,
lib/atlas_rb/system/user.rb,
lib/atlas_rb/configuration.rb,
lib/atlas_rb/authentication.rb,
lib/atlas_rb/faraday_helper.rb,
lib/atlas_rb/admin/community.rb,
lib/atlas_rb/admin/collection.rb
Overview
Ruby client for the Atlas API — Northeastern University's institutional digital repository.
Configuration
Two environment variables drive every request:
ATLAS_URL— base URL of the Atlas API (e.g.https://atlas.example.edu).ATLAS_TOKEN— bearer token sent in theAuthorizationheader.
Authentication additionally accepts an NUID (Northeastern
University ID) which is forwarded in a User: NUID <nuid> header so the
server can resolve the acting user.
Resource hierarchy
{AtlasRb::Community} → {AtlasRb::Collection} → {AtlasRb::Work}
↓
{AtlasRb::FileSet}
↓
{AtlasRb::Blob}
- Community — top-level org unit; may nest sub-Communities.
- Collection — holds Works; lives directly under a Community.
- Work — the bibliographic unit (article, thesis, dataset…); MODS metadata is attached here.
- FileSet — classified slot under a Work that owns one Blob.
- Blob — the binary bytes themselves; supports streaming downloads via Blob.content.
Quick start
Defined Under Namespace
Modules: Admin, FaradayHelper, System Classes: Authentication, Blob, Collection, Community, Configuration, Delegate, Error, FileSet, Mash, Reset, Resource, Work
Constant Summary collapse
- VERSION =
Current gem version, read from the
.versionfile at the repo root at load time. File.read(".version").strip
Class Method Summary collapse
-
.config ⇒ AtlasRb::Configuration
The gem-wide configuration instance.
-
.configure {|config| ... } ⇒ AtlasRb::Configuration
Yield the configuration for registration.
Class Method Details
.config ⇒ AtlasRb::Configuration
The gem-wide configuration instance. Lazily initialized — host applications register defaults via configure.
81 82 83 |
# File 'lib/atlas_rb.rb', line 81 def self.config @config ||= Configuration.new end |
.configure {|config| ... } ⇒ AtlasRb::Configuration
Yield the configuration for registration.
When default_nuid or default_on_behalf_of are set, resource methods
that take nuid: / on_behalf_of: kwargs will fall through to the
registered callables whenever the caller omits the kwarg (or passes
nil). Caller-passed values always win.
100 101 102 103 |
# File 'lib/atlas_rb.rb', line 100 def self.configure yield config config end |