cookies_eu 1.7.6 → 1.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/app/views/cookies_eu/_consent_banner.html.erb +14 -10
- data/config/locales/he.yml +6 -0
- data/config/locales/lt.yml +5 -0
- data/lib/cookies_eu/version.rb +1 -1
- metadata +6 -3
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
@@ -20,8 +20,10 @@ Gem to add cookie consent to rails application
|
|
20
20
|
* French
|
21
21
|
* German
|
22
22
|
* Greek
|
23
|
+
* Hebrew
|
23
24
|
* Hungarian
|
24
25
|
* Italian
|
26
|
+
* Lithuanian
|
25
27
|
* Norwegian
|
26
28
|
* Polish
|
27
29
|
* Portuguese
|
@@ -32,6 +34,10 @@ Gem to add cookie consent to rails application
|
|
32
34
|
* Swedish
|
33
35
|
* Ukrainian
|
34
36
|
|
37
|
+
## Screenshot
|
38
|
+
|
39
|
+
![Cookies eu screenshot](https://user-images.githubusercontent.com/2737390/86209657-5a5e8b00-bb73-11ea-91fc-e5ff36af148f.png)
|
40
|
+
|
35
41
|
## Installation
|
36
42
|
|
37
43
|
Add this line to your application's Gemfile:
|
@@ -92,6 +98,8 @@ If you wish to customize the style of the div the classes are:
|
|
92
98
|
.cookies-eu-link /* link */
|
93
99
|
```
|
94
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
|
+
|
95
103
|
## Cookies used
|
96
104
|
|
97
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.
|
@@ -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/lib/cookies_eu/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: js_cookie_rails
|
@@ -83,9 +83,11 @@ files:
|
|
83
83
|
- config/locales/eu.yml
|
84
84
|
- config/locales/fi.yml
|
85
85
|
- config/locales/fr.yml
|
86
|
+
- config/locales/he.yml
|
86
87
|
- config/locales/hr.yml
|
87
88
|
- config/locales/hu.yml
|
88
89
|
- config/locales/it.yml
|
90
|
+
- config/locales/lt.yml
|
89
91
|
- config/locales/nl.yml
|
90
92
|
- config/locales/no.yml
|
91
93
|
- config/locales/pl.yml
|
@@ -121,7 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
123
|
- !ruby/object:Gem::Version
|
122
124
|
version: '0'
|
123
125
|
requirements: []
|
124
|
-
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 2.7.6.2
|
125
128
|
signing_key:
|
126
129
|
specification_version: 4
|
127
130
|
summary: Displays a cookie consent. If you dont disable cokkies in settings, we assume
|