sudo_rails 0.4.4 → 0.5.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 +6 -0
- data/app/views/sudo_rails/confirm_form.html.erb +5 -3
- data/lib/sudo_rails.rb +1 -0
- data/lib/sudo_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c66a5cac3194830858e3456856ddd5d25124e6309496d7766860789ff790204d
|
4
|
+
data.tar.gz: 53306beab517248b4aa56d75aaaec2dd446d3db934d761c08b0b5a1749d91c8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0ced3873a7a304d4d00133d9b799898165e77cf4e35328541cadf17d5206e8993cc38f31f8387c52feab276f5be5c88f060b329e91bd39c114189427b8714f6
|
7
|
+
data.tar.gz: dcb5c808819fd2c954c5913254749bf1408f93e122b73997ca3221c071ca75604ab7c02d9c4e1892cbfe37b4e28959d80c065bbefe816655777f7cac152bf6cf
|
data/README.md
CHANGED
@@ -71,6 +71,12 @@ SudoRails.setup do |config|
|
|
71
71
|
end
|
72
72
|
```
|
73
73
|
|
74
|
+
### Sudo sessions
|
75
|
+
|
76
|
+
Using the `sudo_session_duration` option you are able to configure the `sudo` session duration (30 minutes by default).
|
77
|
+
|
78
|
+
If you set it to `nil`, your `sudo` session won't expire automatically and you will have to do it manually by using the `reset_sudo_session!` helper.
|
79
|
+
|
74
80
|
### Styling
|
75
81
|
|
76
82
|
Using the `custom_logo`, `primary_color` and `background_color` options, you can customize the confirmation page. In case you want full control of the styles, you can use your own layout (and consequently your own styles too) using the `layout` option.
|
@@ -18,6 +18,8 @@
|
|
18
18
|
<% end %>
|
19
19
|
</div>
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
<% unless SudoRails.sudo_session_duration.nil? %>
|
22
|
+
<div class='sudo-tip'>
|
23
|
+
<%= t('sudo_rails.tip', session_duration: time_ago_in_words(SudoRails.sudo_session_duration.ago)).html_safe %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
data/lib/sudo_rails.rb
CHANGED
data/lib/sudo_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sudo_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- markets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|