devise-authy 1.0.0 → 1.2.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.
Files changed (104) hide show
  1. data/Gemfile +3 -1
  2. data/Gemfile.lock +90 -62
  3. data/Rakefile +1 -1
  4. data/VERSION +1 -1
  5. data/app/controllers/devise/devise_authy_controller.rb +23 -5
  6. data/app/views/devise/enable_authy.html.erb +2 -3
  7. data/app/views/devise/enable_authy.html.haml +2 -5
  8. data/app/views/devise/verify_authy.html.erb +5 -0
  9. data/app/views/devise/verify_authy.html.haml +3 -0
  10. data/authy-devise-demo/Gemfile +1 -0
  11. data/authy-devise-demo/Gemfile.lock +12 -3
  12. data/authy-devise-demo/app/views/devise/devise_authy/enable_authy.html.erb +2 -3
  13. data/authy-devise-demo/app/views/devise/devise_authy/verify_authy.html.erb +5 -0
  14. data/authy-devise-demo/app/views/layouts/application.html.erb +14 -2
  15. data/authy-devise-demo/config/initializers/devise.rb +7 -2
  16. data/authy-devise-demo/config/locales/devise.authy.en.yml +4 -1
  17. data/config/locales/en.yml +4 -1
  18. data/devise-authy.gemspec +62 -51
  19. data/lib/devise-authy.rb +3 -0
  20. data/lib/devise-authy/controllers/helpers.rb +40 -17
  21. data/lib/devise-authy/models/authy_authenticatable.rb +2 -0
  22. data/lib/generators/devise_authy/install_generator.rb +10 -3
  23. data/spec/controllers/devise_authy_controller_spec.rb +134 -45
  24. data/spec/features/authy_authenticatable_spec.rb +95 -0
  25. data/spec/generators_spec.rb +12 -6
  26. data/spec/orm/active_record.rb +1 -1
  27. data/spec/rails-app/Gemfile +8 -0
  28. data/spec/rails-app/Gemfile.lock +111 -0
  29. data/spec/{rails_app → rails-app}/Rakefile +2 -5
  30. data/spec/{rails_app → rails-app}/app/assets/images/rails.png +0 -0
  31. data/spec/rails-app/app/assets/javascripts/application.js +15 -0
  32. data/spec/rails-app/app/assets/javascripts/devise_authy.js +7 -0
  33. data/spec/rails-app/app/assets/javascripts/welcome.js +2 -0
  34. data/spec/rails-app/app/assets/stylesheets/application.css +13 -0
  35. data/spec/{rails_app → rails-app}/app/assets/stylesheets/devise_authy.css +0 -0
  36. data/spec/rails-app/app/assets/stylesheets/welcome.css.scss +3 -0
  37. data/spec/{rails_app → rails-app}/app/controllers/application_controller.rb +0 -1
  38. data/spec/rails-app/app/controllers/welcome_controller.rb +6 -0
  39. data/spec/{rails_app → rails-app}/app/helpers/application_helper.rb +0 -0
  40. data/spec/rails-app/app/helpers/welcome_helper.rb +2 -0
  41. data/spec/{rails_app → rails-app}/app/mailers/.gitkeep +0 -0
  42. data/spec/{rails_app → rails-app}/app/models/.gitkeep +0 -0
  43. data/spec/{rails_app → rails-app}/app/models/user.rb +4 -2
  44. data/spec/{rails_app/app/views/devise/devise_authy/register.html.erb → rails-app/app/views/devise/devise_authy/enable_authy.html.erb} +4 -6
  45. data/spec/rails-app/app/views/devise/devise_authy/verify_authy.html.erb +13 -0
  46. data/spec/rails-app/app/views/devise/devise_authy/verify_authy_installation.html.erb +10 -0
  47. data/spec/rails-app/app/views/layouts/application.html.erb +29 -0
  48. data/spec/rails-app/app/views/welcome/index.html.erb +5 -0
  49. data/spec/{rails_app → rails-app}/config.ru +0 -0
  50. data/spec/{rails_app → rails-app}/config/application.rb +18 -2
  51. data/spec/rails-app/config/boot.rb +6 -0
  52. data/spec/{rails_app → rails-app}/config/database.yml +6 -3
  53. data/spec/{rails_app → rails-app}/config/environment.rb +0 -0
  54. data/spec/{rails_app → rails-app}/config/environments/development.rb +2 -0
  55. data/spec/{rails_app → rails-app}/config/environments/production.rb +0 -0
  56. data/spec/{rails_app → rails-app}/config/environments/test.rb +0 -0
  57. data/spec/rails-app/config/initializers/authy.rb +2 -0
  58. data/spec/{rails_app → rails-app}/config/initializers/backtrace_silencers.rb +0 -0
  59. data/spec/{rails_app → rails-app}/config/initializers/devise.rb +13 -5
  60. data/spec/{rails_app → rails-app}/config/initializers/inflections.rb +5 -0
  61. data/spec/{rails_app → rails-app}/config/initializers/mime_types.rb +0 -0
  62. data/spec/{rails_app → rails-app}/config/initializers/secret_token.rb +1 -1
  63. data/spec/{rails_app → rails-app}/config/initializers/session_store.rb +2 -2
  64. data/spec/{rails_app → rails-app}/config/initializers/wrap_parameters.rb +0 -0
  65. data/spec/{rails_app → rails-app}/config/locales/devise.authy.en.yml +7 -2
  66. data/spec/rails-app/config/locales/devise.en.yml +59 -0
  67. data/spec/rails-app/config/locales/en.yml +5 -0
  68. data/spec/{rails_app → rails-app}/config/routes.rb +3 -2
  69. data/spec/rails-app/db/development.sqlite3 +0 -0
  70. data/spec/{rails_app/db/migrate/20121029205626_devise_create_users.rb → rails-app/db/migrate/20130419164907_devise_create_users.rb} +15 -1
  71. data/spec/{rails_app/db/migrate/20121029205628_devise_authy_add_to_users.rb → rails-app/db/migrate/20130419164936_devise_authy_add_to_users.rb} +5 -2
  72. data/spec/{rails_app → rails-app}/db/schema.rb +7 -12
  73. data/spec/rails-app/db/seeds.rb +7 -0
  74. data/spec/rails-app/lib/assets/.gitkeep +0 -0
  75. data/spec/rails-app/lib/tasks/.gitkeep +0 -0
  76. data/spec/rails-app/public/404.html +26 -0
  77. data/spec/rails-app/public/422.html +26 -0
  78. data/spec/rails-app/public/500.html +25 -0
  79. data/spec/rails-app/public/favicon.ico +0 -0
  80. data/spec/rails-app/public/robots.txt +5 -0
  81. data/spec/{rails_app → rails-app}/script/rails +0 -0
  82. data/spec/routing/routes_spec.rb +20 -8
  83. data/spec/spec_helper.rb +1 -2
  84. data/spec/support/helpers.rb +6 -1
  85. metadata +86 -62
  86. data/spec/integration/authy_authenticatable.rb +0 -88
  87. data/spec/rails_app/app/assets/javascripts/application.js +0 -10
  88. data/spec/rails_app/app/assets/stylesheets/application.css +0 -9
  89. data/spec/rails_app/app/assets/stylesheets/devise_authy.css.scss +0 -26
  90. data/spec/rails_app/app/assets/stylesheets/scaffolds.css.scss +0 -56
  91. data/spec/rails_app/app/controllers/posts_controller.rb +0 -83
  92. data/spec/rails_app/app/helpers/posts_helper.rb +0 -2
  93. data/spec/rails_app/app/models/post.rb +0 -2
  94. data/spec/rails_app/app/views/devise/devise_authy/show.html.erb +0 -10
  95. data/spec/rails_app/app/views/layouts/application.html.erb +0 -24
  96. data/spec/rails_app/app/views/posts/_form.html.erb +0 -25
  97. data/spec/rails_app/app/views/posts/edit.html.erb +0 -6
  98. data/spec/rails_app/app/views/posts/index.html.erb +0 -27
  99. data/spec/rails_app/app/views/posts/new.html.erb +0 -5
  100. data/spec/rails_app/app/views/posts/show.html.erb +0 -15
  101. data/spec/rails_app/config/boot.rb +0 -7
  102. data/spec/rails_app/config/initializers/authy.rb +0 -3
  103. data/spec/rails_app/db/migrate/20121029205627_create_posts.rb +0 -10
  104. data/spec/rails_app/public/favicon.ico +0 -0
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  gem "devise"
4
4
  gem 'authy'
