isni 1.0 → 1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG +6 -0
  3. data/README.markdown +35 -0
  4. data/lib/isni.rb +1 -1
  5. metadata +10 -12
  6. data/README.rdoc +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 377dcc23aef9b2c95633d4cb5c9c1e8352dbe04d
4
- data.tar.gz: 13512e9cfc1c1526b53d991c3b305cbc32c6d0a0
2
+ SHA256:
3
+ metadata.gz: 5cdba762f192bf1cc94c459e3e570bd81781247bdb6cb9923e302e08cf61acbe
4
+ data.tar.gz: 54b8938f9f0b2f97601357c16463cae121a77612ca9118788e6c03d42c6f1b9b
5
5
  SHA512:
6
- metadata.gz: f927d203e32ed77938351662c3405364aa80114d47199d0010b992c721f03598bbe1bda97a0fb7d1ebcdad64b53a33b873c12b9963c4f14d343f728eee32e5c0
7
- data.tar.gz: b239687d6f6df4b7a157407155fa47b1878dc13d6fbcdb8fab5f8fe09fa6f4604e42402ca8bcb92b0c59983879a4357a326adea126bdb18ceec4656d21cfb83c
6
+ metadata.gz: 7bec4d0f3f1958821734b6bda7d8e4ee5951f1e3d9eef3d8eab858b695a9d392e003c5d585ecbefc34232bab4d1a00eecd84972260a277cdbb2017762af285a9
7
+ data.tar.gz: 37739803eea6f8d255bd44c30cd1e9fc26527fec63295d1cb8821867dd2c0296e26ae605573c77d503568575df8aaaf8d736690b77dabf0fdbe8e4481665b907
data/CHANGELOG CHANGED
@@ -1,2 +1,8 @@
1
+ v1.2 (2nd December 2022)
2
+ - Fix bug in checksum calculations for some identifiers ([#1](https://github.com/yob/isni/pull/1))
3
+
4
+ v1.1 (16th July 2017)
5
+ - Updated packaging to work well with ruby 1.9.3 to 2.4
6
+
1
7
  v1.0 (7th August 2014)
2
8
  - Initial Release
data/README.markdown ADDED
@@ -0,0 +1,35 @@
1
+ A small class for generating and validating Internation Standard Name
2
+ Identifiers (ISNI). This will also work just fine with ORCID, a subset
3
+ of ISNI.
4
+
5
+ # Installation
6
+
7
+ gem install isni
8
+
9
+ # Usage
10
+
11
+ ISNI.new("000000029534656X").valid?
12
+ => true
13
+
14
+ ISNI.valid?("000000029534656X")
15
+ => true
16
+
17
+ ISNI.valid?("0000000295346560")
18
+ => false
19
+
20
+ ISNI.complete("000000029534656")
21
+ => "000000029534656X"
22
+
23
+ ISNI.new("000000029534656X").to_s
24
+ => "0000-0002-9534-656X"
25
+
26
+ # Further Reading
27
+
28
+ - http://en.wikipedia.org/wiki/International_Standard_Name_Identifier
29
+ - http://orcid.org/
30
+ - http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier
31
+
32
+ # Contributing
33
+
34
+ Source code is publicly available @ http://github.com/yob/isni. Patches
35
+ welcome, preferably via a git repo I can pull from.
data/lib/isni.rb CHANGED
@@ -38,7 +38,7 @@ class ISNI
38
38
  accum = (accum + i) * 2
39
39
  end
40
40
  end
41
- remainder = 12 - (sum % 11) % 11
41
+ remainder = (12 - (sum % 11)) % 11
42
42
  if remainder == 10
43
43
  check = "X"
44
44
  else
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isni
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Healy
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-07 00:00:00.000000000 Z
11
+ date: 2022-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '10.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '10.0'
27
27
  - !ruby/object:Gem::Dependency
@@ -61,14 +61,14 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - CHANGELOG
63
63
  - MIT-LICENSE
64
- - README.rdoc
64
+ - README.markdown
65
65
  - Rakefile
66
66
  - lib/isni.rb
67
67
  homepage: http://github.com/yob/isni
68
68
  licenses:
69
69
  - MIT
70
70
  metadata: {}
71
- post_install_message:
71
+ post_install_message:
72
72
  rdoc_options:
73
73
  - "--title"
74
74
  - ISNI
@@ -79,17 +79,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 1.9.3
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubyforge_project:
90
- rubygems_version: 2.2.2
91
- signing_key:
89
+ rubygems_version: 3.3.26
90
+ signing_key:
92
91
  specification_version: 4
93
92
  summary: a (very) small library for working with ISNI and ORCID
94
93
  test_files: []
95
- has_rdoc: true
data/README.rdoc DELETED
@@ -1,35 +0,0 @@
1
- A small class for generating and validating Internation Standard Name
2
- Identifiers (ISNI). This will also work just fine with ORCID, a subset
3
- of ISNI.
4
-
5
- = Installation
6
-
7
- gem install isni
8
-
9
- = Usage
10
-
11
- ISNI.new("000000029534656X").valid?
12
- => true
13
-
14
- ISNI.valid?("000000029534656X")
15
- => true
16
-
17
- ISNI.valid?("0000000295346560")
18
- => false
19
-
20
- ISNI.complete("000000029534656")
21
- => "000000029534656X"
22
-
23
- ISNI.new("000000029534656X").to_s
24
- => "0000-0002-9534-656X"
25
-
26
- = Further Reading
27
-
28
- - http://en.wikipedia.org/wiki/International_Standard_Name_Identifier
29
- - http://orcid.org/
30
- - http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier
31
-
32
- = Contributing
33
-
34
- Source code is publicly available @ http://github.com/yob/isni.
35
- Patches welcome, preferably via a git repo I can pull from.