simple_token_authentication 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -24
  3. data/Rakefile +31 -11
  4. data/doc/README.md +18 -0
  5. data/lib/simple_token_authentication.rb +39 -0
  6. data/lib/simple_token_authentication/acts_as_token_authenticatable.rb +18 -7
  7. data/lib/simple_token_authentication/acts_as_token_authentication_handler.rb +12 -123
  8. data/lib/simple_token_authentication/adapter.rb +7 -0
  9. data/lib/simple_token_authentication/adapters/active_record_adapter.rb +14 -0
  10. data/lib/simple_token_authentication/adapters/rails_adapter.rb +14 -0
  11. data/lib/simple_token_authentication/configuration.rb +25 -0
  12. data/lib/simple_token_authentication/entities_manager.rb +10 -0
  13. data/lib/simple_token_authentication/entity.rb +64 -0
  14. data/lib/simple_token_authentication/fallback_authentication_handler.rb +11 -0
  15. data/lib/simple_token_authentication/sign_in_handler.rb +19 -0
  16. data/lib/simple_token_authentication/token_authentication_handler.rb +138 -0
  17. data/lib/simple_token_authentication/token_comparator.rb +13 -0
  18. data/lib/simple_token_authentication/token_generator.rb +9 -0
  19. data/lib/simple_token_authentication/version.rb +1 -1
  20. data/spec/configuration/action_controller_callbacks_options_spec.rb +53 -0
  21. data/spec/configuration/fallback_to_devise_option_spec.rb +128 -0
  22. data/spec/configuration/header_names_option_spec.rb +454 -0
  23. data/spec/configuration/sign_in_token_option_spec.rb +92 -0
  24. data/spec/lib/simple_token_authentication/acts_as_token_authenticatable_spec.rb +108 -0
  25. data/spec/lib/simple_token_authentication/acts_as_token_authentication_handler_spec.rb +127 -0
  26. data/spec/lib/simple_token_authentication/adapter_spec.rb +21 -0
  27. data/spec/lib/simple_token_authentication/adapters/active_record_adapter_spec.rb +21 -0
  28. data/spec/lib/simple_token_authentication/adapters/rails_adapter_spec.rb +21 -0
  29. data/spec/lib/simple_token_authentication/configuration_spec.rb +121 -0
  30. data/spec/lib/simple_token_authentication/entities_manager_spec.rb +67 -0
  31. data/spec/lib/simple_token_authentication/entity_spec.rb +190 -0
  32. data/spec/lib/simple_token_authentication/fallback_authentication_handler_spec.rb +24 -0
  33. data/spec/lib/simple_token_authentication/sign_in_handler_spec.rb +43 -0
  34. data/spec/lib/simple_token_authentication/token_authentication_handler_spec.rb +250 -0
  35. data/spec/lib/simple_token_authentication/token_comparator_spec.rb +19 -0
  36. data/spec/lib/simple_token_authentication/token_generator_spec.rb +19 -0
  37. data/spec/lib/simple_token_authentication_spec.rb +86 -0
  38. data/spec/spec_helper.rb +13 -0
  39. data/spec/support/dummy_classes_helper.rb +80 -0
  40. data/spec/support/spec_for_adapter.rb +6 -0
  41. data/spec/support/spec_for_authentication_handler_interface.rb +8 -0
  42. data/spec/support/spec_for_configuration_option_interface.rb +28 -0
  43. data/spec/support/spec_for_entities_manager_interface.rb +8 -0
  44. data/spec/support/spec_for_sign_in_handler_interface.rb +8 -0
  45. data/spec/support/spec_for_token_comparator_interface.rb +8 -0
  46. data/spec/support/spec_for_token_generator_interface.rb +8 -0
  47. data/spec/support/specs_for_token_authentication_handler_interface.rb +8 -0
  48. metadata +80 -132
  49. data/lib/tasks/cucumber.rake +0 -65
  50. data/spec/dummy/README.rdoc +0 -28
  51. data/spec/dummy/Rakefile +0 -6
  52. data/spec/dummy/app/assets/javascripts/application.js +0 -13
  53. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  54. data/spec/dummy/app/controllers/application_controller.rb +0 -5
  55. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  56. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  57. data/spec/dummy/bin/bundle +0 -3
  58. data/spec/dummy/bin/rails +0 -4
  59. data/spec/dummy/bin/rake +0 -4
  60. data/spec/dummy/config.ru +0 -4
  61. data/spec/dummy/config/application.rb +0 -24
  62. data/spec/dummy/config/boot.rb +0 -5
  63. data/spec/dummy/config/database.yml +0 -25
  64. data/spec/dummy/config/environment.rb +0 -5
  65. data/spec/dummy/config/environments/development.rb +0 -29
  66. data/spec/dummy/config/environments/production.rb +0 -80
  67. data/spec/dummy/config/environments/test.rb +0 -36
  68. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  69. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  70. data/spec/dummy/config/initializers/inflections.rb +0 -16
  71. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  72. data/spec/dummy/config/initializers/secret_token.rb +0 -12
  73. data/spec/dummy/config/initializers/session_store.rb +0 -3
  74. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  75. data/spec/dummy/config/locales/en.yml +0 -23
  76. data/spec/dummy/config/routes.rb +0 -56
  77. data/spec/dummy/public/404.html +0 -58
  78. data/spec/dummy/public/422.html +0 -58
  79. data/spec/dummy/public/500.html +0 -57
  80. data/spec/dummy/public/favicon.ico +0 -0
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ describe SimpleTokenAuthentication::TokenComparator do
4
+
5
+ it_behaves_like 'a token comparator'
6
+
7
+ it 'delegates token comparison to Devise.secure_compare', private: true do
8
+ devise = double()
9
+ allow(devise).to receive(:secure_compare).and_return('Devise.secure_compare response.')
10
+ stub_const('Devise', devise)
11
+
12
+ # delegating consists in sending the message
13
+ expect(Devise).to receive(:secure_compare)
14
+ response = subject.compare('A_raNd0MtoKeN', 'ano4heR-Tok3n')
15
+
16
+ # and returning the response
17
+ expect(response).to eq 'Devise.secure_compare response.'
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ describe SimpleTokenAuthentication::TokenGenerator do
4
+
5
+ it_behaves_like 'a token generator'
6
+
7
+ it 'delegates token generation to Devise.friendly_token', private: true do
8
+ devise = double()
9
+ allow(devise).to receive(:friendly_token).and_return('FRi3ndlY_TokeN')
10
+ stub_const('Devise', devise)
11
+
12
+ # delegating consists in sending the message
13
+ expect(Devise).to receive(:friendly_token)
14
+ response = subject.generate_token
15
+
16
+ # and returning the response
17
+ expect(response).to eq 'FRi3ndlY_TokeN'
18
+ end
19
+ end
@@ -0,0 +1,86 @@
1
+ require 'spec_helper'
2
+
3
+ describe SimpleTokenAuthentication do
4
+
5
+ it 'responds to :ensure_models_can_act_as_token_authenticatables', private: true do
6
+ expect(subject).to respond_to :ensure_models_can_act_as_token_authenticatables
7
+ end
8
+
9
+ it 'responds to :ensure_controllers_can_act_as_token_authentication_handlers', private: true do
10
+ expect(subject).to respond_to :ensure_controllers_can_act_as_token_authentication_handlers
11
+ end
12
+
13
+ context 'when ActiveRecord is available' do
14
+
15
+ before(:each) do
16
+ stub_const('ActiveRecord', Module.new)
17
+ stub_const('ActiveRecord::Base', Class.new)
18
+
19
+ # define a dummy ActiveRecord adapter
20
+ dummy_active_record_adapter = double()
21
+ allow(dummy_active_record_adapter).to receive(:base_class).and_return(ActiveRecord::Base)
22
+ stub_const('SimpleTokenAuthentication::Adapters::DummyActiveRecordAdapter',
23
+ dummy_active_record_adapter)
24
+ end
25
+
26
+ describe '#ensure_models_can_act_as_token_authenticatables' do
27
+
28
+ before(:each) do
29
+ class SimpleTokenAuthentication::DummyModel < ActiveRecord::Base; end
30
+ @dummy_model = SimpleTokenAuthentication::DummyModel
31
+
32
+ expect(@dummy_model.new).to be_instance_of SimpleTokenAuthentication::DummyModel
33
+ expect(@dummy_model.new).to be_kind_of ActiveRecord::Base
34
+ end
35
+
36
+ after(:each) do
37
+ SimpleTokenAuthentication.send(:remove_const, :DummyModel)
38
+ end
39
+
40
+ it 'allows any kind of ActiveRecord::Base to act as token authenticatable', private: true do
41
+ expect(@dummy_model).not_to respond_to :acts_as_token_authenticatable
42
+
43
+ subject.ensure_models_can_act_as_token_authenticatables [
44
+ SimpleTokenAuthentication::Adapters::DummyActiveRecordAdapter]
45
+
46
+ expect(@dummy_model).to respond_to :acts_as_token_authenticatable
47
+ end
48
+ end
49
+ end
50
+
51
+ context 'when ActionController::Base is available' do
52
+
53
+ before(:each) do
54
+ stub_const('ActionController::Base', Class.new)
55
+
56
+ # define a dummy ActionController::Base (a.k.a 'Rails') adapter
57
+ dummy_rails_adapter = double()
58
+ allow(dummy_rails_adapter).to receive(:base_class).and_return(ActionController::Base)
59
+ stub_const('SimpleTokenAuthentication::Adapters::DummyRailsAdapter', dummy_rails_adapter)
60
+ end
61
+
62
+ describe '#ensure_controllers_can_act_as_token_authentication_handlers' do
63
+
64
+ before(:each) do
65
+ class SimpleTokenAuthentication::DummyController < ActionController::Base; end
66
+ @dummy_controller = SimpleTokenAuthentication::DummyController
67
+
68
+ expect(@dummy_controller.new).to be_instance_of SimpleTokenAuthentication::DummyController
69
+ expect(@dummy_controller.new).to be_kind_of ActionController::Base
70
+ end
71
+
72
+ after(:each) do
73
+ SimpleTokenAuthentication.send(:remove_const, :DummyController)
74
+ end
75
+
76
+ it 'allows any kind of ActionController::Base to acts as token authentication handler', private: true do
77
+ expect(@dummy_controller).not_to respond_to :acts_as_token_authentication_handler_for
78
+
79
+ subject.ensure_controllers_can_act_as_token_authentication_handlers [
80
+ SimpleTokenAuthentication::Adapters::DummyRailsAdapter]
81
+
82
+ expect(@dummy_controller).to respond_to :acts_as_token_authentication_handler_for
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,13 @@
1
+ require 'bundler/setup'
2
+ Bundler.setup
3
+
4
+ require 'action_controller'
5
+ require 'active_support'
6
+
7
+ require 'simple_token_authentication'
8
+
9
+ Dir["./spec/support/**/*.rb"].sort.each { |f| require f; puts f }
10
+
11
+ RSpec.configure do |config|
12
+ config.raise_errors_for_deprecations!
13
+ end
@@ -0,0 +1,80 @@
1
+ # Create dummy classes to test modules with RSpec
2
+ #
3
+ # Usage:
4
+ #
5
+ # describe SimpleTokenAuthentication::ModuleUnderTest do
6
+ #
7
+ # after(:each) do
8
+ # ensure_examples_independence
9
+ # end
10
+ #
11
+ # before(:each) do
12
+ # define_test_subjects_for_inclusion_of(SimpleTokenAuthentication::ModuleUnderTest)
13
+ # end
14
+ #
15
+ # # spec examples...
16
+ #
17
+ # end
18
+ ##
19
+
20
+
21
+ # Returns a dummy class which includes the module under test.
22
+ def define_dummy_class_which_includes(module_under_test)
23
+ unless defined? SimpleTokenAuthentication::SomeClass
24
+ SimpleTokenAuthentication.const_set(:SomeClass, Class.new)
25
+ end
26
+ SimpleTokenAuthentication::SomeClass.send :include, module_under_test
27
+ SimpleTokenAuthentication::SomeClass
28
+ end
29
+
30
+ # Returns a dummy class which extends the module under test.
31
+ def define_dummy_class_which_extends(module_under_test)
32
+ unless defined? SimpleTokenAuthentication::SomeClass
33
+ SimpleTokenAuthentication.const_set(:SomeClass, Class.new)
34
+ end
35
+ SimpleTokenAuthentication::SomeClass.send :extend, module_under_test
36
+ SimpleTokenAuthentication::SomeClass
37
+ end
38
+
39
+ # Returns a dummy class which inherits from parent_class.
40
+ def define_dummy_class_child_of(parent_class)
41
+ unless defined? SimpleTokenAuthentication::SomeChildClass
42
+ SimpleTokenAuthentication.const_set(:SomeChildClass, Class.new(parent_class))
43
+ end
44
+ SimpleTokenAuthentication::SomeChildClass
45
+ end
46
+
47
+ def ensure_examples_independence
48
+ SimpleTokenAuthentication.send(:remove_const, :SomeClass)
49
+ SimpleTokenAuthentication.send(:remove_const, :SomeChildClass)
50
+ end
51
+
52
+ # Must be used in coordination with ensure_examples_independence
53
+ def define_test_subjects_for_inclusion_of(module_under_test)
54
+ klass = define_dummy_class_which_includes(module_under_test)
55
+ child_klass = define_dummy_class_child_of(klass)
56
+
57
+ # all specs must apply to classes which include the module and their children
58
+ @subjects = [klass, child_klass]
59
+ end
60
+
61
+ # Must be used in coordination with ensure_examples_independence
62
+ def define_test_subjects_for_extension_of(module_under_test)
63
+ klass = define_dummy_class_which_extends(module_under_test)
64
+ child_klass = define_dummy_class_child_of(klass)
65
+
66
+ # all specs must apply to classes which extend the module and their children
67
+ @subjects = [klass, child_klass]
68
+ end
69
+
70
+ def double_user_model
71
+ user = double()
72
+ stub_const('User', user)
73
+ allow(user).to receive(:name).and_return('User')
74
+ end
75
+
76
+ def double_super_admin_model
77
+ super_admin = double()
78
+ stub_const('SuperAdmin', super_admin)
79
+ allow(super_admin).to receive(:name).and_return('SuperAdmin')
80
+ end
@@ -0,0 +1,6 @@
1
+ RSpec.shared_examples 'an adapter' do
2
+
3
+ it 'responds to :base_class', public: true do
4
+ expect(@subject).to respond_to :base_class
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ RSpec.shared_examples 'an authentication handler' do
2
+
3
+ let(:authentication_handler) { described_class.new() }
4
+
5
+ it 'responds to :authenticate_entity!', private: true do
6
+ expect(authentication_handler).to respond_to :authenticate_entity!
7
+ end
8
+ end
@@ -0,0 +1,28 @@
1
+ RSpec.shared_examples 'a configuration option' do |option_name|
2
+
3
+ before(:each) do
4
+ @get_option = option_name.to_sym # e.g. :sign_in_token
5
+ @set_option = option_name.+('=').to_sym # e.g. :sign_in_token=
6
+ end
7
+
8
+ it 'is accessible', private: true do
9
+ expect(@subject).to respond_to @get_option
10
+ expect(@subject).to respond_to @set_option
11
+ end
12
+
13
+ context 'once set' do
14
+
15
+ before(:each) do
16
+ @_original_value = @subject.send @get_option
17
+ @subject.send @set_option, 'custom header'
18
+ end
19
+
20
+ after(:each) do
21
+ @subject.send @set_option, @_original_value
22
+ end
23
+
24
+ it 'can be retrieved', private: true do
25
+ expect(@subject.send @get_option).to eq 'custom header'
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,8 @@
1
+ RSpec.shared_examples 'an entities manager' do
2
+
3
+ let(:entities_manager) { described_class.new() }
4
+
5
+ it 'responds to :find_or_create_entity', private: true do
6
+ expect(entities_manager).to respond_to :find_or_create_entity
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ RSpec.shared_examples 'a sign in handler' do
2
+
3
+ let(:sign_in_hanlder) { described_class.new() }
4
+
5
+ it 'responds to :sign_in', private: true do
6
+ expect(sign_in_hanlder).to respond_to :sign_in
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ RSpec.shared_examples 'a token comparator' do
2
+
3
+ let(:token_comparator) { described_class.new() }
4
+
5
+ it 'responds to :compare', public: true do
6
+ expect(token_comparator).to respond_to :compare
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ RSpec.shared_examples 'a token generator' do
2
+
3
+ let(:token_generator) { described_class.new() }
4
+
5
+ it 'responds to :generate_token', public: true do
6
+ expect(token_generator).to respond_to :generate_token
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ RSpec.shared_examples 'a token authentication handler' do
2
+
3
+ let(:token_authentication_handler) { described_class }
4
+
5
+ it 'responds to :handle_token_authentication_for', private: true do
6
+ expect(token_authentication_handler).to respond_to :handle_token_authentication_for
7
+ end
8
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_token_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gonzalo Bulnes Guilpain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-18 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -65,89 +65,33 @@ dependencies:
65
65
  - !ruby/object:Gem::Version
