lisbn 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/lisbn/lisbn.rb +1 -11
  2. data/lisbn.gemspec +3 -2
  3. metadata +22 -7
@@ -117,7 +117,7 @@ private
117
117
  end
118
118
 
119
119
  def self.ranges
120
- rngs = parse
120
+ rngs = Nori.new.parse(File.read(File.dirname(__FILE__) + '/../../data/RangeMessage.xml'))
121
121
  Array(rngs["ISBNRangeMessage"]["RegistrationGroups"]["Group"]).flatten.inject({}) do |memo, group|
122
122
  prefix = group["Prefix"].gsub(/-/, '')
123
123
  ranges = Array(group["Rules"]["Rule"]).flatten.map do |rule|
@@ -131,15 +131,5 @@ private
131
131
  end
132
132
  end
133
133
 
134
- # Some gems (read: savon) modify Nori's .convert_tags_to option.
135
- # We save the modification, reset to defaults and reinstate after parsing.
136
- def self.parse
137
- conversion = Nori.convert_tags?
138
- Nori.convert_tags_to(nil)
139
- rngs = Nori.parse(File.read(File.dirname(__FILE__) + '/../../data/RangeMessage.xml'))
140
- Nori.convert_tags_to(nil, &conversion)
141
- rngs
142
- end
143
-
144
134
  RANGES = ranges
145
135
  end
@@ -12,8 +12,9 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
13
  gem.name = "lisbn"
14
14
  gem.require_paths = ["lib"]
15
- gem.version = "0.1.2"
15
+ gem.version = "0.1.3"
16
16
 
17
- gem.add_dependency "nori"
17
+ gem.add_dependency "nori", "~> 2.0"
18
+ gem.add_dependency "nokogiri"
18
19
  gem.add_development_dependency "rspec"
19
20
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lisbn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mike Ragalie
@@ -15,12 +15,27 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-05-21 00:00:00 Z
18
+ date: 2013-01-20 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: nori
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 2
31
+ - 0
32
+ version: "2.0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: nokogiri
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
24
39
  none: false
25
40
  requirements:
26
41
  - - ">="
@@ -30,11 +45,11 @@ dependencies:
30
45
  - 0
31
46
  version: "0"
32
47
  type: :runtime
33
- version_requirements: *id001
48
+ version_requirements: *id002
34
49
  - !ruby/object:Gem::Dependency
35
50
  name: rspec
36
51
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
52
+ requirement: &id003 !ruby/object:Gem::Requirement
38
53
  none: false
39
54
  requirements:
40
55
  - - ">="
@@ -44,7 +59,7 @@ dependencies:
44
59
  - 0
45
60
  version: "0"
46
61
  type: :development
47
- version_requirements: *id002
62
+ version_requirements: *id003
48
63
  description: Lisbn (pronounced "Lisbon") is a wrapper around String that adds methods for manipulating ISBNs.
49
64
  email:
50
65
  - michael.ragalie@verbasoftware.com