devise-authy 2.2.1 → 2.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9157eb5b102b0297c975ea71d190f500e0bf6dc5831717df0ca5695b9f0af13e
4
- data.tar.gz: 7582bfb6b18310dd7697a808460ac87282d1c2e3fc9fd09838c431d69315d655
3
+ metadata.gz: 172c6e55ba9cea022fd4428e398af18be1668965361249ee0dff1e6d45ed042f
4
+ data.tar.gz: 5b8b1cbc2529cfa5b448ae2b3f3b4b7c7759f3b82173d26387e89738bda427c1
5
5
  SHA512:
6
- metadata.gz: 36cc430cf270f535c3068c15668a398bbc9a297d345bb0c659db49ef5fb9febb43761abcf118c340476797a8c7150de37cb6ddcd0caf14b408cdecb94ab856f6
7
- data.tar.gz: 856434e4038f931c25f84ddac5281f0b5f762e4a6d9d27a355362822342c255bea58ee6b087a52d912802b654436ef7505efc6a310375cafb67bdfafa5d800e1
6
+ metadata.gz: 3c462910e527dbfdb1ed0fa46295d7cbe783aa7feab75dbd3d30fc07ee016a793f0824262a533e4b0f41ea89f87018be6b8af5cf1205a9d26864fda8b5246d85
7
+ data.tar.gz: 29039ec4944775c87dcc25c17269409f072cef4db8b054b082242435f5affe786df45a9c16be54f79fe1309a321e0e0150af63e17512110b53437d8294ed5fa6
@@ -0,0 +1,30 @@
1
+ name: build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [2.5, 2.6, 2.7, 3.0, head]
12
+ gemfile: [rails_5_2, rails_6]
13
+ exclude:
14
+ - ruby: 3.0
15
+ gemfile: rails_5_2
16
+ - ruby: head
17
+ gemfile: rails_5_2
18
+ continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
19
+ env:
20
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby ${{ matrix.ruby }}
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+ - name: Install dependencies
28
+ run: bundle install
29
+ - name: Run tests
30
+ run: bundle exec rspec
data/Appraisals CHANGED
@@ -7,7 +7,7 @@ appraise "rails-5-2" do
7
7
  gem 'rspec-rails', "~>4.0.0.beta3", :require => false
8
8
  gem 'database_cleaner', :require => false
9
9
  end
10
- end
10
+ end if RUBY_VERSION.to_f < 3.0
11
11
 
12
12
  appraise "rails-6" do
13
13
  gem "rails", "~> 6.0.0"
@@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9
9
 
10
10
  ...
11
11
 
12
+ ## [2.3.0] - 2021-01-07
13
+
14
+ ### Fixed
15
+
16
+ - Fixes calls to `I18n.t` with keyword arguments to support Ruby 3.0
17
+ - Replaces Travis CI with GitHub Actions
18
+ - Updates webmock development dependency
19
+ - Removes sdoc from Gemfile
20
+
12
21
  ## [2.2.1] - 2020-10-13
13
22
 