@@ -12,9 +12,11 @@ group :development do
12
12
  gem "simplecov"
13
13
  gem "sass-rails"
14
14
  gem "jquery-rails"
15
+ gem "pry"
15
16
  end
16
17
 
17
18
  group :test do
19
+ gem "rails"
18
20
  gem "sqlite3"
19
21
  gem 'rspec-rails'
20
22
  gem 'database_cleaner'
data/Gemfile.lock CHANGED
@@ -1,47 +1,55 @@
1
1
  GEM
2
- remote: http://rubygems.org/
2
+ remote: https://rubygems.org/
3
3
  specs:
4
- actionpack (3.2.8)
5
- activemodel (= 3.2.8)
6
- activesupport (= 3.2.8)
4
+ actionmailer (3.2.13)
5
+ actionpack (= 3.2.13)
6
+ mail (~> 2.5.3)
7
+ actionpack (3.2.13)
8
+ activemodel (= 3.2.13)
9
+ activesupport (= 3.2.13)
7
10
  builder (~> 3.0.0)
8
11
  erubis (~> 2.7.0)
9
12
  journey (~> 1.0.4)
10
- rack (~> 1.4.0)
13
+ rack (~> 1.4.5)
11
14
  rack-cache (~> 1.2)
12
15
  rack-test (~> 0.6.1)
