[DRE-commits] [atig] 03/03: Update debian/changelog, Refresh patches
Youhei SASAKI
uwabami-guest at moszumanska.debian.org
Fri Jun 27 09:23:57 UTC 2014
This is an automated email from the git hooks/post-receive script.
uwabami-guest pushed a commit to branch master
in repository atig.
commit 139205fb651d271b2bbdc86506e8b4ccd993027f
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date: Wed Jun 4 18:01:32 2014 +0900
Update debian/changelog, Refresh patches
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
---
debian/changelog | 2 +-
debian/control | 10 +-
...01-Drop-Bundler-and-RubyGems-dependencies.patch | 37 +++++
...-Remove-Bundler-and-Rubygems-Dependencies.patch | 99 -----------
...Disable-update-checker-for-Debian-Package.patch | 182 +++++++++++++++++++++
debian/patches/0002-Disabled_Update_Checker.patch | 53 ------
.../patches/0003-Drop-coveralls-dependency.patch | 31 ++++
debian/patches/0003-Fix-char-count.patch | 39 -----
debian/patches/series | 4 +-
9 files changed, 258 insertions(+), 199 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 95aeb95..c23fac4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-atig (0.4.3-1) unstable; urgency=low
+atig (0.4.5-1) unstable; urgency=low
* Initial release (Closes: #670130)
diff --git a/debian/control b/debian/control
index 8bb3d35..d6b3225 100644
--- a/debian/control
+++ b/debian/control
@@ -8,9 +8,8 @@ Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~),
ruby-rspec,
ruby-sqlite3,
ruby-net-irc,
- ruby-json,
- ruby-diff-lcs,
- ruby-oauth
+ ruby-oauth,
+ ruby-twitter-text
Standards-Version: 3.9.4
Homepage: http://mzp.github.com/atig/index.html
Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/atig.git
@@ -21,11 +20,10 @@ Package: atig
Architecture: any
XB-Ruby-Versions: ${ruby:Versions}
Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter,
- ruby-json,
ruby-sqlite3,
- ruby-diff-lcs,
ruby-net-irc,
- ruby-oauth
+ ruby-oauth,
+ ruby-twitter-text
Description: Another Twitter IRC gateway
Atig.rb is Twitter Irc Gateway. You can tweet via your favorite IRC
client.
diff --git a/debian/patches/0001-Drop-Bundler-and-RubyGems-dependencies.patch b/debian/patches/0001-Drop-Bundler-and-RubyGems-dependencies.patch
new file mode 100644
index 0000000..d3ef7e9
--- /dev/null
+++ b/debian/patches/0001-Drop-Bundler-and-RubyGems-dependencies.patch
@@ -0,0 +1,37 @@
+From: Youhei SASAKI <uwabami at gfd-dennou.org>
+Date: Wed, 4 Jun 2014 18:04:42 +0900
+Subject: Drop Bundler and RubyGems dependencies
+
+Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
+---
+ atig.gemspec | 1 -
+ spec/spec_helper.rb | 6 +++++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/atig.gemspec b/atig.gemspec
+index 72e2cb3..fd78c24 100644
+--- a/atig.gemspec
++++ b/atig.gemspec
+@@ -22,7 +22,6 @@ Gem::Specification.new do |gem|
+ gem.add_dependency 'oauth', ['>= 0']
+ gem.add_dependency 'twitter-text', ['~> 1.7.0']
+
+- gem.add_development_dependency 'bundler'
+ gem.add_development_dependency 'rspec'
+ gem.add_development_dependency 'coveralls'
+ end
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index cb0adc7..ef98b74 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,5 +1,9 @@
+ # -*- mode:ruby; coding:utf-8 -*-
+-require 'bundler/setup'
++require 'sqlite3'
++require 'net/irc'
++require 'oauth'
++require 'twitter-text'
++require 'rspec'
+ require 'atig/monkey'
+ require 'command_helper'
+
diff --git a/debian/patches/0001-Remove-Bundler-and-Rubygems-Dependencies.patch b/debian/patches/0001-Remove-Bundler-and-Rubygems-Dependencies.patch
deleted file mode 100644
index d0453f2..0000000
--- a/debian/patches/0001-Remove-Bundler-and-Rubygems-Dependencies.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From: Youhei SASAKI <uwabami at gfd-dennou.org>
-Date: Tue, 31 Jan 2012 00:31:24 +0900
-Subject: Remove Bundler and Rubygems Dependencies
-
-Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
----
- lib/atig/bitly.rb | 1 -
- lib/atig/db/sql.rb | 1 -
- lib/atig/db/statuses.rb | 1 -
- lib/atig/monkey.rb | 1 -
- lib/atig/oauth.rb | 1 -
- lib/atig/search.rb | 1 -
- lib/atig/stream.rb | 1 -
- spec/spec_helper.rb | 10 +++++-----
- 8 files changed, 5 insertions(+), 12 deletions(-)
-
---- atig.orig/lib/atig/bitly.rb
-+++ atig/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
-@@ -1,6 +1,5 @@
- # -*- mode:ruby; coding:utf-8 -*-
-
--require 'rubygems'
- require 'sqlite3'
-
- module Atig
---- atig.orig/lib/atig/db/statuses.rb
-+++ atig/lib/atig/db/statuses.rb
-@@ -1,7 +1,6 @@
- # -*- mode:ruby; coding:utf-8 -*-
- require 'atig/db/listenable'
- require 'atig/db/transaction'
--require 'rubygems'
- require 'sqlite3'
- require 'atig/db/roman'
- require 'atig/db/sql'
---- atig.orig/lib/atig/monkey.rb
-+++ atig/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
-@@ -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
-@@ -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
-@@ -1,6 +1,5 @@
- # -*- mode:ruby; coding:utf-8 -*-
-
--require 'rubygems'
- require 'json'
- require 'uri'
- require 'logger'
---- atig.orig/spec/spec_helper.rb
-+++ atig/spec/spec_helper.rb
-@@ -1,9 +1,9 @@
- # -*- mode:ruby; coding:utf-8 -*-
--require 'rubygems'
--require 'bundler'
--
--Bundler.setup
--Bundler.require :default, :test
-+require 'sqlite3'
-+require 'net/irc'
-+require 'oauth'
-+require 'rake' unless defined? Rake
-+require 'json' unless defined? JSON
-
- require 'atig/monkey'
- require 'command_helper'
-@@ -33,5 +33,5 @@
- entry
- end
-
--require 'coveralls'
--Coveralls.wear!
-+# require 'coveralls'
-+# Coveralls.wear!
diff --git a/debian/patches/0002-Disable-update-checker-for-Debian-Package.patch b/debian/patches/0002-Disable-update-checker-for-Debian-Package.patch
new file mode 100644
index 0000000..44e7dd0
--- /dev/null
+++ b/debian/patches/0002-Disable-update-checker-for-Debian-Package.patch
@@ -0,0 +1,182 @@
+From: Youhei SASAKI <uwabami at gfd-dennou.org>
+Date: Wed, 4 Jun 2014 18:07:53 +0900
+Subject: Disable update checker for Debian Package
+
+Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
+---
+ lib/atig/channel/timeline.rb | 28 +++++++++++-----------
+ lib/atig/update_checker.rb | 56 --------------------------------------------
+ spec/update_checker_spec.rb | 55 -------------------------------------------
+ 3 files changed, 14 insertions(+), 125 deletions(-)
+ delete mode 100644 lib/atig/update_checker.rb
+ delete mode 100644 spec/update_checker_spec.rb
+
+diff --git a/lib/atig/channel/timeline.rb b/lib/atig/channel/timeline.rb
+index 9eaea00..f8da642 100644
+--- a/lib/atig/channel/timeline.rb
++++ b/lib/atig/channel/timeline.rb
+@@ -2,7 +2,7 @@
+
+ require 'atig/channel/channel'
+ require 'atig/util'
+-require 'atig/update_checker'
++# require 'atig/update_checker'
+
+ module Atig
+ module Channel
+@@ -23,19 +23,19 @@ module Atig
+ end
+ end
+
+- # git clone した状態から動かしていたら常に最新版のチェック
+- daemon do
+- log :info,"check update"
+- messages = UpdateChecker.latest
+- unless messages.empty?
+- @channel.notify "\002New version is available.\017 run 'git pull'."
+- messages[0, 3].each do |m|
+- @channel.notify " \002#{m[/.+/]}\017"
+- end
+- @channel.notify(" ... and more. check it: http://mzp.github.io/atig/") if messages.size > 3
+- end
+- sleep (3*60*60)
+- end if UpdateChecker.git_repos?
++ # # git clone した状態から動かしていたら常に最新版のチェック
++ # daemon do
++ # log :info,"check update"
++ # messages = UpdateChecker.latest
++ # unless messages.empty?
++ # @channel.notify "\002New version is available.\017 run 'git pull'."
++ # messages[0, 3].each do |m|
++ # @channel.notify " \002#{m[/.+/]}\017"
++ # end
++ # @channel.notify(" ... and more. check it: http://mzp.github.io/atig/") if messages.size > 3
++ # end
++ # sleep (3*60*60)
++ # end if UpdateChecker.git_repos?
+
+ db.statuses.listen do|entry|
+ if db.followings.include?(entry.user) or
+diff --git a/lib/atig/update_checker.rb b/lib/atig/update_checker.rb
+deleted file mode 100644
+index 5949894..0000000
+--- a/lib/atig/update_checker.rb
++++ /dev/null
+@@ -1,56 +0,0 @@
+-# -*- mode:ruby; coding:utf-8 -*-
+-
+-module Atig
+- module UpdateChecker
+- def commits
+- uri = URI("https://api.github.com/repos/mzp/atig/commits")
+- http = Atig::Http.new
+- res = http.http(uri).request http.req(:get, uri)
+- JSON.parse(res.body)
+- end
+-
+- def server_version
+- @server_version ||= instance_eval {
+- head = `git rev-parse HEAD 2>/dev/null`.chomp
+- head.empty?? "unknown" : head
+- }
+- end
+-
+- def local_repos?(rev)
+- system("git show #{rev} > /dev/null 2>&1")
+- end
+-
+- def git_repos?
+- File.exists? File.expand_path('../../../.git', __FILE__)
+- end
+-
+- def git?
+- system('which git > /dev/null 2>&1')
+- end
+-
+- def latest
+- unless git? then
+- []
+- else
+- cs = commits
+- latest = cs.first['sha'][/^[0-9a-z]{40}$/]
+- raise "github API changed?" unless latest
+-
+- if local_repos?(latest) then
+- []
+- else
+- current = cs.map {|i| i['sha'] }.index(server_version)
+- if current then
+- cs[0...current]
+- else
+- cs
+- end.map {|i| i['commit']['message'] }
+- end
+- end
+- rescue Errno::ECONNREFUSED, Timeout::Error => e
+- []
+- end
+-
+- module_function :latest, :commits, :server_version, :local_repos?, :git?, :git_repos?
+- end
+-end
+diff --git a/spec/update_checker_spec.rb b/spec/update_checker_spec.rb
+deleted file mode 100644
+index 1ad54c9..0000000
+--- a/spec/update_checker_spec.rb
++++ /dev/null
+@@ -1,55 +0,0 @@
+-# -*- mode:ruby; coding:utf-8 -*-
+-
+-require File.expand_path( '../spec_helper', __FILE__ )
+-require 'atig/update_checker'
+-
+-describe Atig::UpdateChecker,'when use git version' do
+- def rev(c)
+- c * 40
+- end
+-
+- def commit(c, mesg)
+- {'sha' => rev(c), 'commit' => {'message' => mesg}}
+- end
+-
+- before do
+- Atig::UpdateChecker.stub(:git?).and_return(true)
+- Atig::UpdateChecker.stub(:commits).
+- and_return [
+- commit('a', 'foo'),
+- commit('b', 'bar'),
+- commit('c', 'baz'),
+- commit('d', 'xyzzy'),
+- commit('e', 'fuga'),
+- ]
+- end
+-
+- it "should not do anything when use HEAD version" do
+- Atig::UpdateChecker.stub(:local_repos?).and_return true
+- Atig::UpdateChecker.stub(:server_version).and_return rev('a')
+-
+- Atig::UpdateChecker.latest.should == []
+- end
+-
+- it "should notify when not use HEAD version" do
+- Atig::UpdateChecker.stub(:local_repos?).and_return false
+- Atig::UpdateChecker.stub(:server_version).and_return rev('b')
+-
+- Atig::UpdateChecker.latest.should == [ 'foo' ]
+- end
+-
+- it "should notify many changes" do
+- Atig::UpdateChecker.stub(:local_repos?).and_return false
+- Atig::UpdateChecker.stub(:server_version).and_return rev('d')
+-
+- Atig::UpdateChecker.latest.should == [ 'foo', 'bar', 'baz' ]
+- end
+-
+- it "should notify all changes" do
+- Atig::UpdateChecker.stub(:local_repos?).and_return false
+- Atig::UpdateChecker.stub(:server_version).and_return rev('z')
+-
+- Atig::UpdateChecker.latest.should == [ 'foo', 'bar', 'baz', 'xyzzy', 'fuga' ]
+- end
+-
+-end
diff --git a/debian/patches/0002-Disabled_Update_Checker.patch b/debian/patches/0002-Disabled_Update_Checker.patch
deleted file mode 100644
index 9cdb98b..0000000
--- a/debian/patches/0002-Disabled_Update_Checker.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-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'
- require 'atig/util'
--require 'atig/update_checker'
-+#require 'atig/update_checker'
-
- module Atig
- module Channel
-@@ -24,18 +24,18 @@ module Atig
- end
-
- # 最新版のチェック
-- daemon do
-- log :info,"check update"
-- messages = UpdateChecker.latest
-- unless messages.empty?
-- @channel.notify "\002New version is available.\017 run 'git pull'."
-- messages[0, 3].each do |m|
-- @channel.notify " \002#{m[/.+/]}\017"
-- end
-- @channel.notify(" ... and more. check it: http://mzp.github.com/atig/") if messages.size > 3
-- end
-- sleep (3*60*60)
-- end
-+ #daemon do
-+ # log :info,"check update"
-+ # messages = UpdateChecker.latest
-+ # unless messages.empty?
-+ # @channel.notify "\002New version is available.\017 run 'git pull'."
-+ # messages[0, 3].each do |m|
-+ # @channel.notify " \002#{m[/.+/]}\017"
-+ # end
-+ # @channel.notify(" ... and more. check it: http://mzp.github.com/atig/") if messages.size > 3
-+ # end
-+ # sleep (3*60*60)
-+ #end
-
- db.statuses.listen do|entry|
- if db.followings.include?(entry.user) or
diff --git a/debian/patches/0003-Drop-coveralls-dependency.patch b/debian/patches/0003-Drop-coveralls-dependency.patch
new file mode 100644
index 0000000..9d0f4cd
--- /dev/null
+++ b/debian/patches/0003-Drop-coveralls-dependency.patch
@@ -0,0 +1,31 @@
+From: Youhei SASAKI <uwabami at gfd-dennou.org>
+Date: Wed, 4 Jun 2014 18:15:11 +0900
+Subject: Drop coveralls dependency
+
+Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
+---
+ atig.gemspec | 1 -
+ spec/spec_helper.rb | 3 ---
+ 2 files changed, 4 deletions(-)
+
+diff --git a/atig.gemspec b/atig.gemspec
+index fd78c24..e27fd20 100644
+--- a/atig.gemspec
++++ b/atig.gemspec
+@@ -23,5 +23,4 @@ Gem::Specification.new do |gem|
+ gem.add_dependency 'twitter-text', ['~> 1.7.0']
+
+ gem.add_development_dependency 'rspec'
+- gem.add_development_dependency 'coveralls'
+ end
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index ef98b74..1c5c1a1 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -31,6 +31,3 @@ def entry(user, status, name = 'entry', id = 0)
+ entry.stub('status').and_return(status)
+ entry
+ end
+-
+-require 'coveralls'
+-Coveralls.wear!
diff --git a/debian/patches/0003-Fix-char-count.patch b/debian/patches/0003-Fix-char-count.patch
deleted file mode 100644
index cff44c0..0000000
--- a/debian/patches/0003-Fix-char-count.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-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 92e1533..88c9877 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
-0001-Remove-Bundler-and-Rubygems-Dependencies.patch
+0001-Drop-Bundler-and-RubyGems-dependencies.patch
+0002-Disable-update-checker-for-Debian-Package.patch
+0003-Drop-coveralls-dependency.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/atig.git
More information about the Pkg-ruby-extras-commits
mailing list