google-authenticator-rails 1.7.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7590aa55a2ba14e7005c74ce65b40dbbde7b1156
4
- data.tar.gz: cc80661ea84c682684a1894a91a323e41ad748eb
3
+ metadata.gz: 00704838d9ed31eedcc4224c0116b6606b50ca57
4
+ data.tar.gz: e0c8bf5800b17aa91190e090dd1f44e0f7872e69
5
5
  SHA512:
6
- metadata.gz: eb2ba50e82b403794d9f8f4b2e47601526bbceb94f430732e92679abe66bf0a5faa054f2617163c51f47acb95f12fd539383c6cee3f83c24a46162cfaf9ff89a
7
- data.tar.gz: cde11467ffb3ee7ff5fd5606558f8501936857e29a8580298205280911d010a5d4a386a67e4147ea2099ca57fda95a2adb97115fadcc691cb77813c25021a159
6
+ metadata.gz: e0e2a51adac592a8cd82be253b82007cbd8b39937ec8b161c1c6e5c39eebc26a0d87e252320540e350026d017301f517ef8565d183e17a723540864ca7874341
7
+ data.tar.gz: 4f6d131a29bfbb93385637230a192c61682b5e7afb7912532eeae05fc9d6116760a0a5cf37296801aa66d3b3da602ec45ce8277644102e878364b621fd294a88
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in google-authenticator.gemspec
4
- gemspec
4
+ gemspec
@@ -1,54 +1,53 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google-authenticator-rails (1.7.0)
4
+ google-authenticator-rails (2.0.0)
5
5
  actionpack
6
6
  activerecord
7
7
  google-qr
8
8
  rails
9
9
  rotp (= 3.3.0)
10
- rqrcode
11
10
 
12
11
  GEM
13
12
  remote: https://rubygems.org/
14
13
  specs:
15
- actioncable (5.2.2)
16
- actionpack (= 5.2.2)
14
+ actioncable (5.2.0)
15
+ actionpack (= 5.2.0)
17
16
  nio4r (~> 2.0)
18
17
  websocket-driver (>= 0.6.1)
19
- actionmailer (5.2.2)
20
- actionpack (= 5.2.2)
21
- actionview (= 5.2.2)
22
- activejob (= 5.2.2)
18
+ actionmailer (5.2.0)
19
+ actionpack (= 5.2.0)
20
+ actionview (= 5.2.0)
21
+ activejob (= 5.2.0)
23
22
  mail (~> 2.5, >= 2.5.4)
24
23
  rails-dom-testing (~> 2.0)
25
- actionpack (5.2.2)
26
- actionview (= 5.2.2)
27
- activesupport (= 5.2.2)
24
+ actionpack (5.2.0)
25
+ actionview (= 5.2.0)
26
+ activesupport (= 5.2.0)
28
27
  rack (~> 2.0)
29
28
  rack-test (>= 0.6.3)
30
29
  rails-dom-testing (~> 2.0)
31
30
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
32
- actionview (5.2.2)
33
- activesupport (= 5.2.2)
31
+ actionview (5.2.0)
32
+ activesupport (= 5.2.0)
34
33
  builder (~> 3.1)
35
34
  erubi (~> 1.4)
36
35
  rails-dom-testing (~> 2.0)
37
36
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
38
- activejob (5.2.2)
39
- activesupport (= 5.2.2)
37
+ activejob (5.2.0)
38
+ activesupport (= 5.2.0)
40
39
  globalid (>= 0.3.6)
41
- activemodel (5.2.2)
42
- activesupport (= 5.2.2)
43
- activerecord (5.2.2)
44
- activemodel (= 5.2.2)
45
- activesupport (= 5.2.2)
40
+ activemodel (5.2.0)
41
+ activesupport (= 5.2.0)
42
+ activerecord (5.2.0)
43
+ activemodel (= 5.2.0)
44
+ activesupport (= 5.2.0)
46
45
  arel (>= 9.0)
47
- activestorage (5.2.2)
48
- actionpack (= 5.2.2)
49
- activerecord (= 5.2.2)
46
+ activestorage (5.2.0)
47
+ actionpack (= 5.2.0)
48
+ activerecord (= 5.2.0)
50
49
  marcel (~> 0.3.1)
51
- activesupport (5.2.2)
50
+ activesupport (5.2.0)
52
51
  concurrent-ruby (~> 1.0, >= 1.0.2)