13
- sprockets (~> 2.1.3)
14
- activemodel (3.2.8)
15
- activesupport (= 3.2.8)
16
+ sprockets (~> 2.2.1)
17
+ activemodel (3.2.13)
18
+ activesupport (= 3.2.13)
16
19
  builder (~> 3.0.0)
17
- activesupport (3.2.8)
18
- i18n (~> 0.6)
20
+ activerecord (3.2.13)
21
+ activemodel (= 3.2.13)
22
+ activesupport (= 3.2.13)
23
+ arel (~> 3.0.2)
24
+ tzinfo (~> 0.3.29)
25
+ activeresource (3.2.13)
26
+ activemodel (= 3.2.13)
27
+ activesupport (= 3.2.13)
28
+ activesupport (3.2.13)
29
+ i18n (= 0.6.1)
19
30
  multi_json (~> 1.0)
20
- addressable (2.3.2)
21
- authy (1.1.0)
22
- httpclient
31
+ arel (3.0.2)
32
+ authy (2.0.1)
33
+ httpclient (>= 2.2.6)
23
34
  bcrypt-ruby (3.0.1)
24
35
  builder (3.0.4)
25
- capybara (1.1.2)
36
+ capybara (2.1.0)
26
37
  mime-types (>= 1.16)
27
38
  nokogiri (>= 1.3.3)
28
39
  rack (>= 1.0.0)
29
40
  rack-test (>= 0.5.4)
30
- selenium-webdriver (~> 2.0)
31
- xpath (~> 0.1.4)
32
- childprocess (0.3.6)
33
- ffi (~> 1.0, >= 1.0.6)
41
+ xpath (~> 2.0)
42
+ coderay (1.0.9)
34
43
  database_cleaner (0.9.1)
35
- devise (2.1.2)
44
+ devise (2.2.3)
36
45
  bcrypt-ruby (~> 3.0)
37
46
  orm_adapter (~> 0.1)
38
47
  railties (~> 3.1)
39
48
  warden (~> 1.2.1)
40
- diff-lcs (1.1.3)
49
+ diff-lcs (1.2.3)
41
50
  erubis (2.7.0)
