[DRE-commits] [SCM] atig.git branch, master, updated. upstream/0.3.6-15-g76fd335

Youhei SASAKI uwabami at gfd-dennou.org
Sat Feb 9 08:04:47 UTC 2013


The following commit has been merged in the master branch:
commit 88e822ba6e671a67a7bba3d688aede9618d4da6e
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date:   Sun Jan 27 23:07:59 2013 +0900

    Update/Refresh patches
    
    Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>

diff --git a/debian/control b/debian/control
index 041ff1e..bbd722b 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Standards-Version: 3.9.3
 Homepage: http://mzp.github.com/atig/index.html
 Vcs-Git: git://git.debian.org/pkg-ruby-extras/atig.git
 Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/atig.git;a=summary
-XS-Ruby-Versions: all
+XS-Ruby-Versions: ruby1.9.1
 
 Package: atig
 Architecture: any
diff --git a/debian/patches/0001-Remove-Bundler-and-Rubygems-Dependencies.patch b/debian/patches/0001-Remove-Bundler-and-Rubygems-Dependencies.patch
index 31c22dc..d889c53 100644
--- a/debian/patches/0001-Remove-Bundler-and-Rubygems-Dependencies.patch
+++ b/debian/patches/0001-Remove-Bundler-and-Rubygems-Dependencies.patch
@@ -14,16 +14,20 @@ Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
  spec/spec_helper.rb     |   10 +++++-----
  8 files changed, 5 insertions(+), 12 deletions(-)
 
---- atig.orig/lib/atig/bitly.rb
-+++ atig/lib/atig/bitly.rb
+diff --git a/lib/atig/bitly.rb b/lib/atig/bitly.rb
+index 4675954..0046f25 100644
+--- a/lib/atig/bitly.rb
++++ b/lib/atig/bitly.rb
 @@ -1,5 +1,4 @@
  # -*- mode:ruby; coding:utf-8 -*-
 -require 'rubygems'
  require 'json'
  require 'atig/http'
  
---- atig.orig/lib/atig/db/sql.rb
-+++ atig/lib/atig/db/sql.rb
+diff --git a/lib/atig/db/sql.rb b/lib/atig/db/sql.rb
+index ccf0b4d..df425b1 100644
+--- a/lib/atig/db/sql.rb
++++ b/lib/atig/db/sql.rb
 @@ -1,6 +1,5 @@
  # -*- mode:ruby; coding:utf-8 -*-
  
@@ -31,8 +35,10 @@ Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
  require 'sqlite3'
  
  module Atig
---- atig.orig/lib/atig/db/statuses.rb
-+++ atig/lib/atig/db/statuses.rb
+diff --git a/lib/atig/db/statuses.rb b/lib/atig/db/statuses.rb
+index 4080d48..e753651 100644
+--- a/lib/atig/db/statuses.rb
++++ b/lib/atig/db/statuses.rb
 @@ -1,7 +1,6 @@
  # -*- mode:ruby; coding:utf-8 -*-
  require 'atig/db/listenable'
@@ -41,30 +47,38 @@ Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
  require 'sqlite3'
  require 'atig/db/roman'
  require 'atig/db/sql'
---- atig.orig/lib/atig/monkey.rb
-+++ atig/lib/atig/monkey.rb
+diff --git a/lib/atig/monkey.rb b/lib/atig/monkey.rb
+index ec5a652..c7cdfab 100644
+--- a/lib/atig/monkey.rb
++++ b/lib/atig/monkey.rb
 @@ -1,4 +1,3 @@
 -require 'rubygems'
  require 'net/irc'
  
  # monkey hack
---- atig.orig/lib/atig/oauth.rb
-+++ atig/lib/atig/oauth.rb
+diff --git a/lib/atig/oauth.rb b/lib/atig/oauth.rb
+index cd7c2d0..58b7cd0 100644
+--- a/lib/atig/oauth.rb
++++ b/lib/atig/oauth.rb
 @@ -1,5 +1,4 @@
  # -*- mode:ruby; coding:utf-8 -*-
 -require 'rubygems'
  require 'oauth'
  require 'atig/oauth-patch'
  
