rakismet 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b122ee0148197e727f46656179a22582da4aab0f
4
- data.tar.gz: e8d9b93c6bcb5de87c8717abc8037ce6ef7daf8a
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NzYyMjAxMmVhYThlM2IyNjg3YzhmN2IyNjI3NzFiNDQ4YzkzNzE0Mg==
5
+ data.tar.gz: !binary |-
6
+ MjI1YzE2YWQwMzUxNTk3NzY3Y2IzYjFhYzE5YzE5YTBjMjdmMzIyYg==
5
7
  SHA512:
6
- metadata.gz: de495498ab349675fe5c49a486383925e848b5267976e63722869585b9e24508b44b489a082bb807c8b6574e21931efe7a38df234989c16274b6bfd7c0044484
7
- data.tar.gz: 74ab9d5e48a07e48f0b66c8ef5907ed461508819547f15988e93f734c6ac5163731047535a5ae28bb32a1322f3ef675eb386c914646e89a87dd451c3eaa9310b
8
+ metadata.gz: !binary |-
9
+ NzI0MWU0YzBhZjYxN2FhNGIyZGI1M2QzNjFmMzVlMmFmNWVmYTNmZDVhOThl
10
+ NTc2OTA2Mjg1ZGE5YmE3ZjhiZDQwYzIwNzRkOGRkNzQ1MmYzMzA4NDE2ZDE2
11
+ NmIyNTMyZmU5ZjI4MWRkYjZmYThhZDFlZDM0NWU5ZWVmMzFhYjM=
12
+ data.tar.gz: !binary |-
13
+ ZWJjNTAwZDMxNzU2ZWU3OTI2NGU2ZmQ5NjBhMzRmZWU2M2JiOGIyMWYwOTNm
14
+ NjViNjM0MjIyZGY5ZjBlM2M0MDZmNjczODIxMjY4YTJmY2I5OWMwOTMzOWFh
15
+ YWRjZTU2YjYxNTQxOWYwZjMzNWZhNjdhOGE0NGUwMThiZjdlNTM=
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ = 1.5.1
2
+ * Send user_role attribute to Akismet without comment prefix [Hugo Bauer]
1
3
  = 1.5.0
2
4
  * Send HTTP_ env varialbes to Akismet [Eric Hochberger]
3
5
  = 1.4.0
data/README.md CHANGED
@@ -220,6 +220,9 @@ How can I simulate a spam submission?
220
220
  Most people have the opposite problem, where Akismet doesn't think anything is
221
221
  spam. The only guaranteed way to trigger a positive spam response is to set the
222
222
  comment author to "viagra-test-123".
223
+ To simulate a negative (not spam) result, set user_role to administrator, and all
224
+ other required fields populated with typical values. The Akismet API will always
225
+ return a false response.
223
226
 
224
227
  If you've done this and `spam?` is still returning false, you're probably
225
228
  missing the user IP or one of the key/url config variables. One way to check is
@@ -14,12 +14,12 @@ module Rakismet
14
14
  module ClassMethods
15
15
  def rakismet_attrs(args={})
16
16
  self.akismet_attrs ||= {}
17
- [:comment_type, :author, :author_url, :author_email, :content, :user_role, :permalink].each do |field|
17
+ [:comment_type, :author, :author_url, :author_email, :content, :permalink].each do |field|
18
18
  # clunky, but throwing around +type+ will break your heart
19
19
  fieldname = field.to_s =~ %r(^comment_) ? field : "comment_#{field}".intern
20
20
  self.akismet_attrs[fieldname] = args.delete(field) || field
21
21
  end
22
- [:user_ip, :user_agent, :referrer].each do |field|
22
+ [:user_ip, :user_agent, :referrer, :user_role].each do |field|
23
23
  self.akismet_attrs[field] = args.delete(field) || field
24
24
  end
25
25
  args.each_pair do |f,v|
@@ -1,3 +1,3 @@
1
1
  module Rakismet
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  MAPPED_PARAMS = { :comment_type => :type2, :author => :author2, :content => :content2,
4
4
  :author_email => :author_email2, :author_url => :author_url2,
5
- :user_role => :user_role2, :permalink => :permalink2 }
5
+ :permalink => :permalink2 }
6
6
 
7
7
  class CustomAkismetModel
8
8
  include Rakismet::Model
@@ -8,10 +8,11 @@ describe AkismetModel do
8
8
  end
9
9
 
10
10
  it "should have default mappings" do
11
- [:comment_type, :author, :author_email, :author_url, :content, :user_role, :permalink].each do |field|
11
+ [:comment_type, :author, :author_email, :author_url, :content, :permalink].each do |field|
12
12
  fieldname = field.to_s =~ %r(^comment_) ? field : "comment_#{field}".intern
13
13
  AkismetModel.akismet_attrs[fieldname].should eql(field)
14
14
  end
15
+ AkismetModel::akismet_attrs[:user_role].should eql(:user_role)
15
16
  end
16
17
 
17
18
  it "should have request mappings" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rakismet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh French
@@ -14,14 +14,14 @@ dependencies:
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
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: '0'
27
27
  - !ruby/object:Gem::Dependency
@@ -77,17 +77,17 @@ require_paths:
77
77
  - lib
78
78
  required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - '>='
85
+ - - ! '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
89
  rubyforge_project: rakismet
90
- rubygems_version: 2.0.3
90
+ rubygems_version: 2.4.1
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Akismet and TypePad AntiSpam integration for Rails.