42
- ffi (1.1.5)
43
51
  git (1.2.5)
44
- hike (1.2.1)
52
+ hike (1.2.2)
45
53
  httpclient (2.3.3)
46
54
  i18n (0.6.1)
47
55
  jeweler (1.8.4)
@@ -50,73 +58,91 @@ GEM
50
58
  rake
51
59
  rdoc
52
60
  journey (1.0.4)
53
- jquery-rails (2.1.3)
54
- railties (>= 3.1.0, < 5.0)
55
- thor (~> 0.14)
56
- json (1.7.5)
57
- libwebsocket (0.1.5)
58
- addressable
59
- mime-types (1.19)
60
- multi_json (1.3.6)
61
- nokogiri (1.5.5)
61
+ jquery-rails (2.2.1)
62
+ railties (>= 3.0, < 5.0)
63
+ thor (>= 0.14, < 2.0)
64
+ json (1.7.7)
65
+ mail (2.5.3)
66
+ i18n (>= 0.4.0)
67
+ mime-types (~> 1.16)
68
+ treetop (~> 1.4.8)
69
+ method_source (0.8.1)
70
+ mime-types (1.22)
71
+ multi_json (1.7.2)
72
+ nokogiri (1.5.9)
62
73
  orm_adapter (0.4.0)
63
- rack (1.4.1)
74
+ polyglot (0.3.3)
75
+ pry (0.9.12)
76
+ coderay (~> 1.0.5)
77
+ method_source (~> 0.8)
78
+ slop (~> 3.4)
79
+ rack (1.4.5)
64
80
  rack-cache (1.2)
65
81
  rack (>= 0.4)
66
- rack-ssl (1.3.2)
82
+ rack-ssl (1.3.3)
67
83
  rack
68
84
  rack-test (0.6.2)
69
85
  rack (>= 1.0)
70
- railties (3.2.8)
71
- actionpack (= 3.2.8)
72
- activesupport (= 3.2.8)
86
+ rails (3.2.13)
87
+ actionmailer (= 3.2.13)
88
+ actionpack (= 3.2.13)
89
+ activerecord (= 3.2.13)
90
+ activeresource (= 3.2.13)
91
+ activesupport (= 3.2.13)
92
+ bundler (~> 1.0)
93
+ railties (= 3.2.13)
94
+ railties (3.2.13)
95
+ actionpack (= 3.2.13)
96
+ activesupport (= 3.2.13)
73
97
  rack-ssl (~> 1.3.2)
74
98
  rake (>= 0.8.7)
75
99
  rdoc (~> 3.4)
76
100
  thor (>= 0.14.6, < 2.0)
77
- rake (0.9.2.2)
78
- rdoc (3.12)
101
+ rake (10.0.4)
102
+ rdoc (3.12.2)
79
103
  json (~> 1.4)
80
- rspec (2.11.0)
81
- rspec-core (~> 2.11.0)
82
- rspec-expectations (~> 2.11.0)
83
- rspec-mocks (~> 2.11.0)
84
- rspec-core (2.11.1)
85
- rspec-expectations (2.11.3)
86
- diff-lcs (~> 1.1.3)
87
- rspec-mocks (2.11.3)
88
- rspec-rails (2.11.0)
104
+ rspec (2.13.0)
105
+ rspec-core (~> 2.13.0)
106
+ rspec-expectations (~> 2.13.0)
107
+ rspec-mocks (~> 2.13.0)
108
+ rspec-core (2.13.1)
109
+ rspec-expectations (2.13.0)
110
+ diff-lcs (>= 1.1.3, < 2.0)
111
+ rspec-mocks (2.13.1)
112
+ rspec-rails (2.13.0)
89
113
  actionpack (>= 3.0)
90
114
  activesupport (>= 3.0)
91
115
  railties (>= 3.0)
92
- rspec (~> 2.11.0)
93
- rubyzip (0.9.9)
94
- sass (3.2.1)
95
- sass-rails (3.2.5)
116
+ rspec-core (~> 2.13.0)
117
+ rspec-expectations (~> 2.13.0)
118
+ rspec-mocks (~> 2.13.0)
119
+ sass (3.2.7)
120
+ sass-rails (3.2.6)
96
121
  railties (~> 3.2.0)
