[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:48 UTC 2013


The following commit has been merged in the master branch:
commit 1f2d85ba2773d02dccfb638f3d6529e929f8b58e
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date:   Sun Feb 3 20:39:10 2013 +0900

    Imported Upstream version 0.3.8

diff --git a/Gemfile.lock b/Gemfile.lock
index 6f6ae2c..0801182 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -23,7 +23,7 @@ GEM
     rspec-core (2.12.2)
     rspec-expectations (2.12.1)
       diff-lcs (~> 1.1.3)
-    rspec-mocks (2.12.1)
+    rspec-mocks (2.12.2)
     sqlite3 (1.3.7)
 
 PLATFORMS
diff --git a/lib/atig/channel/timeline.rb b/lib/atig/channel/timeline.rb
index a948741..7d10ba7 100644
--- a/lib/atig/channel/timeline.rb
+++ b/lib/atig/channel/timeline.rb
@@ -23,7 +23,7 @@ module Atig
           end
         end
 
-        # 最新版のチェック
+        # git clone した状態から動かしていたら常に最新版のチェック
         daemon do
           log :info,"check update"
           messages = UpdateChecker.latest
@@ -35,7 +35,7 @@ module Atig
             @channel.notify("  ... and more. check it: http://mzp.github.com/atig/") if messages.size > 3
           end
           sleep (3*60*60)
-        end
+        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
index 1c876fa..5949894 100644
--- a/lib/atig/update_checker.rb
+++ b/lib/atig/update_checker.rb
@@ -20,6 +20,10 @@ module Atig
       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
@@ -47,7 +51,6 @@ module Atig
       []
     end
 
-    module_function :latest, :commits, :server_version, :local_repos?, :git?
+    module_function :latest, :commits, :server_version, :local_repos?, :git?, :git_repos?
   end
 end
-
diff --git a/lib/atig/version.rb b/lib/atig/version.rb
index 7ec4d6d..73f5497 100644
--- a/lib/atig/version.rb
+++ b/lib/atig/version.rb
@@ -1,3 +1,3 @@
 module Atig
-  VERSION = "0.3.7"
+  VERSION = "0.3.8"
 end
diff --git a/metadata.yml b/metadata.yml
deleted file mode 100644
index 08d6781..0000000
--- a/metadata.yml
+++ /dev/null
@@ -1,358 +0,0 @@
---- !ruby/object:Gem::Specification
-name: atig
-version: !ruby/object:Gem::Version
-  version: 0.3.7
-  prerelease: 
-platform: ruby
-authors:
-- SHIBATA Hiroshi
-autorequire: 
-bindir: bin
-cert_chain: []
-date: 2013-01-27 00:00:00.000000000 Z
-dependencies:
-- !ruby/object:Gem::Dependency
-  name: sqlite3
-  requirement: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: 1.3.2
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: 1.3.2
-- !ruby/object:Gem::Dependency
-  name: net-irc
-  requirement: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: oauth
-  requirement: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: rake
-  requirement: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: json
-  requirement: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :runtime
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: rspec
-  requirement: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    none: false
-    requirements:
-    - - ! '>='
-      - !ruby/object:Gem::Version
-        version: '0'
-description: Atig.rb is Twitter Irc Gateway.
-email:
-- shibata.hiroshi at gmail.com
-executables:
-- atig
-extensions: []
-extra_rdoc_files: []
-files:
-- .gitignore
-- .rspec
-- Gemfile
-- Gemfile.lock
-- README.mkdn
-- Rakefile
-- atig.gemspec
-- bin/atig
-- docs/OMakefile
-- docs/OMakeroot
-- docs/_static/allow.png
-- docs/_static/emacs.png
-- docs/_static/irc_setting.png
-- docs/_static/irssi.png
-- docs/_static/limechat.png
-- docs/_static/limechat_s.png
-- docs/_static/oauth_channel.png
-- docs/_static/screenshot.png
-- docs/_static/structure.png
-- docs/_static/verify.png
-- docs/changelog.rst
-- docs/commandline_options.rst
-- docs/commands.rst
-- docs/conf.py
-- docs/config.rst
-- docs/feature.rst
-- docs/graphics.graffle
-- docs/hacking_guide.rst
-- docs/index.rst
-- docs/irc.rst
-- docs/options.rst
-- docs/quickstart.rst
-- docs/resize.sh
-- docs/tiarra.rst
-- docs/tig.rst
-- lib/atig.rb
-- lib/atig/agent.rb
-- lib/atig/agent/agent.rb
-- lib/atig/agent/clenup.rb
-- lib/atig/agent/dm.rb
-- lib/atig/agent/following.rb
-- lib/atig/agent/full_list.rb
-- lib/atig/agent/list.rb
-- lib/atig/agent/list_status.rb
-- lib/atig/agent/mention.rb
-- lib/atig/agent/noretweets.rb
-- lib/atig/agent/other_list.rb
-- lib/atig/agent/own_list.rb
-- lib/atig/agent/stream_follow.rb
-- lib/atig/agent/timeline.rb
-- lib/atig/agent/user_stream.rb
-- lib/atig/basic_twitter.rb
-- lib/atig/bitly.rb
-- lib/atig/channel.rb
-- lib/atig/channel/channel.rb
-- lib/atig/channel/dm.rb
-- lib/atig/channel/list.rb
-- lib/atig/channel/mention.rb
-- lib/atig/channel/retweet.rb
-- lib/atig/channel/timeline.rb
-- lib/atig/client.rb
-- lib/atig/command.rb
-- lib/atig/command/autofix.rb
-- lib/atig/command/command.rb
-- lib/atig/command/command_helper.rb
-- lib/atig/command/destroy.rb
-- lib/atig/command/dm.rb
-- lib/atig/command/favorite.rb
-- lib/atig/command/info.rb
-- lib/atig/command/limit.rb
-- lib/atig/command/location.rb
-- lib/atig/command/name.rb
-- lib/atig/command/option.rb
-- lib/atig/command/refresh.rb
-- lib/atig/command/reply.rb
-- lib/atig/command/retweet.rb
-- lib/atig/command/search.rb
-- lib/atig/command/spam.rb
-- lib/atig/command/status.rb
-- lib/atig/command/thread.rb
-- lib/atig/command/time.rb
-- lib/atig/command/uptime.rb
-- lib/atig/command/user.rb
-- lib/atig/command/user_info.rb
-- lib/atig/command/version.rb
-- lib/atig/command/whois.rb
-- lib/atig/db/db.rb
-- lib/atig/db/followings.rb
-- lib/atig/db/listenable.rb
-- lib/atig/db/lists.rb
-- lib/atig/db/roman.rb
-- lib/atig/db/sized_uniq_array.rb
-- lib/atig/db/sql.rb
-- lib/atig/db/statuses.rb
-- lib/atig/db/transaction.rb
-- lib/atig/exception_util.rb
-- lib/atig/gateway.rb
-- lib/atig/gateway/channel.rb
-- lib/atig/gateway/session.rb
-- lib/atig/http.rb
-- lib/atig/ifilter.rb
-- lib/atig/ifilter/expand_url.rb
-- lib/atig/ifilter/retweet.rb
-- lib/atig/ifilter/retweet_time.rb
-- lib/atig/ifilter/sanitize.rb
-- lib/atig/ifilter/strip.rb
-- lib/atig/ifilter/xid.rb
-- lib/atig/levenshtein.rb
-- lib/atig/monkey.rb
-- lib/atig/oauth-patch.rb
-- lib/atig/oauth.rb
-- lib/atig/ofilter.rb
-- lib/atig/ofilter/escape_url.rb
-- lib/atig/ofilter/footer.rb
-- lib/atig/ofilter/geo.rb
-- lib/atig/ofilter/short_url.rb
-- lib/atig/option.rb
-- lib/atig/optparse.rb
-- lib/atig/scheduler.rb
-- lib/atig/search.rb
-- lib/atig/search_twitter.rb
-- lib/atig/sized_hash.rb
-- lib/atig/stream.rb
-- lib/atig/twitter.rb
-- lib/atig/twitter_struct.rb
-- lib/atig/unu.rb
-- lib/atig/update_checker.rb
-- lib/atig/url_escape.rb
-- lib/atig/util.rb
-- lib/atig/version.rb
-- lib/memory_profiler.rb
-- spec/command/autofix_spec.rb
-- spec/command/destroy_spec.rb
-- spec/command/dm_spec.rb
-- spec/command/favorite_spec.rb
-- spec/command/limit_spec.rb
-- spec/command/location_spec.rb
-- spec/command/name_spec.rb
-- spec/command/option_spec.rb
-- spec/command/refresh_spec.rb
-- spec/command/reply_spec.rb
-- spec/command/retweet_spec.rb
-- spec/command/spam_spec.rb
-- spec/command/status_spec.rb
-- spec/command/thread_spec.rb
-- spec/command/time_spec.rb
-- spec/command/uptime_spec.rb
-- spec/command/user_info_spec.rb
-- spec/command/user_spec.rb
-- spec/command/version_spec.rb
-- spec/command/whois_spec.rb
-- spec/db/followings_spec.rb
-- spec/db/listenable_spec.rb
-- spec/db/lists_spec.rb
-- spec/db/roman_spec.rb
-- spec/db/sized_uniq_array_spec.rb
-- spec/db/statuses_spec.rb
-- spec/ifilter/expand_url_spec.rb
-- spec/ifilter/retweet_spec.rb
-- spec/ifilter/retweet_time_spec.rb
-- spec/ifilter/sanitize_spec.rb
-- spec/ifilter/sid_spec.rb
-- spec/ifilter/strip_spec.rb
-- spec/ifilter/tid_spec.rb
-- spec/levenshtein_spec.rb
-- spec/ofilter/escape_url_spec.rb
-- spec/ofilter/footer_spec.rb
-- spec/ofilter/geo_spec.rb
-- spec/ofilter/short_url_spec.rb
-- spec/option_spec.rb
-- spec/sized_hash_spec.rb
-- spec/spec_helper.rb
-- spec/update_checker_spec.rb
-homepage: https://github.com/mzp/atig
-licenses: []
-post_install_message: 
-rdoc_options: []
-require_paths:
-- lib
-required_ruby_version: !ruby/object:Gem::Requirement
-  none: false
-  requirements:
-  - - ! '>='
-    - !ruby/object:Gem::Version
-      version: '0'
-required_rubygems_version: !ruby/object:Gem::Requirement
-  none: false
-  requirements:
-  - - ! '>='
-    - !ruby/object:Gem::Version
-      version: '0'
-requirements: []
-rubyforge_project: 
-rubygems_version: 1.8.24
-signing_key: 
-specification_version: 3
-summary: Atig.rb is forked from cho45's tig.rb. We improve some features of tig.rb.
-test_files:
-- spec/command/autofix_spec.rb
-- spec/command/destroy_spec.rb
-- spec/command/dm_spec.rb
-- spec/command/favorite_spec.rb
-- spec/command/limit_spec.rb
-- spec/command/location_spec.rb
-- spec/command/name_spec.rb
-- spec/command/option_spec.rb
-- spec/command/refresh_spec.rb
-- spec/command/reply_spec.rb
-- spec/command/retweet_spec.rb
-- spec/command/spam_spec.rb
-- spec/command/status_spec.rb
-- spec/command/thread_spec.rb
-- spec/command/time_spec.rb
-- spec/command/uptime_spec.rb
-- spec/command/user_info_spec.rb
-- spec/command/user_spec.rb
-- spec/command/version_spec.rb
-- spec/command/whois_spec.rb
-- spec/db/followings_spec.rb
-- spec/db/listenable_spec.rb
-- spec/db/lists_spec.rb
-- spec/db/roman_spec.rb
-- spec/db/sized_uniq_array_spec.rb
-- spec/db/statuses_spec.rb
-- spec/ifilter/expand_url_spec.rb
-- spec/ifilter/retweet_spec.rb
-- spec/ifilter/retweet_time_spec.rb
-- spec/ifilter/sanitize_spec.rb
-- spec/ifilter/sid_spec.rb
-- spec/ifilter/strip_spec.rb
-- spec/ifilter/tid_spec.rb
-- spec/levenshtein_spec.rb
-- spec/ofilter/escape_url_spec.rb
-- spec/ofilter/footer_spec.rb
-- spec/ofilter/geo_spec.rb
-- spec/ofilter/short_url_spec.rb
-- spec/option_spec.rb
-- spec/sized_hash_spec.rb
-- spec/spec_helper.rb
-- spec/update_checker_spec.rb
-has_rdoc: 
diff --git a/spec/command/autofix_spec.rb b/spec/command/autofix_spec.rb
index ff558e4..2c512dc 100644
--- a/spec/command/autofix_spec.rb
+++ b/spec/command/autofix_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/autofix'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Autofix do
   include CommandHelper
diff --git a/spec/command/destroy_spec.rb b/spec/command/destroy_spec.rb
index 52dacf5..bf58eca 100644
--- a/spec/command/destroy_spec.rb
+++ b/spec/command/destroy_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/destroy'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Destroy,"when status is not removed" do
   include CommandHelper
diff --git a/spec/command/dm_spec.rb b/spec/command/dm_spec.rb
index 71faeaf..8b3e97f 100644
--- a/spec/command/dm_spec.rb
+++ b/spec/command/dm_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/dm'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Dm do
   include CommandHelper
diff --git a/spec/command/favorite_spec.rb b/spec/command/favorite_spec.rb
index 3e9034f..285629c 100644
--- a/spec/command/favorite_spec.rb
+++ b/spec/command/favorite_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/favorite'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Favorite do
   include CommandHelper
diff --git a/spec/command/limit_spec.rb b/spec/command/limit_spec.rb
index 4613fd2..ba7b180 100644
--- a/spec/command/limit_spec.rb
+++ b/spec/command/limit_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/limit'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Limit do
   include CommandHelper
diff --git a/spec/command/location_spec.rb b/spec/command/location_spec.rb
index 4324644..595dd1f 100644
--- a/spec/command/location_spec.rb
+++ b/spec/command/location_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/location'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Location do
   include CommandHelper
diff --git a/spec/command/name_spec.rb b/spec/command/name_spec.rb
index 852aeff..cd0acb3 100644
--- a/spec/command/name_spec.rb
+++ b/spec/command/name_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/name'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Name do
   include CommandHelper
diff --git a/spec/command/option_spec.rb b/spec/command/option_spec.rb
index 4878dfa..b998ec6 100644
--- a/spec/command/option_spec.rb
+++ b/spec/command/option_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../spec_helper', File.dirname(__FILE__))
 require 'atig/command/option'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Option do
   include CommandHelper
diff --git a/spec/command/refresh_spec.rb b/spec/command/refresh_spec.rb
index b4e056a..2ccdd1d 100644
--- a/spec/command/refresh_spec.rb
+++ b/spec/command/refresh_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/refresh'
-require 'atig/command/command_helper'
 require 'atig/command/info'
 
 describe Atig::Command::Refresh do
diff --git a/spec/command/reply_spec.rb b/spec/command/reply_spec.rb
index 6ad00fa..18038a0 100644
--- a/spec/command/reply_spec.rb
+++ b/spec/command/reply_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/reply'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Reply do
   include CommandHelper
diff --git a/spec/command/retweet_spec.rb b/spec/command/retweet_spec.rb
index d29cb2b..a7ed44e 100644
--- a/spec/command/retweet_spec.rb
+++ b/spec/command/retweet_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/retweet'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Retweet do
   include CommandHelper
diff --git a/spec/command/spam_spec.rb b/spec/command/spam_spec.rb
index f0291b3..f1ed422 100644
--- a/spec/command/spam_spec.rb
+++ b/spec/command/spam_spec.rb
@@ -1,7 +1,6 @@
 # -*- mode:ruby; coding:utf-8 -*-
 
 require File.expand_path( '../../spec_helper', __FILE__ )
-require 'atig/command/command_helper'
 require 'atig/command/spam'
 
 describe Atig::Command::Spam do
diff --git a/spec/command/status_spec.rb b/spec/command/status_spec.rb
index a7cfe04..3c20658 100644
--- a/spec/command/status_spec.rb
+++ b/spec/command/status_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/status'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Status do
   include CommandHelper
@@ -25,6 +24,19 @@ describe Atig::Command::Status do
     @gateway.filtered.should == { :status => 'blah blah' }
   end
 
+  if RUBY_VERSION >= '1.9'
+    it "should post with japanese language" do
+      res = status("あ"*140)
+      @statuses.should_receive(:find_by_user).with(@me,:limit=>1).and_return(nil)
+      @api.should_receive(:post).with('statuses/update', {:status=>"あ"*140}).and_return(res)
+
+      call '#twitter', "status", ["あ" * 140]
+
+      @gateway.updated.should  == [ res, '#twitter' ]
+      @gateway.filtered.should == { :status => "あ" * 140 }
+    end
+  end
+
   it "should not post same post" do
     e = entry user(1,'mzp'), status('blah blah')
     @statuses.should_receive(:find_by_user).with(@me,:limit=>1).and_return([ e ] )
diff --git a/spec/command/thread_spec.rb b/spec/command/thread_spec.rb
index ee9f8f4..2e31f22 100644
--- a/spec/command/thread_spec.rb
+++ b/spec/command/thread_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/thread'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Thread do
   include CommandHelper
diff --git a/spec/command/time_spec.rb b/spec/command/time_spec.rb
index 112faca..5d1f93c 100644
--- a/spec/command/time_spec.rb
+++ b/spec/command/time_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/time'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Time do
   include CommandHelper
diff --git a/spec/command/uptime_spec.rb b/spec/command/uptime_spec.rb
index 655f185..0d0a457 100644
--- a/spec/command/uptime_spec.rb
+++ b/spec/command/uptime_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/uptime'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Uptime do
   include CommandHelper
diff --git a/spec/command/user_info_spec.rb b/spec/command/user_info_spec.rb
index c41c0e4..d6da95e 100644
--- a/spec/command/user_info_spec.rb
+++ b/spec/command/user_info_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__)
 require 'atig/command/user_info'