---- atig.orig/lib/atig/search.rb
-+++ atig/lib/atig/search.rb
+diff --git a/lib/atig/search.rb b/lib/atig/search.rb
+index 26ccdba..6947e50 100644
+--- a/lib/atig/search.rb
++++ b/lib/atig/search.rb
 @@ -1,4 +1,3 @@
 -require 'rubygems'
  require 'json'
  require 'atig/http'
  require 'atig/url_escape'
---- atig.orig/lib/atig/stream.rb
-+++ atig/lib/atig/stream.rb
+diff --git a/lib/atig/stream.rb b/lib/atig/stream.rb
+index 5f1360d..a30e090 100644
+--- a/lib/atig/stream.rb
++++ b/lib/atig/stream.rb
 @@ -1,6 +1,5 @@
  # -*- mode:ruby; coding:utf-8 -*-
  
@@ -72,8 +86,10 @@ Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
  require 'json'
  require 'uri'
  require 'logger'
---- atig.orig/spec/spec_helper.rb
-+++ atig/spec/spec_helper.rb
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index 6658fc7..aebee1b 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
 @@ -1,9 +1,9 @@
  # -*- mode:ruby; coding:utf-8 -*-
 -require 'rubygems'
diff --git a/debian/patches/0002-Update-and-Fix-README.mkdn.patch b/debian/patches/0002-Update-and-Fix-README.mkdn.patch
index a027715..b2fe0f9 100644
--- a/debian/patches/0002-Update-and-Fix-README.mkdn.patch
+++ b/debian/patches/0002-Update-and-Fix-README.mkdn.patch
@@ -7,9 +7,11 @@ Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
  README.mkdn |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
---- atig.orig/README.mkdn
-+++ atig/README.mkdn
-@@ -21,9 +21,9 @@
+diff --git a/README.mkdn b/README.mkdn
+index 443542e..cc4234f 100644
+--- a/README.mkdn
++++ b/README.mkdn
+@@ -21,9 +21,9 @@ HOW TO USE
  
  You type:
  
diff --git a/debian/patches/0003-Userstream-should-work.patch b/debian/patches/0003-Userstream-should-work.patch
index 6471d23..0116730 100644
--- a/debian/patches/0003-Userstream-should-work.patch
+++ b/debian/patches/0003-Userstream-should-work.patch
@@ -15,9 +15,11 @@ Subject: Userstream should work
  lib/atig/stream.rb          |   47 +++++++++++++++++++++----------------------
  7 files changed, 35 insertions(+), 28 deletions(-)
 
---- atig.orig/lib/atig/agent/dm.rb
-+++ atig/lib/atig/agent/dm.rb
-@@ -7,6 +7,7 @@
+diff --git a/lib/atig/agent/dm.rb b/lib/atig/agent/dm.rb
+index 16e6442..8dbb21b 100644
+--- a/lib/atig/agent/dm.rb
++++ b/lib/atig/agent/dm.rb
+@@ -7,6 +7,7 @@ module Atig
        include Util
  
        def initialize(context, api, db)
@@ -25,9 +27,11 @@ Subject: Userstream should work
          @log = context.log
          @api = api
          @prev = nil
---- atig.orig/lib/atig/agent/mention.rb
-+++ atig/lib/atig/agent/mention.rb
-@@ -4,7 +4,10 @@
+diff --git a/lib/atig/agent/mention.rb b/lib/atig/agent/mention.rb
+index 84b0edf..391b3d3 100644
+--- a/lib/atig/agent/mention.rb
++++ b/lib/atig/agent/mention.rb
+@@ -4,7 +4,10 @@ require 'atig/agent/agent'
  module Atig
    module Agent
      class Mention < Atig::Agent::Agent
@@ -39,9 +43,11 @@ Subject: Userstream should work
        def interval; 180 end
        def path; '/statuses/mentions' end
        def source; :mention end
