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 +4 -4
- data/README.md +28 -12
- data/app/assets/javascripts/cookies_eu.js +1 -2
- data/app/views/cookies_eu/{_cookies_eu.html.erb → _consent_banner.html.erb} +1 -1
- data/config/locales/ee.yml +5 -0
- data/config/locales/no.yml +5 -0
- data/config/locales/ru.yml +5 -0
- data/config/locales/sv.yml +5 -0
- data/lib/cookies_eu/version.rb +1 -1
- data/lib/generators/cookies_eu/install/install_generator.rb +13 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 754355c87e051160687e86822843cfb9a994a8cf
|
4
|
+
data.tar.gz: d981d2ece0e124ce02cbb70d10b119d441a316a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
28
|
+
```ruby
|
29
|
+
gem 'cookies_eu'
|
30
|
+
```
|
21
31
|
|
22
32
|
And then execute:
|
23
33
|
|
24
34
|
$ bundle
|
25
35
|
|
26
|
-
|
27
|
-
|
28
|
-
$ gem install cookies_eu
|
36
|
+
Run the installation generator:
|
29
37
|
|
30
|
-
|
38
|
+
$ bundle exec rails g cookies_eu:install
|
31
39
|
|
32
|
-
|
40
|
+
Or manually add in application.js:
|
33
41
|
|
34
42
|
//= require cookies_eu
|
35
43
|
|
36
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
52
|
-
|
53
|
-
|
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
|
|
data/lib/cookies_eu/version.rb
CHANGED
@@ -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
|
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-
|
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/
|
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:
|