97
122
  sass (>= 3.1.10)
98
123
  tilt (~> 1.3)
99
- selenium-webdriver (2.25.0)
100
- childprocess (>= 0.2.5)
101
- libwebsocket (~> 0.1.3)
102
- multi_json (~> 1.0)
103
- rubyzip
104
124
  simplecov (0.7.1)
105
125
  multi_json (~> 1.0)
106
126
  simplecov-html (~> 0.7.1)
107
127
  simplecov-html (0.7.1)
108
- sprockets (2.1.3)
128
+ slop (3.4.4)
129
+ sprockets (2.2.2)
109
130
  hike (~> 1.2)
131
+ multi_json (~> 1.0)
110
132
  rack (~> 1.0)
111
133
  tilt (~> 1.1, != 1.3.0)
112
- sqlite3 (1.3.6)
113
- thor (0.16.0)
114
- tilt (1.3.3)
134
+ sqlite3 (1.3.7)
135
+ thor (0.18.1)
136
+ tilt (1.3.7)
137
+ treetop (1.4.12)
138
+ polyglot
139
+ polyglot (>= 0.3.1)
140
+ tzinfo (0.3.37)
115
141
  warden (1.2.1)
116
142
  rack (>= 1.0)
117
- xpath (0.1.4)
143
+ xpath (2.0.0)
118
144
  nokogiri (~> 1.3)
119
- yard (0.8.3)
145
+ yard (0.8.6.1)
120
146
 
121
147
  PLATFORMS
122
148
  ruby
@@ -129,6 +155,8 @@ DEPENDENCIES
129
155
  devise
130
156
  jeweler
131
157
  jquery-rails
158
+ pry
159
+ rails
132
160
  rdoc
133
161
  rspec
134
162
  rspec-rails
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ require 'jeweler'
15
15
  Jeweler::Tasks.new do |gem|
16
16
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
17
  gem.name = "devise-authy"
18
- gem.homepage = "http://github.com/senekis/devise-authy"
18
+ gem.homepage = "https://github.com/authy/authy-devise"
19
19
  gem.license = "MIT"
20
20
  gem.summary = %Q{Authy plugin for Devise}
21
21
  gem.description = %Q{Authy plugin for Devise}
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.2.1
@@ -1,9 +1,12 @@
1
1
  class Devise::DeviseAuthyController < DeviseController
2
+ prepend_before_filter :find_resource, :only => [
3
+ :request_sms
4
+ ]
2
5
  prepend_before_filter :find_resource_and_require_password_checked, :only => [
3
6
  :GET_verify_authy, :POST_verify_authy
4
7
  ]
5
8
  prepend_before_filter :authenticate_scope!, :only => [
6
- :GET_enable_authy, :POST_enable_authy,
9
+ :GET_enable_authy, :POST_enable_authy,
7
10
  :GET_verify_authy_installation, :POST_verify_authy_installation
8
11
  ]
9
12
  include Devise::Controllers::Helpers
@@ -24,17 +27,25 @@ class Devise::DeviseAuthyController < DeviseController
24
27
  if token.ok?
25
28
  @resource.update_attribute(:last_sign_in_with_authy, DateTime.now)
26
29
 
30
+ remember_device if params[:remember_device].to_i == 1
31
+
27
32
  set_flash_message(:notice, :signed_in) if is_navigational_format?
28
33
  sign_in(resource_name, @resource)
29
34
  respond_with resource, :location => after_sign_in_path_for(@resource)
30
35
  else
36
+ set_flash_message(:error, :invalid_token)
31
37
  render :verify_authy
32
38
  end
33
39
  end
34
40
 
35
41
  # enable 2fa
36
42
  def GET_enable_authy
37
- render :enable_authy
43
+ if resource.authy_id.blank? || !resource.authy_enabled
44
+ render :enable_authy
45
+ else
46
+ set_flash_message(:notice, :already_enabled)
47
+ redirect_to :root
48
+ end
38
49
  end
39
50
 
40
51
  def POST_enable_authy
@@ -82,13 +93,12 @@ class Devise::DeviseAuthyController < DeviseController
82
93
  end
83
94
 
84
95
  def request_sms
85
- @resource = resource_class.find_by_id(session["#{resource_name}_id"])
86
96
  if !@resource
87
97
  render :json => {:sent => false, :message => "User couldn't be found."}
88
98
  return
89
99
  end
90
100
 
91
- response = Authy::API.request_sms(:id => @resource.id, :force => true)
101
+ response = Authy::API.request_sms(:id => @resource.authy_id, :force => true)
92
102
  render :json => {:sent => response.ok?, :message => response.message}
93
103
  end
94
104
 
@@ -99,8 +109,16 @@ class Devise::DeviseAuthyController < DeviseController
99
109
  self.resource = send("current_#{resource_name}")
100
110
  end
101
111
 
112
+ def find_resource
113
+ @resource = send("current_#{resource_name}")
114
+
115
+ if @resource.nil?
116
+ @resource = resource_class.find_by_id(session["#{resource_name}_id"])
117
+ end
118
+ end
119
+
102
120
  def find_resource_and_require_password_checked
103
- @resource = resource_class.find_by_id(session["#{resource_name}_id"])
121
+ find_resource
104
122
 
105
123
  if @resource.nil? || session[:"#{resource_name}_password_checked"].to_s != "true"
106
124
  redirect_to :root
@@ -1,8 +1,7 @@
1
1
  <h2><%= I18n.t('authy_register_title', {:scope => 'devise'}) %></h2>
2
2
 
3
3
  <%= enable_authy_form do %>
4
- <%= text_field_tag :cellphone, '', :autocomplete => :off, :placeholder => I18n.t('devise.cellphone'), :id => "authy-cellphone"%>
5
4
  <%= text_field_tag :country_code, '', :autocomplete => :off, :placeholder => I18n.t('devise.country'), :id => "authy-countries"%>
5
+ <%= text_field_tag :cellphone, '', :autocomplete => :off, :placeholder => I18n.t('devise.cellphone'), :id => "authy-cellphone"%>
6
6
  <p><%= submit_tag I18n.t('enable_authy', {:scope => 'devise'}) %></p>
7
- <% end %>
8
-
7
+ <% end %>
@@ -1,8 +1,5 @@
1
1
  %h2= I18n.t('authy_register_title', {:scope => 'devise'})
2
2
  = enable_authy_form do
3
- = text_field_tag :cellphone, '', :autocomplete => :off, :placeholder => |
4
- I18n.t('devise.cellphone'), :id => "authy-cellphone" |
5
- -#
6
- = text_field_tag :country_code, '', :autocomplete => :off, :placeholder => |
7
- I18n.t('devise.country'), :id => "authy-countries" |
3
+ = text_field_tag :country_code, '', :autocomplete => :off, :placeholder => I18n.t('devise.country'), :id => "authy-countries"
4
+ = text_field_tag :cellphone, '', :autocomplete => :off, :placeholder => I18n.t('devise.cellphone'), :id => "authy-cellphone"
8
5
  %p= submit_tag I18n.t('enable_authy', {:scope => 'devise'})
@@ -6,6 +6,11 @@
6
6
  <legend><%= I18n.t('submit_token_title', {:scope => 'devise'}) %></legend>
7
7
  <%= label_tag :token %>
8
8
  <%= text_field_tag :token, "", :autocomplete => :off, :id => 'authy-token' %>
9
+ <label>
10
+ <%= check_box_tag :remember_device %>
11
+ <span><%= I18n.t('remember_device', {:scope => 'devise'}) %></span>
12
+ </label>
13
+
9
14
  <%= link_to '?', '#', :id => 'authy-help' %>
10
15
  <%= authy_request_sms_link %>
11
16
  <%= submit_tag I18n.t('submit_token', {:scope => 'devise'}), :class => 'btn' %>
