authenticate 0.6.0 → 0.6.1
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/CHANGELOG.md +8 -0
- data/lib/authenticate/version.rb +1 -1
- data/lib/generators/authenticate/install/install_generator.rb +8 -1
- data/lib/generators/authenticate/install/templates/db/migrate/add_authenticate_brute_force_to_users.rb +1 -1
- data/lib/generators/authenticate/install/templates/db/migrate/add_authenticate_password_reset_to_users.rb +1 -1
- data/lib/generators/authenticate/install/templates/db/migrate/add_authenticate_timeoutable_to_users.rb +1 -1
- data/lib/generators/authenticate/install/templates/db/migrate/add_authenticate_to_users.rb +1 -1
- data/lib/generators/authenticate/install/templates/db/migrate/create_users.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2888d491c7df1e767b2bcf58c4581012bb64f56a
|
4
|
+
data.tar.gz: 30548171155bd56462c7326a70e4275d5dde2336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd4d8474083ff62f1f677ef8760f13bdfa9c821c8c7eefcf9461ce691d829cca4af8687fd1d8b51a637b19b752eb25ff7eef2383598ddebf69da7f493f2210c8
|
7
|
+
data.tar.gz: 95ef6dffaebefe2cf9e366e099812e625faa5eb0de27b6e549ccef7cd082aaaee876ae45828a4ddc9c49a0e3972e29984134f09ed095ac0c296f1357f225f2c4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Authenticate Changelog
|
2
2
|
|
3
|
+
## [0.6.1] - May 16, 2017
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
- install migrations now correctly support rails 4.2.x and rails 5.x.
|
7
|
+
|
8
|
+
[0.6.1]: https://github.com/tomichj/authenticate/compare/v0.6.0...v0.6.1
|
9
|
+
|
10
|
+
|
3
11
|
|
4
12
|
## [0.6.0] - May 16, 2017
|
5
13
|
|
data/lib/authenticate/version.rb
CHANGED
@@ -91,11 +91,12 @@ module Authenticate
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def copy_migration(migration_name, config = {})
|
94
|
+
puts "migration_version: #{migration_version}"
|
94
95
|
unless migration_exists?(migration_name)
|
95
96
|
migration_template(
|
96
97
|
"db/migrate/#{migration_name}",
|
97
98
|
"db/migrate/#{migration_name}",
|
98
|
-
config
|
99
|
+
config.merge(migration_version: migration_version)
|
99
100
|
)
|
100
101
|
end
|
101
102
|
end
|
@@ -162,6 +163,12 @@ module Authenticate
|
|
162
163
|
def model_base_class
|
163
164
|
(Rails.version >= '5.0.0') ? 'ApplicationRecord' : 'ActiveRecord::Base'
|
164
165
|
end
|
166
|
+
|
167
|
+
def migration_version
|
168
|
+
if Rails.version >= '5.0.0'
|
169
|
+
"[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
|
170
|
+
end
|
171
|
+
end
|
165
172
|
end
|
166
173
|
end
|
167
174
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddAuthenticateBruteForceToUsers < ActiveRecord::Migration
|
1
|
+
class AddAuthenticateBruteForceToUsers < ActiveRecord::Migration<%= migration_version %>
|
2
2
|
def change
|
3
3
|
add_column :<%= table_name %>, :failed_logins_count, :integer, default: 0
|
4
4
|
add_column :<%= table_name %>, :lock_expires_at, :datetime, default: nil
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddAuthenticatePasswordResetToUsers < ActiveRecord::Migration
|
1
|
+
class AddAuthenticatePasswordResetToUsers < ActiveRecord::Migration<%= migration_version %>
|
2
2
|
def change
|
3
3
|
add_column :<%= table_name %>, :password_reset_token, :string, default: nil
|
4
4
|
add_column :<%= table_name %>, :password_reset_sent_at, :datetime, default: nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authenticate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Tomich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|