Skip to content

Update dependencies, Ruby versions and packaging (0.1.0) - #10

Merged
woodhull merged 4 commits into
mainfrom
json-3
Nov 12, 2026
Merged

woodhull merged 4 commits into
mainfrom
json-3

Conversation

@woodhull

@woodhull woodhull commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Brings the gem's dependencies, Ruby support and packaging up to date. The public API is unchanged: oauth2 underneath, the same constructor options and methods, and the same OAuth2::Error / NationBuilder::Exceptions::ValidationError errors.

Dependencies

  • json: ~> 2.1 → >= 2.1, so consumers can upgrade to json 3. The gem only calls JSON.parse and JSON.generate, which json 3 keeps as they were.
  • oauth2: >= 0 → ~> 2.0. The Gemfile no longer points at the old controlshift/oauth2 fork. Gemfile sources only apply to this gem's own development, so consumers have always used oauth2 from rubygems. Agra already runs this gem on oauth2 2.1.
  • activesupport: > 3.0.0 → >= 7.0.

Ruby and packaging

  • Requires Ruby 3.3+. CI runs on 3.3, 3.4 and 4.0, for pushes to main and for PRs. Previously it ran only Ruby 2.7, on push.
  • Juwelier is replaced by a plain gemspec and Bundler's gem tasks, with the version in NationBuilder::VERSION. Removed VERSION, .document, .ruby-version and .ruby-gemset.
  • Version is now 0.1.0, because dropping old Rubies is a breaking change for anyone still on them.

Specs

The two pending People specs made a live password-grant request to controlshifttest.nationbuilder.com on every run, including CI, using credentials hardcoded in spec/people_spec.rb. That worked because spec_helper called WebMock.allow_net_connect!. Those specs now stub NationBuilder with WebMock, real connections are blocked, and there's new coverage for match, add, update and add_tagging. The hardcoded credentials stay in git history, so they should be rotated if they're still valid.

Replaces #9.

🤖 Generated with Claude Code

woodhull and others added 2 commits November 12, 2026 18:45
The ~> 2.1 pin stopped consumers upgrading to json 3. The gem only calls
JSON.parse and JSON.generate, which json 3 keeps unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the old controlshift/oauth2 fork from the Gemfile. It only applied
to this gem's own development; consumers already resolve oauth2 from
rubygems, and agra runs this gem on oauth2 2.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@woodhull woodhull changed the title Allow json 3 Allow json 3 and require oauth2 2.x Nov 12, 2026
Replace juwelier with a plain gemspec and Bundler's gem tasks, with the
version in NationBuilder::VERSION. Require Ruby 3.3+ and run CI on 3.3,
3.4 and 4.0 for pushes to main and pull requests.

The pending People specs made a live password-grant request to a real
nation on every run, because spec_helper allowed real connections. They
now stub NationBuilder with WebMock and real connections are blocked.

The public API is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@woodhull woodhull changed the title Allow json 3 and require oauth2 2.x Update dependencies, Ruby versions and packaging (0.1.0) Nov 12, 2026
The fixtures were escaped strings and a Ruby hash literal, so they never
parsed, and the pending specs that referenced them never reached them.
Restore them as JSON, load them in the People#list specs, and use
not_found for an update 404 spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@woodhull woodhull left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@woodhull
woodhull merged commit 65939a9 into main Nov 12, 2026
3 checks passed
@woodhull
woodhull deleted the json-3 branch November 12, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant