ean13 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG +3 -0
  2. data/lib/ean13.rb +2 -2
  3. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v1.4 (21st September 2009)
2
+ - remove rails-ism. oops.
3
+
1
4
  v1.3 (11th July 2009)
2
5
  - add a bookland? method. Returns true if ean is a book EAN
3
6
 
@@ -4,7 +4,7 @@ class EAN13
4
4
 
5
5
  class Version #:nodoc:
6
6
  Major = 1
7
- Minor = 3
7
+ Minor = 4
8
8
  Tiny = 0
9
9
 
10
10
  String = [Major, Minor, Tiny].join('.')
@@ -33,7 +33,7 @@ class EAN13
33
33
  return nil unless twelve.length == 12 && twelve.match(/\d{11}/)
34
34
 
35
35
  arr = (0..11).to_a.collect do |i|
36
- if (i+1).even?
36
+ if (i+1) % 2 == 0
37
37
  twelve[i,1].to_i * 3
38
38
  else
39
39
  twelve[i,1].to_i
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ean13
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Healy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-11 00:00:00 +10:00
12
+ date: 2009-09-21 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  requirements: []
53
53
 
54
54
  rubyforge_project: yob-projects
55
- rubygems_version: 1.3.4
55
+ rubygems_version: 1.3.5
56
56
  signing_key:
57
57
  specification_version: 3
58
58
  summary: a (very) small library for working with EAN-13 codes