nadoka 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +3 -4
- data/ndk/version.rb +1 -1
- data/plugins/googlebot.nb +4 -0
- data/plugins/titlebot.nb +3 -3
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb5d2901149e7c9b3ceb6e96b8b3aa4f4a1c4b68
|
4
|
+
data.tar.gz: 42ad6c145f67aadd8b4369187a0d9df83dc87c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 550f7ed0ab720cb1778a05bf15b18f6046ae1a099e5b6c0aa22edb3356e9d121635e57d8bb908112a57c10282fa5fb62c4ac9fece4ee75c61afb41bb6d18f607
|
7
|
+
data.tar.gz: b298ae869b4d92cf748efb16774a7bc08d506d1f2650ff08a033a39bb7f000bd0ee90edb2c3d692ffa9168ec034e458f43fba15fe5b0aec20f9542df47698d94
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -2,10 +2,9 @@
|
|
2
2
|
|
3
3
|
Written by SASADA Koichi <ko1 at atdot.net>
|
4
4
|
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/nadoka.
|
6
|
-
[![Build Status](https://
|
7
|
-
[![Code Climate](https://
|
8
|
-
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/nadoka/nadoka/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/nadoka.svg)](http://badge.fury.io/rb/nadoka)
|
6
|
+
[![Build Status](https://img.shields.io/travis/nadoka/nadoka.svg)](https://travis-ci.org/nadoka/nadoka)
|
7
|
+
[![Code Climate](https://img.shields.io/codeclimate/github/nadoka/nadoka.svg)](https://codeclimate.com/github/nadoka/nadoka)
|
9
8
|
|
10
9
|
## What's this?
|
11
10
|
|
data/ndk/version.rb
CHANGED
data/plugins/googlebot.nb
CHANGED
@@ -216,6 +216,10 @@ class GoogleBot < Nadoka::NDK_Bot
|
|
216
216
|
result = "#{$1} #{$2}"
|
217
217
|
#@logger.slog("google_calc>#{result.dump}")
|
218
218
|
return result
|
219
|
+
elsif /<g-card>(.*)<\/g-card>/ =~ html
|
220
|
+
result = $1
|
221
|
+
result.sub!(/<a.*/u, '')
|
222
|
+
result.gsub!(/<.+?>/u, '')
|
219
223
|
else
|
220
224
|
"response error"
|
221
225
|
end
|
data/plugins/titlebot.nb
CHANGED
@@ -149,6 +149,8 @@ module URL2Title
|
|
149
149
|
title = tweet unless tweet.empty?
|
150
150
|
end
|
151
151
|
end
|
152
|
+
when /\A(?:github\.com)\z/
|
153
|
+
# ignore og:title
|
152
154
|
else
|
153
155
|
if defined?(::Nokogiri)
|
154
156
|
doc ||= Nokogiri::HTML(body, uri.to_s, 'utf-8')
|
@@ -232,8 +234,6 @@ module URL2Title
|
|
232
234
|
case url
|
233
235
|
when %r!\Ahttp://www\.amazon\.co\.jp/.*(/dp/.+)\z!
|
234
236
|
"http://amazon.jp#{$1}"
|
235
|
-
when %r!\A(http://(?:[a-z]+\.)?slashdot\.jp/story/\d+/\d+/\d+/\d+)(?:/.*)?\z!
|
236
|
-
$1
|
237
237
|
else
|
238
238
|
# default: do nothing
|
239
239
|
url
|
@@ -241,7 +241,7 @@ module URL2Title
|
|
241
241
|
end
|
242
242
|
|
243
243
|
def cleanup(title)
|
244
|
-
title.gsub(
|
244
|
+
title.gsub(/(\s| | | |\u{A0})+/i, ' ')
|
245
245
|
end
|
246
246
|
|
247
247
|
def url2title(url, headers)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nadoka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuhiro NISHIYAMA
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-02-29 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Nadoka is a tool for monitoring and logging IRC conversations and responding
|
15
15
|
to specially formatted requests. You define and customize these responses in Ruby.
|
@@ -21,8 +21,8 @@ executables:
|
|
21
21
|
extensions: []
|
22
22
|
extra_rdoc_files: []
|
23
23
|
files:
|
24
|
-
- .gitignore
|
25
|
-
- .travis.yml
|
24
|
+
- ".gitignore"
|
25
|
+
- ".travis.yml"
|
26
26
|
- Gemfile
|
27
27
|
- README.md
|
28
28
|
- Rakefile
|
@@ -87,17 +87,17 @@ require_paths:
|
|
87
87
|
- lib
|
88
88
|
required_ruby_version: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
|
-
- -
|
90
|
+
- - ">="
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
99
|
rubyforge_project:
|
100
|
-
rubygems_version: 2.
|
100
|
+
rubygems_version: 2.5.1
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: IRC logger, monitor and proxy program ("bot")
|