lockup 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -10,7 +10,7 @@ _“Can I come into your fort?”_
10
10
 
11
11
  _“…what's the codeword?”_
12
12
 
13
- (currently used in production with Rails 3.X and nonimally tested—seems to work—in Rails 4)
13
+ (currently used in production with Rails 3.X and Rails 4)
14
14
 
15
15
  ## Installation
16
16
 
@@ -34,7 +34,7 @@ If you think you might need a hint:
34
34
 
35
35
  ENV["LOCKUP_HINT"] = 'Something that you do not tell everyone.'
36
36
 
37
- If you're using [Figaro](https://github.com/laserlemon/figaro), set your lockup codeword and hint (optional) in your application.yml file:
37
+ If you're using [Figaro](https://github.com/laserlemon/figaro), set your Lockup codeword and hint (optional) in your application.yml file:
38
38
 
39
39
  LOCKUP_CODEWORD: "love"
40
40
 
@@ -42,6 +42,20 @@ If you're using [Figaro](https://github.com/laserlemon/figaro), set your lockup
42
42
 
43
43
  **Codewords are not case-sensitive, by design. Keep it simple.**
44
44
 
45
+ ## Advanced Usage
46
+
47
+ ### Use Lockup around a specific controller:
48
+
49
+ 1. Follow the installtion instructions above.
50
+
51
+ 2. In your application_controller.rb file, add:
52
+
53
+ skip_before_action :check_for_lockup
54
+
55
+ 4. In the controller(s) you would like to restrict:
56
+
57
+ before_action :check_for_lockup
58
+
45
59
  ### Link it with no typing:
46
60
 
47
61
  http://somedomain.com/or_path/?lockup_codeword=love
@@ -1,12 +1,14 @@
1
1
  setTimeout(function () {
2
2
  var hint = document.getElementById('hint');
3
3
  var hint_icon = document.getElementById('hint_icon');
4
- hint_icon.onclick = function () {
5
- if(hint.className.indexOf('show') < 0) {
6
- hint.className = hint.className + " show";
7
- }
8
- else {
9
- hint.className = hint.className.replace(/\sshow/, '');
4
+ if (hint_icon != null) {
5
+ hint_icon.onclick = function () {
6
+ if(hint.className.indexOf('show') < 0) {
7
+ hint.className = hint.className + " show";
8
+ }
9
+ else {
10
+ hint.className = hint.className.replace(/\sshow/, '');
11
+ }
10
12
  }
11
13
  }
12
14
  }, 50);
@@ -1,3 +1,3 @@
1
1
  module Lockup
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockup
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - gb Studio
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-01-15 00:00:00 Z
18
+ date: 2014-03-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails