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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75f85d54e8f19b0ed218580546f474d2bece87cf
4
- data.tar.gz: eb126dfc939bac1c946f92f681751373e60b4455
3
+ metadata.gz: cd4c0a52c101a6425db862de24695b7d86c82948
4
+ data.tar.gz: a3e63dc7ec78a60f41ffb21aab78a1d721b44b5f
5
5
  SHA512:
6
- metadata.gz: 15d4528b727219ecdb28f26b02d2a7fc76a947a626ac6626d6cdc2bfc8767c6439addb4d2518bdbf1ec8d8cefe0da80f11ee864949a95f9a4d8f6b548ccade4c
7
- data.tar.gz: 5f41074b7bae07b1af0f310733188e58578c640b8cfbf009021298c79429425b72243783c7bc408811262b93492c42af2410303c41e71f85df6be3e64a501974
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 1000
161
+ LIMIT #{limit}
160
162
  EOQ
161
163
  Google::Apis::BigqueryV2::QueryRequest.new(query: query)
162
164
  end
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module QiitaAntiSpam
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  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.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-20 00:00:00.000000000 Z
11
+ date: 2015-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler