cinch-title 0.3.1 → 0.4.0
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/README.rdoc +6 -1
- data/lib/cinch/plugins/title.rb +2 -1
- metadata +27 -11
data/README.rdoc
CHANGED
|
@@ -17,7 +17,9 @@ A plugin for the Cinch ircbot framework to output HTML-titles for URL:s posted t
|
|
|
17
17
|
Cinch::Plugins::Title => {
|
|
18
18
|
"ignore" => [
|
|
19
19
|
"facebook.com"
|
|
20
|
-
]
|
|
20
|
+
],
|
|
21
|
+
"max_redirects" => 5,
|
|
22
|
+
"user_agent" => "cinch-title/0.3.1"
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
end
|
|
@@ -28,8 +30,11 @@ A plugin for the Cinch ircbot framework to output HTML-titles for URL:s posted t
|
|
|
28
30
|
=== Options
|
|
29
31
|
|
|
30
32
|
ignore: a list of regexps of URI:S that should be ignored
|
|
33
|
+
|
|
31
34
|
max_redirects: redirects until a non-redirect is found if not set, or set it to the max number of redirects you want the plugin to follow
|
|
32
35
|
|
|
36
|
+
user_agent: An optional user agent for the requests. Some sites do not like an empty user agent (which is curb's default).
|
|
37
|
+
|
|
33
38
|
== Copyright
|
|
34
39
|
|
|
35
40
|
Copyright (c) 2010 Victor Bergöö. See LICENSE for details.
|
data/lib/cinch/plugins/title.rb
CHANGED
|
@@ -48,6 +48,7 @@ module Cinch
|
|
|
48
48
|
call = Curl::Easy.perform(uri) do |easy|
|
|
49
49
|
easy.follow_location = true
|
|
50
50
|
easy.max_redirects = config["max_redirects"]
|
|
51
|
+
easy.headers["User-Agent"] = config["user_agent"] || 'cinch'
|
|
51
52
|
end
|
|
52
53
|
|
|
53
54
|
html = Nokogiri::HTML(call.body_str)
|
|
@@ -69,4 +70,4 @@ module Cinch
|
|
|
69
70
|
end
|
|
70
71
|
end
|
|
71
72
|
end
|
|
72
|
-
end
|
|
73
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cinch-title
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2014-10-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: cinch
|
|
16
|
-
requirement:
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ! '>='
|
|
@@ -21,10 +21,15 @@ dependencies:
|
|
|
21
21
|
version: '0'
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements:
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
26
|
+
requirements:
|
|
27
|
+
- - ! '>='
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '0'
|
|
25
30
|
- !ruby/object:Gem::Dependency
|
|
26
31
|
name: nokogiri
|
|
27
|
-
requirement:
|
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
|
28
33
|
none: false
|
|
29
34
|
requirements:
|
|
30
35
|
- - ! '>='
|
|
@@ -32,10 +37,15 @@ dependencies:
|
|
|
32
37
|
version: '0'
|
|
33
38
|
type: :runtime
|
|
34
39
|
prerelease: false
|
|
35
|
-
version_requirements:
|
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
42
|
+
requirements:
|
|
43
|
+
- - ! '>='
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0'
|
|
36
46
|
- !ruby/object:Gem::Dependency
|
|
37
47
|
name: curb
|
|
38
|
-
requirement:
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
39
49
|
none: false
|
|
40
50
|
requirements:
|
|
41
51
|
- - ! '>='
|
|
@@ -43,7 +53,12 @@ dependencies:
|
|
|
43
53
|
version: '0'
|
|
44
54
|
type: :runtime
|
|
45
55
|
prerelease: false
|
|
46
|
-
version_requirements:
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
none: false
|
|
58
|
+
requirements:
|
|
59
|
+
- - ! '>='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
47
62
|
description: Plugin for the irc-framework Cinch to output HTML-titles
|
|
48
63
|
email: victor.bergoo@gmail.com
|
|
49
64
|
executables: []
|
|
@@ -56,7 +71,8 @@ files:
|
|
|
56
71
|
- README.rdoc
|
|
57
72
|
- lib/cinch/plugins/title.rb
|
|
58
73
|
homepage: http://github.com/netfeed/cinch-title
|
|
59
|
-
licenses:
|
|
74
|
+
licenses:
|
|
75
|
+
- MIT
|
|
60
76
|
post_install_message:
|
|
61
77
|
rdoc_options: []
|
|
62
78
|
require_paths:
|
|
@@ -75,8 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
75
91
|
version: '0'
|
|
76
92
|
requirements: []
|
|
77
93
|
rubyforge_project:
|
|
78
|
-
rubygems_version: 1.8.
|
|
94
|
+
rubygems_version: 1.8.23
|
|
79
95
|
signing_key:
|
|
80
|
-
specification_version:
|
|
96
|
+
specification_version: 4
|
|
81
97
|
summary: Plugin for Cinch to output HTML-titles
|
|
82
98
|
test_files: []
|