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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cb2d094a4ba7be9bce32ee74a4c383180bf2f98a42acec67547aeae7eb1379f
4
- data.tar.gz: bd8053f6e934144b3be8b5ece71388df85f22d6471202ef9b70768c65b559f8f
3
+ metadata.gz: 1edfa1c59476f0510472c9538efbd5e56ce95d9905022cfbdf7bbfea29c622d5
4
+ data.tar.gz: c45186c9cfdaf12b3f6e4ffa2f93856c7c9ab41c47206229ccc8fca3a67dfb61
5
5
  SHA512:
6
- metadata.gz: 2c3ac23fca403663601c97d7721c3d3aadecf80612d2dd935b59fa5035c85105e83a78a28937cd2a52899b684bc0d8c45c30ee1ffe4a8e27961e8d15310cacba
7
- data.tar.gz: f3e2ff19c006e2e017e35132922526253f5d18cfd74f08bd9d6a521c418cf01519f7a1daf92e21e3c5e8cb4e14be163bb12cc107ee2a302c6973fe0ec48a79bc
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
+ ![Cookies eu screenshot](https://user-images.githubusercontent.com/2737390/86209657-5a5e8b00-bb73-11ea-91fc-e5ff36af148f.png)
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
- Cookies.set('cookie_eu_consented', true, { path: '/', expires: 365 });
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 && cookies['cookie_eu_consented'] != 'true' %>
2
- <div class="cookies-eu js-cookies-eu">
3
- <span class="cookies-eu-content-holder"><%= t('cookies_eu.cookies_text') %></span>
4
- <span class="cookies-eu-button-holder">
5
- <button class="cookies-eu-ok js-cookies-eu-ok"> <%= t('cookies_eu.ok') %> </button>
6
- <% if defined?(link).present? %>
7
- <a href="<%= link %>" class="cookies-eu-link" target="<%= defined?(target).present? ? target : '' %>"> <%= t('cookies_eu.learn_more') %> </a>
8
- <% end %>
9
- </span>
10
- </div>
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 %>
@@ -0,0 +1,5 @@
1
+ bg:
2
+ cookies_eu:
3
+ cookies_text: "Курабийките ни помагат да доставяме услугите си. Използвайки нашите услуги, вие се съгласявате с нашето използване на курабийки."
4
+ learn_more: "Научи повече"
5
+ ok: "ОК"
@@ -0,0 +1,5 @@
1
+ ca:
2
+ cookies_eu:
3
+ cookies_text: "Les cookies ens ajuden a oferir els nostres serveis. En utilitzar els nostres serveis, acceptes l'ús de cookies."
4
+ learn_more: "Més informació"
5
+ ok: "OK"
@@ -1,5 +1,5 @@
1
1
  el:
2
2
  cookies_eu:
3
- cookies_text: "Τα cookies μας βοηθούν να προσφέρουμε τις υπηρεσίες μας. Με την χρησιμοποίηση των υπηρεσιών μας, συμφωνείτε στην χρήση των cookies."
3
+ cookies_text: "Τα cookies μας βοηθούν να προσφέρουμε τις υπηρεσίες μας. Με την χρήση των υπηρεσιών μας, συμφωνείτε στην χρήση των cookies."
4
4
  learn_more: "Μάθετε περισσότερα"
5
5
  ok: "OK"
@@ -0,0 +1,5 @@
1
+ eu:
2
+ cookies_eu:
3
+ cookies_text: "Cookieek gure zerbitzuak eskaintzen laguntzen digute. Gure zerbitzuak erabiltzerakoan, cookie-erabilera onartzen duzu."
4
+ learn_more: "Informazio gehiago"
5
+ ok: "OK"
@@ -0,0 +1,6 @@
1
+ he:
2
+ cookies_eu:
3
+ cookies_text: "העוגיות עוזרות לנו לספק את שירותינו. על ידי השימוש בשירותים שלנו אתה מסכים לשימוש שלנו בעוגיות."
4
+ learn_more: "למד/י עוד"
5
+ ok: "בסדר"
6
+ direction: "rtl"
@@ -0,0 +1,5 @@
1
+ lt:
2
+ cookies_eu:
3
+ cookies_text: "Sklandžiam svetainės veikimui, jūsų naršymo patirties gerinimui bei rinkodarai naudojame slapukus. Spausdami sutinku ar toliau naršydami svetainėje, Jūs sutinkate su slapukų įrašymu."
4
+ learn_more: "Daugiau informacijos"
5
+ ok: "OK"
File without changes
@@ -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"
@@ -1,3 +1,3 @@
1
1
  module CookiesEu
2
- VERSION = "1.7.2"
2
+ VERSION = "1.7.7"
3
3
  end
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.2
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: 2018-06-15 00:00:00.000000000 Z
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