cookies_eu 1.7.7 → 1.7.8

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: 1edfa1c59476f0510472c9538efbd5e56ce95d9905022cfbdf7bbfea29c622d5
4
- data.tar.gz: c45186c9cfdaf12b3f6e4ffa2f93856c7c9ab41c47206229ccc8fca3a67dfb61
3
+ metadata.gz: ef0d89db9e2357389f70112e9a4297b66425c05f650388b0faad52ac093bdc95
4
+ data.tar.gz: 1c4ad2c16def8a1c133fd43bae71ab719e35adb979307047fd7b9ad392844892
5
5
  SHA512:
6
- metadata.gz: c7c0b1171008328506873b225d31d14a3c3ad2336e1c17527d7c99914877a6251c3b4bbe1df3c86b1d1cd99b2bbc6634cc0d34577f0d07da2aadc0f654d8ab34
7
- data.tar.gz: 58e71a845a009e99918122071e2c7ed1f3b3e4561b2785b5b932d1e4c50dfd747210f7755a505d80878561aab1b5d7da1d252cfe16789daebb979e5af509d555
6
+ metadata.gz: dc9a1a68a0199e56fe4c7c8af2a0e7a39cb9b0f558280d2c972aa65080901a1de9f97622aab838aae99c5a797b7c53c07ea0f6d8a947752588ecd1f6b37a4b53
7
+ data.tar.gz: d3d46d5e74e8eab57e1cb670a81503ad42213d3540d0766832f2116a085564f749254ca06bb9f79e1a8366c768174caee59072d99671283572cc481a1ae2ad10
data/README.md CHANGED
@@ -32,6 +32,7 @@ Gem to add cookie consent to rails application
32
32
  * Slovenian
33
33
  * Spanish
34
34
  * Swedish
35
+ * Turkish
35
36
  * Ukrainian
36
37
 
37
38
  ## Screenshot
@@ -100,6 +101,16 @@ If you wish to customize the style of the div the classes are:
100
101
 
101
102
  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
103
 
104
+ If you wish to run some arbitrary code when the user acknowledges the cookie message, you can register a callback. This is useful if you wish to persist the user's preference to the database.
105
+
106
+ ```javascript
107
+ document.addEventListener('cookies-eu-acknowledged', function() {
108
+ // The user has acknowledged cookies! If they're logged in, make an api call
109
+ // so we remember their preference.
110
+ fetch('...');
111
+ });
112
+ ```
113
+
103
114
  ## Cookies used
104
115
 
105
116
  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.
@@ -29,6 +29,8 @@ var cookiesEu = {
29
29
 
30
30
  var container = document.querySelector('.js-cookies-eu');
31
31
  container.parentNode.removeChild(container);
32
+
33
+ document.dispatchEvent(new CustomEvent('cookies-eu-acknowledged'));
32
34
  }
33
35
  };
34
36
 
@@ -0,0 +1,5 @@
1
+ tr:
2
+ cookies_eu:
3
+ cookies_text: "Çerezler, hizmetlerimizi sunmamıza yardımcı oluyor. Hizmetlerimizi kullanarak, çerez kullanımımızı kabul etmiş olursunuz. "
4
+ learn_more: "Detayları Göster"
5
+ ok: "Tamam"
@@ -1,3 +1,3 @@
1
1
  module CookiesEu
2
- VERSION = "1.7.7"
2
+ VERSION = "1.7.8"
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.7
4
+ version: 1.7.8
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: 2020-10-02 00:00:00.000000000 Z
12
+ date: 2021-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: js_cookie_rails
@@ -98,6 +98,7 @@ files:
98
98
  - config/locales/sl.yml
99
99
  - config/locales/sq.yml
100
100
  - config/locales/sv.yml
101
+ - config/locales/tr.yml
101
102
  - config/locales/ua.yml
102
103
  - cookies_eu.gemspec
103
104
  - lib/cookies_eu.rb
@@ -123,8 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
124
  - !ruby/object:Gem::Version
124
125
  version: '0'
125
126
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.7.6.2
127
+ rubygems_version: 3.1.4
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: Displays a cookie consent. If you dont disable cokkies in settings, we assume