yandex_cleanweb 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,16 +6,16 @@ require "net/http"
6
6
 
7
7
  module YandexCleanweb
8
8
  API_URL = 'http://cleanweb-api.yandex.ru/1.0/'
9
- mattr_accessor :api_key
10
9
 
11
10
  class << self
11
+ attr_accessor :api_key
12
+
12
13
  def spam?(*options)
13
14
  response = api_check_spam(options)
14
- puts response
15
15
  doc = Nokogiri::XML(response)
16
+
16
17
  request_id_tag = doc.xpath('//check-spam-result/id')
17
18
  spam_flag_tag = doc.xpath('//check-spam-result/text')
18
- puts spam_flag_tag.inspect
19
19
 
20
20
  request_id = request_id_tag[0]
21
21
  spam_flag = spam_flag_tag[0].attributes["spam-flag"].content
@@ -1,3 +1,3 @@
1
1
  module YandexCleanweb
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yandex_cleanweb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: