Permalink
Browse files

Merge pull request #7 from hsbt/master

spec ファイルのディレクトリを分割
  • Loading branch information...
mzp committed May 13, 2011
2 parents bcaccb9 + 4fecf50 commit 5a541315ea95eb852726f00a070a60b271ea614d
Showing with 95 additions and 113 deletions.
  1. +8 −8 Gemfile.lock
  2. +1 −1 Rakefile
  3. +2 −18 atig.rb
  4. +1 −2 atig/command/user_info.rb
  5. +2 −2 {atig → spec}/command/autofix_spec.rb
  6. +2 −2 {atig → spec}/command/destroy_spec.rb
  7. +2 −2 {atig → spec}/command/dm_spec.rb
  8. +2 −2 {atig → spec}/command/favorite_spec.rb
  9. +2 −2 {atig → spec}/command/limit_spec.rb
  10. +2 −2 {atig → spec}/command/location_spec.rb
  11. +2 −2 {atig → spec}/command/name_spec.rb
  12. +2 −2 {atig → spec}/command/option_spec.rb
  13. +2 −2 {atig → spec}/command/refresh_spec.rb
  14. +2 −2 {atig → spec}/command/reply_spec.rb
  15. +2 −2 {atig → spec}/command/retweet_spec.rb
  16. +2 −2 {atig → spec}/command/spam_spec.rb
  17. +2 −2 {atig → spec}/command/status_spec.rb
  18. +2 −2 {atig → spec}/command/thread_spec.rb
  19. +2 −2 {atig → spec}/command/time_spec.rb
  20. +2 −2 {atig → spec}/command/uptime_spec.rb
  21. +1 −2 {atig → spec}/command/user_info_spec.rb
  22. +2 −2 {atig → spec}/command/user_spec.rb
  23. +2 −2 {atig → spec}/command/version_spec.rb
  24. +2 −2 {atig → spec}/command/whois_spec.rb
  25. +2 −2 {atig → spec}/db/followings_spec.rb
  26. +2 −2 {atig → spec}/db/listenable_spec.rb
  27. +2 −2 {atig → spec}/db/lists_spec.rb
  28. +2 −2 {atig → spec}/db/roman_spec.rb
  29. +2 −2 {atig → spec}/db/sized_uniq_array_spec.rb
  30. +2 −2 {atig → spec}/db/statuses_spec.rb
  31. +2 −2 {atig → spec}/ifilter/expand_url_spec.rb
  32. +2 −2 {atig → spec}/ifilter/retweet_spec.rb
  33. +2 −2 {atig → spec}/ifilter/retweet_time_spec.rb
  34. +2 −2 {atig → spec}/ifilter/sanitize_spec.rb
  35. +2 −2 {atig → spec}/ifilter/sid_spec.rb
  36. +2 −2 {atig → spec}/ifilter/strip_spec.rb
  37. +2 −2 {atig → spec}/ifilter/tid_spec.rb
  38. +2 −2 {atig → spec}/ifilter/utf7_spec.rb
  39. +2 −2 {atig → spec}/levenshtein_spec.rb
  40. +2 −2 {atig → spec}/ofilter/escape_url_spec.rb
  41. +2 −2 {atig → spec}/ofilter/footer_spec.rb
  42. +2 −2 {atig → spec}/ofilter/geo_spec.rb
  43. +2 −2 {atig → spec}/ofilter/short_url_spec.rb
  44. +2 −2 {atig → spec}/option_spec.rb
  45. +2 −2 {atig → spec}/sized_hash_spec.rb
  46. 0 {atig → spec}/spec_helper.rb
  47. +2 −2 {atig → spec}/update_checker_spec.rb
