g5_authenticatable 0.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 +7 -0
- data/.env +1 -0
- data/.gitignore +25 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +45 -0
- data/Gemfile +37 -0
- data/LICENSE +22 -0
- data/README.md +519 -0
- data/Rakefile +20 -0
- data/app/assets/images/g5_authenticatable/.gitkeep +0 -0
- data/app/assets/javascripts/g5_authenticatable/application.js +15 -0
- data/app/assets/stylesheets/g5_authenticatable/application.css +13 -0
- data/app/controllers/g5_authenticatable/application_controller.rb +4 -0
- data/app/controllers/g5_authenticatable/error_controller.rb +9 -0
- data/app/controllers/g5_authenticatable/sessions_controller.rb +23 -0
- data/app/helpers/g5_authenticatable/application_helper.rb +4 -0
- data/app/models/g5_authenticatable/user.rb +8 -0
- data/app/views/g5_authenticatable/error/auth_error.html.erb +1 -0
- data/app/views/layouts/g5_authenticatable/application.html.erb +20 -0
- data/circle.yml +4 -0
- data/config/initializers/devise.rb +257 -0
- data/config/locales/devise.en.yml +59 -0
- data/config/routes.rb +6 -0
- data/g5_authenticatable.gemspec +25 -0
- data/lib/g5_authenticatable.rb +7 -0
- data/lib/g5_authenticatable/engine.rb +15 -0
- data/lib/g5_authenticatable/rspec.rb +4 -0
- data/lib/g5_authenticatable/test/controller_helpers.rb +59 -0
- data/lib/g5_authenticatable/test/factory.rb +10 -0
- data/lib/g5_authenticatable/test/feature_helpers.rb +38 -0
- data/lib/g5_authenticatable/test/request_helpers.rb +29 -0
- data/lib/g5_authenticatable/version.rb +3 -0
- data/lib/generators/g5_authenticatable/install/USAGE +11 -0
- data/lib/generators/g5_authenticatable/install/install_generator.rb +20 -0
- data/lib/generators/g5_authenticatable/install/templates/create_g5_authenticatable_users.rb +23 -0
- data/lib/tasks/g5_authenticatable_tasks.rake +4 -0
- data/script/rails +8 -0
- data/spec/config/application_spec.rb +7 -0
- data/spec/controllers/.gitkeep +0 -0
- data/spec/controllers/application_controller_spec.rb +22 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/api/secure_api.rb +8 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/home_controller.rb +9 -0
- data/spec/dummy/app/controllers/rails_api/secure_resources_controller.rb +17 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/home/index.html.erb +1 -0
- data/spec/dummy/app/views/home/show.html.erb +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +16 -0
- data/spec/dummy/app/views/rails_api/secure_resources/show.html.erb +0 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +63 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml.ci +6 -0
- data/spec/dummy/config/database.yml.sample +13 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +65 -0
- data/spec/dummy/config/environments/test.rb +33 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +15 -0
- data/spec/dummy/db/migrate/20140206070137_create_g5_authenticatable_users.rb +23 -0
- data/spec/dummy/db/schema.rb +33 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/features/auth_error_path_spec.rb +21 -0
- data/spec/features/sign_in_spec.rb +68 -0
- data/spec/g5_authenticatable/version_spec.rb +7 -0
- data/spec/lib/generators/g5_authenticatable/install_generator_spec.rb +55 -0
- data/spec/models/.gitkeep +0 -0
- data/spec/models/g5_authenticatable/user_spec.rb +39 -0
- data/spec/requests/grape_api_spec.rb +19 -0
- data/spec/requests/rails_api_spec.rb +53 -0
- data/spec/routing/auth_error_routing_spec.rb +15 -0
- data/spec/spec_helper.rb +52 -0
- data/spec/support/devise.rb +3 -0
- metadata +222 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe G5Authenticatable::ErrorController do
|
|
4
|
+
routes {G5Authenticatable::Engine.routes}
|
|
5
|
+
|
|
6
|
+
it 'should route GET /g5_auth/auth_error path' do
|
|
7
|
+
expect(get: '/auth_error').
|
|
8
|
+
to route_to(controller: 'g5_authenticatable/error', action: 'auth_error')
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it 'should generate a helper' do
|
|
12
|
+
expect(auth_error_path).to eq('/g5_auth/auth_error')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# MUST happen before any other code is loaded
|
|
2
|
+
require 'simplecov'
|
|
3
|
+
SimpleCov.start 'test_frameworks'
|
|
4
|
+
|
|
5
|
+
require 'codeclimate-test-reporter'
|
|
6
|
+
CodeClimate::TestReporter.start
|
|
7
|
+
|
|
8
|
+
ENV["RAILS_ENV"] ||= 'test'
|
|
9
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
|
10
|
+
|
|
11
|
+
require 'rspec/rails'
|
|
12
|
+
require 'rspec/autorun'
|
|
13
|
+
require 'capybara/rspec'
|
|
14
|
+
require 'webmock/rspec'
|
|
15
|
+
require 'g5_authenticatable/rspec'
|
|
16
|
+
|
|
17
|
+
Rails.backtrace_cleaner.remove_silencers!
|
|
18
|
+
|
|
19
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
|
20
|
+
# in spec/support/ and its subdirectories.
|
|
21
|
+
Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
|
|
22
|
+
|
|
23
|
+
RSpec.configure do |config|
|
|
24
|
+
# ## Mock Framework
|
|
25
|
+
#
|
|
26
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
|
27
|
+
#
|
|
28
|
+
# config.mock_with :mocha
|
|
29
|
+
# config.mock_with :flexmock
|
|
30
|
+
# config.mock_with :rr
|
|
31
|
+
config.mock_with :rspec
|
|
32
|
+
|
|
33
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
|
34
|
+
# examples within a transaction, remove the following line or assign false
|
|
35
|
+
# instead of true.
|
|
36
|
+
config.use_transactional_fixtures = true
|
|
37
|
+
|
|
38
|
+
# If true, the base class of anonymous controllers will be inferred
|
|
39
|
+
# automatically. This will be the default behavior in future versions of
|
|
40
|
+
# rspec-rails.
|
|
41
|
+
config.infer_base_class_for_anonymous_controllers = false
|
|
42
|
+
|
|
43
|
+
# Run specs in random order to surface order dependencies. If you find an
|
|
44
|
+
# order dependency and want to debug it, you can fix the order by providing
|
|
45
|
+
# the seed, which is printed after each run.
|
|
46
|
+
# --seed 1234
|
|
47
|
+
config.order = 'random'
|
|
48
|
+
|
|
49
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
|
50
|
+
|
|
51
|
+
config.after(:suite) { WebMock.disable! }
|
|
52
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: g5_authenticatable
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.3.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- maeve
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: devise_g5_authenticatable
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0.1'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0.1'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: g5_authenticatable_api
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0.2'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0.2'
|
|
41
|
+
description: |-
|
|
42
|
+
An engine that provides a basic User model,
|
|
43
|
+
authentication logic, and remote credential
|
|
44
|
+
management for G5 applications.
|
|
45
|
+
email:
|
|
46
|
+
- maeve.revels@getg5.com
|
|
47
|
+
executables: []
|
|
48
|
+
extensions: []
|
|
49
|
+
extra_rdoc_files: []
|
|
50
|
+
files:
|
|
51
|
+
- ".env"
|
|
52
|
+
- ".gitignore"
|
|
53
|
+
- ".rspec"
|
|
54
|
+
- ".ruby-version"
|
|
55
|
+
- CHANGELOG.md
|
|
56
|
+
- Gemfile
|
|
57
|
+
- LICENSE
|
|
58
|
+
- README.md
|
|
59
|
+
- Rakefile
|
|
60
|
+
- app/assets/images/g5_authenticatable/.gitkeep
|
|
61
|
+
- app/assets/javascripts/g5_authenticatable/application.js
|
|
62
|
+
- app/assets/stylesheets/g5_authenticatable/application.css
|
|
63
|
+
- app/controllers/g5_authenticatable/application_controller.rb
|
|
64
|
+
- app/controllers/g5_authenticatable/error_controller.rb
|
|
65
|
+
- app/controllers/g5_authenticatable/sessions_controller.rb
|
|
66
|
+
- app/helpers/g5_authenticatable/application_helper.rb
|
|
67
|
+
- app/models/g5_authenticatable/user.rb
|
|
68
|
+
- app/views/g5_authenticatable/error/auth_error.html.erb
|
|
69
|
+
- app/views/layouts/g5_authenticatable/application.html.erb
|
|
70
|
+
- circle.yml
|
|
71
|
+
- config/initializers/devise.rb
|
|
72
|
+
- config/locales/devise.en.yml
|
|
73
|
+
- config/routes.rb
|
|
74
|
+
- g5_authenticatable.gemspec
|
|
75
|
+
- lib/g5_authenticatable.rb
|
|
76
|
+
- lib/g5_authenticatable/engine.rb
|
|
77
|
+
- lib/g5_authenticatable/rspec.rb
|
|
78
|
+
- lib/g5_authenticatable/test/controller_helpers.rb
|
|
79
|
+
- lib/g5_authenticatable/test/factory.rb
|
|
80
|
+
- lib/g5_authenticatable/test/feature_helpers.rb
|
|
81
|
+
- lib/g5_authenticatable/test/request_helpers.rb
|
|
82
|
+
- lib/g5_authenticatable/version.rb
|
|
83
|
+
- lib/generators/g5_authenticatable/install/USAGE
|
|
84
|
+
- lib/generators/g5_authenticatable/install/install_generator.rb
|
|
85
|
+
- lib/generators/g5_authenticatable/install/templates/create_g5_authenticatable_users.rb
|
|
86
|
+
- lib/tasks/g5_authenticatable_tasks.rake
|
|
87
|
+
- script/rails
|
|
88
|
+
- spec/config/application_spec.rb
|
|
89
|
+
- spec/controllers/.gitkeep
|
|
90
|
+
- spec/controllers/application_controller_spec.rb
|
|
91
|
+
- spec/dummy/README.rdoc
|
|
92
|
+
- spec/dummy/Rakefile
|
|
93
|
+
- spec/dummy/app/api/secure_api.rb
|
|
94
|
+
- spec/dummy/app/assets/javascripts/application.js
|
|
95
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
|
96
|
+
- spec/dummy/app/controllers/application_controller.rb
|
|
97
|
+
- spec/dummy/app/controllers/home_controller.rb
|
|
98
|
+
- spec/dummy/app/controllers/rails_api/secure_resources_controller.rb
|
|
99
|
+
- spec/dummy/app/helpers/application_helper.rb
|
|
100
|
+
- spec/dummy/app/mailers/.gitkeep
|
|
101
|
+
- spec/dummy/app/models/.gitkeep
|
|
102
|
+
- spec/dummy/app/views/home/index.html.erb
|
|
103
|
+
- spec/dummy/app/views/home/show.html.erb
|
|
104
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
|
105
|
+
- spec/dummy/app/views/rails_api/secure_resources/show.html.erb
|
|
106
|
+
- spec/dummy/config.ru
|
|
107
|
+
- spec/dummy/config/application.rb
|
|
108
|
+
- spec/dummy/config/boot.rb
|
|
109
|
+
- spec/dummy/config/database.yml.ci
|
|
110
|
+
- spec/dummy/config/database.yml.sample
|
|
111
|
+
- spec/dummy/config/environment.rb
|
|
112
|
+
- spec/dummy/config/environments/development.rb
|
|
113
|
+
- spec/dummy/config/environments/production.rb
|
|
114
|
+
- spec/dummy/config/environments/test.rb
|
|
115
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
116
|
+
- spec/dummy/config/initializers/inflections.rb
|
|
117
|
+
- spec/dummy/config/initializers/mime_types.rb
|
|
118
|
+
- spec/dummy/config/initializers/secret_token.rb
|
|
119
|
+
- spec/dummy/config/initializers/session_store.rb
|
|
120
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
|
121
|
+
- spec/dummy/config/locales/en.yml
|
|
122
|
+
- spec/dummy/config/routes.rb
|
|
123
|
+
- spec/dummy/db/migrate/20140206070137_create_g5_authenticatable_users.rb
|
|
124
|
+
- spec/dummy/db/schema.rb
|
|
125
|
+
- spec/dummy/lib/assets/.gitkeep
|
|
126
|
+
- spec/dummy/log/.gitkeep
|
|
127
|
+
- spec/dummy/public/404.html
|
|
128
|
+
- spec/dummy/public/422.html
|
|
129
|
+
- spec/dummy/public/500.html
|
|
130
|
+
- spec/dummy/public/favicon.ico
|
|
131
|
+
- spec/dummy/script/rails
|
|
132
|
+
- spec/features/auth_error_path_spec.rb
|
|
133
|
+
- spec/features/sign_in_spec.rb
|
|
134
|
+
- spec/g5_authenticatable/version_spec.rb
|
|
135
|
+
- spec/lib/generators/g5_authenticatable/install_generator_spec.rb
|
|
136
|
+
- spec/models/.gitkeep
|
|
137
|
+
- spec/models/g5_authenticatable/user_spec.rb
|
|
138
|
+
- spec/requests/grape_api_spec.rb
|
|
139
|
+
- spec/requests/rails_api_spec.rb
|
|
140
|
+
- spec/routing/auth_error_routing_spec.rb
|
|
141
|
+
- spec/spec_helper.rb
|
|
142
|
+
- spec/support/devise.rb
|
|
143
|
+
homepage: https://github.com/G5/g5_authenticatable
|
|
144
|
+
licenses:
|
|
145
|
+
- MIT
|
|
146
|
+
metadata: {}
|
|
147
|
+
post_install_message:
|
|
148
|
+
rdoc_options: []
|
|
149
|
+
require_paths:
|
|
150
|
+
- lib
|
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
|
+
requirements:
|
|
153
|
+
- - ">="
|
|
154
|
+
- !ruby/object:Gem::Version
|
|
155
|
+
version: '0'
|
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
|
+
requirements:
|
|
158
|
+
- - ">="
|
|
159
|
+
- !ruby/object:Gem::Version
|
|
160
|
+
version: '0'
|
|
161
|
+
requirements: []
|
|
162
|
+
rubyforge_project:
|
|
163
|
+
rubygems_version: 2.2.0
|
|
164
|
+
signing_key:
|
|
165
|
+
specification_version: 4
|
|
166
|
+
summary: An authentication engine for G5 applications.
|
|
167
|
+
test_files:
|
|
168
|
+
- spec/config/application_spec.rb
|
|
169
|
+
- spec/controllers/.gitkeep
|
|
170
|
+
- spec/controllers/application_controller_spec.rb
|
|
171
|
+
- spec/dummy/README.rdoc
|
|
172
|
+
- spec/dummy/Rakefile
|
|
173
|
+
- spec/dummy/app/api/secure_api.rb
|
|
174
|
+
- spec/dummy/app/assets/javascripts/application.js
|
|
175
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
|
176
|
+
- spec/dummy/app/controllers/application_controller.rb
|
|
177
|
+
- spec/dummy/app/controllers/home_controller.rb
|
|
178
|
+
- spec/dummy/app/controllers/rails_api/secure_resources_controller.rb
|
|
179
|
+
- spec/dummy/app/helpers/application_helper.rb
|
|
180
|
+
- spec/dummy/app/mailers/.gitkeep
|
|
181
|
+
- spec/dummy/app/models/.gitkeep
|
|
182
|
+
- spec/dummy/app/views/home/index.html.erb
|
|
183
|
+
- spec/dummy/app/views/home/show.html.erb
|
|
184
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
|
185
|
+
- spec/dummy/app/views/rails_api/secure_resources/show.html.erb
|
|
186
|
+
- spec/dummy/config.ru
|
|
187
|
+
- spec/dummy/config/application.rb
|
|
188
|
+
- spec/dummy/config/boot.rb
|
|
189
|
+
- spec/dummy/config/database.yml.ci
|
|
190
|
+
- spec/dummy/config/database.yml.sample
|
|
191
|
+
- spec/dummy/config/environment.rb
|
|
192
|
+
- spec/dummy/config/environments/development.rb
|
|
193
|
+
- spec/dummy/config/environments/production.rb
|
|
194
|
+
- spec/dummy/config/environments/test.rb
|
|
195
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
196
|
+
- spec/dummy/config/initializers/inflections.rb
|
|
197
|
+
- spec/dummy/config/initializers/mime_types.rb
|
|
198
|
+
- spec/dummy/config/initializers/secret_token.rb
|
|
199
|
+
- spec/dummy/config/initializers/session_store.rb
|
|
200
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
|
201
|
+
- spec/dummy/config/locales/en.yml
|
|
202
|
+
- spec/dummy/config/routes.rb
|
|
203
|
+
- spec/dummy/db/migrate/20140206070137_create_g5_authenticatable_users.rb
|
|
204
|
+
- spec/dummy/db/schema.rb
|
|
205
|
+
- spec/dummy/lib/assets/.gitkeep
|
|
206
|
+
- spec/dummy/log/.gitkeep
|
|
207
|
+
- spec/dummy/public/404.html
|
|
208
|
+
- spec/dummy/public/422.html
|
|
209
|
+
- spec/dummy/public/500.html
|
|
210
|
+
- spec/dummy/public/favicon.ico
|
|
211
|
+
- spec/dummy/script/rails
|
|
212
|
+
- spec/features/auth_error_path_spec.rb
|
|
213
|
+
- spec/features/sign_in_spec.rb
|
|
214
|
+
- spec/g5_authenticatable/version_spec.rb
|
|
215
|
+
- spec/lib/generators/g5_authenticatable/install_generator_spec.rb
|
|
216
|
+
- spec/models/.gitkeep
|
|
217
|
+
- spec/models/g5_authenticatable/user_spec.rb
|
|
218
|
+
- spec/requests/grape_api_spec.rb
|
|
219
|
+
- spec/requests/rails_api_spec.rb
|
|
220
|
+
- spec/routing/auth_error_routing_spec.rb
|
|
221
|
+
- spec/spec_helper.rb
|
|
222
|
+
- spec/support/devise.rb
|