---- atig.orig/lib/atig/agent/timeline.rb
-+++ atig/lib/atig/agent/timeline.rb
-@@ -4,7 +4,10 @@
+diff --git a/lib/atig/agent/timeline.rb b/lib/atig/agent/timeline.rb
+index a928f07..4f4ce88 100644
+--- a/lib/atig/agent/timeline.rb
++++ b/lib/atig/agent/timeline.rb
+@@ -4,7 +4,10 @@ require 'atig/agent/agent'
  module Atig
    module Agent
      class Timeline < Atig::Agent::Agent
@@ -53,9 +59,11 @@ Subject: Userstream should work
        def interval; 30 end
        def path; '/statuses/home_timeline' end
        def source; :timeline end
---- atig.orig/lib/atig/gateway/session.rb
-+++ atig/lib/atig/gateway/session.rb
-@@ -138,7 +138,7 @@
+diff --git a/lib/atig/gateway/session.rb b/lib/atig/gateway/session.rb
+index 9dc5bec..2438922 100644
+--- a/lib/atig/gateway/session.rb
++++ b/lib/atig/gateway/session.rb
+@@ -138,7 +138,7 @@ END
          log :debug, "initialize Twitter"
          twitter = Twitter.new   context, oauth.access
          search  = SearchTwitter.new context
@@ -64,9 +72,11 @@ Subject: Userstream should work
          @api    = Scheduler.new context, twitter, search, stream
  
          log :debug, "initialize filter"
---- atig.orig/lib/atig/oauth.rb
-+++ atig/lib/atig/oauth.rb
-@@ -19,6 +19,7 @@
+diff --git a/lib/atig/oauth.rb b/lib/atig/oauth.rb
+index 58b7cd0..40d4bbd 100644
+--- a/lib/atig/oauth.rb
++++ b/lib/atig/oauth.rb
+@@ -19,6 +19,7 @@ module Atig
      end
  
      attr_reader :access
@@ -74,9 +84,11 @@ Subject: Userstream should work
      def initialize(context, nick)
        uri = URI(context.opts.api_base)
        site = "http://#{uri.host}"
---- atig.orig/lib/atig/option.rb
-+++ atig/lib/atig/option.rb
-@@ -30,7 +30,7 @@
+diff --git a/lib/atig/option.rb b/lib/atig/option.rb
+index 9c9897a..05c5efc 100644
+--- a/lib/atig/option.rb
++++ b/lib/atig/option.rb
+@@ -30,7 +30,7 @@ module Atig
      end
  
      default_value :api_base,        'https://api.twitter.com/1/'
@@ -85,9 +97,11 @@ Subject: Userstream should work
      default_value :search_api_base, 'http://search.twitter.com/'
  
      def initialize(table)
---- atig.orig/lib/atig/stream.rb
-+++ atig/lib/atig/stream.rb
-@@ -12,11 +12,11 @@
+diff --git a/lib/atig/stream.rb b/lib/atig/stream.rb
+index a30e090..7d927e4 100644
+--- a/lib/atig/stream.rb
++++ b/lib/atig/stream.rb
+@@ -12,11 +12,11 @@ module Atig
      include Util
  
      class APIFailed < StandardError; end
@@ -102,7 +116,7 @@ Subject: Userstream should work
      end
  
      def watch(path, query={}, &f)
-@@ -29,32 +29,31 @@
+@@ -29,32 +29,31 @@ module Atig
  
        @log.debug [uri.to_s]
  
@@ -128,19 +142,18 @@ Subject: Userstream should work
 -            response.read_body do |chunk|
 -              next if chunk.chomp.empty?
 -              buffer << chunk.to_s
--
++        begin
++          buffer = ''
++          response.read_body do |chunk|
++            next if chunk.chomp.empty?
++            buffer << chunk.to_s
+ 
 -              if buffer =~ /\A(.*)\n/ then
 -                text = $1
 -                unless text.strip.empty?
 -                  f.call TwitterStruct.make(JSON.parse(text))
 -                end
 -                buffer = ''
-+        begin
-+          buffer = ''
-+          response.read_body do |chunk|
-+            next if chunk.chomp.empty?
-+            buffer << chunk.to_s
-+
 +            if buffer =~ /\A(.*)\n/ then
 +              text = $1
 +              unless text.strip.empty?
diff --git a/debian/patches/0004-Userstream-changes.patch b/debian/patches/0004-Userstream-changes.patch
index 1cee97e..214b552 100644
--- a/debian/patches/0004-Userstream-changes.patch
+++ b/debian/patches/0004-Userstream-changes.patch
@@ -12,9 +12,11 @@ Subject: Userstream changes.
  lib/atig/stream.rb            |    8 +++++---
  3 files changed, 26 insertions(+), 4 deletions(-)
 
---- atig.orig/lib/atig/agent/user_stream.rb
-+++ atig/lib/atig/agent/user_stream.rb
-@@ -23,6 +23,20 @@
+diff --git a/lib/atig/agent/user_stream.rb b/lib/atig/agent/user_stream.rb
+index f96fb4a..dc6315d 100644
+--- a/lib/atig/agent/user_stream.rb
++++ b/lib/atig/agent/user_stream.rb
+@@ -23,6 +23,20 @@ module Atig
                  d.add :status => status, :user => status.user, :source => :user_stream
                end
              end
@@ -35,9 +37,11 @@ Subject: Userstream changes.
            end
          end
        end
---- atig.orig/lib/atig/gateway/session.rb
-+++ atig/lib/atig/gateway/session.rb
-@@ -138,7 +138,13 @@
+diff --git a/lib/atig/gateway/session.rb b/lib/atig/gateway/session.rb
+index 2438922..f5edadf 100644
+--- a/lib/atig/gateway/session.rb
++++ b/lib/atig/gateway/session.rb
+@@ -138,7 +138,13 @@ END
          log :debug, "initialize Twitter"
          twitter = Twitter.new   context, oauth.access
          search  = SearchTwitter.new context
@@ -52,9 +56,11 @@ Subject: Userstream changes.
          @api    = Scheduler.new context, twitter, search, stream
  
          log :debug, "initialize filter"
---- atig.orig/lib/atig/stream.rb
-+++ atig/lib/atig/stream.rb
-@@ -11,11 +11,13 @@
+diff --git a/lib/atig/stream.rb b/lib/atig/stream.rb
+index 7d927e4..069c0df 100644
+--- a/lib/atig/stream.rb
++++ b/lib/atig/stream.rb
+@@ -11,11 +11,13 @@ module Atig
    class Stream
      include Util
  
@@ -70,7 +76,7 @@ Subject: Userstream changes.
        @access   = access
      end
  
-@@ -32,7 +34,7 @@
+@@ -32,7 +34,7 @@ module Atig
        http = Net::HTTP.new(uri.host, uri.port)
        http.use_ssl = true
        request = Net::HTTP::Get.new(uri.request_uri)
diff --git a/debian/patches/0005-don-t-process-retweet-status-by-no_retweet_ids.patch b/debian/patches/0005-don-t-process-retweet-status-by-no_retweet_ids.patch
index ad191d8..287310b 100644
--- a/debian/patches/0005-don-t-process-retweet-status-by-no_retweet_ids.patch
+++ b/debian/patches/0005-don-t-process-retweet-status-by-no_retweet_ids.patch
@@ -11,15 +11,20 @@ Subject: don't process retweet status by no_retweet_ids
  5 files changed, 29 insertions(+), 1 deletion(-)
  create mode 100644 lib/atig/agent/noretweets.rb
 
---- atig.orig/lib/atig/agent.rb
-+++ atig/lib/atig/agent.rb
-@@ -7,3 +7,4 @@
+diff --git a/lib/atig/agent.rb b/lib/atig/agent.rb
+index 24c89aa..8ee9dc8 100644
+--- a/lib/atig/agent.rb
++++ b/lib/atig/agent.rb
+@@ -7,3 +7,4 @@ require 'atig/agent/dm'
  require 'atig/agent/timeline'
  require 'atig/agent/clenup'
  require 'atig/agent/user_stream'
 +require 'atig/agent/noretweets'
