data_nexus 0.2.0 → 0.2.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: 3a77e46a3dbaca91a51fa4b1eda5f5f5aa267b1f8c7011d21888de892b19e373
4
- data.tar.gz: 91e3d85cdec6629444eaf4c5a7846be3dbaf876ec00b56cefc12b2bac18b473c
3
+ metadata.gz: 27c91c699abd23dd3463ae2dbe82840f32cb2d0dc8753caec22734c86fda1fd5
4
+ data.tar.gz: 85bf87c4cad24a20ae307b996cdafbcc5827a3f0f8b1f375b4b506d7a28d0715
5
5
  SHA512:
6
- metadata.gz: 3fe4cf797a07bdff2cbe1f1a8ad7689f4ea2ff29396c75896e01acf05e41fe88c51f8f7965655565b8e7078c5205e1eb3aa31d5a8bcb31e26133189db958fe51
7
- data.tar.gz: 575e20457eca50ebbaf258b9fad1d86210a78337c8bfa04a535457843ce83a73687e21f5629e28a2bdb755a7592a38e4745839a54bb830ded1bae3a8670bc0c2
6
+ metadata.gz: fb51987bebd0709461f56093be6c0d3b4ab9dbb151f7f2c5db8c6399050d5f8cf168d1ae4e5bf3b31129ccc838e118c1dce23df78fd41f2c8a3eb0058eed23a3
7
+ data.tar.gz: 7ff0c3784d400e5b28e2fd1ea2d51e27162d8fa759fbda03b05b9aa21e328401a0cb88f5173dfa3c4e8e0372f5c48872c1870bdcff0b34c9d3cf0fc4ca0ab4f5
@@ -0,0 +1,17 @@
1
+ {
2
+ "problemMatcher": [
3
+ {
4
+ "owner": "actionlint",
5
+ "pattern": [
6
+ {
7
+ "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$",
8
+ "file": 1,
9
+ "line": 2,
10
+ "column": 3,
11
+ "message": 4,
12
+ "code": 5
13
+ }
14
+ ]
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,21 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "bundler" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
12
+ cooldown:
13
+ default-days: 7
14
+ # Keeps the SHA-pinned actions in .github/workflows current (SC-6615).
15
+ # Without this entry the pins would never move.
16
+ - package-ecosystem: "github-actions"
17
+ directory: "/"
18
+ schedule:
19
+ interval: "weekly"
20
+ cooldown:
21
+ default-days: 7
@@ -1,5 +1,7 @@
1
1
  name: CI
2
2
 
3
+ permissions:
4
+ contents: read
3
5
  on:
4
6
  push:
5
7
  branches: [main]
@@ -16,10 +18,12 @@ jobs:
16
18
  ruby-version: ["3.0", "3.1", "3.2", "3.4", "4.0"]
17
19
 
18
20
  steps:
19
- - uses: actions/checkout@v4
21
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ with:
23
+ persist-credentials: false
20
24
 
21
25
  - name: Set up Ruby ${{ matrix.ruby-version }}
22
- uses: ruby/setup-ruby@v1
26
+ uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
23
27
  with:
24
28
  ruby-version: ${{ matrix.ruby-version }}
25
29
  bundler-cache: true
@@ -31,10 +35,12 @@ jobs:
31
35
  runs-on: ubuntu-latest
32
36
 
33
37
  steps:
34
- - uses: actions/checkout@v4
38
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
39
+ with:
40
+ persist-credentials: false
35
41
 
36
42
  - name: Set up Ruby
37
- uses: ruby/setup-ruby@v1
43
+ uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
38
44
  with:
39
45
  ruby-version: "3.2"
40
46
  bundler-cache: true
@@ -0,0 +1,80 @@
1
+ name: GitHub Actions Scan
2
+
3
+ # Security (zizmor) and correctness (actionlint) scanning of this repo's own
4
+ # GitHub Actions config (SC-6615). Each job fails on any finding. zizmor covers
5
+ # workflows, composite actions and dependabot.yml; actionlint covers workflows
6
+ # only -- it does not lint the steps of composite actions.
7
+ #
8
+ # Results arrive as annotations on each job's check run (inline on the diff for
9
+ # a PR). GitHub renders at most 10 annotations per step, so the job log is the
10
+ # complete list. The job still fails on any finding, however many are rendered.
11
+ #
12
+ # No path filter, on purpose: a path-filtered workflow never reports on a PR
13
+ # that doesn't touch .github/, so it could never be made a required check.
14
+ # Both jobs finish in well under a minute.
15
+ #
16
+ # Run both locally before pushing a workflow change:
17
+ # GH_TOKEN=$(gh auth token) zizmor . # without a token, online audits are skipped
18
+ # actionlint
19
+ # To suppress a finding, put `# zizmor: ignore[<audit>]` with a reason on the
20
+ # offending line. Disable an audit repo-wide (.github/zizmor.yml) only when it
21
+ # is wrong for the whole repo.
22
+ #
23
+ # The same file runs in every DartHealth repo with workflows (SC-6615);
24
+ # DartHealth/datahub holds the rollout notes. Keep the copies in step.
25
+
26
+ on:
27
+ pull_request:
28
+ push:
29
+ branches:
30
+ - main
31
+
32
+ permissions:
33
+ contents: read
34
+
35
+ jobs:
36
+ zizmor:
37
+ name: zizmor
38
+ runs-on: ubuntu-latest
39
+ timeout-minutes: 5
40
+ steps:
41
+ - name: Checkout repository
42
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
43
+ with:
44
+ persist-credentials: false
45
+
46
+ - name: Run zizmor
47
+ uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4
48
+ with:
49
+ # Annotations, not SARIF. In SARIF mode zizmor exits 0 whatever it
50
+ # finds, so `advanced-security: true` would quietly turn this gate
51
+ # into an advisory check -- even on a repo that has Code Scanning.
52
+ advanced-security: false
53
+ annotations: true
54
+ # `version` is left at its default, `latest`, which the action
55
+ # resolves to the digest-pinned zizmor image it shipped with. So the
56
+ # SHA pin above also pins zizmor, and a Dependabot bump of this action
57
+ # is the zizmor upgrade.
58
+
59
+ actionlint:
60
+ name: actionlint
61
+ runs-on: ubuntu-latest
62
+ timeout-minutes: 5
63
+ steps:
64
+ - name: Checkout repository
65
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
66
+ with:
67
+ persist-credentials: false
68
+
69
+ # Turns actionlint's output into PR annotations. The matcher file is
70
+ # upstream's, copied verbatim at the same version as the image below.
71
+ - name: Register actionlint problem matcher
72
+ run: echo "::add-matcher::.github/actionlint-matcher.json"
73
+
74
+ # The image bundles shellcheck, so `run:` blocks are checked too. This is
75
+ # a digest-pinned docker:// reference, which Dependabot may not bump:
76
+ # update it by hand, and re-copy the matcher from the same tag.
77
+ - name: Run actionlint
78
+ uses: docker://rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
79
+ with:
80
+ args: -color
@@ -0,0 +1,78 @@
1
+ name: Release
2
+
3
+ permissions:
4
+ contents: read
5
+
6
+ on:
7
+ release:
8
+ types: [published]
9
+
10
+ jobs:
11
+ release:
12
+ runs-on: ubuntu-latest
13
+
14
+ # OIDC trusted publishing: id-token lets us mint a short-lived, gem-scoped
15
+ # RubyGems credential instead of a stored API key. No contents: write is
16
+ # needed -- this job builds and pushes the gem but does not push a git tag
17
+ # (the tag already exists; this workflow is triggered by release:published).
18
+ #
19
+ # No GitHub Environment / approval gate is configured (SC-6688). Trusted
20
+ # publishing already scopes publishing to this repo + workflow, which closes
21
+ # the finding on its own. An environment would add a human-approval gate on
22
+ # publishing; deferred as defense-in-depth. To add it later: register the
23
+ # environment name on the gem's trusted publisher at rubygems.org, add an
24
+ # `environment:` key here, and create a matching environment (with required
25
+ # reviewers) in the repo settings.
26
+ permissions:
27
+ contents: read
28
+ id-token: write
29
+
30
+ steps:
31
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32
+ with:
33
+ persist-credentials: false
34
+
35
+ # No bundler cache in this job (zizmor cache-poisoning). This job
36
+ # publishes the gem, and any workflow run on this repo can write the
37
+ # cache, so a restored cache could hand the release poisoned
38
+ # dependencies. A fresh install costs seconds.
39
+ - name: Set up Ruby
40
+ uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
41
+ with:
42
+ ruby-version: "3.2"
43
+
44
+ - name: Install dependencies
45
+ run: bundle install
46
+
47
+ - name: Run tests
48
+ run: bundle exec rspec
49
+
50
+ - name: Verify release tag matches gemspec
51
+ run: |
52
+ GEM_VERSION=$(ruby -r ./lib/data_nexus/version -e "puts DataNexus::VERSION")
53
+ TAG_VERSION=${GITHUB_REF_NAME#v}
54
+ if [ "$GEM_VERSION" != "$TAG_VERSION" ]; then
55
+ echo "::error::Version mismatch: gemspec has $GEM_VERSION but tag is $TAG_VERSION"
56
+ exit 1
57
+ fi
58
+ echo "Version verified: $GEM_VERSION"
59
+
60
+ - name: Build gem
61
+ id: build
62
+ run: |
63
+ gem build data_nexus.gemspec
64
+ GEM_FILE=$(ls data_nexus-*.gem)
65
+ echo "gem_file=$GEM_FILE" >> "$GITHUB_OUTPUT"
66
+ echo "Built: $GEM_FILE"
67
+
68
+ # Exchanges the GitHub OIDC token for a short-lived RubyGems credential
69
+ # via trusted publishing, so no API key is stored. Requires a trusted
70
+ # publisher registered for the data_nexus gem on rubygems.org
71
+ # (repo DartHealth/datanexus-ruby, workflow release.yml).
72
+ - name: Configure RubyGems credentials
73
+ uses: rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a # v2.1.0
74
+
75
+ - name: Push to RubyGems
76
+ run: gem push "$GEM_FILE"
77
+ env:
78
+ GEM_FILE: ${{ steps.build.outputs.gem_file }}
data/AGENTS.md ADDED
@@ -0,0 +1,59 @@
1
+ # Agents Guide
2
+
3
+ ## Project Overview
4
+
5
+ `data_nexus` is a Ruby client gem for Dart Health's Data Nexus API. It wraps the API using Faraday and provides resource-based access.
6
+
7
+ ## Structure
8
+
9
+ - `lib/data_nexus/` - Main gem code
10
+ - `client.rb` - Entry point for API interactions
11
+ - `configuration.rb` - Config (API keys, base URL, etc.)
12
+ - `connection.rb` - Faraday HTTP connection setup
13
+ - `resources/` - API resource classes
14
+ - `collection.rb` - Collection handling
15
+ - `errors.rb` - Custom error classes
16
+ - `version.rb` - Gem version (bump here for releases)
17
+ - `spec/` - RSpec tests
18
+ - `.github/workflows/` - CI and release automation
19
+
20
+ ## Development
21
+
22
+ - Ruby >= 3.0.0
23
+ - Run `bundle install` to install dependencies
24
+ - Run `bundle exec rspec` to run tests
25
+ - Run `bundle exec rubocop` to lint
26
+
27
+ ## GitHub Actions scanning
28
+
29
+ `.github/workflows/github-actions-scan.yml` runs zizmor (security) and actionlint (correctness) on every PR and on every push to `main`, and fails on any finding. Before pushing a workflow change, run both locally:
30
+
31
+ - `GH_TOKEN=$(gh auth token) zizmor .` (without a token, zizmor skips its online audits)
32
+ - `actionlint`
33
+
34
+ Pin every action to a full commit SHA, with the exact version in a comment; `pinact run` does this. Dependabot keeps the pins current. To suppress a finding, add `# zizmor: ignore[<audit>]` with a reason on the offending line.
35
+
36
+ ## Releasing
37
+
38
+ 1. Bump the version in `lib/data_nexus/version.rb`
39
+ 2. Merge to `main`
40
+ 3. Create a GitHub Release with tag `vX.Y.Z` matching the version
41
+ 4. The release workflow runs tests, verifies the version/tag match, builds, and pushes to RubyGems
42
+
43
+ ## When to Suggest a Release
44
+
45
+ Only suggest a release when there are meaningful changes to the gem's shipped code (anything under `lib/`). Changes that do NOT warrant a release on their own:
46
+ - Dependabot dependency bumps (dev dependencies, Gemfile.lock-only changes)
47
+ - CI/workflow config changes
48
+ - Test-only changes
49
+ - Documentation updates
50
+
51
+ Changes that DO warrant a release:
52
+ - Bug fixes in `lib/`
53
+ - New features or API changes
54
+ - Updates to runtime dependencies in the gemspec (e.g., bumping `faraday` constraint)
55
+
56
+ ## Key Dependencies
57
+
58
+ - `faraday` (~> 2.0) - HTTP client
59
+ - `faraday-retry` (~> 2.0) - Retry middleware
data/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ @AGENTS.md
data/README.md CHANGED
@@ -4,14 +4,6 @@ Ruby client for the DataNexus API.
4
4
 
5
5
  ## Installation
6
6
 
7
- Install from GitHub (before gem is published):
8
-
9
- ```ruby
10
- gem 'data_nexus', git: 'https://github.com/DartHealth/datanexus-ruby.git', tag: 'v0.1.0'
11
- ```
12
-
13
- Or from RubyGems (once published):
14
-
15
7
  ```ruby
16
8
  gem 'data_nexus'
17
9
  ```
@@ -21,7 +13,7 @@ gem 'data_nexus'
21
13
  ```ruby
22
14
  client = DataNexus::Client.new(
23
15
  api_key: ENV['DATANEXUS_API_KEY'],
24
- base_url: 'https://api.datanexus.com' # optional
16
+ base_url: 'https://datanexus.darthealth.com' # optional
25
17
  )
26
18
  ```
27
19
 
@@ -6,13 +6,13 @@ module DataNexus
6
6
  # @example Configure the client globally
7
7
  # DataNexus.configure do |config|
8
8
  # config.api_key = "your_api_key"
9
- # config.base_url = "https://api.datanexus.com"
9
+ # config.base_url = "https://datanexus.darthealth.com"
10
10
  # end
11
11
  #
12
12
  # @example Create a configuration instance
13
13
  # config = DataNexus::Configuration.new(
14
14
  # api_key: "your_api_key",
15
- # base_url: "https://api.datanexus.com"
15
+ # base_url: "https://datanexus.darthealth.com"
16
16
  # )
17
17
  #
18
18
  class Configuration
@@ -32,7 +32,7 @@ module DataNexus
32
32
  attr_accessor :ssl_verify
33
33
 
34
34
  # Default base URL for the DataNexus API
35
- DEFAULT_BASE_URL = 'https://api.datanexus.com'
35
+ DEFAULT_BASE_URL = 'https://datanexus.darthealth.com'
36
36
 
37
37
  # Default request timeout in seconds
38
38
  DEFAULT_TIMEOUT = 30
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DataNexus
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.2'
5
5
  end
data/lib/data_nexus.rb CHANGED
@@ -34,7 +34,7 @@ module DataNexus
34
34
  # @example
35
35
  # DataNexus.configure do |config|
36
36
  # config.api_key = "your_api_key"
37
- # config.base_url = "https://api.datanexus.com"
37
+ # config.base_url = "https://datanexus.darthealth.com"
38
38
  # end
39
39
  #
40
40
  # @yield [Configuration]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_nexus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Kibler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-02-04 00:00:00.000000000 Z
11
+ date: 2026-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -38,17 +38,23 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.0'
41
- description: A Ruby gem for interacting with the Dart Health's DataNexus API.
41
+ description: A Ruby gem for interacting with Dart Health's Data Nexus API.
42
42
  email:
43
43
  - alexkibler@me.com
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ".github/actionlint-matcher.json"
49
+ - ".github/dependabot.yml"
48
50
  - ".github/workflows/ci.yml"
51
+ - ".github/workflows/github-actions-scan.yml"
52
+ - ".github/workflows/release.yml"
49
53
  - ".mise.local.toml.example"
50
54
  - ".mise.toml"
51
55
  - ".rubocop.yml"
56
+ - AGENTS.md
57
+ - CLAUDE.md
52
58
  - README.md
53
59
  - Rakefile
54
60
  - lib/data_nexus.rb
@@ -88,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
94
  - !ruby/object:Gem::Version
89
95
  version: '0'
90
96
  requirements: []
91
- rubygems_version: 3.5.9
97
+ rubygems_version: 3.4.19
92
98
  signing_key:
93
99
  specification_version: 4
94
100
  summary: Ruby client for the DataNexus API