14
23
  ### Fixed
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gemspec
4
-
5
- # bundle exec rake doc:rails generates the API under doc/api.
6
- gem 'sdoc', '~> 0.4.0', group: :doc
3
+ gemspec
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012-2020 Authy Inc
1
+ Copyright (c) 2012-2021 Authy Inc
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Authy Devise [![Build Status](https://travis-ci.org/twilio/authy-devise.svg?branch=master)](https://travis-ci.org/twilio/authy-devise)
1
+ # Authy Devise [![Build Status](https://github.com/twilio/authy-devise/workflows/build/badge.svg)](https://github.com/twilio/authy-devise/actions)
2
2
 
3
3
  This is a [Devise](https://github.com/plataformatec/devise) extension to add [Two-Factor Authentication with Authy](https://www.twilio.com/docs/authy) to your Rails application.
4
4
 
@@ -227,20 +227,12 @@ end
227
227
 
228
228
  ## Running Tests
229
229
 
230
- To prepare the tests run the following commands:
231
-
232
- ```bash
233
- $ cd spec/rails-app
234
- $ bundle install
235
- $ RAILS_ENV=test bundle exec rake db:migrate
236
- ```
237
-
238
- Now on the project root run the following commands:
230
+ Run the following command:
239
231
 
240
232
  ```bash
241
- $ bundle exec rspec spec/
233
+ $ bundle exec rspec
242
234
  ```
243
235
 
244
236
  ## Copyright
245
237
 
246
- Copyright (c) 2012-2020 Authy Inc. See LICENSE.txt for further details.
238
+ Copyright (c) 2012-2021 Authy Inc. See LICENSE.txt for further details.
@@ -1,7 +1,7 @@
1
- <h2><%= I18n.t('authy_register_title', {:scope => 'devise'}) %></h2>
1
+ <h2><%= I18n.t('authy_register_title', scope: 'devise') %></h2>
2
2
 
3
3
  <%= enable_authy_form do %>
4
4
  <%= text_field_tag :country_code, '', :autocomplete => :off, :placeholder => I18n.t('devise.country'), :id => "authy-countries"%>
5
5
  <%= text_field_tag :cellphone, '', :autocomplete => :off, :placeholder => I18n.t('devise.cellphone'), :id => "authy-cellphone"%>
6
- <p><%= submit_tag I18n.t('enable_authy', {:scope => 'devise'}) %></p>
6
+ <p><%= submit_tag I18n.t('enable_authy', scope: 'devise') %></p>
7
7
  <% end %>
@@ -1,5 +1,5 @@
1
- %h2= I18n.t('authy_register_title', {:scope => 'devise'})
1
+ %h2= I18n.t('authy_register_title', scope: 'devise')
2
2
  = enable_authy_form do
3
3
  = text_field_tag :country_code, '', :autocomplete => :off, :placeholder => I18n.t('devise.country'), :id => "authy-countries"
4
4
  = text_field_tag :cellphone, '', :autocomplete => :off, :placeholder => I18n.t('devise.cellphone'), :id => "authy-cellphone"
5
- %p= submit_tag I18n.t('enable_authy', {:scope => 'devise'})
5
+ %p= submit_tag I18n.t('enable_authy', scope: 'devise')
@@ -1,14 +1,14 @@
1
1
  <h2>
2
- <%= I18n.t('submit_token_title', {:scope => 'devise'}) %>
2
+ <%= I18n.t('submit_token_title', scope: 'devise') %>
3
3
  </h2>
4
4
 
5
5
  <%= verify_authy_form do %>
6
- <legend><%= I18n.t('submit_token_title', {:scope => 'devise'}) %></legend>
6
+ <legend><%= I18n.t('submit_token_title', scope: 'devise') %></legend>
7
7
  <%= label_tag 'authy-token' %>
8
8
  <%= text_field_tag :token, "", :autocomplete => "one-time-code", :inputmode => "numeric", :pattern => "[0-9]*", :id => 'authy-token' %>
9
9
  <label>
10
10
  <%= check_box_tag :remember_device %>
11
- <span><%= I18n.t('remember_device', {:scope => 'devise'}) %></span>
11
+ <span><%= I18n.t('remember_device', scope: 'devise') %></span>
12
12
  </label>
13
13
 
14
14
  <!-- Help tooltip -->
@@ -17,7 +17,7 @@
17
17
  <!-- <%= link_to '?', '#', :id => 'authy-help' %> -->
18
18
 
19
19
  <%= authy_request_sms_link %>
20
- <%= submit_tag I18n.t('submit_token', {:scope => 'devise'}), :class => 'btn' %>
20
+ <%= submit_tag I18n.t('submit_token', scope: 'devise'), :class => 'btn' %>
21
21
  <% end %>
22
22
 
23
23
  <% if @onetouch_uuid %>
@@ -1,13 +1,13 @@
1
- %h2= I18n.t('authy_register_title', {:scope => 'devise'})
1
+ %h2= I18n.t('authy_register_title', scope: 'devise')
2
2
 
3
3
  = verify_authy_form do
4
- %legend= I18n.t('submit_token_title', {:scope => 'devise'})
4
+ %legend= I18n.t('submit_token_title', scope: 'devise')
5
5
  = hidden_field_tag :"#{resource_name}_id", @resource.id
6
6
  = label_tag 'authy-token'
7
7
  = text_field_tag :token, "", :autocomplete => "one-time-code", :inputmode => "numeric", :pattern => "[0-9]*", :id => 'authy-token'
8
8
  %label
9
9
  = check_box_tag :remember_device
10
- %span= I18n.t('remember_device', {:scope => 'devise'})
10
+ %span= I18n.t('remember_device', scope: 'devise')
11
11
 
12
12
  / Help Tooltip
13
13
  / You need to configure a help message.
@@ -15,7 +15,7 @@
15
15
  / = link_to '?', '#', :id => 'authy-help', :'data-message' => 'a message'
16
16
 
17
17
  = authy_request_sms_link
18
- = submit_tag I18n.t('submit_token', {:scope => 'devise'}), :class => 'btn'
18
+ = submit_tag I18n.t('submit_token', scope: 'devise'), :class => 'btn'
19
19
 
20
20
  - if @onetouch_uuid
21
21
  :javascript
@@ -1,18 +1,18 @@
1
- <h2><%= I18n.t('authy_verify_installation_title', {:scope => 'devise'}) %></h2>
1
+ <h2><%= I18n.t('authy_verify_installation_title', scope: 'devise') %></h2>
2
2
 
3
3
  <% if @authy_qr_code %>
4
- <%= image_tag @authy_qr_code, :size => '256x256', :alt => I18n.t('authy_qr_code_alt', {:scope => 'devise'}) %>
5
- <p><%= I18n.t('authy_qr_code_instructions', {:scope => 'devise'}) %></p>
4
+ <%= image_tag @authy_qr_code, :size => '256x256', :alt => I18n.t('authy_qr_code_alt', scope: 'devise') %>
5
+ <p><%= I18n.t('authy_qr_code_instructions', scope: 'devise') %></p>
6
6
  <% end %>
7
7
 
8
8
  <%= verify_authy_installation_form do %>
9
- <legend><%= I18n.t('submit_token_title', {:scope => 'devise'}) %></legend>
9
+ <legend><%= I18n.t('submit_token_title', scope: 'devise') %></legend>
10
10
  <%= label_tag :token %>
11
11
  <%= text_field_tag :token, "", :autocomplete => "one-time-code", :inputmode => "numeric", :pattern => "[0-9]*", :id => 'authy-token' %>
12
12
  <label>
13
13
  <%= check_box_tag :remember_device %>
14
- <span><%= I18n.t('remember_device', {:scope => 'devise'}) %></span>
14
+ <span><%= I18n.t('remember_device', scope: 'devise') %></span>
15
15
  </label>
16
16
  <%= authy_request_sms_link %>
17
- <%= submit_tag I18n.t('enable_my_account', {:scope => 'devise'}), :class => 'btn' %>
17
+ <%= submit_tag I18n.t('enable_my_account', scope: 'devise'), :class => 'btn' %>
18
18
  <% end %>
@@ -1,16 +1,16 @@
1
- %h2= I18n.t('authy_verify_installation_title', {:scope => 'devise'})
1
+ %h2= I18n.t('authy_verify_installation_title', scope: 'devise')
2
2
 
3
3
  - if @authy_qr_code
4
- = image_tag @authy_qr_code, :size => '256x256', :alt => I18n.t('authy_qr_code_alt', {:scope => 'devise'})
5
- %p= I18n.t('authy_qr_code_instructions', {:scope => 'devise'})
4
+ = image_tag @authy_qr_code, :size => '256x256', :alt => I18n.t('authy_qr_code_alt', scope: 'devise')
5
+ %p= I18n.t('authy_qr_code_instructions', scope: 'devise')
6
6
 
7
7
  = verify_authy_installation_form do
8
- %legend= I18n.t('submit_token_title', {:scope => 'devise'})
8
+ %legend= I18n.t('submit_token_title', scope: 'devise')
9
9
  = label_tag :token
10
10
  = text_field_tag :token, "", :autocomplete => "one-time-code", :inputmode => "numeric", :pattern => "[0-9]*", :id => 'authy-token'
11
11
  %label
12
12
  = check_box_tag :remember_device
13
- %span= I18n.t('remember_device', {:scope => 'devise'})
13
+ %span= I18n.t('remember_device', scope: 'devise')
14
14
  = authy_request_sms_link
15
- = submit_tag I18n.t('enable_my_account', {:scope => 'devise'}), :class => 'btn'
15
+ = submit_tag I18n.t('enable_my_account', scope: 'devise'), :class => 'btn'
16
16
 
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
 
31
31
  spec.add_dependency "devise", ">= 4.0.0"
32
- spec.add_dependency "authy", ">= 2.7.5"
32
+ spec.add_dependency "authy", "~> 3.0"
33
33
 
34
34
  spec.add_development_dependency "appraisal", "~> 2.2"
35
35
  spec.add_development_dependency "bundler", ">= 1.16"
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
41
41
  spec.add_development_dependency "yard", "~> 0.9.11"
42
42
  spec.add_development_dependency "rdoc", "~> 4.3.0"
43
43
  spec.add_development_dependency "simplecov", "~> 0.17.1"
44
- spec.add_development_dependency "webmock", "~> 3.7.6"
44
+ spec.add_development_dependency "webmock", "~> 3.11.0"
45
45
  spec.add_development_dependency "rails", ">= 5"
46
46
  spec.add_development_dependency "sqlite3"
47
47
  spec.add_development_dependency "generator_spec"
@@ -2,7 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "sdoc", "~> 0.4.0", group: :doc
6
5
  gem "rails", "~> 5.2.0"
7
6
  gem "sqlite3", "~> 1.3.13"
8
7
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "sdoc", "~> 0.4.0", group: :doc
6
5
  gem "rails", "~> 6.0.0"
7
6
  gem "sqlite3", "~> 1.4"
8
7
 
@@ -77,7 +77,7 @@ module DeviseAuthy
77
77
  end
78
78
 
79
79
  def send_one_touch_request(authy_id)
80
- Authy::OneTouch.send_approval_request(id: authy_id, message: I18n.t('request_to_login', { :scope => 'devise' }))
80
+ Authy::OneTouch.send_approval_request(id: authy_id, message: I18n.t('request_to_login', scope: 'devise'))
81
81
  end
82
82
 
83
83
  def record_authy_authentication
@@ -3,7 +3,7 @@ module DeviseAuthy
3
3
  module Helpers
4
4
  def authy_request_phone_call_link(opts = {})
5
5
  title = opts.delete(:title) do
6
- I18n.t('request_phone_call', { :scope => 'devise' })
6
+ I18n.t('request_phone_call', scope: 'devise')
7
7
  end
8
8
  opts = {
9
9
  :id => "authy-request-phone-call-link",
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeviseAuthy
4
- VERSION = '2.2.1'
4
+ VERSION = '2.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-authy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Authy Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-13 00:00:00.000000000 Z
11
+ date: 2021-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: authy
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.7.5
33
+ version: '3.0'
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: 2.7.5
40
+ version: '3.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 3.7.6
187
+ version: 3.11.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 3.7.6
194
+ version: 3.11.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rails
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -270,9 +270,9 @@ extensions: []
270
270
  extra_rdoc_files: []
271
271
  files:
272
272
  - ".document"
273
+ - ".github/workflows/build.yml"
273
274
  - ".gitignore"
274
275
  - ".rspec"
275
- - ".travis.yml"
276
276
  - Appraisals
277
277
  - CHANGELOG.md
278
278
  - Gemfile
@@ -1,17 +0,0 @@
1
- language: ruby
2
- script: bundle exec rspec
3
- rvm:
4
- - 2.7
5
- - 2.6
6
- - 2.5
7
- - 2.4
8
- - ruby-head
9
- gemfile:
10
- - gemfiles/rails_5_2.gemfile
11
- - gemfiles/rails_6.gemfile
12
- matrix:
13
- allow_failures:
14
- - rvm: ruby-head
15
- exclude:
16
- - rvm: 2.4
17
- gemfile: gemfiles/rails_6.gemfile