-require 'atig/command/command_helper'
 
 describe Atig::Command::UserInfo do
   include CommandHelper
diff --git a/spec/command/user_spec.rb b/spec/command/user_spec.rb
index 6681b70..0a5a2de 100644
--- a/spec/command/user_spec.rb
+++ b/spec/command/user_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/user'
-require 'atig/command/command_helper'
 
 describe Atig::Command::User do
   include CommandHelper
diff --git a/spec/command/version_spec.rb b/spec/command/version_spec.rb
index d49bafc..2425e72 100644
--- a/spec/command/version_spec.rb
+++ b/spec/command/version_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/version'
-require 'atig/command/command_helper'
 
 describe Atig::Command::Version do
   include CommandHelper
diff --git a/spec/command/whois_spec.rb b/spec/command/whois_spec.rb
index 562215b..dc0b5da 100644
--- a/spec/command/whois_spec.rb
+++ b/spec/command/whois_spec.rb
@@ -2,7 +2,6 @@
 
 require File.expand_path( '../../spec_helper', __FILE__ )
 require 'atig/command/whois'
-require 'atig/command/command_helper'
 require 'atig/command/info'
 
 include Net::IRC::Constants
diff --git a/lib/atig/command/command_helper.rb b/spec/command_helper.rb
similarity index 100%
rename from lib/atig/command/command_helper.rb
rename to spec/command_helper.rb
diff --git a/spec/db/followings_spec.rb b/spec/db/followings_spec.rb
index 34a811a..9e13ede 100644
--- a/spec/db/followings_spec.rb
+++ b/spec/db/followings_spec.rb
@@ -9,6 +9,10 @@ describe Atig::Db::Followings,"when it is empty" do
     @db = Atig::Db::Followings.new('following.test.db')
   end
 
