cinch-title 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.1.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cinch-title}
8
- s.version = "0.0.5"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Victor Bergöö"]
12
- s.date = %q{2010-11-16}
12
+ s.date = %q{2010-12-05}
13
13
  s.default_executable = %q{cinch-title}
14
14
  s.description = %q{Plugin for the irc-framework Cinch to output HTML-titles}
15
15
  s.email = %q{victor.bergoo@gmail.com}
@@ -41,7 +41,10 @@ module Cinch
41
41
  def parse uri
42
42
  content = Curl::Easy.perform(uri).body_str
43
43
  html = Nokogiri::HTML(content)
44
- CGI.unescape_html html.at("title").text.gsub(/\s+/, ' ')
44
+ title = html.at("title")
45
+
46
+ return "No title" if title.nil?
47
+ CGI.unescape_html title.text.gsub(/\s+/, ' ')
45
48
  end
46
49
  end
47
50
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 1
7
8
  - 0
8
- - 5
9
- version: 0.0.5
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - "Victor Berg\xC3\xB6\xC3\xB6"
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-16 00:00:00 +01:00
17
+ date: 2010-12-05 00:00:00 +01:00
18
18
  default_executable: cinch-title
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency