akismet 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE.txt +1 -1
- data/lib/akismet/client.rb +6 -4
- data/lib/akismet/version.rb +1 -4
- metadata +24 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7fe6266271b275e87866567e5d29ad6caab4872de31503f1b4c86e5ada2a9ee8
|
4
|
+
data.tar.gz: 01b4a05e6dd6448e285a83ff80e8a6de4eb6dfc172522248a31da2bad5fce84f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 637d4cb7c2a101ada4e86d9d81a378a487ff96740aa4e49feb41ea95e62a6e860937d8104a63922739bc4c8da069a1f47e5e50cf32887fd5ab91bd74acf03f94
|
7
|
+
data.tar.gz: 93eeb3be625623d3c9f1df0c6f86e3413a856c8185a15235536af453d29c7772fb19ea7915f8c00fe4159a6717b5df78c57cbffc1e11642de475d60a321ac8d8
|
data/LICENSE.txt
CHANGED
data/lib/akismet/client.rb
CHANGED
@@ -58,7 +58,7 @@ module Akismet
|
|
58
58
|
#
|
59
59
|
def self.open(api_key, app_url, options = {})
|
60
60
|
raise "Block required" unless block_given?
|
61
|
-
client = new(api_key, app_url)
|
61
|
+
client = new(api_key, app_url, options)
|
62
62
|
client.open { yield client }
|
63
63
|
end
|
64
64
|
|
@@ -85,7 +85,7 @@ module Akismet
|
|
85
85
|
# @return [Object]
|
86
86
|
# The return value of the block
|
87
87
|
# @raise [StandardError]
|
88
|
-
# The client is already open
|
88
|
+
# The client is already open
|
89
89
|
# @overload open
|
90
90
|
# @return [self]
|
91
91
|
# @raise [StandardError]
|
@@ -94,7 +94,8 @@ module Akismet
|
|
94
94
|
def open
|
95
95
|
raise "Already open" if open?
|
96
96
|
|
97
|
-
@http_session = Net::HTTP.new(
|
97
|
+
@http_session = Net::HTTP.new("#{ api_key }.rest.akismet.com", Net::HTTP.https_default_port)
|
98
|
+
@http_session.use_ssl = true
|
98
99
|
|
99
100
|
begin
|
100
101
|
@http_session.start
|
@@ -127,7 +128,7 @@ module Akismet
|
|
127
128
|
# @return [Boolean]
|
128
129
|
#
|
129
130
|
def verify_key
|
130
|
-
response = Net::HTTP.start('rest.akismet.com',
|
131
|
+
response = Net::HTTP.start('rest.akismet.com', use_ssl: true) do |session|
|
131
132
|
invoke session, 'verify-key', blog: app_url, key: api_key
|
132
133
|
end
|
133
134
|
|
@@ -385,6 +386,7 @@ module Akismet
|
|
385
386
|
languages: :blog_lang,
|
386
387
|
user_role: :user_role,
|
387
388
|
test: :is_test,
|
389
|
+
test_discard: :test_discard,
|
388
390
|
}
|
389
391
|
|
390
392
|
end
|
data/lib/akismet/version.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: akismet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonah Burke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.11'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.11'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
47
|
+
version: '12.0'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
54
|
+
version: '12.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: yard
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
61
|
+
version: 0.9.20
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
68
|
+
version: 0.9.20
|
55
69
|
description:
|
56
70
|
email:
|
57
71
|
- jonah@jonahb.com
|
@@ -78,17 +92,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
92
|
requirements:
|
79
93
|
- - ">="
|
80
94
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
95
|
+
version: '2.4'
|
82
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
97
|
requirements:
|
84
98
|
- - ">="
|
85
99
|
- !ruby/object:Gem::Version
|
86
100
|
version: '0'
|
87
101
|
requirements: []
|
88
|
-
|
89
|
-
rubygems_version: 2.4.5
|
102
|
+
rubygems_version: 3.0.3
|
90
103
|
signing_key:
|
91
104
|
specification_version: 4
|
92
105
|
summary: A Ruby client for the Akismet API
|
93
106
|
test_files: []
|
94
|
-
has_rdoc:
|