ATDIS
A Ruby interface for reading and validating planning application data feeds that follow the Application Tracking Data Interchange Specification (ATDIS).
This has been developed against ATDIS version 1.0.2.
Source code is available on GitHub at https://github.com/openaustralia/atdis
Requirements
Ruby 3.2 or later.
Installation
Add this line to your application's Gemfile:
gem "atdis"And then execute:
$ bundle
Or install it yourself as:
$ gem install atdis
Usage
Basic usage
require "atdis"
f = ATDIS::Feed.new("http://www.planningalerts.org.au/atdis/feed/1/atdis/1.0", "Sydney")
# Get the first application in the first page of results for all the applications
page = f.applications
app = page.response.first
puts "#{app.application.info.dat_id}: #{app.application.info.description}"DA2013-0381: New pool plus deck
Paging
page.next_pageand
page.previous_pageValidation
page.valid?Development
After checking out the repo, run bundle install to install dependencies.
Then run the tests with:
$ bundle exec rspec
There is also RuboCop for linting:
$ bundle exec rubocop
Releasing a new version
Releases are published to rubygems.org
automatically by GitHub Actions using
RubyGems trusted publishing —
no API keys involved. Merging a version bump to main is all it takes:
- Create a branch off
main, e.g.chore/release-0-6-0 - Bump the version number in
lib/atdis/version.rbfollowing Semantic Versioning - Update
CHANGELOG.md: move the entries under "Unreleased" to a new section for the version you are releasing (with today's date) and update the comparison links at the bottom of the file - Open a pull request and get it reviewed and merged
- When the version bump lands on
main, the Release workflow builds the gem, tags the release (e.g.v0.6.0), pushes the tag and publishes the gem to rubygems.org. If the version inlib/atdis/version.rbhas already been published the workflow does nothing, so it is safe to re-run - Check that the new version appears on rubygems.org and that the tag was pushed
One-time trusted publishing setup (gem owners)
Before the Release workflow can publish, a gem owner must register this repository as a trusted publisher on rubygems.org (this only needs to be done once):
- Sign in to rubygems.org with an account that owns
the
atdisgem - Go to the atdis gem page → Ownership → Trusted publishers (https://rubygems.org/gems/atdis/trusted_publishers)
- Create a new GitHub Actions trusted publisher with:
-
Repository owner:
openaustralia -
Repository name:
atdis -
Workflow filename:
release.yml -
Environment:
release
-
Repository owner:
- In this GitHub repository, create the matching
releaseenvironment (Settings → Environments → New environment). Optionally add protection rules, such as required reviewers, to gate releases
Contributing
Contributions are welcome! This project follows the OpenAustralia Foundation contributing guidelines.
- Fork it
- Create your feature branch (
git checkout -b feature/my-new-feature) - Commit your changes with a sign-off (
git commit -s -am 'Add some feature') - Push to the branch (
git push origin feature/my-new-feature) - Create new Pull Request
License
The gem is available as open source under the terms of the MIT License.