66
66
  version: '3.2'
67
67
  - !ruby/object:Gem::Dependency
68
- name: sqlite3
68
+ name: rspec
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: '0'
74
- type: :development
75
- prerelease: false
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- version: '0'
81
- - !ruby/object:Gem::Dependency
82
- name: rspec-rails
83
- requirement: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- version: '0'
88
- type: :development
89
- prerelease: false
90
- version_requirements: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- - !ruby/object:Gem::Dependency
96
- name: factory_girl_rails
97
- requirement: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- version: '0'
109
- - !ruby/object:Gem::Dependency
110
- name: cucumber-rails
111
- requirement: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- version: '0'
116
- type: :development
117
- prerelease: false
118
- version_requirements: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: '0'
123
- - !ruby/object:Gem::Dependency
124
- name: database_cleaner
125
- requirement: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - ">="
71
+ - - "~>"
128
72
  - !ruby/object:Gem::Version
129
- version: '0'
73
+ version: '3.0'
130
74
  type: :development
131
75
  prerelease: false
132
76
  version_requirements: !ruby/object:Gem::Requirement
133
77
  requirements:
134
- - - ">="
78
+ - - "~>"
135
79
  - !ruby/object:Gem::Version
136
- version: '0'
80
+ version: '3.0'
137
81
  - !ruby/object:Gem::Dependency
