ayadn 2.0.7 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/ayadn/blacklist.rb +3 -3
- data/lib/ayadn/databases.rb +3 -3
- data/lib/ayadn/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: 3fe98242f8d9e9e70dc24a3e22035ef47657fa9e
|
4
|
+
data.tar.gz: 80a6b546f4d741666c77782e65020b2aa633e717
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08f7150a39053147bda052ef519efab5f6705c24a97c23b635624b2d8064c6e814b7306922fad28551cf544b30555000937e7ba0ea0a34894f8e6adececad3da
|
7
|
+
data.tar.gz: 1a18cd74a2ed4fbd44b9aea9c224ed5739689f508896f2faea7d1cb40fa3620d2e84d434e40e1e55004a2bc804b2816cbeecd86a1cbed6833f860a9cabe464e2
|
data/CHANGELOG.md
CHANGED
data/lib/ayadn/blacklist.rb
CHANGED
@@ -111,15 +111,15 @@ module Ayadn
|
|
111
111
|
type = args.shift
|
112
112
|
case type
|
113
113
|
when 'user', 'username', 'account'
|
114
|
-
Databases.remove_from_blacklist(args)
|
114
|
+
Databases.remove_from_blacklist(type, args)
|
115
115
|
target = @workers.add_arobases_to_usernames(args)
|
116
116
|
Logs.rec.info "Removed '#{target}' from blacklist of users."
|
117
117
|
when 'mention', 'mentions'
|
118
|
-
Databases.remove_from_blacklist(args)
|
118
|
+
Databases.remove_from_blacklist(type, args)
|
119
119
|
target = @workers.add_arobases_to_usernames(args)
|
120
120
|
Logs.rec.info "Removed '#{target}' from blacklist of mentions."
|
121
121
|
when 'client', 'source', 'hashtag', 'tag'
|
122
|
-
Databases.remove_from_blacklist(args)
|
122
|
+
Databases.remove_from_blacklist(type, args)
|
123
123
|
Logs.rec.info "Removed '#{type}:#{args}' from blacklist."
|
124
124
|
else
|
125
125
|
Status.new.wrong_arguments
|
data/lib/ayadn/databases.rb
CHANGED
@@ -69,7 +69,7 @@ module Ayadn
|
|
69
69
|
def self.add_to_blacklist(type, target)
|
70
70
|
crashes = 0
|
71
71
|
begin
|
72
|
-
remove_from_blacklist(target)
|
72
|
+
remove_from_blacklist(type, target)
|
73
73
|
@sql.transaction do |db_in_transaction|
|
74
74
|
target.each do |element|
|
75
75
|
insert_data = {}
|
@@ -119,11 +119,11 @@ module Ayadn
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
122
|
-
def self.remove_from_blacklist(target)
|
122
|
+
def self.remove_from_blacklist(type, target)
|
123
123
|
crashes = 0
|
124
124
|
begin
|
125
125
|
target.each do |el|
|
126
|
-
@sql.execute("DELETE FROM Blacklist WHERE content=(?)", [el.downcase])
|
126
|
+
@sql.execute("DELETE FROM Blacklist WHERE type=(?) AND content=(?)", [type, el.downcase])
|
127
127
|
end
|
128
128
|
rescue Amalgalite::SQLite3::Error => e
|
129
129
|
if crashes < 2
|
data/lib/ayadn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ayadn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dejonckheere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|