isbn_validation 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f53a620a852652e44e87cb703dbc5609f09d4259
4
+ data.tar.gz: 63ec1d627d6c85ec11199d923634f53be3ad7be4
5
+ SHA512:
6
+ metadata.gz: 6dc1691bd87441deddc51219d882611dbc3a382b63561f15328b6d357fc448182f5f21b84df65a0f3bbfe0f65a08b8dd0ed8fdf1eeb26cdda12b2dba1eecf1be
7
+ data.tar.gz: 5360acca4f91b758aa794b4fb6f3ddc70f970e005191d296c9e92dc277814e07aca28c6f6820b954e21a43381f51f1a417d9d6c61f40d355f17ac9ff5356ac27
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Nick Plante
1
+ Copyright (c) 2015 Nick Plante
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -26,4 +26,4 @@ support, please use v0.1.2.
26
26
  validates :isbn13, :isbn_format => { :with => :isbn13 }
27
27
  end
28
28
 
29
- Copyright © 2014 Nick Plante, released under the MIT license
29
+ Copyright © 2015 Nick Plante, released under the MIT license
@@ -73,6 +73,7 @@ module ValidationExtensions
73
73
  def validate_with_isbn13(isbn) #:nodoc:
74
74
  if (isbn || '').match(ISBN13_REGEX)
75
75
  isbn_values = isbn.upcase.gsub(/\ |-/, '').split('')
76
+ return false if !isbn_values[0..2].join('').match(/(978|979)/)
76
77
  check_digit = isbn_values.pop.to_i # last digit is check digit
77
78
 
78
79
  sum = 0
@@ -1,3 +1,3 @@
1
1
  module IsbnValidation
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isbn_validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
5
- prerelease:
4
+ version: 1.2.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Nick Plante
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-25 00:00:00.000000000 Z
11
+ date: 2015-05-01 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activerecord
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: sqlite3
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: isbn_validation adds an isbn validation routine to active record models.
@@ -52,32 +47,31 @@ extra_rdoc_files:
52
47
  - README.md
53
48
  - MIT-LICENSE
54
49
  files:
55
- - lib/isbn_validation/version.rb
56
- - lib/isbn_validation.rb
57
- - README.md
58
50
  - MIT-LICENSE
51
+ - README.md
52
+ - lib/isbn_validation.rb
53
+ - lib/isbn_validation/version.rb
59
54
  homepage: https://github.com/zapnap/isbn_validation
60
55
  licenses: []
56
+ metadata: {}
61
57
  post_install_message:
62
58
  rdoc_options: []
63
59
  require_paths:
64
60
  - lib
65
61
  required_ruby_version: !ruby/object:Gem::Requirement
66
- none: false
67
62
  requirements:
68
- - - ! '>='
63
+ - - ">="
69
64
  - !ruby/object:Gem::Version
70
65
  version: '0'
71
66
  required_rubygems_version: !ruby/object:Gem::Requirement
72
- none: false
73
67
  requirements:
74
- - - ! '>='
68
+ - - ">="
75
69
  - !ruby/object:Gem::Version
76
70
  version: '0'
77
71
  requirements: []
78
72
  rubyforge_project:
79
- rubygems_version: 1.8.23
73
+ rubygems_version: 2.4.3
80
74
  signing_key:
81
- specification_version: 3
75
+ specification_version: 4
82
76
  summary: isbn_validation adds an isbn validation routine to active record models.
83
77
  test_files: []