gdpr 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a659d250706a0d53330035165bf30ea00225335d
4
- data.tar.gz: 54fceb26c045db2bd52acec48bf8d9e55d015d77
3
+ metadata.gz: d30ad7478790233bf21437ff952934f735b5248f
4
+ data.tar.gz: 5aa340f73a302342ef5042e5f63afb36beb2b27e
5
5
  SHA512:
6
- metadata.gz: f01aefeb4a5e4134ffa593fcc2d9601bdb9c5d2b52762566cd5d3084e6244b99b1fd9804c9a1aa121c7089b8ca63288a019b0148dc0291563039a4a86d347b86
7
- data.tar.gz: 3e88bece413462886936d6c1504d192134dd0e1cff389894c6e645ef2d26b17d8f66e0726bd82847c55eb86b355bf41b4a925ffa67fbf2b3527b2d1569e5ee67
6
+ metadata.gz: f5786697702cb52655ca25a66bd836791b7462bd6368698bcc85b9a6db88ec3b16e0ffcebcd7068fad8928cfef2d5a3052743a31466f99ef6e8a781af428e31d
7
+ data.tar.gz: a0431329c78ede616fe17d98828f660b1a80615cb28d4a5647e228a1c64c0653813e2f75894d3b89fa31e77109b7e19740d71b384931b94f4ee6ce0c6efd69d3
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Les Poupées Russes
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,8 +1,5 @@
1
- # Gdpr
2
- Short description and motivation.
3
-
4
- ## Usage
5
- How to use my plugin.
1
+ # GDPR
2
+ Helps getting your Rails app GDPR compliant
6
3
 
7
4
  ## Installation
8
5
  Add this line to your application's Gemfile:
@@ -21,8 +18,25 @@ Or install it yourself as:
21
18
  $ gem install gdpr
22
19
  ```
23
20
 
21
+ Add this to layout:
22
+ ```ruby
23
+ <%= render 'gdpr/cookie_consent' %>
24
+ ```
25
+
26
+ Add this to javascripts:
27
+ ```js
28
+ //= require gdpr
29
+ ```
30
+
31
+ Add this to stylesheets:
32
+ ```sass
33
+ @import 'gdpr'
34
+ ```
35
+
24
36
  ## Checklist
25
37
 
38
+ https://www.eugdpr.org/
39
+
26
40
  [x] Cookie consent
27
41
  [ ] Privacy policy
28
42
  [ ] Optin must exist, and must not be checked by default
@@ -0,0 +1,7 @@
1
+ //= require js.cookie
2
+ $(function(){
3
+ $('.js-gdpr__cookie_consent').click(function() {
4
+ Cookies.set('gdpr.cookie_consent.ok', true, { path: '/', expires: 365 });
5
+ $('.js-gdpr__cookie_consent').remove();
6
+ });
7
+ });
@@ -1,4 +1,4 @@
1
- .cookies-consent
1
+ .gdpr__cookie_consent
2
2
  position: fixed
3
3
  z-index: 999
4
4
  right: 0
@@ -6,28 +6,28 @@
6
6
  left: 0
7
7
  padding: 0 20px
8
8
  text-align: center
9
- border-top: 1px solid $border-grey
9
+ border-top: 1px solid #ccc
10
10
  background: #fff
11
11
 
12
- +breakpoint(xs)
12
+ @media only screen and (max-width : 480px)
13
13
  font-size: 12px
14
14
  position: initial
15
15
 
16
- .cookies-consent__text
16
+ &__text
17
17
  display: inline-block
18
18
  padding: 20px 160px
19
19
 
20
- +breakpoint(xs)
20
+ @media only screen and (max-width : 480px)
21
21
  padding: 20px 0
22
22
 
23
- .cookies-consent__buttons
23
+ &__buttons
24
24
  position: absolute
25
25
  right: 10px
26
26
  top: 12px
27
27
 
28
- +breakpoint(xs)
28
+ @media only screen and (max-width : 480px)
29
29
  position: initial
30
30
  margin-bottom: 10px
31
31
 
32
- .cookies-consent-ok
32
+ &__ok
33
33
  padding: 15px 21px 15px !important
@@ -0,0 +1,11 @@
1
+ <% if cookies && cookies['gdpr.cookie_consent.ok'] != 'true' %>
2
+ <div class="gdpr__cookie_consent js-gdpr__cookie_consent">
3
+ <div class="gdpr__cookie_consent__text">
4
+ <%= t('gdpr.cookie_consent.text') %>
5
+ <%= t('gdpr.cookie_consent.learn_more_html', link: t('gdpr.privacy_policy')) %>
6
+ </div>
7
+ <div class="gdpr__cookie_consent__buttons">
8
+ <button class="gdpr__cookie_consent__buttons__ok"> <%= t('gdpr.cookie_consent.btn_ok') %></button>
9
+ </div>
10
+ </div>
11
+ <% end %>
@@ -0,0 +1,7 @@
1
+ en:
2
+ gdpr:
3
+ privacy_policy: https://www.eugdpr.org
4
+ cookie_consent:
5
+ text: 'By navigating on this website, you agree to our use of cookies to personalize certain website features and to measure the audience and use of this website.'
6
+ button: "I agree"
7
+ learn_more_html: "To learn more about cookies and how to customize your cookies options: <a href=\"%{link}\" target=\"_blank\">click here</a>"
@@ -0,0 +1,7 @@
1
+ fr:
2
+ gdpr:
3
+ privacy_policy: https://www.eugdpr.org
4
+ cookie_consent:
5
+ text: "En poursuivant votre navigation sur ce site, vous acceptez l’utilisation de Cookies pour vous proposer notamment des fonctionnalités personnalisées et pour réaliser des mesures d’audience."
6
+ button: "J'ai compris"
7
+ learn_more_html: "Pour en savoir plus et paramétrer ces cookies : <a href=\"%{link}\" target=\"_blank\">cliquer ici</a>"
@@ -1,3 +1,7 @@
1
+ require 'gdpr/version'
2
+ require 'gdpr/engine'
3
+ require 'js_cookie_rails'
4
+
1
5
  module Gdpr
2
6
  # Your code goes here...
3
7
  end
@@ -0,0 +1,5 @@
1
+ module Gdpr
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace Gdpr
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Gdpr
2
- VERSION = '0.1.0'
2
+ VERSION = '1.0.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gdpr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Levy
@@ -59,10 +59,16 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - LICENSE
62
63
  - README.md
63
64
  - Rakefile
65
+ - app/assets/javascripts/gdpr.js
64
66
  - app/assets/stylesheets/gdpr.sass
67
+ - app/views/gdpr/_cookie_consent.html.erb
68
+ - config/locales/en.yml
69
+ - config/locales/fr.yml
65
70
  - lib/gdpr.rb
71
+ - lib/gdpr/engine.rb
66
72
  - lib/gdpr/version.rb
67
73
  - lib/tasks/gdpr_tasks.rake
68
74
  homepage: https://github.com/lespoupeesrusses/gdpr
@@ -72,7 +78,7 @@ metadata: {}
72
78
  post_install_message:
73
79
  rdoc_options: []
74
80
  require_paths:
75
- - lib
81
+ - "./app/assets/stylesheets"
76
82
  required_ruby_version: !ruby/object:Gem::Requirement
77
83
  requirements:
78
84
  - - ">="