devise-multi-factor 3.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.codeclimate.yml +21 -0
- data/.github/workflows/gem-push.yml +42 -0
- data/.gitignore +23 -0
- data/.rubocop.yml +295 -0
- data/.travis.yml +28 -0
- data/CHANGELOG.md +119 -0
- data/Gemfile +32 -0
- data/LICENSE +19 -0
- data/README.md +322 -0
- data/Rakefile +12 -0
- data/app/controllers/devise/totp_controller.rb +79 -0
- data/app/controllers/devise/two_factor_authentication_controller.rb +84 -0
- data/app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb +3 -0
- data/app/views/devise/two_factor_authentication/new.html.erb +14 -0
- data/app/views/devise/two_factor_authentication/show.html.erb +19 -0
- data/config/locales/de.yml +8 -0
- data/config/locales/en.yml +8 -0
- data/config/locales/es.yml +8 -0
- data/config/locales/fr.yml +8 -0
- data/config/locales/ru.yml +8 -0
- data/devise-multi-factor.gemspec +40 -0
- data/lib/devise-multi-factor.rb +1 -0
- data/lib/devise_multi_factor.rb +56 -0
- data/lib/devise_multi_factor/controllers/helpers.rb +57 -0
- data/lib/devise_multi_factor/hooks/two_factor_authenticatable.rb +17 -0
- data/lib/devise_multi_factor/models/totp_enrollable.rb +7 -0
- data/lib/devise_multi_factor/models/two_factor_authenticatable.rb +142 -0
- data/lib/devise_multi_factor/orm/active_record.rb +14 -0
- data/lib/devise_multi_factor/rails.rb +7 -0
- data/lib/devise_multi_factor/routes.rb +15 -0
- data/lib/devise_multi_factor/schema.rb +23 -0
- data/lib/devise_multi_factor/version.rb +3 -0
- data/lib/generators/active_record/devise_multi_factor_generator.rb +13 -0
- data/lib/generators/active_record/templates/migration.rb +11 -0
- data/lib/generators/devise_multi_factor/devise_multi_factor_generator.rb +17 -0
- data/spec/controllers/two_factor_authentication_controller_spec.rb +41 -0
- data/spec/features/two_factor_authenticatable_spec.rb +237 -0
- data/spec/generators/active_record/devise_multi_factor_generator_spec.rb +34 -0
- data/spec/lib/devise_multi_factor/models/two_factor_authenticatable_spec.rb +282 -0
- data/spec/rails_app/.gitignore +3 -0
- data/spec/rails_app/README.md +3 -0
- data/spec/rails_app/Rakefile +7 -0
- data/spec/rails_app/app/assets/config/manifest.js +2 -0
- data/spec/rails_app/app/assets/javascripts/application.js +1 -0
- data/spec/rails_app/app/assets/stylesheets/application.css +4 -0
- data/spec/rails_app/app/controllers/application_controller.rb +3 -0
- data/spec/rails_app/app/controllers/home_controller.rb +10 -0
- data/spec/rails_app/app/helpers/application_helper.rb +8 -0
- data/spec/rails_app/app/mailers/.gitkeep +0 -0
- data/spec/rails_app/app/models/.gitkeep +0 -0
- data/spec/rails_app/app/models/admin.rb +6 -0
- data/spec/rails_app/app/models/encrypted_user.rb +7 -0
- data/spec/rails_app/app/models/guest_user.rb +7 -0
- data/spec/rails_app/app/models/test_user.rb +38 -0
- data/spec/rails_app/app/models/user.rb +18 -0
- data/spec/rails_app/app/views/home/dashboard.html.erb +11 -0
- data/spec/rails_app/app/views/home/index.html.erb +3 -0
- data/spec/rails_app/app/views/layouts/application.html.erb +20 -0
- data/spec/rails_app/config.ru +4 -0
- data/spec/rails_app/config/application.rb +61 -0
- data/spec/rails_app/config/boot.rb +10 -0
- data/spec/rails_app/config/database.yml +19 -0
- data/spec/rails_app/config/environment.rb +5 -0
- data/spec/rails_app/config/environments/development.rb +28 -0
- data/spec/rails_app/config/environments/production.rb +68 -0
- data/spec/rails_app/config/environments/test.rb +41 -0
- data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/rails_app/config/initializers/cookies_serializer.rb +3 -0
- data/spec/rails_app/config/initializers/devise.rb +258 -0
- data/spec/rails_app/config/initializers/inflections.rb +15 -0
- data/spec/rails_app/config/initializers/mime_types.rb +5 -0
- data/spec/rails_app/config/initializers/secret_token.rb +7 -0
- data/spec/rails_app/config/initializers/session_store.rb +8 -0
- data/spec/rails_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/rails_app/config/locales/devise.en.yml +59 -0
- data/spec/rails_app/config/locales/en.yml +5 -0
- data/spec/rails_app/config/routes.rb +65 -0
- data/spec/rails_app/db/migrate/20140403184646_devise_create_users.rb +42 -0
- data/spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb +17 -0
- data/spec/rails_app/db/migrate/20140407215513_add_nickanme_to_users.rb +7 -0
- data/spec/rails_app/db/migrate/20151224171231_add_encrypted_columns_to_user.rb +7 -0
- data/spec/rails_app/db/migrate/20151224180310_populate_otp_column.rb +19 -0
- data/spec/rails_app/db/migrate/20151228230340_remove_otp_secret_key_from_user.rb +5 -0
- data/spec/rails_app/db/migrate/20160209032439_devise_create_admins.rb +42 -0
- data/spec/rails_app/db/schema.rb +55 -0
- data/spec/rails_app/lib/assets/.gitkeep +0 -0
- data/spec/rails_app/lib/sms_provider.rb +17 -0
- data/spec/rails_app/public/404.html +26 -0
- data/spec/rails_app/public/422.html +26 -0
- data/spec/rails_app/public/500.html +25 -0
- data/spec/rails_app/public/favicon.ico +0 -0
- data/spec/rails_app/script/rails +6 -0
- data/spec/spec_helper.rb +26 -0
- data/spec/support/authenticated_model_helper.rb +29 -0
- data/spec/support/capybara.rb +3 -0
- data/spec/support/controller_helper.rb +16 -0
- data/spec/support/features_spec_helper.rb +42 -0
- data/spec/support/sms_provider.rb +5 -0
- data/spec/support/totp_helper.rb +11 -0
- metadata +315 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ed4e43d631f791265fbe4849b093753d4905e605a959fce1af1cfe1ddbbe01ca
|
4
|
+
data.tar.gz: 3e1c5ff5e1b8612cb73c675641303f297596fa2d90c1aa028c99e6f99f9383b4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cc45d1846a2191ae1ccc52faf8b0bf124b828eed2b5df3f25ceb2dddfd9a49dc1a65329bbf8bfef5245aca9f15be5647e6f15398aa3286901237f344505847dc
|
7
|
+
data.tar.gz: 0b29c86fbc815d956bf0d6c2f40c9d11b194942850ab933a12c479af6dff9aa01fd4579025470c3f57d73a4129f53b8d24aaaf398302405d62ee22b51711c9ec
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
engines:
|
2
|
+
brakeman:
|
3
|
+
enabled: true
|
4
|
+
duplication:
|
5
|
+
enabled: true
|
6
|
+
config:
|
7
|
+
languages:
|
8
|
+
- ruby
|
9
|
+
# mass_threshold: 30
|
10
|
+
exclude_paths:
|
11
|
+
- 'spec/**/*'
|
12
|
+
fixme:
|
13
|
+
enabled: true
|
14
|
+
rubocop:
|
15
|
+
enabled: true
|
16
|
+
|
17
|
+
ratings:
|
18
|
+
paths:
|
19
|
+
- app/**
|
20
|
+
- lib/**
|
21
|
+
- '**.rb'
|
@@ -0,0 +1,42 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
name: Build + Publish
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- name: Set up Ruby 2.6
|
17
|
+
uses: actions/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: 2.6.x
|
20
|
+
|
21
|
+
- name: Publish to GPR
|
22
|
+
run: |
|
23
|
+
mkdir -p $HOME/.gem
|
24
|
+
touch $HOME/.gem/credentials
|
25
|
+
chmod 0600 $HOME/.gem/credentials
|
26
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
27
|
+
gem build *.gemspec
|
28
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
29
|
+
env:
|
30
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
31
|
+
OWNER: ${{ github.repository_owner }}
|
32
|
+
|
33
|
+
- name: Publish to RubyGems
|
34
|
+
run: |
|
35
|
+
mkdir -p $HOME/.gem
|
36
|
+
touch $HOME/.gem/credentials
|
37
|
+
chmod 0600 $HOME/.gem/credentials
|
38
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
39
|
+
gem build *.gemspec
|
40
|
+
gem push *.gem
|
41
|
+
env:
|
42
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
data/.gitignore
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
*.gem
|
2
|
+
.bundle
|
3
|
+
Gemfile.lock
|
4
|
+
pkg/*
|
5
|
+
|
6
|
+
# Temporary files of every sort
|
7
|
+
.DS_Store
|
8
|
+
.idea
|
9
|
+
.rvmrc
|
10
|
+
.stgit*
|
11
|
+
*.swap
|
12
|
+
*.swo
|
13
|
+
*.swp
|
14
|
+
*~
|
15
|
+
bin/*
|
16
|
+
nbproject
|
17
|
+
patches-*
|
18
|
+
capybara-*.html
|
19
|
+
dump.rdb
|
20
|
+
*.ids
|
21
|
+
.rbenv-version
|
22
|
+
.ruby-gemset
|
23
|
+
.ruby-version
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,295 @@
|
|
1
|
+
AllCops:
|
2
|
+
Include:
|
3
|
+
- '**/Gemfile'
|
4
|
+
- '**/Rakefile'
|
5
|
+
UseCache: true
|
6
|
+
|
7
|
+
Lint/AssignmentInCondition:
|
8
|
+
Description: Don't use assignment in conditions.
|
9
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
10
|
+
Enabled: true
|
11
|
+
AllowSafeAssignment: true
|
12
|
+
Lint/EachWithObjectArgument:
|
13
|
+
Description: Check for immutable argument given to each_with_object.
|
14
|
+
Enabled: true
|
15
|
+
Lint/HandleExceptions:
|
16
|
+
Description: Don't suppress exception.
|
17
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
18
|
+
Enabled: true
|
19
|
+
Lint/LiteralInCondition:
|
20
|
+
Description: Checks of literals used in conditions.
|
21
|
+
Enabled: true
|
22
|
+
Lint/LiteralInInterpolation:
|
23
|
+
Description: Checks for literals used in interpolation.
|
24
|
+
Enabled: true
|
25
|
+
Lint/ParenthesesAsGroupedExpression:
|
26
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
27
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
28
|
+
Enabled: true
|
29
|
+
|
30
|
+
Metrics/AbcSize:
|
31
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
32
|
+
conditions.
|
33
|
+
Enabled: true
|
34
|
+
Max: 15
|
35
|
+
Exclude:
|
36
|
+
- spec/**/*
|
37
|
+
Metrics/ClassLength:
|
38
|
+
Description: Avoid classes longer than 100 lines of code.
|
39
|
+
Enabled: true
|
40
|
+
CountComments: false
|
41
|
+
Max: 100
|
42
|
+
Exclude:
|
43
|
+
- spec/**/*
|
44
|
+
Metrics/CyclomaticComplexity:
|
45
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
46
|
+
cases needed to validate a method.
|
47
|
+
Enabled: true
|
48
|
+
Max: 6
|
49
|
+
Metrics/LineLength:
|
50
|
+
Description: Limit lines to 80 characters.
|
51
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
52
|
+
Enabled: true
|
53
|
+
Max: 100
|
54
|
+
AllowURI: true
|
55
|
+
URISchemes:
|
56
|
+
- http
|
57
|
+
- https
|
58
|
+
Metrics/MethodLength:
|
59
|
+
Description: Avoid methods longer than 10 lines of code.
|
60
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
61
|
+
Enabled: true
|
62
|
+
CountComments: false
|
63
|
+
Max: 10
|
64
|
+
Exclude:
|
65
|
+
- spec/**/*
|
66
|
+
Metrics/ModuleLength:
|
67
|
+
CountComments: false
|
68
|
+
Max: 100
|
69
|
+
Description: Avoid modules longer than 100 lines of code.
|
70
|
+
Enabled: true
|
71
|
+
Exclude:
|
72
|
+
- spec/**/*
|
73
|
+
Metrics/ParameterLists:
|
74
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
75
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
76
|
+
Enabled: true
|
77
|
+
Max: 5
|
78
|
+
CountKeywordArgs: true
|
79
|
+
Metrics/PerceivedComplexity:
|
80
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
81
|
+
reader.
|
82
|
+
Enabled: true
|
83
|
+
Max: 7
|
84
|
+
|
85
|
+
Rails/ScopeArgs:
|
86
|
+
Description: Checks the arguments of ActiveRecord scopes.
|
87
|
+
Enabled: true
|
88
|
+
Rails/TimeZone:
|
89
|
+
# The value `strict` means that `Time` should be used with `zone`.
|
90
|
+
# The value `flexible` allows usage of `in_time_zone` instead of `zone`.
|
91
|
+
Enabled: true
|
92
|
+
EnforcedStyle: flexible
|
93
|
+
SupportedStyles:
|
94
|
+
- strict
|
95
|
+
- flexible
|
96
|
+
|
97
|
+
Style/AccessorMethodName:
|
98
|
+
Description: Check the naming of accessor methods for get_/set_.
|
99
|
+
Enabled: false
|
100
|
+
Style/AndOr:
|
101
|
+
Description: Use &&/|| instead of and/or.
|
102
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
103
|
+
Enabled: true
|
104
|
+
EnforcedStyle: conditionals
|
105
|
+
SupportedStyles:
|
106
|
+
- always
|
107
|
+
- conditionals
|
108
|
+
Style/Alias:
|
109
|
+
Description: Use alias_method instead of alias.
|
110
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
111
|
+
Enabled: true
|
112
|
+
Style/ClassAndModuleChildren:
|
113
|
+
EnforcedStyle: nested
|
114
|
+
SupportedStyles:
|
115
|
+
- nested
|
116
|
+
- compact
|
117
|
+
Style/CollectionMethods:
|
118
|
+
Description: Preferred collection methods.
|
119
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
120
|
+
Enabled: true
|
121
|
+
PreferredMethods:
|
122
|
+
collect: map
|
123
|
+
collect!: map!
|
124
|
+
find: detect
|
125
|
+
find_all: select
|
126
|
+
reduce: inject
|
127
|
+
Style/Documentation:
|
128
|
+
Description: Document classes and non-namespace modules.
|
129
|
+
Enabled: false
|
130
|
+
Style/DotPosition:
|
131
|
+
Description: Checks the position of the dot in multi-line method calls.
|
132
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
133
|
+
Enabled: true
|
134
|
+
EnforcedStyle: trailing
|
135
|
+
SupportedStyles:
|
136
|
+
- leading
|
137
|
+
- trailing
|
138
|
+
Style/DoubleNegation:
|
139
|
+
Description: Checks for uses of double negation (!!).
|
140
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
141
|
+
Enabled: true
|
142
|
+
Style/EachWithObject:
|
143
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
144
|
+
Enabled: true
|
145
|
+
Style/EmptyLiteral:
|
146
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
147
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
148
|
+
Enabled: true
|
149
|
+
Style/FileName:
|
150
|
+
Description: Use snake_case for source file names.
|
151
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
152
|
+
Enabled: true
|
153
|
+
Exclude: []
|
154
|
+
Style/GuardClause:
|
155
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
156
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
157
|
+
Enabled: true
|
158
|
+
MinBodyLength: 1
|
159
|
+
Style/IfUnlessModifier:
|
160
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
161
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
162
|
+
Enabled: false
|
163
|
+
MaxLineLength: 80
|
164
|
+
Style/InlineComment:
|
165
|
+
Description: Avoid inline comments.
|
166
|
+
Enabled: false
|
167
|
+
Style/ModuleFunction:
|
168
|
+
Description: Checks for usage of `extend self` in modules.
|
169
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
170
|
+
Enabled: false
|
171
|
+
Style/OneLineConditional:
|
172
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
173
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
174
|
+
Enabled: false
|
175
|
+
Style/OptionHash:
|
176
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
177
|
+
Enabled: false
|
178
|
+
Style/PercentLiteralDelimiters:
|
179
|
+
Description: Use `%`-literal delimiters consistently
|
180
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
181
|
+
Enabled: true
|
182
|
+
PreferredDelimiters:
|
183
|
+
"%": "()"
|
184
|
+
"%i": "()"
|
185
|
+
"%q": "()"
|
186
|
+
"%Q": "()"
|
187
|
+
"%r": "{}"
|
188
|
+
"%s": "()"
|
189
|
+
"%w": "()"
|
190
|
+
"%W": "()"
|
191
|
+
"%x": "()"
|
192
|
+
Style/PerlBackrefs:
|
193
|
+
Description: Avoid Perl-style regex back references.
|
194
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
195
|
+
Enabled: false
|
196
|
+
Style/PredicateName:
|
197
|
+
Description: Check the names of predicate methods.
|
198
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
199
|
+
Enabled: true
|
200
|
+
NamePrefix:
|
201
|
+
- is_
|
202
|
+
- has_
|
203
|
+
- have_
|
204
|
+
NamePrefixBlacklist:
|
205
|
+
- is_
|
206
|
+
Exclude:
|
207
|
+
- spec/**/*
|
208
|
+
Style/RaiseArgs:
|
209
|
+
Description: Checks the arguments passed to raise/fail.
|
210
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
211
|
+
Enabled: true
|
212
|
+
EnforcedStyle: exploded
|
213
|
+
SupportedStyles:
|
214
|
+
- compact
|
215
|
+
- exploded
|
216
|
+
Style/Send:
|
217
|
+
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
|
218
|
+
may overlap with existing methods.
|
219
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
220
|
+
Enabled: false
|
221
|
+
Style/SignalException:
|
222
|
+
Description: Checks for proper usage of fail and raise.
|
223
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
224
|
+
Enabled: true
|
225
|
+
EnforcedStyle: semantic
|
226
|
+
SupportedStyles:
|
227
|
+
- only_raise
|
228
|
+
- only_fail
|
229
|
+
- semantic
|
230
|
+
Style/SingleLineBlockParams:
|
231
|
+
Description: Enforces the names of some block params.
|
232
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
233
|
+
Enabled: true
|
234
|
+
Methods:
|
235
|
+
- reduce:
|
236
|
+
- a
|
237
|
+
- e
|
238
|
+
- inject:
|
239
|
+
- a
|
240
|
+
- e
|
241
|
+
Style/SingleLineMethods:
|
242
|
+
Description: Avoid single-line methods.
|
243
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
244
|
+
Enabled: true
|
245
|
+
AllowIfMethodIsEmpty: true
|
246
|
+
Style/SpecialGlobalVars:
|
247
|
+
Description: Avoid Perl-style global variables.
|
248
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
249
|
+
Enabled: false
|
250
|
+
Style/StringLiterals:
|
251
|
+
Description: Checks if uses of quotes match the configured preference.
|
252
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
253
|
+
Enabled: true
|
254
|
+
EnforcedStyle: single_quotes
|
255
|
+
SupportedStyles:
|
256
|
+
- single_quotes
|
257
|
+
- double_quotes
|
258
|
+
Style/StringLiteralsInInterpolation:
|
259
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
260
|
+
match the configured preference.
|
261
|
+
Enabled: true
|
262
|
+
EnforcedStyle: single_quotes
|
263
|
+
SupportedStyles:
|
264
|
+
- single_quotes
|
265
|
+
- double_quotes
|
266
|
+
Style/TrailingCommaInArguments:
|
267
|
+
Description: 'Checks for trailing comma in argument lists.'
|
268
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
269
|
+
Enabled: true
|
270
|
+
EnforcedStyleForMultiline: no_comma
|
271
|
+
SupportedStyles:
|
272
|
+
- comma
|
273
|
+
- consistent_comma
|
274
|
+
- no_comma
|
275
|
+
Style/TrailingCommaInLiteral:
|
276
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
277
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
278
|
+
Enabled: true
|
279
|
+
EnforcedStyleForMultiline: no_comma
|
280
|
+
SupportedStyles:
|
281
|
+
- comma
|
282
|
+
- consistent_comma
|
283
|
+
- no_comma
|
284
|
+
Style/VariableInterpolation:
|
285
|
+
Description: Don't interpolate global, instance and class variables directly in
|
286
|
+
strings.
|
287
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
288
|
+
Enabled: false
|
289
|
+
Style/WhenThen:
|
290
|
+
Description: Use when x then ... for one-line cases.
|
291
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
292
|
+
Enabled: false
|
293
|
+
Style/ZeroLengthPredicate:
|
294
|
+
Description: 'Use #empty? when testing for objects of length 0.'
|
295
|
+
Enabled: true
|
data/.travis.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
env:
|
4
|
+
- "RAILS_VERSION=4.2"
|
5
|
+
- "RAILS_VERSION=5.2"
|
6
|
+
- "RAILS_VERSION=master"
|
7
|
+
|
8
|
+
rvm:
|
9
|
+
- 2.3.8
|
10
|
+
- 2.4.5
|
11
|
+
- 2.5.3
|
12
|
+
|
13
|
+
matrix:
|
14
|
+
fast_finish: true
|
15
|
+
allow_failures:
|
16
|
+
- env: "RAILS_VERSION=master"
|
17
|
+
include:
|
18
|
+
- rvm: 2.2
|
19
|
+
env: RAILS_VERSION=4.2
|
20
|
+
|
21
|
+
before_install:
|
22
|
+
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
|
23
|
+
- gem install bundler -v '< 2'
|
24
|
+
|
25
|
+
before_script:
|
26
|
+
- bundle exec rake app:db:setup
|
27
|
+
|
28
|
+
script: bundle exec rake spec
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## [Unreleased](https://github.com/Houdini/two_factor_authentication/tree/HEAD)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.5...HEAD)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Fix class detection in reset\_otp\_state\_for\(user\) [\#69](https://github.com/Houdini/two_factor_authentication/pull/69) ([monfresh](https://github.com/monfresh))
|
10
|
+
- Add ability to resend code [\#52](https://github.com/Houdini/two_factor_authentication/pull/52) ([iDiogenes](https://github.com/iDiogenes))
|
11
|
+
|
12
|
+
## [v1.1.5](https://github.com/Houdini/two_factor_authentication/tree/v1.1.5) (2016-02-01)
|
13
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.4...v1.1.5)
|
14
|
+
|
15
|
+
**Closed issues:**
|
16
|
+
|
17
|
+
- How should I integrate Devise two factor authentication with custom sessions controller? [\#60](https://github.com/Houdini/two_factor_authentication/issues/60)
|
18
|
+
|
19
|
+
**Merged pull requests:**
|
20
|
+
|
21
|
+
- added french translation [\#68](https://github.com/Houdini/two_factor_authentication/pull/68) ([qsypoq](https://github.com/qsypoq))
|
22
|
+
- Drop support for Ruby 1.9.3 & update .travis.yml [\#67](https://github.com/Houdini/two_factor_authentication/pull/67) ([monfresh](https://github.com/monfresh))
|
23
|
+
- Fix reset\_otp\_state specs [\#66](https://github.com/Houdini/two_factor_authentication/pull/66) ([monfresh](https://github.com/monfresh))
|
24
|
+
- Add a CHANGELOG.md [\#65](https://github.com/Houdini/two_factor_authentication/pull/65) ([monfresh](https://github.com/monfresh))
|
25
|
+
- Update bundler on Travis before installing gems [\#63](https://github.com/Houdini/two_factor_authentication/pull/63) ([monfresh](https://github.com/monfresh))
|
26
|
+
- Add support for OTP secret key encryption [\#62](https://github.com/Houdini/two_factor_authentication/pull/62) ([monfresh](https://github.com/monfresh))
|
27
|
+
- Allow executing code after sign in and before sign out [\#61](https://github.com/Houdini/two_factor_authentication/pull/61) ([monfresh](https://github.com/monfresh))
|
28
|
+
|
29
|
+
## [v1.1.4](https://github.com/Houdini/two_factor_authentication/tree/v1.1.4) (2016-01-01)
|
30
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.3...v1.1.4)
|
31
|
+
|
32
|
+
**Closed issues:**
|
33
|
+
|
34
|
+
- Old OTP can be used after a new one has been generated [\#59](https://github.com/Houdini/two_factor_authentication/issues/59)
|
35
|
+
- Do we have any two\_factor\_method like authenticate\_user! [\#58](https://github.com/Houdini/two_factor_authentication/issues/58)
|
36
|
+
- Configuration [\#57](https://github.com/Houdini/two_factor_authentication/issues/57)
|
37
|
+
|
38
|
+
**Merged pull requests:**
|
39
|
+
|
40
|
+
- Abstract logic for two factor success and fail into separate methods.… [\#56](https://github.com/Houdini/two_factor_authentication/pull/56) ([kpheasey](https://github.com/kpheasey))
|
41
|
+
- Move require rotp library to the file where it is used [\#55](https://github.com/Houdini/two_factor_authentication/pull/55) ([gkopylov](https://github.com/gkopylov))
|
42
|
+
- Add support for remembering a user's 2FA session in a cookie [\#54](https://github.com/Houdini/two_factor_authentication/pull/54) ([boffbowsh](https://github.com/boffbowsh))
|
43
|
+
- Test against Ruby 2.2 and Rails 4.2 [\#53](https://github.com/Houdini/two_factor_authentication/pull/53) ([boffbowsh](https://github.com/boffbowsh))
|
44
|
+
- Eliminates appended '?' to redirects that have no query string [\#46](https://github.com/Houdini/two_factor_authentication/pull/46) ([daveriess](https://github.com/daveriess))
|
45
|
+
|
46
|
+
## [v1.1.3](https://github.com/Houdini/two_factor_authentication/tree/v1.1.3) (2014-12-14)
|
47
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.2...v1.1.3)
|
48
|
+
|
49
|
+
**Closed issues:**
|
50
|
+
|
51
|
+
- rails g two\_factor\_authentication MODEL does not append .rb to end of migration [\#40](https://github.com/Houdini/two_factor_authentication/issues/40)
|
52
|
+
|
53
|
+
**Merged pull requests:**
|
54
|
+
|
55
|
+
- Allows length of OTP to be configured [\#44](https://github.com/Houdini/two_factor_authentication/pull/44) ([amoose](https://github.com/amoose))
|
56
|
+
- Missing translation. [\#43](https://github.com/Houdini/two_factor_authentication/pull/43) ([sadfuzzy](https://github.com/sadfuzzy))
|
57
|
+
- Preserve query parameters in \_return\_to for redirect. [\#42](https://github.com/Houdini/two_factor_authentication/pull/42) ([omb-awong](https://github.com/omb-awong))
|
58
|
+
- Add file extension to ActiveRecord generator [\#41](https://github.com/Houdini/two_factor_authentication/pull/41) ([jackturnbull](https://github.com/jackturnbull))
|
59
|
+
|
60
|
+
## [v1.1.2](https://github.com/Houdini/two_factor_authentication/tree/v1.1.2) (2014-07-14)
|
61
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1.1...v1.1.2)
|
62
|
+
|
63
|
+
**Closed issues:**
|
64
|
+
|
65
|
+
- NoMethodError \(undefined method `scan' for nil:NilClass\) [\#37](https://github.com/Houdini/two_factor_authentication/issues/37)
|
66
|
+
|
67
|
+
**Merged pull requests:**
|
68
|
+
|
69
|
+
- Updated readme with rake task to update existing users with OTP secret k... [\#39](https://github.com/Houdini/two_factor_authentication/pull/39) ([Znow](https://github.com/Znow))
|
70
|
+
- Updated readme with view overriding [\#38](https://github.com/Houdini/two_factor_authentication/pull/38) ([Znow](https://github.com/Znow))
|
71
|
+
|
72
|
+
## [v1.1.1](https://github.com/Houdini/two_factor_authentication/tree/v1.1.1) (2014-05-31)
|
73
|
+
[Full Changelog](https://github.com/Houdini/two_factor_authentication/compare/v1.1...v1.1.1)
|
74
|
+
|
75
|
+
**Closed issues:**
|
76
|
+
|
77
|
+
- Override views [\#36](https://github.com/Houdini/two_factor_authentication/issues/36)
|
78
|
+
- NoMethodError in Devise::TwoFactorAuthenticationController\#update [\#30](https://github.com/Houdini/two_factor_authentication/issues/30)
|
79
|
+
|
80
|
+
**Merged pull requests:**
|
81
|
+
|
82
|
+
- Use Strings and not Symbols for keys when storing variable in warden session [\#35](https://github.com/Houdini/two_factor_authentication/pull/35) ([karolsarnacki](https://github.com/karolsarnacki))
|
83
|
+
- Chore/extract reused hash key [\#34](https://github.com/Houdini/two_factor_authentication/pull/34) ([rud](https://github.com/rud))
|
84
|
+
- Pad OTP codes with less than 6 digits [\#31](https://github.com/Houdini/two_factor_authentication/pull/31) ([brissmyr](https://github.com/brissmyr))
|
85
|
+
|
86
|
+
## [v1.1](https://github.com/Houdini/two_factor_authentication/tree/v1.1) (2014-04-16)
|
87
|
+
**Closed issues:**
|
88
|
+
|
89
|
+
- Update [\#15](https://github.com/Houdini/two_factor_authentication/issues/15)
|
90
|
+
- Data in formats other than HTML left unprotected [\#6](https://github.com/Houdini/two_factor_authentication/issues/6)
|
91
|
+
- Wordlists [\#5](https://github.com/Houdini/two_factor_authentication/issues/5)
|
92
|
+
- devise - wrong number of arguments \(1 for 0\) [\#3](https://github.com/Houdini/two_factor_authentication/issues/3)
|
93
|
+
- gem? [\#1](https://github.com/Houdini/two_factor_authentication/issues/1)
|
94
|
+
|
95
|
+
**Merged pull requests:**
|
96
|
+
|
97
|
+
- added is\_fully\_authenticated helper for current version [\#28](https://github.com/Houdini/two_factor_authentication/pull/28) ([edg3r](https://github.com/edg3r))
|
98
|
+
- Adds integration spec to ensure authentication code is sent on sign in [\#27](https://github.com/Houdini/two_factor_authentication/pull/27) ([rossta](https://github.com/rossta))
|
99
|
+
- ensure return\_to location is properly stored [\#26](https://github.com/Houdini/two_factor_authentication/pull/26) ([rossta](https://github.com/rossta))
|
100
|
+
- travis badge in README [\#25](https://github.com/Houdini/two_factor_authentication/pull/25) ([rossta](https://github.com/rossta))
|
101
|
+
- Integration specs [\#24](https://github.com/Houdini/two_factor_authentication/pull/24) ([rossta](https://github.com/rossta))
|
102
|
+
- README updates [\#23](https://github.com/Houdini/two_factor_authentication/pull/23) ([rossta](https://github.com/rossta))
|
103
|
+
- extract method \#max\_login\_attempts [\#22](https://github.com/Houdini/two_factor_authentication/pull/22) ([rossta](https://github.com/rossta))
|
104
|
+
- extract method \#populate\_otp\_column [\#21](https://github.com/Houdini/two_factor_authentication/pull/21) ([rossta](https://github.com/rossta))
|
105
|
+
- specs for Model\#provisioning\_uri [\#20](https://github.com/Houdini/two_factor_authentication/pull/20) ([rossta](https://github.com/rossta))
|
106
|
+
- Provide options for \#provisioning\_uri [\#19](https://github.com/Houdini/two_factor_authentication/pull/19) ([rossta](https://github.com/rossta))
|
107
|
+
- Use time-based authentication codes [\#16](https://github.com/Houdini/two_factor_authentication/pull/16) ([mattmueller](https://github.com/mattmueller))
|
108
|
+
- Add ru locales and locales for max\_limit\_reached view [\#13](https://github.com/Houdini/two_factor_authentication/pull/13) ([edg3r](https://github.com/edg3r))
|
109
|
+
- Update README.md [\#11](https://github.com/Houdini/two_factor_authentication/pull/11) ([edg3r](https://github.com/edg3r))
|
110
|
+
- Changed route from user to admin\_user [\#10](https://github.com/Houdini/two_factor_authentication/pull/10) ([ilanstern](https://github.com/ilanstern))
|
111
|
+
- Changed :notice to :error when setting flash message on attempt failure. [\#9](https://github.com/Houdini/two_factor_authentication/pull/9) ([johnmichaelbradley](https://github.com/johnmichaelbradley))
|
112
|
+
- Typo and punctuation corrections. [\#8](https://github.com/Houdini/two_factor_authentication/pull/8) ([johnmichaelbradley](https://github.com/johnmichaelbradley))
|
113
|
+
- Respond with 401 for request non-HTML requests [\#7](https://github.com/Houdini/two_factor_authentication/pull/7) ([WojtekKruszewski](https://github.com/WojtekKruszewski))
|
114
|
+
- need\_two\_factor\_authentication? method should accept request param. [\#4](https://github.com/Houdini/two_factor_authentication/pull/4) ([VladimirMikhailov](https://github.com/VladimirMikhailov))
|
115
|
+
- Add generators to make it easier to install and fix deprecation warnings [\#2](https://github.com/Houdini/two_factor_authentication/pull/2) ([carvil](https://github.com/carvil))
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|