cookies_eu 1.0.19 → 1.1.0

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
  SHA1:
3
- metadata.gz: 660f2d07359ff54af905298acf992b2534e68e75
4
- data.tar.gz: 01c942130ab086b1b3d7ddca4f141df76b9f2e21
3
+ metadata.gz: 754355c87e051160687e86822843cfb9a994a8cf
4
+ data.tar.gz: d981d2ece0e124ce02cbb70d10b119d441a316a8
5
5
  SHA512:
6
- metadata.gz: 08f86250fcd000086381f7ce095bda38cafe3fa2bd348b86357fdb18df1af267ce9ad7b73df2e44f2ab994360b11a197ded4477080ac8d13796629d153d7fa63
7
- data.tar.gz: 6a621ee0b4c6e9c57198d74e344a8095c0798e3df0605fa59b8ae2898aa26cd4f1976684594da397d77c7528fd9d391e1ffdff4a8ab5afcdf3849f3dfef24000
6
+ metadata.gz: a7f9414cc7e5b2770cf496931f593ce144435b5f6f75989e7a0b9f9ea7934c9f5416113a8f9128224120e973bac707b7dc56bfae1afdef80e77d7c569dedb7ad
7
+ data.tar.gz: 65fd2c6bdee6e9bf25d96b701c0cfd10f8e365007a86c84f0ea286d3d1d0d32b948446fec8a10e357f2f78f82a750de8ea4779fa196bebd4f65af23c4727bf62
data/README.md CHANGED
@@ -12,45 +12,61 @@ Gem to add cookie consent to rails application
12
12
  * Italian
13
13
  * Slovenian
14
14
  * Dutch
15
+ * Estonian
16
+ * Norwegian
17
+ * Russian
18
+ * Swedish
19
+
20
+ ## Prerequisites
21
+
22
+ jquery needs to be present in your application.js
15
23
 
16
24
  ## Installation
17
25
 
18
26
  Add this line to your application's Gemfile:
19
27
 
20
- gem 'cookies_eu'
28
+ ```ruby
29
+ gem 'cookies_eu'
30
+ ```
21
31
 
22
32
  And then execute:
23
33
 
24
34
  $ bundle
25
35
 
26
- Or install it yourself as:
27
-
28
- $ gem install cookies_eu
36
+ Run the installation generator:
29
37
 
30
- ## Usage
38
+ $ bundle exec rails g cookies_eu:install
31
39
 
32
- In application.js add
40
+ Or manually add in application.js:
33
41
 
34
42
  //= require cookies_eu
35
43
 
36
- In application.css add
44
+ And in application.css:
37
45
 
38
46
  *= require cookies_eu
39
47
 
48
+ ## Usage
49
+
40
50
  In your view add
41
51
 
42
- = render 'cookies_eu/cookies_eu'
52
+ ```ruby
53
+ = render 'cookies_eu/consent_banner'
54
+ ```
43
55
 
44
56
  You can add a link parameter to link to your cookies explanation page (you have to create the page and controller for this)
45
57
 
46
- = render 'cookies_eu/cookies_eu', link: '/cookies'
58
+ ```ruby
59
+ = render 'cookies_eu/consent_banner', link: '/cookies'
60
+ ```
47
61
 
48
62
 
49
63
  If you whish to customize the syle of the div the classes are:
50
64
 
51
- .cookies_eu // main div
52
- .cookies_eu_ok // button
53
- .cookies_eu_link // link
65
+ ```javascript
66
+ .cookies_eu // main div
67
+ .cookies_eu_ok // button
68
+ .cookies_eu_link // link
69
+ ```
54
70
 
55
71
  ## Turbolinks NOT supported
56
72
 
@@ -1,4 +1,3 @@
1
- //= require jquery
2
1
  //= require jquery.cookie
3
2
 
