authtrail 0.1.2 → 0.1.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/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/app/jobs/auth_trail/geocode_job.rb +1 -1
- data/lib/auth_trail/version.rb +1 -1
- data/lib/generators/authtrail/install_generator.rb +18 -2
- data/lib/generators/authtrail/templates/{login_activities_migration.rb → login_activities_migration.rb.tt} +0 -0
- data/lib/generators/authtrail/templates/login_activity_model.rb.tt +3 -0
- metadata +8 -8
- data/lib/generators/authtrail/templates/login_activity_model.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d58f1c05f2177c5a9dd84c1aeed638ce17b5d601f8b8b9a677f5046cad5f239
|
4
|
+
data.tar.gz: 79b099d5edba1165e553c35aa8ed43040ca58c2d1ff2616f76cd020da48b15d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc289ab35e5bddd7ea8043fe771787f737bc6661444921485a0b86d13c741c39e4812277718246d612f17bd63cd9719543d23f57803b17cdd30e20f948eeb1ae
|
7
|
+
data.tar.gz: 8ba5999ed1ed9f96a225d4f16ce94117204045d3375080ca6dbac0f4020a5e0b00279e69175ef0845403707ea5a1c9b89fe709a0b613666bf207f04cea2c46b2
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -129,7 +129,7 @@ We recommend using this in addition to Devise’s `Lockable` module and [Rack::A
|
|
129
129
|
|
130
130
|
Check out [Hardening Devise](https://github.com/ankane/shorts/blob/master/Hardening-Devise.md) and [Secure Rails](https://github.com/ankane/secure_rails) for more best practices.
|
131
131
|
|
132
|
-
Works with Rails
|
132
|
+
Works with Rails 4.2+
|
133
133
|
|
134
134
|
## History
|
135
135
|
|
data/lib/auth_trail/version.rb
CHANGED
@@ -25,11 +25,27 @@ module Authtrail
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def generate_model
|
28
|
-
template "login_activity_model.rb", "app/models/login_activity.rb"
|
28
|
+
template "login_activity_model.rb", "app/models/login_activity.rb", model_base_class: model_base_class, ar_optional_flag: ar_optional_flag
|
29
29
|
end
|
30
30
|
|
31
31
|
def migration_version
|
32
|
-
|
32
|
+
if rails5?
|
33
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def rails5?
|
38
|
+
Rails::VERSION::MAJOR >= 5
|
39
|
+
end
|
40
|
+
|
41
|
+
def model_base_class
|
42
|
+
rails5? ? "ApplicationRecord" : "ActiveRecord::Base"
|
43
|
+
end
|
44
|
+
|
45
|
+
def ar_optional_flag
|
46
|
+
if rails5?
|
47
|
+
", optional: true"
|
48
|
+
end
|
33
49
|
end
|
34
50
|
end
|
35
51
|
end
|
File without changes
|
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.1.
|
4
|
+
version: 0.1.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: 2018-
|
11
|
+
date: 2018-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.2'
|
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.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '4.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '4.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: warden
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,8 +123,8 @@ files:
|
|
123
123
|
- lib/auth_trail/version.rb
|
124
124
|
- lib/authtrail.rb
|
125
125
|
- lib/generators/authtrail/install_generator.rb
|
126
|
-
- lib/generators/authtrail/templates/login_activities_migration.rb
|
127
|
-
- lib/generators/authtrail/templates/login_activity_model.rb
|
126
|
+
- lib/generators/authtrail/templates/login_activities_migration.rb.tt
|
127
|
+
- lib/generators/authtrail/templates/login_activity_model.rb.tt
|
128
128
|
homepage: https://github.com/ankane/authtrail
|
129
129
|
licenses:
|
130
130
|
- MIT
|