View
@@ -2,17 +2,17 @@ GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.2)
- json (1.4.6)
+ json (1.5.1)
oauth (0.4.4)
rake (0.8.7)
- rspec (2.4.0)
- rspec-core (~> 2.4.0)
- rspec-expectations (~> 2.4.0)
- rspec-mocks (~> 2.4.0)
- rspec-core (2.4.0)
- rspec-expectations (2.4.0)
+ rspec (2.5.0)
+ rspec-core (~> 2.5.0)
+ rspec-expectations (~> 2.5.0)
+ rspec-mocks (~> 2.5.0)
+ rspec-core (2.5.1)
+ rspec-expectations (2.5.0)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.4.0)
+ rspec-mocks (2.5.0)
sqlite3-ruby (1.2.5)
PLATFORMS
View
@@ -10,7 +10,7 @@ require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new do |t|
t.rspec_opts = ['--color']
- t.pattern = 'atig/**/*_spec.rb'
+ t.pattern = 'spec/**/*_spec.rb'
end
task :default => [:spec]
View
20 atig.rb
@@ -22,24 +22,8 @@
require 'atig/twitter'
require 'atig/scheduler'
-Dir['atig/agent/*.rb'].each do|file|
- load file
-end
-
-Dir['atig/ifilter/*.rb'].each do|file|
- require file unless file =~ /_spec.rb\Z/
-end
-
-Dir['atig/ofilter/*.rb'].each do|file|
- require file unless file =~ /_spec.rb\Z/
-end
-
-Dir['atig/command/*.rb'].each do|file|
- require file unless file =~ /(?:_spec\.rb|_helper\.rb)\Z/
-end
-
-Dir['atig/channel/*.rb'].each do|file|
- require file
+%w(agent ifilter ofilter command channel).each do |dir|
+ Dir["atig/#{dir}/*.rb"].each {|file| load file}
end
require 'atig/gateway/session'
@@ -1,6 +1,5 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
require 'atig/command/command'
module Atig
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/autofix'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/destroy'
require 'atig/command/command_helper'
View
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/dm'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/favorite'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/limit'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/location'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/name'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../spec_helper', File.dirname(__FILE__))
require 'atig/command/option'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/refresh'
require 'atig/command/command_helper'
require 'atig/command/info'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/reply'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/retweet'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/command_helper'
require 'atig/command/spam'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/status'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/thread'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/time'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/uptime'
require 'atig/command/command_helper'
@@ -1,7 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require 'atig/spec_helper'
+require File.expand_path( '../../spec_helper', __FILE__)
require 'atig/command/user_info'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/user'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/version'
require 'atig/command/command_helper'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/command/whois'
require 'atig/command/command_helper'
require 'atig/command/info'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/db/followings'
describe Atig::Db::Followings,"when it is empty" do
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/db/listenable'
class SampleListener
View
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/db/lists'
describe Atig::Db::Lists do
View
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/db/roman'
describe Atig::Db::Roman do
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/db/sized_uniq_array'
require 'ostruct'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'fileutils'
require 'atig/db/statuses'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/ifilter/expand_url'
require 'atig/twitter_struct'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/ifilter/retweet'
require 'atig/twitter_struct'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/ifilter/retweet_time'
require 'atig/twitter_struct'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/ifilter/sanitize'
require 'atig/twitter_struct'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/ifilter/xid'
require 'atig/twitter_struct'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/ifilter/strip'
require 'atig/twitter_struct'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/ifilter/xid'
require 'atig/twitter_struct'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/ifilter/utf7'
require 'atig/twitter_struct'
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( 'spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../spec_helper', __FILE__ )
require 'atig/levenshtein'
target = [Atig::Levenshtein, Atig::Levenshtein::PureRuby]
@@ -1,6 +1,6 @@
-#! /opt/local/bin/ruby -w
# -*- mode:ruby; coding:utf-8 -*-
-require File.expand_path( '../spec_helper', File.dirname(__FILE__) )
+
+require File.expand_path( '../../spec_helper', __FILE__ )
require 'atig/ofilter/escape_url'
class Atig::OFilter::EscapeUrl
Oops, something went wrong.

0 comments on commit 5a54131

Please sign in to comment.