Skip to content

Commit c2d44dd

Browse files
Exclude JRuby check for the moment
1 parent d71b5c8 commit c2d44dd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ matrix:
1919
fast_finish: true
2020
allow_failures:
2121
- rvm: ruby-head
22-
include:
23-
- rvm: jruby
24-
env: JRUBY_OPTS="--1.9 --server -Xcext.enabled=true"
22+
# include:
23+
# - rvm: jruby
24+
# env: JRUBY_OPTS="--1.9 --server -Xcext.enabled=true"
2525
notifications:
2626
email: false

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# ActiveModel::Otp
77

8-
**ActiveModel::Otp** makes adding **Two Factor Authentication** (TFA) to a model simple. Let's see what's required to get AMo::Otp working in our Application, using Rails 4.0 (AMo::Otp is also compatible with Rails 3.x versions). We're going to use a User model and some authentication to do it. Inspired by AM::SecurePassword
8+
**ActiveModel::Otp** makes adding **Two Factor Authentication** (TFA) to a model simple. Let's see what's required to get AMo::Otp working in our Application, using Rails 5.0 (AMo::Otp is also compatible with Rails 4.x versions). We're going to use a User model and try to add options provided by **ActiveMOdel::Otp**. Inspired by AM::SecurePassword
99

1010
## Dependencies
1111

@@ -39,7 +39,7 @@ rails g migration AddOtpSecretKeyToUsers otp_secret_key:string
3939
We’ll then need to run rake db:migrate to update the users table in the database. The next step is to update the model code. We need to use has_one_time_password to make it use TFA.
4040

4141
```ruby
42-
class User < ActiveRecord::Base
42+
class User < ApplicationRecord
4343
has_one_time_password
4444
end
4545
```
@@ -52,7 +52,7 @@ User.find_each { |user| user.update_attribute(:otp_secret_key, User.otp_random_s
5252
To use a custom column to store the secret key field you can use the column_name option. It is also possible to generate codes with a specified length.
5353

5454
```ruby
55-
class User < ActiveRecord::Base
55+
class User < ApplicationRecord
5656
has_one_time_password column_name: :my_otp_secret_column, length: 4
5757
end
5858
```
@@ -116,15 +116,15 @@ change_column :users, :otp_counter, :integer, default: 0
116116
In addition set the counter flag option to true
117117

118118
```ruby
119-
class User < ActiveRecord::Base
119+
class User < ApplicationRecord
120120
has_one_time_password counter_based: true
121121
end
122122
```
123123

124124
And for a custom counter column
125125

126126
```ruby
127-
class User < ActiveRecord::Base
127+
class User < ApplicationRecord
128128
has_one_time_password counter_based: true, counter_column_name: :my_otp_secret_counter_column
129129
end
130130
```

0 commit comments

Comments
 (0)