cinch-rfc 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fcdc4c88808fa535dd079b9bddd121f168eaf52f
4
- data.tar.gz: b0add895d208c895179620476dbaab6686eabc5a
3
+ metadata.gz: a7bbd561465d5e4fb975023948128cd427d0d801
4
+ data.tar.gz: c2fd97fa39d28ee7092c00a68dc2c6efa9af53f9
5
5
  SHA512:
6
- metadata.gz: d50000ce739ecd586840d905b57385cba94556f7ce65150df2b9847e1ba29c97559d02e251862403fdffa3eefd96338265d9b5952c3f391cbec0ad778c488375
7
- data.tar.gz: 96942684517e3724cd18b9831585606a14ba69e8a71a98c472781483f9d138f3090dab541798ac4a5115ac932895f050ea70e1e255809ae1b67b014d581cc7d3
6
+ metadata.gz: 911e00e9f2b5b651866e02d1b711a36c42ab96a210254034ba43f9eb07054a9c092a4e98e83102749e6c66ed2b9b509de7dacf2d4b4af0653cdb821405159c55
7
+ data.tar.gz: 43c3e947e3c24b8049fc94b9b9971f17e54eb2ed681ca331c47ab0e592a78d271bc675516908f40a6ea21b8a849c3c2d91a3c71afbb7f6b39d26aa1cc833ac7a
@@ -20,12 +20,13 @@ module Cinch
20
20
 
21
21
  def rfc_name_from_url(uri)
22
22
  call = Curl::Easy.perform(uri) do |easy|
23
+ easy.headers["User-Agent"] = "cinch-rfc IRC bot"
23
24
  easy.follow_location = true
24
25
  easy.max_redirects = 2
25
26
  end
26
27
 
27
28
  html = Nokogiri::HTML(call.body_str)
28
- html.at_xpath('//title').content.sub(/^RFC \d+ - (.+) \(RFC\d+\)$/,"\\1")
29
+ html.at_xpath('//meta[@name="DC.Title"]')['content']
29
30
  end
30
31
  end
31
32
  end
@@ -1,7 +1,7 @@
1
1
  module Cinch
2
2
  module Plugins
3
3
  class RFC
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinch-rfc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Hastings-Spital