53
52
  i18n (>= 0.7, < 2)
54
53
  minitest (~> 5.1)
@@ -58,64 +57,61 @@ GEM
58
57
  rake
59
58
  arel (9.0.0)
60
59
  builder (3.2.3)
61
- chunky_png (1.3.11)
62
- concurrent-ruby (1.1.4)
60
+ concurrent-ruby (1.0.5)
63
61
  crass (1.0.4)
64
62
  diff-lcs (1.1.3)
65
- docile (1.3.1)
66
- erubi (1.8.0)
67
- globalid (0.4.2)
63
+ docile (1.1.5)
64
+ erubi (1.7.1)
65
+ globalid (0.4.1)
68
66
  activesupport (>= 4.2.0)
69
67
  google-qr (0.2.2)
70
- i18n (1.6.0)
68
+ i18n (1.0.1)
71
69
  concurrent-ruby (~> 1.0)
72
- json (2.2.0)
73
- loofah (2.2.3)
70
+ json (2.1.0)
71
+ loofah (2.2.2)
74
72
  crass (~> 1.0.2)
75
73
  nokogiri (>= 1.5.9)
76
- mail (2.7.1)
74
+ mail (2.7.0)
77
75
  mini_mime (>= 0.1.1)
78
- marcel (0.3.3)
76
+ marcel (0.3.2)
79
77
  mimemagic (~> 0.3.2)
80
- method_source (0.9.2)
81
- mimemagic (0.3.3)
82
- mini_mime (1.0.1)
83
- mini_portile2 (2.4.0)
78
+ method_source (0.9.0)
79
+ mimemagic (0.3.2)
80
+ mini_mime (1.0.0)
81
+ mini_portile2 (2.3.0)
84
82
  minitest (5.11.3)
85
83
  nio4r (2.3.1)
86
- nokogiri (1.10.1)
87
- mini_portile2 (~> 2.4.0)
88
- rack (2.0.6)
89
- rack-test (1.1.0)
84
+ nokogiri (1.8.3)
85
+ mini_portile2 (~> 2.3.0)
86
+ rack (2.0.5)
87
+ rack-test (1.0.0)
90
88
  rack (>= 1.0, < 3)
91
- rails (5.2.2)
92
- actioncable (= 5.2.2)
93
- actionmailer (= 5.2.2)
94
- actionpack (= 5.2.2)
95
- actionview (= 5.2.2)
96
- activejob (= 5.2.2)
97
- activemodel (= 5.2.2)
98
- activerecord (= 5.2.2)
99
- activestorage (= 5.2.2)
100
- activesupport (= 5.2.2)
89
+ rails (5.2.0)
90
+ actioncable (= 5.2.0)
91
+ actionmailer (= 5.2.0)
92
+ actionpack (= 5.2.0)
93
+ actionview (= 5.2.0)
94
+ activejob (= 5.2.0)
95
+ activemodel (= 5.2.0)
96
+ activerecord (= 5.2.0)
97
+ activestorage (= 5.2.0)
98
+ activesupport (= 5.2.0)
101
99
  bundler (>= 1.3.0)
102
- railties (= 5.2.2)
100
+ railties (= 5.2.0)
103
101
  sprockets-rails (>= 2.0.0)
104
102
  rails-dom-testing (2.0.3)
105
103
  activesupport (>= 4.2.0)
106
104
  nokogiri (>= 1.6)
107
105
  rails-html-sanitizer (1.0.4)
108
106
  loofah (~> 2.2, >= 2.2.2)
109
- railties (5.2.2)
110
- actionpack (= 5.2.2)
111
- activesupport (= 5.2.2)
107
+ railties (5.2.0)
108
+ actionpack (= 5.2.0)
109
+ activesupport (= 5.2.0)
112
110
  method_source
113
111
  rake (>= 0.8.7)
114
- thor (>= 0.19.0, < 2.0)
112
+ thor (>= 0.18.1, < 2.0)
115
113
  rake (11.3.0)
116
114
  rotp (3.3.0)
117
- rqrcode (0.10.1)
118
- chunky_png (~> 1.0)
119
115
  rspec (2.8.0)
120
116
  rspec-core (~> 2.8.0)
121
117
  rspec-expectations (~> 2.8.0)
@@ -124,8 +120,8 @@ GEM
124
120
  rspec-expectations (2.8.0)