+diff --git a/lib/atig/agent/noretweets.rb b/lib/atig/agent/noretweets.rb
+new file mode 100644
+index 0000000..ea50135
 --- /dev/null
-+++ atig/lib/atig/agent/noretweets.rb
++++ b/lib/atig/agent/noretweets.rb
 @@ -0,0 +1,24 @@
 +# -*- mode:ruby; coding:utf-8 -*-
 +
@@ -45,9 +50,11 @@ Subject: don't process retweet status by no_retweet_ids
 +    end
 +  end
 +end
---- atig.orig/lib/atig/agent/user_stream.rb
-+++ atig/lib/atig/agent/user_stream.rb
-@@ -18,6 +18,7 @@
+diff --git a/lib/atig/agent/user_stream.rb b/lib/atig/agent/user_stream.rb
+index dc6315d..a7cf345 100644
+--- a/lib/atig/agent/user_stream.rb
++++ b/lib/atig/agent/user_stream.rb
+@@ -18,6 +18,7 @@ module Atig
          @api.stream do|t|
            t.watch('user') do |status|
  #            @log.debug status.inspect
@@ -55,9 +62,11 @@ Subject: don't process retweet status by no_retweet_ids
              if status and status.user
                db.statuses.transaction do|d|
                  d.add :status => status, :user => status.user, :source => :user_stream
---- atig.orig/lib/atig/db/db.rb
-+++ atig/lib/atig/db/db.rb
-@@ -13,7 +13,7 @@
+diff --git a/lib/atig/db/db.rb b/lib/atig/db/db.rb
+index 74c31f9..d035292 100644
+--- a/lib/atig/db/db.rb
++++ b/lib/atig/db/db.rb
+@@ -13,7 +13,7 @@ module Atig
    module Db
      class Db
        include Util
@@ -66,7 +75,7 @@ Subject: don't process retweet status by no_retweet_ids
        attr_accessor :me
        Path = ::Dir.tmpdir
        VERSION = 4
-@@ -26,6 +26,7 @@
+@@ -26,6 +26,7 @@ module Atig
          @statuses   = Statuses.new   dir('status')
          @dms        = Statuses.new   dir('dm')
          @lists      = Lists.new      dir('lists.%s')
@@ -74,9 +83,11 @@ Subject: don't process retweet status by no_retweet_ids
  
          log :info, "initialize"
        end