4
3
  $(document).ready( function(){
@@ -7,4 +6,4 @@ $(document).ready( function(){
7
6
  $.cookie('cookie_eu_consented', 'true', { path: '/', expires: 365 });
8
7
  $('.cookies-eu').remove();
9
8
  });
10
- });
9
+ });
@@ -8,4 +8,4 @@
8
8
  <% end %>
9
9
  </span>
10
10
  </div>
11
- <% end %>
11
+ <% end %>
@@ -0,0 +1,5 @@
1
+ ee:
2
+ cookies_eu:
3
+ cookies_text: "Küpsised aitavad meil osutada teenuseid. Kasutades meie teenuseid nõustute küpsiste kasutamisega."
4
+ learn_more: "Lähemalt"
5
+ ok: "OK"
@@ -0,0 +1,5 @@
1
+ "no":
2
+ cookies_eu:
3
+ cookies_text: "Cookies hjelper oss å levere våre tjenester. Ved å bruke våre tjenester, samtykker du til vår bruk av informasjonskapsler."
4
+ learn_more: "Lær mer"
5
+ ok: "OK"
@@ -0,0 +1,5 @@
1
+ ru:
2
+ cookies_eu:
3
+ cookies_text: "Cookies помогают нам предоставлять наши услуги. Используя наши услуги, вы соглашаетесь с использованием наших cookies."
4
+ learn_more: "Подробнее"
5
+ ok: "OK"
@@ -0,0 +1,5 @@
1
+ sv:
2
+ cookies_eu:
3
+ cookies_text: "Cookies hjälper oss att leverera våra tjänster. Genom att använda våra tjänster accepterar du vår användning av Cookies."
4
+ learn_more: "Lär dig mer"
5
+ ok: "OK"
@@ -1,3 +1,3 @@
1
1
  module CookiesEu
2
- VERSION = "1.0.19"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -0,0 +1,13 @@
1
+ module CookiesEu
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ def add_javascripts
5
+ append_file 'app/assets/javascripts/application.js', "//= require cookies_eu\n"
6
+ end
7
+
8
+ def add_stylesheets
9
+ inject_into_file 'app/assets/stylesheets/application.css', "*= require cookies_eu\n", before: /\*\//, verbose: true
10
+ end
11
+ end
12
+ end
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookies_eu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.19
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stjepan Hadjic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-16 00:00:00.000000000 Z
11
+ date: 2015-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-rails
@@ -80,20 +80,25 @@ files:
80
80
  - Rakefile
81
81
  - app/assets/javascripts/cookies_eu.js
82
82
  - app/assets/stylesheets/cookies_eu.scss
83
- - app/views/cookies_eu/_cookies_eu.html.erb
83
+ - app/views/cookies_eu/_consent_banner.html.erb
84
84
  - app/views/cookies_eu/cookies_info.html.haml
85
85
  - config/locales/de.yml
86
+ - config/locales/ee.yml
86
87
  - config/locales/en.yml
87
88
  - config/locales/es.yml
88
89
  - config/locales/fr.yml
89
90
  - config/locales/hr.yml
90
91
  - config/locales/it.yml
91
92
  - config/locales/nl.yml
93
+ - config/locales/no.yml
94
+ - config/locales/ru.yml
92
95
  - config/locales/sl.yml
96
+ - config/locales/sv.yml
93
97
  - cookies_eu.gemspec
94
98
  - lib/cookies_eu.rb
95
99
  - lib/cookies_eu/engine.rb
96
100
  - lib/cookies_eu/version.rb
101
+ - lib/generators/cookies_eu/install/install_generator.rb
97
102
  homepage: https://github.com/infinum/cookies_eu
98
103
  licenses:
99
104
  - MIT
@@ -120,3 +125,4 @@ specification_version: 4
120
125
  summary: Displays a cookie consent. If you dont disable cokkies in settings, we assume
121
126
  you are ok with us using cookies
122
127
  test_files: []
128
+ has_rdoc: