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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4e8bf1dc42176c81751ad4d20bd178cda8b2ee5
4
- data.tar.gz: be2444c5552d37730987a6ddae9b12a1c5b1acf3
3
+ metadata.gz: fb5d2901149e7c9b3ceb6e96b8b3aa4f4a1c4b68
4
+ data.tar.gz: 42ad6c145f67aadd8b4369187a0d9df83dc87c26
5
5
  SHA512:
6
- metadata.gz: 549e67f5bc2f14276fb5fc53fe92e06bcc9ed567230bd17fcbe0bff71633941e427d9529a4140d70f3bd0626d6578de98ebf441c660ebbe0317391732cb39007
7
- data.tar.gz: 163d7ef0eb1462044f393da222d377d86fbfe4831ab834796dd2f07cbffb15a0e6dab8699b7adfae8efdfb47044f1321ba1fc6e58cf5df963669e6165c16af61
6
+ metadata.gz: 550f7ed0ab720cb1778a05bf15b18f6046ae1a099e5b6c0aa22edb3356e9d121635e57d8bb908112a57c10282fa5fb62c4ac9fece4ee75c61afb41bb6d18f607
7
+ data.tar.gz: b298ae869b4d92cf748efb16774a7bc08d506d1f2650ff08a033a39bb7f000bd0ee90edb2c3d692ffa9168ec034e458f43fba15fe5b0aec20f9542df47698d94
data/.travis.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.2
4
+ - 2.1
3
5
  - 2.0.0
4
6
  - 1.9.3
5
7
  - jruby-18mode # JRuby in 1.8 mode
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.png)](http://badge.fury.io/rb/nadoka)
6
- [![Build Status](https://travis-ci.org/nadoka/nadoka.png?branch=master)](https://travis-ci.org/nadoka/nadoka)
7
- [![Code Climate](https://codeclimate.com/github/nadoka/nadoka.png)](https://codeclimate.com/github/nadoka/nadoka)
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
@@ -11,7 +11,7 @@
11
11
  #
12
12
 
13
13
  module Nadoka
14
- VERSION = '0.9.0'
14
+ VERSION = '0.9.1'
15
15
  NDK_Version = VERSION.dup
16
16
  NDK_Created = Time.now
17
17
 
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(/&nbsp;|&#xA0;|&#160;|\u{A0}/i, ' ')
244
+ title.gsub(/(\s|&nbsp;|&#xA0;|&#160;|\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.0
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: 2014-06-29 00:00:00.000000000 Z
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.0.3
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")