+  after(:all) do
+    FileUtils.rm_f 'following.test.db'
+  end
+
   it "should be emtpy" do
     @db.empty?.should be_true
   end
diff --git a/spec/db/lists_spec.rb b/spec/db/lists_spec.rb
index 7e9e4ab..05ec2fa 100644
--- a/spec/db/lists_spec.rb
+++ b/spec/db/lists_spec.rb
@@ -19,6 +19,12 @@ describe Atig::Db::Lists do
     @lists.listen{|kind,*args| @args[kind] = args }
   end
 
+  after(:all) do
+    %w(test-a.db test-b.db).each do |file|
+      FileUtils.rm_f file
+    end
+  end
+
   it "should have list" do
     @lists.update("a" => [ @alice, @bob ],
                   "b" => [ @alice, @bob , @charriey ])
@@ -101,4 +107,3 @@ describe Atig::Db::Lists do
     @args[:mode].should == [ "a", [ bob ]]
   end
 end
-
diff --git a/spec/db/statuses_spec.rb b/spec/db/statuses_spec.rb
index 5a8eeb1..58a4715 100644
--- a/spec/db/statuses_spec.rb
+++ b/spec/db/statuses_spec.rb
@@ -31,6 +31,10 @@ describe Atig::Db::Statuses do
     @db.add :status => @c , :user => @alice, :source => :srcC
   end
 
+  after(:all) do
+    FileUtils.rm_f 'test.db'
+  end
+
   it "should be re-openable" do
     Atig::Db::Statuses.new 'test.db'
   end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 6658fc7..4515b43 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -5,9 +5,9 @@ require 'bundler'
 Bundler.setup
 Bundler.require :default, :test
 
-$:.unshift(File.expand_path( '../lib', File.dirname(__FILE__) ) )
 
 require 'atig/monkey'
+require 'command_helper'
 
 RSpec::Matchers.define :be_text do |text|
   match do |status|

-- 
atig.git



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