rakismet 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -7,4 +7,5 @@ tmtags
7
7
  coverage
8
8
  rdoc
9
9
  pkg
10
- Gemfile.lock
10
+ Gemfile.lock
11
+ .bundle
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ = 1.1.2
2
+ * Explicitly load version
3
+ = 1.1.1
4
+ * Fix SafeBuffer error under Rails 3.0.8 and 3.0.9 [Brandon Ferguson]
5
+ * Readme cleanup [Zeke Sikelianos]
6
+ * Drop Jeweler in favor of Bundler's gem tasks
1
7
  = 1.1.0
2
8
  * Add HTTP Proxy support [Francisco Trindade]
3
9
  = 1.0.1
data/README.md CHANGED
@@ -8,14 +8,15 @@ AntiSpam service and generic Akismet endpoints are supported.
8
8
  Compatibility
9
9
  =============
10
10
 
11
- **Rakismet 1.0.0** works with Rails 3 and other Rack-based frameworks.
12
- **Rakismet 0.4.2** is compatible with Rails 2.
11
+ **Rakismet >= 1.0.0** work with Rails 3 and other Rack-based frameworks.
12
+
13
+ **Rakismet <= 0.4.2** is compatible with Rails 2.
13
14
 
14
15
  Getting Started
15
16
  ===============
16
17
 
17
18
  Once you've installed the Rakismet gem and added it to your application's Gemfile,
18
- you'll need an API key. Head on over to http://akismet.com/wordpress/ and sign up
19
+ you'll need an API key. Head on over to http://akismet.com/signup/ and sign up
19
20
  for a new username.
20
21
 
21
22
  Configure the Rakismet key and the URL of your application by setting the following
@@ -30,8 +31,8 @@ If you wish to use another Akismet-compatible API provider such as TypePad's
30
31
  antispam service, you'll also need to set `config.rakismet.host` to your service
31
32
  provider's endpoint.
32
33
 
33
- If you want to use a proxy to access akismet (i.e your application is behind a firewall),
34
- set the proxy_host and proxy_port option.
34
+ If you want to use a proxy to access akismet (i.e. your application is behind a
35
+ firewall), set the proxy_host and proxy_port option.
35
36
 
36
37
  ```ruby
37
38
  config.rakismet.proxy_host = 'http://yourdomain.com/'
@@ -49,12 +50,17 @@ class Comment
49
50
  end
50
51
  ```
51
52
 
52
- With Rakismet mixed in to your model, you'll get three methods for interacting with
53
+ With Rakismet mixed in to your model, you'll get three instance methods for interacting with
53
54
  Akismet:
54
55
 
55
- * `spam?` returns true if it's spam, false if it's not.
56
- * `ham!` submits comment that Akismet erroneously marked as spam, marked as a false positive.
57
- * `spam!` submits a comment that Akismet didn't think was spam.
56
+ * `spam?` submits the comment to Akismet and returns true if Akismet thinks the comment is spam, false if not.
57
+ * `ham!` resubmits a valid comment that Akismet erroneously marked as spam (marks it as a false positive.)
58
+ * `spam!` resubmits a spammy comment that Akismet missed (marks it as a false negative.)
59
+
60
+ The `ham!` and `spam!` methods will change the value of `spam?` but their
61
+ primary purpose is to send feedback to Akismet. The service works best when you
62
+ help correct the rare mistake; please consider using these methods if you're
63
+ moderating comments or otherwise reviewing the Akismet responses.
58
64
 
59
65
  Configuring Your Model
60
66
  ----------------------
@@ -119,13 +125,13 @@ exists) and take the values from the request object instead.
119
125
  This means that if you are **not storing the request variables**, you must call
120
126
  `spam?` from within the controller action that handles comment submissions. That
121
127
  way the IP, user agent, and referer will belong to the person submitting the
122
- comment. If you're not storing the request variables and you call `spam?` at a later
123
- time, the request information will be missing or invalid and Akismet won't be
124
- able to do its job properly.
128
+ comment. If you're not storing the request variables and you call `spam?` at a
129
+ later time, the request information will be missing or invalid and Akismet won't
130
+ be able to do its job properly.
125
131
 
