authtrail 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +5 -5
- data/lib/auth_trail/version.rb +1 -1
- data/lib/generators/authtrail/install_generator.rb +9 -1
- data/lib/generators/authtrail/templates/model_lockbox.rb.tt +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00a8cfabe2cfddb7349c055c13db2b56080409058ba48813310c6218a6b34fba
|
4
|
+
data.tar.gz: 59190df662382f672ad17c753d1eee6c0f8afacb68f7e082ed8766f188487d66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9137421c5e8f4c91be7dae62ccc9f12a831da6ae6fb390cfca766274045135c130f3cd9b0b5178d041be1348c527f39cc1aa0c986c798634e68300ee1c5a0a7
|
7
|
+
data.tar.gz: fa139b3a9df804feb52fa3823a67fb88781cefeda509d5719caf3f98c793e1aaaaecec553e8d1b1f08c03da8c4886b8e42400158e04aef12c34d404045b7b799
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Track Devise login activity
|
|
13
13
|
Add this line to your application’s Gemfile:
|
14
14
|
|
15
15
|
```ruby
|
16
|
-
gem
|
16
|
+
gem "authtrail"
|
17
17
|
```
|
18
18
|
|
19
19
|
To encrypt email and IP addresses with Lockbox, install [Lockbox](https://github.com/ankane/lockbox) and [Blind Index](https://github.com/ankane/blind_index) and run:
|
@@ -23,7 +23,7 @@ rails generate authtrail:install --encryption=lockbox
|
|
23
23
|
rails db:migrate
|
24
24
|
```
|
25
25
|
|
26
|
-
To use Active Record encryption (Rails 7+, experimental
|
26
|
+
To use Active Record encryption (Rails 7+, experimental), run:
|
27
27
|
|
28
28
|
```sh
|
29
29
|
rails generate authtrail:install --encryption=activerecord
|
@@ -118,7 +118,7 @@ AuthTrail uses [Geocoder](https://github.com/alexreisner/geocoder) for geocoding
|
|
118
118
|
To enable geocoding, add this line to your application’s Gemfile:
|
119
119
|
|
120
120
|
```ruby
|
121
|
-
gem
|
121
|
+
gem "geocoder"
|
122
122
|
```
|
123
123
|
|
124
124
|
And update `config/initializers/authtrail.rb`:
|
@@ -138,7 +138,7 @@ AuthTrail.job_queue = :low_priority
|
|
138
138
|
For privacy and performance, we recommend geocoding locally. Add this line to your application’s Gemfile:
|
139
139
|
|
140
140
|
```ruby
|
141
|
-
gem
|
141
|
+
gem "maxminddb"
|
142
142
|
```
|
143
143
|
|
144
144
|
For city-level geocoding, download the [GeoLite2 City database](https://dev.maxmind.com/geoip/geoip2/geolite2/) and create `config/initializers/geocoder.rb` with:
|
@@ -221,7 +221,7 @@ There are two notable changes to geocoding:
|
|
221
221
|
2. The `geocoder` gem is now an optional dependency. To use geocoding, add it to your Gemfile:
|
222
222
|
|
223
223
|
```ruby
|
224
|
-
gem
|
224
|
+
gem "geocoder"
|
225
225
|
```
|
226
226
|
|
227
227
|
### 0.2.0
|
data/lib/auth_trail/version.rb
CHANGED
@@ -22,7 +22,7 @@ module Authtrail
|
|
22
22
|
def generate_model
|
23
23
|
case encryption
|
24
24
|
when "lockbox"
|
25
|
-
template "model_lockbox.rb", "app/models/login_activity.rb"
|
25
|
+
template "model_lockbox.rb", "app/models/login_activity.rb", lockbox_method: lockbox_method
|
26
26
|
when "activerecord"
|
27
27
|
template "model_activerecord.rb", "app/models/login_activity.rb"
|
28
28
|
else
|
@@ -70,6 +70,14 @@ module Authtrail
|
|
70
70
|
abort "Error: encryption must be lockbox, activerecord, or none"
|
71
71
|
end
|
72
72
|
end
|
73
|
+
|
74
|
+
def lockbox_method
|
75
|
+
if defined?(Lockbox::VERSION) && Lockbox::VERSION.to_i < 1
|
76
|
+
"encrypts"
|
77
|
+
else
|
78
|
+
"has_encrypted"
|
79
|
+
end
|
80
|
+
end
|
73
81
|
end
|
74
82
|
end
|
75
83
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authtrail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
|
-
rubygems_version: 3.
|
94
|
+
rubygems_version: 3.3.7
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Track Devise login activity
|