README.md in iceland-0.1.11 vs README.md in iceland-0.1.12

- old
+ new

@@ -28,11 +28,11 @@ Icelandic postal codes are 3-digit numeric identifiers, with the first digit indicating a region and the rest identifying a specific locale within the region. Names of locales are provided in dative form by default as per Icelandic postal convention, but nomative forms can be returned by setting the `force_nominative` parameter to `true` when using the `Iceland.all_postal_codes` and `Iceland.locale_by_postal_code` methods. -(Note that we use the term "locale" as per Universal Postal Union convention to name town, city or other location the postal code is assigned to.) +(Note that we use the term "locale" as per Universal Postal Union convention to name the town, city or other location the postal code is assigned to.) #### Examples ```ruby # Get all postal codes, skipping codes assigned to P.O. boxes. @@ -60,11 +60,11 @@ ### The Kennitala Class The Iceland Gem provides a class to handle "kennitala" identifier codes. The class can be used to sanitize the identifiers and read information like the date of birth (or date of registration in the case of companies and organization), age and the type of entity. -The class does not access external APIs or databases such National Registry or the Company Registry, so names and status (death, bankruptcy, credit rating etc.) cannot be accessed using the class. However, it can be used to sanitize and validate such data before being sent to external APIs, as such services are provided by private companies, which often charge a specific amount for each query. +The class does not access external APIs or databases such National Registry or the Company Registry, so names and status (sex/gender, death, bankruptcy, credit rating etc.) cannot be accessed using the class. However, it can be used to sanitize and validate such data before being sent to external APIs, as such services are provided by private companies, which often charge a specific amount for each query. #### Uses of kennitala Unlike the US Social Security number and equivalents, the kennitala is only used for identification of persons and companies (as well as other registered organizations) — and is often used internally by educational institutions, companies and other organization as a primary identifier for persons (e.g. school, employee, customer and frequent flyer ID). It is not to be used for authentication (i.e. a password) and is not considered a secret per se. While a kennitala can be kept unencrypted in a database, publishing a kennitala or a list of them is generally not considered good practice and might cause liability. @@ -86,12 +86,13 @@ ##### Working with Kennitala objects ```ruby # Initialize a Kennitala object. -# The string provided may include spaces and hyphens. -k = Kennitala.new('010130-2989') +# The string provided may include spaces, hyphens and alphabetical characters, +# which will then be erased from the resulting string. +k = Kennitala.new(' 010130-2989') # => #<Kennitala:0x007fe35d041bc0 @value="0101302989"> # Invalid strings are rejected with an argument error f = Kennitala.new('010130-2979') # ArgumentError: Kennitala is invalid @@ -141,11 +142,11 @@ ##### Casting strings ```ruby # Casting a string to a Kennitala object -'0101302989'.to_kt +'010130 2989'.to_kt # => #<Kennitala:0x007fc5893286a0 @value="0101302989"> # Get the current age based on a String '0101302989'.to_kt.age # => 86 @@ -153,10 +154,11 @@ ## Todo * Administrative Divisions * Bank accounts +* Car plate numbers ## About the data The Postal code data is based on data files provided by Iceland Post. The files are available at http://www.postur.is/um-postinn/posthus/postnumer/gagnaskrar/ and are provided for free for any use by individuals and organizations. @@ -170,10 +172,10 @@ ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/stefanvignir/iceland_gem. -Do make sure that the `rspec` unit tests run before sending a pull request (hint: try running `rspec` a couple of times in a row as some tests might fail randomly) and write tests for any new functionality you add. Also run `rubocop` to check if your code adheres to the Ruby Style Guide. +Do make sure that the `rspec` unit tests run before sending a pull request and write tests for any new functionality you add. Also run `rubocop` to check if your code adheres to the Ruby Style Guide and other conventions. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).