126
- If you've decided to handle the request variables yourself, you can add this to your
127
- app initialization to disable the middleware responsible for tracking the request
128
- information:
132
+ If you've decided to handle the request variables yourself, you can disable the
133
+ middleware responsible for tracking the request information by adding this to
134
+ your app initialization:
129
135
 
130
136
  ```ruby
131
137
  config.rakismet.use_middleware = false
@@ -138,10 +144,10 @@ If you want to see what's happening behind the scenes, after you call one of
138
144
  `@comment.spam?`, `@comment.spam!` or `@comment.ham!` you can check
139
145
  `@comment.akismet_response`.
140
146
 
141
- This will contain the last response from the Akismet server. In the case of `spam?`
142
- it should be `true` or `false.` For `spam!` and `ham!` it should be `Feedback received.`
143
- If Akismet returned an error instead (e.g. if you left out some required information)
144
- this will contain the error message.
147
+ This will contain the last response from the Akismet server. In the case of
148
+ `spam?` it should be `true` or `false.` For `spam!` and `ham!` it should be
149
+ `Feedback received.` If Akismet returned an error instead (e.g. if you left out
150
+ some required information) this will contain the error message.
145
151
 
146
152
  FAQ
147
153
  ===
@@ -172,8 +178,8 @@ Can I use Rakismet with a different ORM or framework?
172
178
  Sure. Rakismet doesn't care what your persistence layer is. It will work with
173
179
  Datamapper, a NoSQL store, or whatever next month's DB flavor is.
174
180
 
175
- Rakismet also has no dependencies on Rails or any of its components, and only uses
176
- a small Rack middleware object to do some of its magic. Depending on your
181
+ Rakismet also has no dependencies on Rails or any of its components, and only
182
+ uses a small Rack middleware object to do some of its magic. Depending on your
177
183
  framework, you may have to modify this slightly and/or manually place it in your
178
184
  stack.
179
185
 
data/lib/rakismet.rb CHANGED
@@ -5,7 +5,7 @@ require 'yaml'
5
5
 
6
6
  require 'rakismet/model'
7
7
  require 'rakismet/middleware'
8
-
8
+ require 'rakismet/version'
9
9
  require 'rakismet/railtie.rb' if defined?(Rails)
10
10
 
11
11
  module Rakismet
@@ -1,3 +1,3 @@
1
1
  module Rakismet
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,28 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rakismet
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.2
4
5
  prerelease:
5
- version: 1.1.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Josh French
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-08-11 00:00:00 -04:00
14
- default_executable:
12
+ date: 2011-08-11 00:00:00.000000000Z
15
13
  dependencies: []
16
-
17
- description: Rakismet is the easiest way to integrate Akismet or TypePad's AntiSpam into your Rails app.
14
+ description: Rakismet is the easiest way to integrate Akismet or TypePad's AntiSpam
15
+ into your Rails app.
18
16
  email: josh@vitamin-j.com
19
17
  executables: []
20
-
21
18
  extensions: []
22
-
23
- extra_rdoc_files:
19
+ extra_rdoc_files:
24
20
  - README.md
25
- files:
21
+ files:
26
22
  - .gitignore
27
23
  - CHANGELOG
28
24
  - Gemfile
@@ -40,35 +36,31 @@ files:
40
36
  - spec/rakismet_model_spec.rb
41
37
  - spec/rakismet_spec.rb
42
38
  - spec/spec_helper.rb
43
- has_rdoc: true
44
39
  homepage: http://github.com/joshfrench/rakismet
45
40
  licenses: []
46
-
47
41
  post_install_message:
48
42
  rdoc_options: []
49
-
50
- require_paths:
43
+ require_paths:
51
44
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
45
+ required_ruby_version: !ruby/object:Gem::Requirement
53
46
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: "0"
58
- required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
52
  none: false
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: "0"
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
64
57
  requirements: []
65
-
66
58
  rubyforge_project: rakismet
67
- rubygems_version: 1.6.2
59
+ rubygems_version: 1.8.6
68
60
  signing_key:
69
61
  specification_version: 3
70
62
  summary: Akismet and TypePad AntiSpam integration for Rails.
71
- test_files:
63
+ test_files:
72
64
  - spec/rakismet_middleware_spec.rb
73
65
  - spec/rakismet_model_spec.rb
74
66
  - spec/rakismet_spec.rb