threepwood 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +22 -7
- data/lib/threepwood/railtie.rb +3 -0
- data/lib/threepwood/version.rb +1 -1
- metadata +6 -6
data/README.rdoc
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
= Threepwood
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
Allows cookies to be set and unset with simple command. To comply with EU law, users must explictly accept cookies before amy cookies are placed on their devise.
|
4
|
+
By including Threepwood, you block all cookie until you explicitly accept them. It currently only works with rails >=3 projects.
|
5
|
+
|
6
6
|
|
7
7
|
== Installation
|
8
8
|
|
@@ -10,10 +10,25 @@ Allows cookies to be set and unset with simple command.
|
|
10
10
|
|
11
11
|
== Usage
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
In your gemfile:
|
14
|
+
gem 'threepwood'
|
15
|
+
Create a partial saying that your site will use cookies
|
16
|
+
%p
|
17
|
+
This site uses cookies.
|
18
|
+
= link_to 'I accept cookies.', '/cookies_accept'
|
19
|
+
= link_to 'I decline cookies.', '/cookies_deny'
|
20
|
+
Set up routes etc as normal and create new actions in a controller:
|
21
|
+
def cookies_accept
|
22
|
+
accept_cookies #this calls the threepwood method to allow cookies
|
23
|
+
redirect_to home_path
|
24
|
+
end
|
25
|
+
def cookies_deny
|
26
|
+
reject_cookies # this calls the threepwood method to remove the fact that the user has accepted cookies
|
27
|
+
end
|
28
|
+
|
29
|
+
On your page (assume HAML):
|
30
|
+
= render :partial => 'your_message_about_cookies' unless @accepted_cookies
|
31
|
+
|
17
32
|
|
18
33
|
== License
|
19
34
|
|
data/lib/threepwood/railtie.rb
CHANGED
data/lib/threepwood/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: threepwood
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 8
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.8.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Yule
|
@@ -18,8 +18,8 @@ cert_chain: []
|
|
18
18
|
date: 2012-05-21 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
|
-
description:
|
22
|
-
email:
|
21
|
+
description: Block all cookies, until user explicitly accepts them, comply with EU cookie law
|
22
|
+
email: paul@dryule.com
|
23
23
|
executables: []
|
24
24
|
|
25
25
|
extensions: []
|
@@ -32,7 +32,7 @@ files:
|
|
32
32
|
- lib/threepwood/version.rb
|
33
33
|
- lib/threepwood.rb
|
34
34
|
- README.rdoc
|
35
|
-
homepage:
|
35
|
+
homepage: https://github.com/yule/threepwood
|
36
36
|
licenses: []
|
37
37
|
|
38
38
|
post_install_message:
|