Giter VIP home page Giter VIP logo

ndr_support's Introduction

NdrSupport Build Status Gem Version

This is the Public Health England (PHE) National Disease Registers (NDR) 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:

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:

include NdrSupport::YAML::SerializationMigration

Contributing

  1. Fork it ( https://github.com/PublicHealthEngland/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.

ndr_support's People

Contributors

bshand avatar drewthorp avatar joecatling avatar joshpencheon avatar kenny-lee-1 avatar ollietulloch avatar pauleves avatar timgentry avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ndr_support's Issues

Replace PHE references with NHS Digital

With the move to NHS Digital, references to PHE need to be replaced across all the files in the project (regexs show case insensitivity):

  • Replace /raw.githubusercontent.com/PublicHealthEngland/i with raw.githubusercontent.com/NHSDigital
  • Replace /github.com/publichealthengland/i with github.com/NHSDigital
  • Replace /\bPHE\b/ with NHSD
  • Replace Public Health England with NHS Digital
  • Replace PublicHealthEngland with NHSDigital
  • Check LICENSE.txt copyright date range is up to date
  • Add /.rubocop-https---raw-githubusercontent-com-NHSDigital-ndr-dev-support-master--rubocop-yml to .gitignore (leave in the old PHE .rubocop cache reference)

Thread scanner tests failing

As a developer.
I need to be able to run all the tests reliably.
It's done when the thread scanner test no longer report missing method errors

Julian date conversion fails with some Ruby versions

The integer/julian_date_conversions.rb file is missing a require 'ndr_support/ourdate'. This causes an uncaught exception ('uninitialized constant Integer::Ourdate') with certain ruby versions under certain circumstance (Presumably sue to variances in auto-loading).

Fix deprecations with Ruby 2.4.0

Fixnum has been unified, so this gem now raises deprecation warnings:

ndr_support-5.0.0/lib/ndr_support/fixnum/julian_date_conversions.rb:4: warning: constant ::Fixnum is deprecated

We should address in way that is backwards-compatible with previous rubies.

Partition / Deprecate / Remove legacy logic from NdrSupport

Some of the code in NdrSupport was extracted from legacy systems. It would not always be desirable to add this blindly to other projects.

Some of this logic has been encapsulated (e.g. NdrSupport.attempt_date_patch!), but in the current release is still active-by-default.

We should list methods that are undesirable (resp. unused by internal NDR projects!?), and put them through a deprecation cycle, after which they would be disabled-by-default (resp. removed entirely).

@timgentry, does this sound sensible?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.