Skip to content

Commit 8488334

Browse files
authored
Set required Ruby version and document RubyGems install (#41)
The gem name on RubyGems now belongs to this project. Require Ruby 3.3, the oldest version in the CI matrix, and point the README at RubyGems instead of git. The README also says that the 0.x versions are c7/personnummer and have a different API.
1 parent 5bf77ff commit 8488334

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
Validate personal identity numbers.
44

5+
Versions 0.x of the `personnummer` gem are a different library, [c7/personnummer](https://github.com/c7/personnummer) by Peter Hellberg, who handed the gem name over to this project. They are still on RubyGems, and a Gemfile with `gem 'personnummer', '~> 0.1'` keeps getting them. The API there is `Personnummer.new('830428-5912').valid?`, here it is `Personnummer.valid?('830428-5912')`.
6+
57
## Installation
68

79
Add this to your `Gemfile`
810

911
```
10-
gem 'personnummer', :git => 'https://github.com/personnummer/ruby.git'
12+
gem 'personnummer'
1113
```
1214

1315
Then run `bundle install`

‎personnummer.gemspec‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Gem::Specification.new do |s|
1515
s.require_paths = ["lib"]
1616
s.homepage = 'https://github.com/personnummer/ruby'
1717
s.license = 'MIT'
18+
# The oldest Ruby in the CI matrix.
19+
s.required_ruby_version = '>= 3.3'
1820
s.add_development_dependency 'rake'
1921
s.add_development_dependency 'minitest'
2022
s.add_development_dependency 'timecop'

0 commit comments

Comments
 (0)