138
- name: aruba
82
+ name: inch
139
83
  requirement: !ruby/object:Gem::Requirement
140
84
  requirements:
141
- - - ">="
85
+ - - "~>"
142
86
  - !ruby/object:Gem::Version
143
- version: '0'
87
+ version: '0.4'
144
88
  type: :development
145
89
  prerelease: false
146
90
  version_requirements: !ruby/object:Gem::Requirement
147
91
  requirements:
148
- - - ">="
92
+ - - "~>"
149
93
  - !ruby/object:Gem::Version
150
- version: '0'
94
+ version: '0.4'
151
95
  description:
152
96
  email:
153
97
  - gon.bulnes@gmail.com
@@ -158,44 +102,51 @@ files:
158
102
  - LICENSE
159
103
  - README.md
160
104
  - Rakefile
105
+ - doc/README.md
161
106
  - lib/simple_token_authentication.rb
162
107
  - lib/simple_token_authentication/acts_as_token_authenticatable.rb
163
108
  - lib/simple_token_authentication/acts_as_token_authentication_handler.rb
109
+ - lib/simple_token_authentication/adapter.rb
110
+ - lib/simple_token_authentication/adapters/active_record_adapter.rb
111
+ - lib/simple_token_authentication/adapters/rails_adapter.rb
164
112
  - lib/simple_token_authentication/configuration.rb
