cookie_alert 0.0.3 → 0.0.4
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 +10 -11
- data/app/controllers/cookie_alert/cookies_controller.rb +6 -2
- data/lib/cookie_alert/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a662d05151fa9baddd1aabf37b7aac010d2581b5
|
|
4
|
+
data.tar.gz: d3f6db65ea7378e1917c94020a30e65fab362c08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1ecfc7fdd777de833a45d4a26b88260e1777f6dab8f3a6886dbeab7ae6016e67475ecfd08c519c23642254f26555d3d223b489e0c426c9c39c5ace756a88469
|
|
7
|
+
data.tar.gz: 376f35caa15207ef01f5ddd2d2d8a86ff60cc3060f61208108cca55e48cc057a466d9e25efcee586aead639b7457597eb0fb5e94a9e0b302b522e85c15c2e839
|
data/README.md
CHANGED
|
@@ -41,17 +41,16 @@ number of views, or display it constantly until the visitor 'accepts' the alert.
|
|
|
41
41
|
|
|
42
42
|
6. Update your Asset Manifest files to add the JavaScript and CSS files:
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
* in application.css add
|
|
44
|
+
* in application.js add
|
|
45
|
+
|
|
46
|
+
```Ruby
|
|
47
|
+
//= require cookie_alert
|
|
48
|
+
```
|
|
49
|
+
* in application.css add
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
```Ruby
|
|
52
|
+
*= require cookie_alert
|
|
53
|
+
```
|
|
55
54
|
|
|
56
55
|
## Uninstall
|
|
57
56
|
|
|
@@ -128,4 +127,4 @@ Developed by [CodeMeister](http://github.com/CodeMeister) at [Katana Code Ltd](h
|
|
|
128
127
|
|
|
129
128
|
## About Katana Code
|
|
130
129
|
|
|
131
|
-
Katana Code are [iPhone app and Ruby on Rails Developers in Edinburgh, Scotland](http://katanacode.com/ "Katana Code").
|
|
130
|
+
Katana Code are [iPhone app and Ruby on Rails Developers in Edinburgh, Scotland](http://katanacode.com/ "Katana Code").
|
|
@@ -7,7 +7,11 @@ module CookieAlert
|
|
|
7
7
|
def cookie_accepted
|
|
8
8
|
|
|
9
9
|
# Get the visitor's current page URL or, if nil?, default to the application root
|
|
10
|
-
visitor_current_url = cookies.signed[CookieAlert.config.cookie_name.to_sym]
|
|
10
|
+
visitor_current_url = if cookies.signed[CookieAlert.config.cookie_name.to_sym]
|
|
11
|
+
cookies.signed[CookieAlert.config.cookie_name.to_sym].split(CookieAlert.config.cookie_value_text_separator)[1]
|
|
12
|
+
else
|
|
13
|
+
main_app.root_path
|
|
14
|
+
end
|
|
11
15
|
|
|
12
16
|
# Set the Cookie value to 'accepted'
|
|
13
17
|
if CookieAlert.config.cookie_type == 'permanent'
|
|
@@ -39,4 +43,4 @@ module CookieAlert
|
|
|
39
43
|
end
|
|
40
44
|
|
|
41
45
|
end
|
|
42
|
-
end
|
|
46
|
+
end
|
data/lib/cookie_alert/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cookie_alert
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- CodeMeister
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-07-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ~>
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '4.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ~>
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '4.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: jquery-rails
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|