ruboty-qiita_anti_spam 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruboty/handlers/qiita_anti_spam.rb +3 -1
- data/lib/ruboty/qiita_anti_spam/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd4c0a52c101a6425db862de24695b7d86c82948
|
4
|
+
data.tar.gz: a3e63dc7ec78a60f41ffb21aab78a1d721b44b5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08bf0854006c6a82678b9e6765d23952148ebcb60f3d7ffce722b26549c4cd14d34c7a03eac7aa3d5ee6a45c88d73ba166bfd1cf90c085a29b70dc72fc937ebb
|
7
|
+
data.tar.gz: ef4d6524a55ee4bd1d5cef4852c9b09410889c55358c9d64acab7fe7c59613a561f5729dcc362dff836f3d0069089db77200b41239fbce33159cf73897332f3e
|
@@ -146,8 +146,10 @@ module Ruboty
|
|
146
146
|
def build_query_request(opts)
|
147
147
|
if (permanent_user_id = opts[:permanent_user_id])
|
148
148
|
cond = %Q(user_id = #{permanent_user_id})
|
149
|
+
limit = 1000
|
149
150
|
elsif (uuid = opts[:uuid])
|
150
151
|
cond = %Q(message3 = "#{uuid}")
|
152
|
+
limit = 1
|
151
153
|
else
|
152
154
|
fail ArgumentError
|
153
155
|
end
|
@@ -156,7 +158,7 @@ module Ruboty
|
|
156
158
|
SELECT message1, message2
|
157
159
|
FROM (TABLE_DATE_RANGE(qiita.events_, DATE_ADD(CURRENT_TIMESTAMP(), -7, "DAY"), CURRENT_TIMESTAMP()))
|
158
160
|
WHERE name = "check spam" AND (#{cond})
|
159
|
-
LIMIT
|
161
|
+
LIMIT #{limit}
|
160
162
|
EOQ
|
161
163
|
Google::Apis::BigqueryV2::QueryRequest.new(query: query)
|
162
164
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-qiita_anti_spam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomoki Aonuma
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|