cookies_eu 1.7.6 → 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: 2b81b5d6ddf4d8cbbe1f4781670ce82d918d013cac7a4643be8cc3b285c0e013
4
- data.tar.gz: d3b0f124f364d9bd9c9924b2c547e11d3b73e69757841a66a06f5699a341e985
3
+ metadata.gz: 1edfa1c59476f0510472c9538efbd5e56ce95d9905022cfbdf7bbfea29c622d5
4
+ data.tar.gz: c45186c9cfdaf12b3f6e4ffa2f93856c7c9ab41c47206229ccc8fca3a67dfb61
5
5
  SHA512:
6
- metadata.gz: 4f5e3b20d214803d2fb5f83391c4413ee1bed395260bcd3c71019910568713806cc514eb8a56bfa29eff032f92f91e6953e524bc7b5c903e923cab6824a4dbf1
7
- data.tar.gz: a6eb620b83223d69950e7e126486e840db595eb9d19be2ae68cc5db05b4567c21e2bac06774e2e539484a72fc6d3c030d858ba3b15332a9b783edbf36bb0398b
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 && 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,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"
@@ -1,3 +1,3 @@
1
1
  module CookiesEu
2
- VERSION = "1.7.6"
2
+ VERSION = "1.7.7"
3
3
  end
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.6
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: 2019-10-17 00:00:00.000000000 Z
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
- rubygems_version: 3.0.2
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