metal-archives 0.1.6 → 0.1.7

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
@@ -93,12 +93,17 @@ module MetalArchives
93
93
  end
94
94
 
95
95
  def total_albums
96
- page = search_by_year
97
- album_total = page.search('body table:nth-child(2n) tr:first-child b').first.content.match(/\sof\s(\d+)/)
98
- if album_total.nil?
99
- 0
100
- else
101
- album_total[1].to_i
96
+ begin
97
+ page = search_by_year
98
+ album_total = page.search('body table:nth-child(2n) tr:first-child b').first.content.match(/\sof\s(\d+)/)
99
+ if album_total.nil?
100
+ 0
101
+ else
102
+ album_total[1].to_i
103
+ end
104
+ rescue Exception => e
105
+ puts "\nError accessing metal-archives.com's paginated result urls: #{e}"
106
+ return nil
102
107
  end
103
108
  end
104
109
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{metal-archives}
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Danny Olson"]
12
- s.date = %q{2011-03-06}
12
+ s.date = %q{2011-03-25}
13
13
  s.description = %q{metal-archives provides an interface to search for album releases for a specific year, defaulting to the current one if none is provided.}
14
14
  s.email = %q{dbolson@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 6
9
- version: 0.1.6
8
+ - 7
9
+ version: 0.1.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Danny Olson
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-06 00:00:00 -08:00
17
+ date: 2011-03-25 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - ">="
145
145
  - !ruby/object:Gem::Version
146
- hash: 4382458967996369210
146
+ hash: -1207388483986643029
147
147
  segments:
148
148
  - 0
149
149
  version: "0"