cookies_eu 1.7.2 → 1.7.7
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 +4 -4
- data/README.md +11 -0
- data/app/assets/javascripts/cookies_eu.js +2 -1
- data/app/views/cookies_eu/_consent_banner.html.erb +14 -10
- data/config/locales/bg.yml +5 -0
- data/config/locales/ca.yml +5 -0
- data/config/locales/el.yml +1 -1
- data/config/locales/eu.yml +5 -0
- data/config/locales/he.yml +6 -0
- data/config/locales/lt.yml +5 -0
- data/config/locales/{sq → sq.yml} +0 -0
- data/cookies_eu.gemspec +2 -2
- data/lib/cookies_eu/version.rb +1 -1
- metadata +11 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1edfa1c59476f0510472c9538efbd5e56ce95d9905022cfbdf7bbfea29c622d5
|
|
4
|
+
data.tar.gz: c45186c9cfdaf12b3f6e4ffa2f93856c7c9ab41c47206229ccc8fca3a67dfb61
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7c0b1171008328506873b225d31d14a3c3ad2336e1c17527d7c99914877a6251c3b4bbe1df3c86b1d1cd99b2bbc6634cc0d34577f0d07da2aadc0f654d8ab34
|
|
7
|
+
data.tar.gz: 58e71a845a009e99918122071e2c7ed1f3b3e4561b2785b5b932d1e4c50dfd747210f7755a505d80878561aab1b5d7da1d252cfe16789daebb979e5af509d555
|
data/README.md
CHANGED
|
@@ -7,6 +7,9 @@ Gem to add cookie consent to rails application
|
|
|
7
7
|
## Supported languages
|
|
8
8
|
|
|
9
9
|
* Albanian
|
|
10
|
+
* Basque
|
|
11
|
+
* Bulgarian
|
|
12
|
+
* Catalan
|
|
10
13
|
* Croatian
|
|
11
14
|
* Czech
|
|
12
15
|
* Danish
|
|
@@ -17,8 +20,10 @@ Gem to add cookie consent to rails application
|
|
|
17
20
|
* French
|
|
18
21
|
* German
|
|
19
22
|
* Greek
|
|
23
|
+
* Hebrew
|
|
20
24
|
* Hungarian
|
|
21
25
|
* Italian
|
|
26
|
+
* Lithuanian
|
|
22
27
|
* Norwegian
|
|
23
28
|
* Polish
|
|
24
29
|
* Portuguese
|
|
@@ -29,6 +34,10 @@ Gem to add cookie consent to rails application
|
|
|
29
34
|
* Swedish
|
|
30
35
|
* Ukrainian
|
|
31
36
|
|
|
37
|
+
## Screenshot
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
32
41
|
## Installation
|
|
33
42
|
|
|
34
43
|
Add this line to your application's Gemfile:
|
|
@@ -89,6 +98,8 @@ If you wish to customize the style of the div the classes are:
|
|
|
89
98
|
.cookies-eu-link /* link */
|
|
90
99
|
```
|
|
91
100
|
|
|
101
|
+
If you wish to customize the HTML, create a folder `cookies_eu`, create a partial `_consent_banner.html.erb` and paste the HTML from [here](app/views/cookies_eu/_consent_banner.html.erb)
|
|
102
|
+
|
|
92
103
|
## Cookies used
|
|
93
104
|
|
|
94
105
|
This gem uses a cookie called **cookie_eu_consented** to track whether a user has accepted the cookie notice and whether it needs to be shown again or not.
|
|
@@ -24,7 +24,8 @@ var cookiesEu = {
|
|
|
24
24
|
},
|
|
25
25
|
|
|
26
26
|
setCookie: function() {
|
|
27
|
-
|
|
27
|
+
var isSecure = location.protocol === 'https:';
|
|
28
|
+
Cookies.set('cookie_eu_consented', true, { path: '/', expires: 365, secure: isSecure });
|
|
28
29
|
|
|
29
30
|
var container = document.querySelector('.js-cookies-eu');
|
|
30
31
|
container.parentNode.removeChild(container);
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
<% if cookies
|
|
2
|
-
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
<% if cookies.kind_of? ActionDispatch::Cookies::CookieJar %>
|
|
2
|
+
<% if cookies && cookies['cookie_eu_consented'] != 'true' %>
|
|
3
|
+
<div class="cookies-eu js-cookies-eu" <%= "dir=rtl" if I18n.exists?('cookies_eu.direction', I18n.locale) && I18n.t("cookies_eu.direction") == "rtl" %>>
|
|
4
|
+
<span class="cookies-eu-content-holder"><%= t('cookies_eu.cookies_text') %></span>
|
|
5
|
+
<span class="cookies-eu-button-holder">
|
|
6
|
+
<button class="cookies-eu-ok js-cookies-eu-ok"> <%= t('cookies_eu.ok') %> </button>
|
|
7
|
+
<% if defined?(link).present? %>
|
|
8
|
+
<a href="<%= link %>" class="cookies-eu-link" target="<%= defined?(target).present? ? target : '' %>"> <%= t('cookies_eu.learn_more') %> </a>
|
|
9
|
+
<% end %>
|
|
10
|
+
</span>
|
|
11
|
+
</div>
|
|
12
|
+
<% end %>
|
|
13
|
+
<% else %>
|
|
14
|
+
<% raise Exception.new "'cookies' is a reserved Rails class, please rename your method" %>
|
|
11
15
|
<% end %>
|
data/config/locales/el.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
el:
|
|
2
2
|
cookies_eu:
|
|
3
|
-
cookies_text: "Τα cookies μας βοηθούν να προσφέρουμε τις υπηρεσίες μας. Με την
|
|
3
|
+
cookies_text: "Τα cookies μας βοηθούν να προσφέρουμε τις υπηρεσίες μας. Με την χρήση των υπηρεσιών μας, συμφωνείτε στην χρήση των cookies."
|
|
4
4
|
learn_more: "Μάθετε περισσότερα"
|
|
5
5
|
ok: "OK"
|
|
File without changes
|
data/cookies_eu.gemspec
CHANGED
|
@@ -6,8 +6,8 @@ require 'cookies_eu/version'
|
|
|
6
6
|
Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "cookies_eu"
|
|
8
8
|
spec.version = CookiesEu::VERSION
|
|
9
|
-
spec.authors = ["Stjepan Hadjic"]
|
|
10
|
-
spec.email = ["stjepan.hadjic@infinum.hr"]
|
|
9
|
+
spec.authors = ["Stjepan Hadjic", "Gabrijel Skoro"]
|
|
10
|
+
spec.email = ["stjepan.hadjic@infinum.hr", "gabrijel.skoro@gmail.com"]
|
|
11
11
|
spec.description = %q{Displays a cookie consent}
|
|
12
12
|
spec.summary = %q{Displays a cookie consent. If you dont disable cokkies in settings, we assume you are ok with us using cookies}
|
|
13
13
|
spec.homepage = "https://github.com/infinum/cookies_eu"
|
data/lib/cookies_eu/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cookies_eu
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stjepan Hadjic
|
|
8
|
+
- Gabrijel Skoro
|
|
8
9
|
autorequire:
|
|
9
10
|
bindir: bin
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: js_cookie_rails
|
|
@@ -55,6 +56,7 @@ dependencies:
|
|
|
55
56
|
description: Displays a cookie consent
|
|
56
57
|
email:
|
|
57
58
|
- stjepan.hadjic@infinum.hr
|
|
59
|
+
- gabrijel.skoro@gmail.com
|
|
58
60
|
executables: []
|
|
59
61
|
extensions: []
|
|
60
62
|
extra_rdoc_files: []
|
|
@@ -69,6 +71,8 @@ files:
|
|
|
69
71
|
- app/assets/stylesheets/cookies_eu.scss
|
|
70
72
|
- app/views/cookies_eu/_consent_banner.html.erb
|
|
71
73
|
- app/views/cookies_eu/cookies_info.html.haml
|
|
74
|
+
- config/locales/bg.yml
|
|
75
|
+
- config/locales/ca.yml
|
|
72
76
|
- config/locales/cs.yml
|
|
73
77
|
- config/locales/da.yml
|
|
74
78
|
- config/locales/de.yml
|
|
@@ -76,11 +80,14 @@ files:
|
|
|
76
80
|
- config/locales/el.yml
|
|
77
81
|
- config/locales/en.yml
|
|
78
82
|
- config/locales/es.yml
|
|
83
|
+
- config/locales/eu.yml
|
|
79
84
|
- config/locales/fi.yml
|
|
80
85
|
- config/locales/fr.yml
|
|
86
|
+
- config/locales/he.yml
|
|
81
87
|
- config/locales/hr.yml
|
|
82
88
|
- config/locales/hu.yml
|
|
83
89
|
- config/locales/it.yml
|
|
90
|
+
- config/locales/lt.yml
|
|
84
91
|
- config/locales/nl.yml
|
|
85
92
|
- config/locales/no.yml
|
|
86
93
|
- config/locales/pl.yml
|
|
@@ -89,7 +96,7 @@ files:
|
|
|
89
96
|
- config/locales/ru.yml
|
|
90
97
|
- config/locales/sk.yml
|
|
91
98
|
- config/locales/sl.yml
|
|
92
|
-
- config/locales/sq
|
|
99
|
+
- config/locales/sq.yml
|
|
93
100
|
- config/locales/sv.yml
|
|
94
101
|
- config/locales/ua.yml
|
|
95
102
|
- cookies_eu.gemspec
|
|
@@ -117,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
117
124
|
version: '0'
|
|
118
125
|
requirements: []
|
|
119
126
|
rubyforge_project:
|
|
120
|
-
rubygems_version: 2.7.6
|
|
127
|
+
rubygems_version: 2.7.6.2
|
|
121
128
|
signing_key:
|
|
122
129
|
specification_version: 4
|
|
123
130
|
summary: Displays a cookie consent. If you dont disable cokkies in settings, we assume
|