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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2dea9759992fa5b17960f97071121681000d6be2
4
- data.tar.gz: 9d1c29c9468cf430f23b99856eea566a4d7bda18
3
+ metadata.gz: 3fe98242f8d9e9e70dc24a3e22035ef47657fa9e
4
+ data.tar.gz: 80a6b546f4d741666c77782e65020b2aa633e717
5
5
  SHA512:
6
- metadata.gz: 16a8e9d817fb23f6638fb378def0093a73da61c5881e262bd035d3bf185a1f499ed59e14f8d4c47d331a9992a6bdeec3199eadff21187e0e911ffa2d96019de7
7
- data.tar.gz: 378aa246ade134480083371dcb287cfff439bbc427d0e749ce3720e60dae2ca69c2f45df6b0763a40e4fda6927c0cb2cb59153cba66c0a7c5fdec865723c776b
6
+ metadata.gz: 08f7150a39053147bda052ef519efab5f6705c24a97c23b635624b2d8064c6e814b7306922fad28551cf544b30555000937e7ba0ea0a34894f8e6adececad3da
7
+ data.tar.gz: 1a18cd74a2ed4fbd44b9aea9c224ed5739689f508896f2faea7d1cb40fa3620d2e84d434e40e1e55004a2bc804b2816cbeecd86a1cbed6833f860a9cabe464e2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.0.8 - 2015-02-11 - 'Russel'
2
+
3
+ - Fix: bug in add/remove user/mention to the blacklist
4
+
1
5
  ## 2.0.7 - 2015-02-04 - 'Diacritics'
2
6
 
3
7
  - Fix: users list if an element isn't in UTF8
@@ -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
@@ -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
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Ayadn
3
- VERSION = "2.0.7"
3
+ VERSION = "2.0.8"
4
4
  end
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.7
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-04 00:00:00.000000000 Z
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor