https://github.com/nhsdigital/ndr_support
National Disease Registers support gem
https://github.com/nhsdigital/ndr_support
Last synced: 7 months ago
JSON representation
National Disease Registers support gem
- Host: GitHub
- URL: https://github.com/nhsdigital/ndr_support
- Owner: NHSDigital
- License: mit
- Created: 2015-07-24T08:27:37.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2025-02-05T19:40:13.000Z (12 months ago)
- Last Synced: 2025-06-06T20:07:20.376Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 976 KB
- Stars: 4
- Watchers: 15
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# NdrSupport [](https://github.com/NHSDigital/ndr_support/actions?query=workflow%3Atest) [](https://rubygems.org/gems/ndr_support)
This is the NHS England (NHS-E) National Disease Registration Service (NDRS) Support ruby gem, providing:
1. core ruby class extensions;
2. additional time, regular expression, file security, password checking/generation, and encoding classes.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'ndr_support'
```
And then execute:
$ bundle
Or install it yourself by cloning the project, then executing:
$ gem install ndr_support.gem
## Usage
ndr_support extends/overrides the following core classes/modules:
- Array
- Hash
- Integer
- NilClass
- String
- Time
ndr_support adds the following classes:
- Daterange
- NdrSupport::Password
- Ourdate
- Ourtime
- RegexpRange
- SafeFile
- SafePath
- UTF8Encoding
### YAML Serialization Wrapper
ndr_support also provides a lightweight wrapper around YAML serialization to provide support for YAML engines and string encodings. This behavour is not enabled by default.
To enable this add the following line to your code:
```ruby
include NdrSupport::YAML::SerializationMigration
```
## Contributing
1. Fork it ( https://github.com/NHSDigital/ndr_support/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
## Test Data
All test data in this repository is fictitious. Any resemblance to real persons, living or dead, is purely coincidental.
Note: Real codes exist in the tests, postcodes for example, but bear no relation to real patient data. Please ensure that you *always* only ever commit dummy data when contributing to this project.