113
+ - lib/simple_token_authentication/entities_manager.rb
114
+ - lib/simple_token_authentication/entity.rb
115
+ - lib/simple_token_authentication/fallback_authentication_handler.rb
116
+ - lib/simple_token_authentication/sign_in_handler.rb
117
+ - lib/simple_token_authentication/token_authentication_handler.rb
118
+ - lib/simple_token_authentication/token_comparator.rb
119
+ - lib/simple_token_authentication/token_generator.rb
165
120
  - lib/simple_token_authentication/version.rb
166
- - lib/tasks/cucumber.rake
167
121
  - lib/tasks/simple_token_authentication_tasks.rake
168
- - spec/dummy/README.rdoc
169
- - spec/dummy/Rakefile
170
- - spec/dummy/app/assets/javascripts/application.js
171
- - spec/dummy/app/assets/stylesheets/application.css
172
- - spec/dummy/app/controllers/application_controller.rb
173
- - spec/dummy/app/helpers/application_helper.rb
174
- - spec/dummy/app/views/layouts/application.html.erb
175
- - spec/dummy/bin/bundle
176
- - spec/dummy/bin/rails
177
- - spec/dummy/bin/rake
178
- - spec/dummy/config.ru
179
- - spec/dummy/config/application.rb
180
- - spec/dummy/config/boot.rb
181
- - spec/dummy/config/database.yml
182
- - spec/dummy/config/environment.rb
183
- - spec/dummy/config/environments/development.rb
184
- - spec/dummy/config/environments/production.rb
185
- - spec/dummy/config/environments/test.rb
186
- - spec/dummy/config/initializers/backtrace_silencers.rb
187
- - spec/dummy/config/initializers/filter_parameter_logging.rb
188
- - spec/dummy/config/initializers/inflections.rb
189
- - spec/dummy/config/initializers/mime_types.rb
190
- - spec/dummy/config/initializers/secret_token.rb
191
- - spec/dummy/config/initializers/session_store.rb
192
- - spec/dummy/config/initializers/wrap_parameters.rb
193
- - spec/dummy/config/locales/en.yml
194
- - spec/dummy/config/routes.rb
195
- - spec/dummy/public/404.html
196
- - spec/dummy/public/422.html
197
- - spec/dummy/public/500.html
198
- - spec/dummy/public/favicon.ico
122
+ - spec/configuration/action_controller_callbacks_options_spec.rb
123
+ - spec/configuration/fallback_to_devise_option_spec.rb
124
+ - spec/configuration/header_names_option_spec.rb
125
+ - spec/configuration/sign_in_token_option_spec.rb
126
+ - spec/lib/simple_token_authentication/acts_as_token_authenticatable_spec.rb
127
+ - spec/lib/simple_token_authentication/acts_as_token_authentication_handler_spec.rb
128
+ - spec/lib/simple_token_authentication/adapter_spec.rb
129
+ - spec/lib/simple_token_authentication/adapters/active_record_adapter_spec.rb
130
+ - spec/lib/simple_token_authentication/adapters/rails_adapter_spec.rb
131
+ - spec/lib/simple_token_authentication/configuration_spec.rb
132
+ - spec/lib/simple_token_authentication/entities_manager_spec.rb
133
+ - spec/lib/simple_token_authentication/entity_spec.rb
134
+ - spec/lib/simple_token_authentication/fallback_authentication_handler_spec.rb
135
+ - spec/lib/simple_token_authentication/sign_in_handler_spec.rb
136
+ - spec/lib/simple_token_authentication/token_authentication_handler_spec.rb
137
+ - spec/lib/simple_token_authentication/token_comparator_spec.rb
138
+ - spec/lib/simple_token_authentication/token_generator_spec.rb
139
+ - spec/lib/simple_token_authentication_spec.rb
140
+ - spec/spec_helper.rb
141
+ - spec/support/dummy_classes_helper.rb
142
+ - spec/support/spec_for_adapter.rb
143
+ - spec/support/spec_for_authentication_handler_interface.rb
144
+ - spec/support/spec_for_configuration_option_interface.rb
145
+ - spec/support/spec_for_entities_manager_interface.rb
146
+ - spec/support/spec_for_sign_in_handler_interface.rb
147
+ - spec/support/spec_for_token_comparator_interface.rb
148
+ - spec/support/spec_for_token_generator_interface.rb
149
+ - spec/support/specs_for_token_authentication_handler_interface.rb
199
150
  homepage: https://github.com/gonzalo-bulnes/simple_token_authentication
