atig 0.4.3 → 0.4.4

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: 4fa3205294dc32a30048fe0bb019a00ee64b993b
4
- data.tar.gz: af811c86345b7f465ea7d461332a24f929054c3a
3
+ metadata.gz: f5849d378b18e123fd9dcf8bf9a1ee96e6401434
4
+ data.tar.gz: f0e7fc07a38030e1beb7b2fb9fd2633fb289db1e
5
5
  SHA512:
6
- metadata.gz: b527ca8c8e5526320297014377b0ff46979622c846bb459b064e32e8dd1c5f6a394645a6521240693677d57d20fd614ae26e5d0fa88ce7c259862167b79b56cb
7
- data.tar.gz: 30616c567a4fe5359fe331de8ecd3f12acfa088d262a4d97baa5457bc1a5903312fb61234490be3018a85811efb7638bb524dccdfaec471b5f2049a42cae2520
6
+ metadata.gz: f8418c16aa59ad77355d7ccb591d1ef21cfe0c3963c0626c3f9e1ecdefdebaf76db89286e62e1528a5f07242f2f76aa06cf172b166ee3d2e08439c56623770af
7
+ data.tar.gz: c50550489c0888bb2bba2facf47ee41b6524a44b2f7c85c0d3661dcaacc2ae93f5542d2e0c2431d84721bc6881f7cf97795184f05743f18bc0a9c9a0be6bf025
@@ -1,5 +1,7 @@
1
+ language: ruby
1
2
  rvm:
2
3
  - 1.9.3
3
4
  - 2.0.0
5
+ - 2.1.0
4
6
 
5
7
  script: bundle exec rake spec
data/Rakefile CHANGED
@@ -1,5 +1,4 @@
1
1
  # -*- mode:ruby -*-
2
- require 'rubygems'
3
2
  require 'rake'
4
3
  require 'rake/clean'
5
4
  require 'rspec/core/rake_task'
@@ -10,7 +9,8 @@ CLEAN.include(
10
9
  )
11
10
 
12
11
  CLOBBER.include(
13
- "pkg"
12
+ "pkg",
13
+ "coverage"
14
14
  )
15
15
 
16
16
  RSpec::Core::RakeTask.new do |t|
@@ -20,7 +20,7 @@ end
20
20
  desc "building document with sphinx"
21
21
  task :docs do
22
22
  build_dir = "docs/_build"
23
- `sphinx-build -b html -d #{build_dir}/doctrees -D latex_paper_size=a4 docs #{build_dir}/html`
23
+ `LC_CTYPE=C sphinx-build -b html -d #{build_dir}/doctrees -D latex_paper_size=a4 docs #{build_dir}/html`
24
24
  end
25
25
 
26
26
  task :default => [:spec, :clean]
