metal-archives 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -63,18 +63,19 @@ module MetalArchives
63
63
  # album's release date
64
64
  # album's release type (full-length, demo, split, DVD, etc.)
65
65
  def album_from_url(url)
66
- page = @agent.get(SITE_URL + '/' + url)
67
- page.encoding = 'iso-8859-1' if !page.nil? && page.encoding != 'iso-8859-1' # needed for foreign characters
68
- band_and_album = page.search('body table tr:first-child .tt').text
69
-
70
- # these fields can be in one of the following forms, so we need to find the specific fields appropriately:
71
- # "\n\t\t", "Demo", ", Nazgûl Distro & Prod.", "", "2011", "\t\t\t"
72
- # "\n\t\t", "Demo", ", Deific Mourning", "", "\n\n\t\tJanuary ", "2011", "\t\t\t"
73
- # "Full-length", ", ARX Productions", "", "\n\n\t\tFebruary 25th, ", "2011", "\t\t\t"
74
66
  begin
67
+ page = @agent.get(SITE_URL + '/' + url)
68
+ page.encoding = 'iso-8859-1' if !page.nil? && page.encoding != 'iso-8859-1' # needed for foreign characters
69
+ band_and_album = page.search('body table tr:first-child .tt').text
70
+
71
+ # these fields can be in one of the following forms, so we need to find the specific fields appropriately:
72
+ # "\n\t\t", "Demo", ", Nazgûl Distro & Prod.", "", "2011", "\t\t\t"
73
+ # "\n\t\t", "Demo", ", Deific Mourning", "", "\n\n\t\tJanuary ", "2011", "\t\t\t"
74
+ # "Full-length", ", ARX Productions", "", "\n\n\t\tFebruary 25th, ", "2011", "\t\t\t"
75
75
  album_fields = page.search('body table:nth-child(2n) tr:first-child > td:first-child').first.children
76
76
  rescue Exception => e
77
77
  puts "\nError accessing metal-archives.com's album information: #{e}"
78
+ return nil
78
79
  end
79
80
 
80
81
  {
@@ -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.4"
8
+ s.version = "0.1.5"
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-02-12}
12
+ s.date = %q{2011-02-26}
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
- - 4
9
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
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-02-12 00:00:00 -08:00
17
+ date: 2011-02-26 00:00:00 -08: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: 3280097642105159980
146
+ hash: 708635247568569300
147
147
  segments:
148
148
  - 0
149
149
  version: "0"