200
151
  licenses:
201
152
  - GPLv3
@@ -216,40 +167,37 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
167
  version: '0'
217
168
  requirements: []
218
169
  rubyforge_project:
219
- rubygems_version: 2.4.1
170
+ rubygems_version: 2.4.2
220
171
  signing_key:
221
172
  specification_version: 4
222
173
  summary: Simple (but safe) token authentication for Rails apps or API with Devise.
223
174
  test_files:
224
- - spec/dummy/app/assets/javascripts/application.js
225
- - spec/dummy/app/assets/stylesheets/application.css
226
- - spec/dummy/app/controllers/application_controller.rb
227
- - spec/dummy/app/helpers/application_helper.rb
228
- - spec/dummy/app/views/layouts/application.html.erb
229
- - spec/dummy/config.ru
230
- - spec/dummy/public/500.html
231
- - spec/dummy/public/422.html
232
- - spec/dummy/public/404.html
233
- - spec/dummy/public/favicon.ico
234
- - spec/dummy/README.rdoc
235
- - spec/dummy/bin/rake
236
- - spec/dummy/bin/bundle
237
- - spec/dummy/bin/rails
238
- - spec/dummy/Rakefile
239
- - spec/dummy/config/database.yml
240
- - spec/dummy/config/environment.rb
241
- - spec/dummy/config/locales/en.yml
242
- - spec/dummy/config/boot.rb
243
- - spec/dummy/config/routes.rb
244
- - spec/dummy/config/application.rb
245
- - spec/dummy/config/initializers/secret_token.rb
246
- - spec/dummy/config/initializers/backtrace_silencers.rb
247
- - spec/dummy/config/initializers/inflections.rb
248
- - spec/dummy/config/initializers/mime_types.rb
249
- - spec/dummy/config/initializers/wrap_parameters.rb
250
- - spec/dummy/config/initializers/filter_parameter_logging.rb
251
- - spec/dummy/config/initializers/session_store.rb
252
- - spec/dummy/config/environments/development.rb
253
- - spec/dummy/config/environments/production.rb
254
- - spec/dummy/config/environments/test.rb
175
+ - spec/lib/simple_token_authentication_spec.rb
176
+ - spec/lib/simple_token_authentication/entities_manager_spec.rb
177
+ - spec/lib/simple_token_authentication/sign_in_handler_spec.rb
178
+ - spec/lib/simple_token_authentication/fallback_authentication_handler_spec.rb
179
+ - spec/lib/simple_token_authentication/token_comparator_spec.rb
180
+ - spec/lib/simple_token_authentication/configuration_spec.rb
181
+ - spec/lib/simple_token_authentication/token_generator_spec.rb
182
+ - spec/lib/simple_token_authentication/acts_as_token_authenticatable_spec.rb
183
+ - spec/lib/simple_token_authentication/acts_as_token_authentication_handler_spec.rb
184
+ - spec/lib/simple_token_authentication/token_authentication_handler_spec.rb
185
+ - spec/lib/simple_token_authentication/adapters/active_record_adapter_spec.rb
186
+ - spec/lib/simple_token_authentication/adapters/rails_adapter_spec.rb
187
+ - spec/lib/simple_token_authentication/entity_spec.rb
188
+ - spec/lib/simple_token_authentication/adapter_spec.rb
189
+ - spec/configuration/action_controller_callbacks_options_spec.rb
190
+ - spec/configuration/header_names_option_spec.rb
191
+ - spec/configuration/fallback_to_devise_option_spec.rb
192
+ - spec/configuration/sign_in_token_option_spec.rb
193
+ - spec/spec_helper.rb
194
+ - spec/support/spec_for_authentication_handler_interface.rb
195
+ - spec/support/spec_for_entities_manager_interface.rb
196
+ - spec/support/spec_for_adapter.rb
197
+ - spec/support/specs_for_token_authentication_handler_interface.rb
198
+ - spec/support/spec_for_token_comparator_interface.rb
199
+ - spec/support/spec_for_configuration_option_interface.rb
200
+ - spec/support/spec_for_sign_in_handler_interface.rb
201
+ - spec/support/dummy_classes_helper.rb
202
+ - spec/support/spec_for_token_generator_interface.rb
255
203
  has_rdoc: