library_stdnums 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.markdown +7 -5
  2. data/VERSION +1 -1
  3. metadata +3 -3
data/README.markdown CHANGED
@@ -2,9 +2,10 @@
2
2
 
3
3
  These are a set of Module functions (not classes with methods!) that perform simple checksum verification and (when applicable) normalization on strings containing common library types (currently just ISBN, ISSN, and LCCN).
4
4
 
5
- The code allows for some minimal crap (e.g., '1234-4568 online') will work fine. All returned ISBN/ISSN values are devoid any dashes; any trailing X for an ISBN/ISSN checkdigit will be uppercase *and will always be returned as a one-digit string*.
5
+ The code allows for some minimal crap to be in the passed string (e.g., '1234-4568 online' will work fine). All returned ISBN/ISSN values are devoid any dashes; any trailing X for an ISBN/ISSN checkdigit will be uppercase.
6
+
7
+ When you're getting back just the checkdigit, it will *always be returned as a one-digit string or an uppercase X* ('1'..'9' or 'X').
6
8
 
7
- See the actual functions for more information than what's below.
8
9
 
9
10
  ## ISBN
10
11
 
@@ -24,7 +25,7 @@ See the actual functions for more information than what's below.
24
25
  # an empty array if not
25
26
 
26
27
  digit = StdNum::ISBN.checkdigit(isbn)
27
- # => 0..9 (for isbn13) or 0..9,X (for isbn10)
28
+ # => '0'..'9' (for isbn13) or '0'..'9','X' (for isbn10)
28
29
 
29
30
  if StdNum::ISBN.valid?(isbn)
30
31
  puts "#{isbn} has a valid checkdigit"
@@ -39,7 +40,7 @@ See the actual functions for more information than what's below.
39
40
  # => the cleaned-up issn if valid; nil if not
40
41
 
41
42
  digit = StdNum::ISSN.checkdigit(issn)
42
- # => 0..9 or X
43
+ # => '0'..'9' or 'X'
43
44
 
44
45
  if StdNum::ISSN.valid?(issn)
45
46
  puts "#{issn} has a valid checkdigit"
@@ -62,7 +63,8 @@ LCCNs are normalized according to the algorithm at http://www.loc.gov/marc/lccn-
62
63
  ````
63
64
 
64
65
  ## CHANGES
65
-
66
+ * 1.0.2
67
+ * Made docs clearer.
66
68
  * 1.0.0
67
69
  * Added normalization all around.
68
70
  * Added valid? for LCCN.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: library_stdnums
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.1
5
+ version: 1.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bill Dueber
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-06 00:00:00 -04:00
13
+ date: 2012-01-19 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  requirements: []
67
67
 
68
68
  rubyforge_project:
69
- rubygems_version: 1.5.2
69
+ rubygems_version: 1.6.2
70
70
  signing_key:
71
71
  specification_version: 3
72
72
  summary: Normalize and compute checkdigits for ISBN, ISSN, and LCCN