@@ -5,6 +5,9 @@
5
5
  = hidden_field_tag :"#{resource_name}_id", @resource.id
6
6
  = label_tag :token
7
7
  = text_field_tag :token, "", :autocomplete => :off, :id => 'authy-token'
8
+ %label
9
+ = check_box_tag :remember_device
10
+ %span= I18n.t('remember_device', {:scope => 'devise'})
8
11
  = link_to '?', '#', :id => 'authy-help'
9
12
  = authy_request_sms_link
10
13
  = submit_tag I18n.t('submit_token', {:scope => 'devise'}), :class => 'btn'
@@ -8,6 +8,7 @@ gem 'rails', '3.2.13'
8
8
  gem 'sqlite3'
9
9
  gem 'devise', '2.1.3'
10
10
  gem 'devise-authy', :path => ".."
11
+ gem 'pry'
11
12
 
12
13
  # Gems used only for assets and not required
13
14
  # in production environments by default.
@@ -1,10 +1,11 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- devise-authy (1.0.0)
4
+ devise-authy (1.1.0)
5
5
  authy
6
6
  devise
7
7
  devise-authy
8
+ rails (~> 3.2.6)
8
9
 
9
10
  GEM
10
11
  remote: https://rubygems.org/
@@ -37,10 +38,11 @@ GEM
37
38
  i18n (= 0.6.1)
38
39
  multi_json (~> 1.0)
39
40
  arel (3.0.2)
40
- authy (1.1.0)
41
- httpclient
41
+ authy (2.0.1)
42
+ httpclient (>= 2.2.6)
42
43
  bcrypt-ruby (3.0.1)
43
44
  builder (3.0.4)
45
+ coderay (1.0.9)
44
46
  coffee-rails (3.2.2)
45
47
  coffee-script (>= 2.2.0)
46
48
  railties (~> 3.2.0)
@@ -68,10 +70,15 @@ GEM
68
70
  i18n (>= 0.4.0)
69
71
  mime-types (~> 1.16)
70
72
  treetop (~> 1.4.8)
73
+ method_source (0.8.1)
71
74
  mime-types (1.22)
72
75
  multi_json (1.7.2)
73
76
  orm_adapter (0.4.0)
74
77
  polyglot (0.3.3)
78
+ pry (0.9.12)
79
+ coderay (~> 1.0.5)
80
+ method_source (~> 0.8)
81
+ slop (~> 3.4)
75
82
  rack (1.4.5)
76
83
  rack-cache (1.2)
77
84
  rack (>= 0.4)
@@ -102,6 +109,7 @@ GEM
102
109
  railties (~> 3.2.0)
103
110
  sass (>= 3.1.10)
104
111
  tilt (~> 1.3)
112
+ slop (3.4.4)
105
113
  sprockets (2.2.2)
106
114
  hike (~> 1.2)
107
115
  multi_json (~> 1.0)
@@ -128,6 +136,7 @@ DEPENDENCIES
128
136
  devise (= 2.1.3)
129
137
  devise-authy!
130
138
  jquery-rails
139
+ pry
131
140
  rails (= 3.2.13)
132
141
  sass-rails (~> 3.2.3)
133
142
  sqlite3
@@ -1,8 +1,7 @@
1
1
  <h2><%= I18n.t('authy_register_title', {:scope => 'devise'}) %></h2>
2
2
 
3
3
  <%= enable_authy_form do %>
4
- <%= text_field_tag :cellphone, '', :autocomplete => :off, :placeholder => I18n.t('devise.cellphone'), :id => "authy-cellphone"%>
5
4
  <%= text_field_tag :country_code, '', :autocomplete => :off, :placeholder => I18n.t('devise.country'), :id => "authy-countries"%>
5
+ <%= text_field_tag :cellphone, '', :autocomplete => :off, :placeholder => I18n.t('devise.cellphone'), :id => "authy-cellphone"%>
6
6
  <p><%= submit_tag I18n.t('enable_authy', {:scope => 'devise'}) %></p>
7
- <% end %>
8
-
7
+ <% end %>