125
121
  diff-lcs (~> 1.1.2)
126
122
  rspec-mocks (2.8.0)
127
- simplecov (0.16.1)
128
- docile (~> 1.1)
123
+ simplecov (0.15.1)
124
+ docile (~> 1.1.0)
129
125
  json (>= 1.8, < 3)
130
126
  simplecov-html (~> 0.10.0)
131
127
  simplecov-html (0.10.2)
@@ -137,7 +133,7 @@ GEM
137
133
  activesupport (>= 4.0)
138
134
  sprockets (>= 3.0.0)
139
135
  sqlite3 (1.3.13)
140
- thor (0.20.3)
136
+ thor (0.20.0)
141
137
  thread_safe (0.3.6)
142
138
  tzinfo (1.2.5)
143
139
  thread_safe (~> 0.1)
@@ -154,7 +150,7 @@ DEPENDENCIES
154
150
  rake (~> 11.0)
155
151
  rspec (~> 2.8.0)
156
152
  simplecov
157
- sqlite3 (~> 1.3.6)
153
+ sqlite3
158
154
 
159
155
  BUNDLED WITH
160
- 2.0.1
156
+ 1.16.1
data/README.md CHANGED
@@ -52,7 +52,7 @@ Example:
52
52
 
53
53
  ```ruby
54
54
  class User
55
- acts_as_google_authenticated :column_name => :user_name
55
+ acts_as_google_authenticated :column => :user_name
56
56
  end
57
57
 
58
58
  @user = User.new(:user_name => "ted")
@@ -200,7 +200,7 @@ class UserMfaSession < GoogleAuthenticatorRails::Session::Base
200
200
  end
201
201
 
202
202
  # app/controllers/mfa_session_controller.rb
203
- class MfaSessionController < ApplicationController
203
+ def class MfaSessionController < ApplicationController
204
204
  def create
205
205
  UserMfaSession.create(user)
206
206
  end
@@ -5,7 +5,6 @@ require 'active_record'
5
5
  require 'openssl'
6
6
  require 'rotp'
7
7
  require 'google-qr'
8
- require 'rqrcode'
9
8
 
10
9
  # Stuff the gem is
11
10
  #
@@ -35,10 +35,6 @@ module GoogleAuthenticatorRails # :nodoc:
35
35
  GoogleQR.new(:data => ROTP::TOTP.new(google_secret_value, :issuer => google_issuer).provisioning_uri(google_label), :size => size || self.class.google_qr_size).to_s
36
36
  end
37
37
 
38
- def google_qr_to_base64(size = 200)
39
- "data:image/png;base64,#{Base64.strict_encode64(RQRCode::QRCode.new(ROTP::TOTP.new(google_secret_value, :issuer => google_issuer).provisioning_uri(google_label).to_s).as_png(size: size).to_s)}"
40
- end
41
-
42
38
  def google_label
43
39
  method = self.class.google_label_method
44
40
  case method
@@ -1,3 +1,3 @@
1
1
  module GoogleAuthenticatorRails
2
- VERSION = "1.7.0"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -272,11 +272,6 @@ describe GoogleAuthenticatorRails do
272
272
  subject { user.google_qr_uri('400x400') }
273
273
  it { should eq "https://chart.googleapis.com/chart?cht=qr&chl=otpauth%3A%2F%2Ftotp%2Ftest%40example.com%3Fsecret%3D#{secret}&chs=400x400" }
274
274
  end
275
-
276
- context 'generates base64 image' do
277
- let(:user) { UserFactory.create QrCodeUser }
278
- it { user.google_qr_to_base64.include?('data:image/png;base64').should be_true }
279
- end
280
275
  end
281
276
  end
282
277
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-authenticator-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared McFarland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-08 00:00:00.000000000 Z
11
+ date: 2018-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rotp
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rqrcode
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: actionpack
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -154,16 +140,16 @@ dependencies:
154
140
  name: sqlite3
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
- - - "~>"
143
+ - - ">="
158
144
  - !ruby/object:Gem::Version
159
- version: 1.3.6
145
+ version: '0'
160
146
  type: :development
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
- - - "~>"
150
+ - - ">="
165
151
  - !ruby/object:Gem::Version
166
- version: 1.3.6
152
+ version: '0'
167
153
  description: Add the ability to use the Google Authenticator with ActiveRecord.
168
154
  email:
169
155
  - jared.online@gmail.com