atig 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/atig/channel/timeline.rb +2 -2
- data/lib/atig/update_checker.rb +5 -2
- data/lib/atig/version.rb +1 -1
- data/spec/command/autofix_spec.rb +0 -1
- data/spec/command/destroy_spec.rb +0 -1
- data/spec/command/dm_spec.rb +0 -1
- data/spec/command/favorite_spec.rb +0 -1
- data/spec/command/limit_spec.rb +0 -1
- data/spec/command/location_spec.rb +0 -1
- data/spec/command/name_spec.rb +0 -1
- data/spec/command/option_spec.rb +0 -1
- data/spec/command/refresh_spec.rb +0 -1
- data/spec/command/reply_spec.rb +0 -1
- data/spec/command/retweet_spec.rb +0 -1
- data/spec/command/spam_spec.rb +0 -1
- data/spec/command/status_spec.rb +13 -1
- data/spec/command/thread_spec.rb +0 -1
- data/spec/command/time_spec.rb +0 -1
- data/spec/command/uptime_spec.rb +0 -1
- data/spec/command/user_info_spec.rb +0 -1
- data/spec/command/user_spec.rb +0 -1
- data/spec/command/version_spec.rb +0 -1
- data/spec/command/whois_spec.rb +0 -1
- data/{lib/atig/command → spec}/command_helper.rb +0 -0
- data/spec/db/followings_spec.rb +4 -0
- data/spec/db/lists_spec.rb +6 -1
- data/spec/db/statuses_spec.rb +4 -0
- data/spec/spec_helper.rb +1 -1
- metadata +4 -3
@@ -23,7 +23,7 @@ module Atig
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
#
|
26
|
+
# git clone した状態から動かしていたら常に最新版のチェック
|
27
27
|
daemon do
|
28
28
|
log :info,"check update"
|
29
29
|
messages = UpdateChecker.latest
|
@@ -35,7 +35,7 @@ module Atig
|
|
35
35
|
@channel.notify(" ... and more. check it: http://mzp.github.com/atig/") if messages.size > 3
|
36
36
|
end
|
37
37
|
sleep (3*60*60)
|
38
|
-
end
|
38
|
+
end if UpdateChecker.git_repos?
|
39
39
|
|
40
40
|
db.statuses.listen do|entry|
|
41
41
|
if db.followings.include?(entry.user) or
|
data/lib/atig/update_checker.rb
CHANGED
@@ -20,6 +20,10 @@ module Atig
|
|
20
20
|
system("git show #{rev} > /dev/null 2>&1")
|
21
21
|
end
|
22
22
|
|
23
|
+
def git_repos?
|
24
|
+
File.exists? File.expand_path('../../../.git', __FILE__)
|
25
|
+
end
|
26
|
+
|
23
27
|
def git?
|
24
28
|
system('which git > /dev/null 2>&1')
|
25
29
|
end
|
@@ -47,7 +51,6 @@ module Atig
|
|
47
51
|
[]
|
48
52
|
end
|
49
53
|
|
50
|
-
module_function :latest, :commits, :server_version, :local_repos?, :git?
|
54
|
+
module_function :latest, :commits, :server_version, :local_repos?, :git?, :git_repos?
|
51
55
|
end
|
52
56
|
end
|
53
|
-
|
data/lib/atig/version.rb
CHANGED
data/spec/command/dm_spec.rb
CHANGED
data/spec/command/limit_spec.rb
CHANGED
data/spec/command/name_spec.rb
CHANGED
data/spec/command/option_spec.rb
CHANGED
data/spec/command/reply_spec.rb
CHANGED
data/spec/command/spam_spec.rb
CHANGED
data/spec/command/status_spec.rb
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require File.expand_path( '../../spec_helper', __FILE__ )
|
4
4
|
require 'atig/command/status'
|
5
|
-
require 'atig/command/command_helper'
|
6
5
|
|
7
6
|
describe Atig::Command::Status do
|
8
7
|
include CommandHelper
|
@@ -25,6 +24,19 @@ describe Atig::Command::Status do
|
|
25
24
|
@gateway.filtered.should == { :status => 'blah blah' }
|
26
25
|
end
|
27
26
|
|
27
|
+
if RUBY_VERSION >= '1.9'
|
28
|
+
it "should post with japanese language" do
|
29
|
+
res = status("あ"*140)
|
30
|
+
@statuses.should_receive(:find_by_user).with(@me,:limit=>1).and_return(nil)
|
31
|
+
@api.should_receive(:post).with('statuses/update', {:status=>"あ"*140}).and_return(res)
|
32
|
+
|
33
|
+
call '#twitter', "status", ["あ" * 140]
|
34
|
+
|
35
|
+
@gateway.updated.should == [ res, '#twitter' ]
|
36
|
+
@gateway.filtered.should == { :status => "あ" * 140 }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
28
40
|
it "should not post same post" do
|
29
41
|
e = entry user(1,'mzp'), status('blah blah')
|
30
42
|
@statuses.should_receive(:find_by_user).with(@me,:limit=>1).and_return([ e ] )
|
data/spec/command/thread_spec.rb
CHANGED
data/spec/command/time_spec.rb
CHANGED
data/spec/command/uptime_spec.rb
CHANGED
data/spec/command/user_spec.rb
CHANGED
data/spec/command/whois_spec.rb
CHANGED
File without changes
|
data/spec/db/followings_spec.rb
CHANGED
data/spec/db/lists_spec.rb
CHANGED
@@ -19,6 +19,12 @@ describe Atig::Db::Lists do
|
|
19
19
|
@lists.listen{|kind,*args| @args[kind] = args }
|
20
20
|
end
|
21
21
|
|
22
|
+
after(:all) do
|
23
|
+
%w(test-a.db test-b.db).each do |file|
|
24
|
+
FileUtils.rm_f file
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
22
28
|
it "should have list" do
|
23
29
|
@lists.update("a" => [ @alice, @bob ],
|
24
30
|
"b" => [ @alice, @bob , @charriey ])
|
@@ -101,4 +107,3 @@ describe Atig::Db::Lists do
|
|
101
107
|
@args[:mode].should == [ "a", [ bob ]]
|
102
108
|
end
|
103
109
|
end
|
104
|
-
|
data/spec/db/statuses_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -5,9 +5,9 @@ require 'bundler'
|
|
5
5
|
Bundler.setup
|
6
6
|
Bundler.require :default, :test
|
7
7
|
|
8
|
-
$:.unshift(File.expand_path( '../lib', File.dirname(__FILE__) ) )
|
9
8
|
|
10
9
|
require 'atig/monkey'
|
10
|
+
require 'command_helper'
|
11
11
|
|
12
12
|
RSpec::Matchers.define :be_text do |text|
|
13
13
|
match do |status|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sqlite3
|
@@ -179,7 +179,6 @@ files:
|
|
179
179
|
- lib/atig/command.rb
|
180
180
|
- lib/atig/command/autofix.rb
|
181
181
|
- lib/atig/command/command.rb
|
182
|
-
- lib/atig/command/command_helper.rb
|
183
182
|
- lib/atig/command/destroy.rb
|
184
183
|
- lib/atig/command/dm.rb
|
185
184
|
- lib/atig/command/favorite.rb
|
@@ -266,6 +265,7 @@ files:
|
|
266
265
|
- spec/command/user_spec.rb
|
267
266
|
- spec/command/version_spec.rb
|
268
267
|
- spec/command/whois_spec.rb
|
268
|
+
- spec/command_helper.rb
|
269
269
|
- spec/db/followings_spec.rb
|
270
270
|
- spec/db/listenable_spec.rb
|
271
271
|
- spec/db/lists_spec.rb
|
@@ -333,6 +333,7 @@ test_files:
|
|
333
333
|
- spec/command/user_spec.rb
|
334
334
|
- spec/command/version_spec.rb
|
335
335
|
- spec/command/whois_spec.rb
|
336
|
+
- spec/command_helper.rb
|
336
337
|
- spec/db/followings_spec.rb
|
337
338
|
- spec/db/listenable_spec.rb
|
338
339
|
- spec/db/lists_spec.rb
|