@@ -2,8 +2,8 @@
2
2
  require File.expand_path('../lib/atig/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["SHIBATA Hiroshi"]
6
- gem.email = ["shibata.hiroshi@gmail.com"]
5
+ gem.authors = ["MIZUNO Hiroki", "SHIBATA Hiroshi", ]
6
+ gem.email = ["mzp@ocaml.jp", "shibata.hiroshi@gmail.com"]
7
7
  gem.description = %q{Atig.rb is Twitter Irc Gateway.}
8
8
  gem.summary = %q{Atig.rb is forked from cho45's tig.rb. We improve some features of tig.rb.}
9
9
  gem.homepage = "https://github.com/mzp/atig"
@@ -15,13 +15,12 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Atig::VERSION
17
17
 
18
+ gem.required_ruby_version = Gem::Requirement.new(">= 1.9.3")
19
+
18
20
  gem.add_dependency 'sqlite3', ['>= 1.3.2']
19
21
  gem.add_dependency 'net-irc', ['>= 0']
20
22
  gem.add_dependency 'oauth', ['>= 0']
21
23
 
22
- gem.add_dependency 'rake', ['>= 0'] unless defined? Rake
23
- gem.add_dependency 'json', ['>= 0'] unless defined? JSON
24
-
25
24
  gem.add_development_dependency 'bundler'
26
25
  gem.add_development_dependency 'rspec'
27
26
  gem.add_development_dependency 'coveralls'
@@ -1,6 +1,31 @@
1
1
  更新履歴
2
2
  ==============
3
3
 
4
+ v0.4.4(2013-12-29)
5
+ ------------------------------
6
+ http://github.com/mzp/atig/tree/v0.4.4
7
+
8
+ 機能変更
9
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10
+ - サポート対象を Ruby 1.9.3 以降にしました
11
+ - follower 取得時の1回の取得数を100件に拡張しました
12
+
13
+ v0.4.3(2013-10-18)
14
+ ------------------------------
15
+ http://github.com/mzp/atig/tree/v0.4.3
16
+
17
+ 不具合修正
18
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19
+ - 短縮 URL の展開が動かない問題を修正しました
20
+
21
+ v0.4.2(2013-10-13)
22
+ ------------------------------
23
+ http://github.com/mzp/atig/tree/v0.4.2
24
+
25
+ 機能変更
26
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27
+ - タイムラインの取得間隔を 1 分にしました
28
+
4
29
  v0.4.1(2013-08-02)
5
30
  ------------------------------
6
31
  http://github.com/mzp/atig/tree/v0.4.1
@@ -38,16 +38,16 @@ master_doc = 'index'
38
38
 
39
39
  # General information about the project.
40
40
  project = u'atig.rb'
41
- copyright = u'2010, mzp'
41
+ copyright = u'2010-2013, mzp'
42
42
 
43
43
  # The version info for the project you're documenting, acts as replacement for
44
44
  # |version| and |release|, also used in various other places throughout the
45
45
  # built documents.
46
46
  #
47
47
  # The short X.Y version.
48
- version = '0.3'
48
+ version = '0.4'
49
49
  # The full version, including alpha/beta/rc tags.
50
- release = '0.3.8'
50
+ release = '0.4.3'
51
51
 
52
52
  # The language for content autogenerated by Sphinx. Refer to documentation
53
53
  # for a list of supported languages.
@@ -15,11 +15,11 @@ atig.rbはTwitterとIRCを結ぶゲートウェイです。
15
15
  ダウンロード
16
16
  ------------------------------
17
17
 
18
- - 安定板: `atigrb-0.3.8.tgz`_. ( `過去のバージョン`_ )
18
+ - 安定板: `atigrb-0.4.3.tgz`_. ( `過去のバージョン`_ )
19
19
  - 開発版: `Github Repository`_.
20
20
 
21
- .. _atigrb-0.3.8.tgz: http://github.com/mzp/atig/tarball/v0.3.8
22
- .. _過去のバージョン: http://github.com/mzp/atig/downloads
21
+ .. _atigrb-0.4.3.tgz: http://github.com/mzp/atig/tarball/v0.4.3
22
+ .. _過去のバージョン: http://github.com/mzp/atig/tags
23
23
  .. _GitHub Repository: http://github.com/mzp/atig
24
24
 
25
25
  特徴
@@ -63,10 +63,6 @@ bitlify=\ ``username``:\ ``api_key``:\ ``size``
63
63
  ``size``\ 字以上のURLを http://bit.ly のAPIによって短縮します。
64
64
  APIを利用して短縮すると、ユーザページに短縮したURLが記録されたりします。
65
65
  詳しくは、 http://bit.ly のSign up for bit.lyを読んでください。
66
- unuify
67
- |len| 字以上のURLを http://u.nu によって短縮します。
68
- unuify= \ ``size``
69
- ``size`` 字以上のURLを http://u.nu によって短縮します。
70
66
 
71
67
  .. |len| replace:: 20
72
68
 
@@ -36,7 +36,7 @@ trunk版
36
36
  ~~~~~~~~~~
37
37
  githubからpullしてください。::
38
38
 
39
- $ git pull http://mzp.github.com/atig
39
+ $ git clone https://github.com/mzp/atig.git
40
40
 
41
41
  使ってみる
42
42
  ----------
@@ -1,6 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
- $KCODE = "u" unless defined? ::Encoding # json use this
3
-
4
2
  require 'atig/version'
5
3
  require 'atig/monkey'
6
4
  require 'atig/optparse'
@@ -22,15 +22,15 @@ module Atig
22
22
 
23
23
  def update(api)
24
24
  if @db.followings.empty?
25
- friends = api.page("friends/list", :users, {:user_id => @db.me.id})
25
+ friends = api.page("friends/list", :users, {:user_id => @db.me.id, :count => 100})
26
26
  else
27
27
  @db.me = api.post("account/update_profile")
28
28
  return if @db.me.friends_count == @db.followings.size
29
- friends = api.page("friends/list", :users, {:user_id => @db.me.id})
29
+ friends = api.page("friends/list", :users, {:user_id => @db.me.id, :count => 100})
30
30
  end
31
31
 
32
32
  if @opts.only
33
- followers = api.page("friends/ids", :ids, {:user_id => @db.me.id})
33
+ followers = api.page("friends/ids", :ids, {:user_id => @db.me.id, :count => 2500})
34
34
  friends.each do|friend|
35
35
  friend[:only] = !followers.include?(friend.id)
36
36
  end
@@ -1,5 +1,4 @@
1
1
  # -*- mode:ruby; coding:utf-8 -*-
2
- require 'rubygems'
3
2
  require 'json'
4
3
  require 'atig/http'
5
4
 
@@ -32,7 +32,7 @@ module Atig
32
32
  messages[0, 3].each do |m|
33
33
  @channel.notify " \002#{m[/.+/]}\017"
34
34
  end
35
- @channel.notify(" ... and more. check it: http://mzp.github.com/atig/") if messages.size > 3
35
+ @channel.notify(" ... and more. check it: http://mzp.github.io/atig/") if messages.size > 3
36
36
  end
37
37
  sleep (3*60*60)
38
38
  end if UpdateChecker.git_repos?
@@ -1,6 +1,5 @@
1
1
  # -*- mode:ruby; coding:utf-8 -*-
2
2
 
3
- require 'rubygems'
4
3
  require 'sqlite3'
5
4
 
6
5
  module Atig
@@ -1,7 +1,6 @@
1
1
  # -*- mode:ruby; coding:utf-8 -*-
2
2
  require 'atig/db/listenable'
3
3
  require 'atig/db/transaction'
4
- require 'rubygems'
5
4
  require 'sqlite3'
6
5
  require 'atig/db/roman'
7
6
  require 'atig/db/sql'
@@ -44,7 +44,6 @@ module Atig
44
44
  | nico\.ms
45
45
  | airme\.us
46
46
  | twurl\.nl
47
- | u\.nu
48
47
  | htn\.to)
49
48
  / [0-9a-z=-]+ |
50
49
  blip\.fm/~ (?> [0-9a-z]+) (?! /) |
@@ -1,4 +1,3 @@
1
- require 'rubygems'
2
1
  require 'net/irc'
3
2
 
4
3
  # monkey hack
@@ -1,5 +1,4 @@
1
1
  # -*- mode:ruby; coding:utf-8 -*-
2
- require 'rubygems'
3
2
  require 'oauth'
4
3
  require 'atig/oauth-patch'
5
4
 
@@ -1,6 +1,5 @@
1
1
  # -*- mode:ruby; coding:utf-8 -*-
2
2
 
3
- require 'atig/unu'
4
3
  require 'atig/bitly'
5
4
 
6
5
  module Atig
@@ -28,9 +27,6 @@ module Atig
28
27
  when @opts.bitlify
29
28
  @len = (@opts.bitlify.to_s || MIN_LEN).to_i
30
29
  Bitly.no_login @log
31
- when @opts.unuify
32
- @len = (@opts.unuify.to_s || MIN_LEN).to_i
33
- Unu.new @log
34
30
  else
35
31
  return mesg
36
32
  end
@@ -1,4 +1,3 @@
1
- require 'rubygems'
2
1
  require 'json'
3
2
  require 'atig/http'
4
3
  require 'atig/url_escape'
@@ -1,6 +1,5 @@
1
1
  # -*- mode:ruby; coding:utf-8 -*-
2
2
 
3
- require 'rubygems'
4
3
  require 'json'
5
4
  require 'uri'
6
5
  require 'logger'
@@ -1,3 +1,3 @@
1
1
  module Atig
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
@@ -0,0 +1,5 @@
1
+ Jinja2==2.7.1
2
+ MarkupSafe==0.18
3
+ Pygments==1.6
4
+ Sphinx==1.2b3
5
+ docutils==0.11
@@ -76,42 +76,6 @@ describe Atig::OFilter::ShortUrl,"when login bitly with size" do
76
76
  end
77
77
  end
78
78
 
79
- describe Atig::OFilter::ShortUrl,"when unu bitly" do
80
- before do
81
- logger = double('Logger')
82
- unu = double("Unu")
83
- unu.stub(:shorten).and_return{|s|
84
- "[#{s}]"
85
- }
86
- Atig::Unu.should_receive(:new).with(logger).and_return(unu)
87
- @ofilter = Atig::OFilter::ShortUrl.new(OpenStruct.new(:log=>logger, :opts=>OpenStruct.new('unuify'=>true)))
88
- end
89
-
90
- it "should shorten url by unu" do
91
- @ofilter.call({:status => "this is http://example.com/a http://example.com/b"}).should == {
92
- :status => "this is [http://example.com/a] [http://example.com/b]"
93
- }
94
- end
95
- end
96
-
97
- describe Atig::OFilter::ShortUrl,"when no-login unu with size" do
98
- before do
99
- logger = double('Logger')
100
- unu = double("Unu")
101
- unu.stub(:shorten).and_return{|s|
102
- "[#{s}]"
103
- }
104
- Atig::Unu.should_receive(:new).with(logger).and_return(unu)
105
- @ofilter = Atig::OFilter::ShortUrl.new(OpenStruct.new(:log=>logger, :opts=>OpenStruct.new('unuify'=>13)))
106
- end
107
-
108
- it "should only shorten large url" do
109
- @ofilter.call({:status => "this is http://example.com/a http://a.com"}).should == {
110
- :status => "this is [http://example.com/a] http://a.com"
111
- }
112
- end
113
- end
114
-
115
79
  describe Atig::OFilter::ShortUrl,"when nop" do
116
80
  before do
117
81
  logger = double('Logger')
@@ -1,10 +1,5 @@
1
1
  # -*- mode:ruby; coding:utf-8 -*-
2
- require 'rubygems'
3
- require 'bundler'
4
-
5
- Bundler.setup
6
- Bundler.require :default, :test
7
-
2
+ require 'bundler/setup'
8
3
  require 'atig/monkey'
9
4
  require 'command_helper'
10
5
 
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
+ - MIZUNO Hiroki
7
8
  - SHIBATA Hiroshi
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-10-18 00:00:00.000000000 Z
12
+ date: 2013-12-29 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: sqlite3
@@ -52,34 +53,6 @@ dependencies:
52
53
  - - ">="
53
54
  - !ruby/object:Gem::Version
54
55
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: json
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
56
  - !ruby/object:Gem::Dependency
84
57
  name: bundler
85
58
  requirement: !ruby/object:Gem::Requirement
@@ -124,6 +97,7 @@ dependencies:
124
97
  version: '0'
125
98
  description: Atig.rb is Twitter Irc Gateway.
126
99
  email:
100
+ - mzp@ocaml.jp
127
101
  - shibata.hiroshi@gmail.com
128
102
  executables:
129
103
  - atig
@@ -250,12 +224,12 @@ files:
250
224
  - lib/atig/stream.rb
251
225
  - lib/atig/twitter.rb
252
226
  - lib/atig/twitter_struct.rb
253
- - lib/atig/unu.rb
254
227
  - lib/atig/update_checker.rb
255
228
  - lib/atig/url_escape.rb
256
229
  - lib/atig/util.rb
257
230
  - lib/atig/version.rb
258
231
  - lib/memory_profiler.rb
232
+ - requirements.txt
259
233
  - spec/command/autofix_spec.rb
260
234
  - spec/command/destroy_spec.rb
261
235
  - spec/command/dm_spec.rb
@@ -310,7 +284,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
310
284
  requirements:
311
285
  - - ">="
312
286
  - !ruby/object:Gem::Version
313
- version: '0'
287
+ version: 1.9.3
314
288
  required_rubygems_version: !ruby/object:Gem::Requirement
315
289
  requirements:
316
290
  - - ">="
@@ -318,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
292
  version: '0'
319
293
  requirements: []
320
294
  rubyforge_project:
321
- rubygems_version: 2.1.9
295
+ rubygems_version: 2.2.0
322
296
  signing_key:
323
297
  specification_version: 4
324
298
  summary: Atig.rb is forked from cho45's tig.rb. We improve some features of tig.rb.
@@ -366,3 +340,4 @@ test_files:
366
340
  - spec/sized_hash_spec.rb
367
341
  - spec/spec_helper.rb
368
342
  - spec/update_checker_spec.rb
343
+ has_rdoc:
@@ -1,27 +0,0 @@
1
- # -*- mode:ruby; coding:utf-8 -*-
2
- module Atig
3
- class Unu
4
- def initialize(logger)
5
- @log = logger
6
- @http = Atig::Http.new logger
7
- end
8
-
9
- def shorten(url)
10
- unu_url = "http://u.nu/"
11
- unu = URI("#{unu_url}unu-api-simple")
12
- url = URI.rstrip url
13
- unu.query = { :url => url }.to_query_str
14
- res = @http.http(unu, 5, 5).request(@http.req(:get, unu)).body
15
-
16
- if res[0, 12] == unu_url
17
- res
18
- else
19
- @log.error res
20
- url
21
- end
22
- rescue Errno::ETIMEDOUT, JSON::ParserError, IOError, Timeout::Error, Errno::ECONNRESET => e
23
- @log.error e
24
- url
25
- end
26
- end
27
- end