---- atig.orig/lib/atig/gateway.rb
-+++ atig/lib/atig/gateway.rb
-@@ -9,6 +9,7 @@
+diff --git a/lib/atig/gateway.rb b/lib/atig/gateway.rb
+index 8a12381..61e4221 100644
+--- a/lib/atig/gateway.rb
++++ b/lib/atig/gateway.rb
+@@ -9,6 +9,7 @@ Atig::Gateway::Session.agents   = [
                                     Atig::Agent::Timeline,
                                     Atig::Agent::Cleanup,
                                     Atig::Agent::UserStream,
diff --git a/debian/patches/0006-handle-direct-message-in-userstream.patch b/debian/patches/0006-handle-direct-message-in-userstream.patch
index e362820..a74678a 100644
--- a/debian/patches/0006-handle-direct-message-in-userstream.patch
+++ b/debian/patches/0006-handle-direct-message-in-userstream.patch
@@ -6,9 +6,11 @@ Subject: handle direct message in userstream.
  lib/atig/agent/user_stream.rb |   10 +++++++---
  1 file changed, 7 insertions(+), 3 deletions(-)
 
---- atig.orig/lib/atig/agent/user_stream.rb
-+++ atig/lib/atig/agent/user_stream.rb
-@@ -19,12 +19,16 @@
+diff --git a/lib/atig/agent/user_stream.rb b/lib/atig/agent/user_stream.rb
+index a7cf345..e2b4866 100644
+--- a/lib/atig/agent/user_stream.rb
++++ b/lib/atig/agent/user_stream.rb
+@@ -19,12 +19,16 @@ module Atig
            t.watch('user') do |status|
  #            @log.debug status.inspect
              next if status.retweeted_status and db.noretweets.include?(status.user.id)
diff --git a/debian/patches/Disabled_Update_Checker.patch b/debian/patches/0007-Disabled_Update_Checker.patch
similarity index 72%
rename from debian/patches/Disabled_Update_Checker.patch
rename to debian/patches/0007-Disabled_Update_Checker.patch
index 5b37fb0..9cdb98b 100644
--- a/debian/patches/Disabled_Update_Checker.patch
+++ b/debian/patches/0007-Disabled_Update_Checker.patch
@@ -1,5 +1,16 @@
---- atig.orig/lib/atig/channel/timeline.rb
-+++ atig/lib/atig/channel/timeline.rb
+From: Debian Ruby Extras Maintainers
+ <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
+Date: Tue, 22 Jan 2013 21:00:10 +0900
+Subject: Disabled_Update_Checker
+
+---
+ lib/atig/channel/timeline.rb |   26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/lib/atig/channel/timeline.rb b/lib/atig/channel/timeline.rb
+index a948741..9635814 100644
+--- a/lib/atig/channel/timeline.rb
++++ b/lib/atig/channel/timeline.rb
 @@ -2,7 +2,7 @@
  
  require 'atig/channel/channel'
@@ -9,7 +20,7 @@
  
  module Atig
    module Channel
-@@ -24,18 +24,18 @@
+@@ -24,18 +24,18 @@ module Atig
          end
  
          # 最新版のチェック
diff --git a/debian/patches/0008-Fix-char-count.patch b/debian/patches/0008-Fix-char-count.patch
new file mode 100644
index 0000000..cff44c0
--- /dev/null
+++ b/debian/patches/0008-Fix-char-count.patch
@@ -0,0 +1,39 @@
+From: Youhei SASAKI <uwabami at gfd-dennou.org>
+Date: Tue, 22 Jan 2013 21:06:29 +0900
+Subject: Fix char count
+
+Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
+---
+ lib/atig/command/retweet.rb |    3 ++-
+ lib/atig/command/status.rb  |    4 ++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/lib/atig/command/retweet.rb b/lib/atig/command/retweet.rb
+index a0b1139..9b376f8 100644
+--- a/lib/atig/command/retweet.rb
++++ b/lib/atig/command/retweet.rb
+@@ -22,7 +22,8 @@ module Atig
+         text = "#{comment.strip} RT #{screen_name}: #{entry.status.text}"
+ 
+         chars = text.each_char.to_a
+-        if chars.size > 140 then
++        chars_length = text.encode("UTF-16BE", :invalid => :replace, :undef => :replace, :replace => '?').encode("UTF-8")
++        if chars_length.each_char.to_a.size > 140 then
+           url = @bitly.shorten "http://twitter.com/#{entry.user.screen_name}/status/#{entry.status.id}"
+           text = chars[0,140-url.size-1].join('') + ' ' + url
+         end
+diff --git a/lib/atig/command/status.rb b/lib/atig/command/status.rb
+index f625478..96fec14 100644
+--- a/lib/atig/command/status.rb
++++ b/lib/atig/command/status.rb
+@@ -25,8 +25,8 @@ module Atig
+           return
+         end
+         q = gateway.output_message(:status => text)
+-
+-        if q[:status].each_char.to_a.size > 140 then
++        q_length = q[:status].encode("UTF-16BE", :invalid => :replace, :undef => :replace, :replace => '?').encode("UTF-8")
++        if q_length.each_char.to_a.size > 140 then
+           yield "You can't submit the status over 140 chars"
+           return
+         end
diff --git a/debian/patches/series b/debian/patches/series
index dd02359..1afc243 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,4 +4,5 @@
 0004-Userstream-changes.patch
 0005-don-t-process-retweet-status-by-no_retweet_ids.patch
 0006-handle-direct-message-in-userstream.patch
-Disabled_Update_Checker.patch
+0007-Disabled_Update_Checker.patch
+0008-Fix-char-count.patch

-- 
atig.git



More information about the Pkg-ruby-extras-commits mailing list