simple_auth 3.0.0 → 3.1.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 +5 -5
- data/.gitignore +2 -2
- data/.rubocop.yml +6 -0
- data/.travis.yml +17 -3
- data/CHANGELOG.md +9 -1
- data/Gemfile +2 -0
- data/README.md +41 -12
- data/Rakefile +3 -1
- data/bin/console +2 -0
- data/gemfiles/rails_5_2.gemfile +6 -0
- data/gemfiles/rails_6_0.gemfile +6 -0
- data/lib/simple_auth.rb +3 -0
- data/lib/simple_auth/action_controller.rb +6 -7
- data/lib/simple_auth/action_controller/require_login_action.rb +11 -9
- data/lib/simple_auth/config.rb +2 -0
- data/lib/simple_auth/generator.rb +2 -0
- data/lib/simple_auth/railtie.rb +2 -0
- data/lib/simple_auth/session.rb +5 -6
- data/lib/simple_auth/templates/install/initializer.rb +2 -0
- data/lib/simple_auth/version.rb +3 -1
- data/simple_auth.gemspec +12 -5
- data/test/controllers/admin/dashboard_controller_test.rb +2 -0
- data/test/controllers/dashboard_controller_test.rb +2 -0
- data/test/controllers/pages_controller_test.rb +21 -1
- data/test/generators/install_test.rb +2 -0
- data/test/support/dummy/app/controllers/admin/dashboard_controller.rb +3 -3
- data/test/support/dummy/app/controllers/application_controller.rb +2 -0
- data/test/support/dummy/app/controllers/dashboard_controller.rb +3 -3
- data/test/support/dummy/app/controllers/pages_controller.rb +12 -1
- data/test/support/dummy/app/models/user.rb +2 -0
- data/test/support/dummy/config/application.rb +2 -0
- data/test/support/dummy/config/initializers/simple_auth.rb +2 -0
- data/test/support/dummy/config/routes.rb +4 -0
- data/test/support/schema.rb +2 -0
- data/test/test_helper.rb +5 -1
- metadata +74 -18
- data/gemfiles/rails_4_2.gemfile +0 -4
- data/gemfiles/rails_5_0.gemfile +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ba465a655d4336e0e400a40306644584f5dc0e9fd1be216272d12f9326e01467
|
4
|
+
data.tar.gz: d92099b4d135f1e36c195996c14972ff6ad55e20c1d3e7d920909c3b525b11c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbe00d05c29d18d067f4decc46ab3cd1a70d72cb6e8e6bd42f16f9601b4dea552f5b6b2d6504632b4a49f01458f9e313bfa60ee65785d019c7aadb2bd86b66da
|
7
|
+
data.tar.gz: 71c868b0d198cf63139168545155eabe87f23cd4558f8f11e289a29917bca7fc196c6ce158a2da10c30d8922599889f9f8ed821e1872f5ea3d43c76d3fca2ba0
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
@@ -1,8 +1,22 @@
|
|
1
|
+
---
|
1
2
|
sudo: false
|
2
3
|
cache: bundler
|
3
4
|
rvm:
|
4
|
-
-
|
5
|
+
- 2.7.0
|
6
|
+
- 2.6.5
|
7
|
+
- 2.5.7
|
5
8
|
script: bundle exec rake
|
9
|
+
before_script:
|
10
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
11
|
+
- chmod +x ./cc-test-reporter
|
12
|
+
- "./cc-test-reporter before-build"
|
13
|
+
after_script:
|
14
|
+
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
|
15
|
+
notifications:
|
16
|
+
email: false
|
6
17
|
gemfile:
|
7
|
-
- gemfiles/
|
8
|
-
- gemfiles/
|
18
|
+
- gemfiles/rails_6_0.gemfile
|
19
|
+
- gemfiles/rails_5_2.gemfile
|
20
|
+
env:
|
21
|
+
global:
|
22
|
+
secure: LglasZ2QJLCE2tSKyZ9wIZNNwDNQ/gi+QNSHlpK2olgBOYMKV1idJPZjUlSTAac7+QHTYRRGCoUVMYHWxJgLfcuo7YpXVAgqPwjVl5nbHKfh/oP/FLriELKZbqMo0TtuqZNdnqPdO8RE7zK0om37jYNoUPJ4j2mUVLC8PMZpbiM=
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
#v3.
|
1
|
+
# v3.1.0
|
2
|
+
|
3
|
+
- SimpleAuth now uses [GlobalID](https://github.com/rails/globalid) as the
|
4
|
+
identification that's saved on the session. This should be a seamless
|
5
|
+
migration (users will only have to re-login). This allows using any objects
|
6
|
+
that respond to `#to_gid`, including namespaced models and POROs.
|
7
|
+
|
8
|
+
# v3.0.0
|
9
|
+
|
2
10
|
- Reimplemented library.
|
3
11
|
- Add support for scoped authentication (e.g. user and admin).
|
4
12
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
# Simple Auth
|
2
2
|
|
3
|
-
[](https://travis-ci.org/fnando/simple_auth)
|
4
|
+
[](https://codeclimate.com/github/fnando/simple_auth)
|
5
|
+
[](https://codeclimate.com/github/fnando/simple_auth/coverage)
|
6
|
+
[](https://rubygems.org/gems/simple_auth)
|
7
|
+
[](https://rubygems.org/gems/simple_auth)
|
6
8
|
|
7
|
-
SimpleAuth is an authentication library to be used when everything else is just
|
9
|
+
SimpleAuth is an authentication library to be used when everything else is just
|
10
|
+
too complicated.
|
8
11
|
|
9
|
-
This library only handles session. You have to implement the authentication
|
10
|
-
|
11
|
-
Rails 4.2+ running over Ruby 2.1+ is required.
|
12
|
+
This library only handles session. You have to implement the authentication
|
13
|
+
strategy as you want (e.g. in-site authentication, OAuth, etc).
|
12
14
|
|
13
15
|
## Installation
|
14
16
|
|
@@ -20,7 +22,9 @@ Then run `rails generate simple_auth:install` to copy the initializer file.
|
|
20
22
|
|
21
23
|
## Usage
|
22
24
|
|
23
|
-
The initializer will install the required helper methods on your controller. So,
|
25
|
+
The initializer will install the required helper methods on your controller. So,
|
26
|
+
let's say you want to support `user` and `admin` authentication. You'll need to
|
27
|
+
specify the following scope.
|
24
28
|
|
25
29
|
```ruby
|
26
30
|
# config/initializers/simple_auth.rb
|
@@ -33,7 +37,10 @@ SimpleAuth.setup do |config|
|
|
33
37
|
end
|
34
38
|
```
|
35
39
|
|
36
|
-
Session is valid only when `Controller#authorized_#{scope}?` method returns
|
40
|
+
Session is valid only when `Controller#authorized_#{scope}?` method returns
|
41
|
+
`true`, which is the default behavior. You can override these methods with your
|
42
|
+
own rules; the following example shows how you can authorize all e-mails from
|
43
|
+
`@example.com` to access the admin dashboard.
|
37
44
|
|
38
45
|
```ruby
|
39
46
|
class Admin::DashboardController < ApplicationController
|
@@ -70,11 +77,33 @@ class SessionsController < ApplicationController
|
|
70
77
|
end
|
71
78
|
```
|
72
79
|
|
73
|
-
First thing to notice is that
|
80
|
+
First thing to notice is that SimpleAuth doesn't care about how you
|
81
|
+
authenticate. You could easily set up a different authentication strategy, e.g.
|
82
|
+
API tokens. The important part is assigning the `record:` and `scope:` options.
|
83
|
+
The `return_to` helper will give you the requested url (before the user logged
|
84
|
+
in) or the default url.
|
85
|
+
|
86
|
+
SimpleAuth uses [GlobalID](https://github.com/rails/globalid) as the session
|
87
|
+
identifier. This allows using any objects that respond to `#to_gid`, including
|
88
|
+
namespaced models and POROs.
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
session[:user_id]
|
92
|
+
#=> gid://myapp/User/1
|
93
|
+
```
|
94
|
+
|
95
|
+
If you need to locate a record using such value, you can do it by calling
|
96
|
+
`GlobalID::Locator.locate(session[:user_id])`
|
97
|
+
|
98
|
+
### Logging out users
|
99
|
+
|
100
|
+
Logging out a user is just as simple; all you have to do is calling the regular
|
101
|
+
`reset_session`.
|
74
102
|
|
75
|
-
|
103
|
+
### Restricting access
|
76
104
|
|
77
|
-
You can restrict access by using 2 macros. Use `redirect_logged_#{scope}` to
|
105
|
+
You can restrict access by using 2 macros. Use `redirect_logged_#{scope}` to
|
106
|
+
avoid rendering a page for logged user.
|
78
107
|
|
79
108
|
```ruby
|
80
109
|
class SignupController < ApplicationController
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/lib/simple_auth.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module SimpleAuth
|
3
4
|
module ActionController
|
4
5
|
extend ActiveSupport::Concern
|
@@ -15,7 +16,7 @@ module SimpleAuth
|
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
18
|
-
def install_simple_auth_scope(scope)
|
19
|
+
def install_simple_auth_scope(scope) # rubocop:disable Metrics/MethodLength
|
19
20
|
class_eval <<-RUBY, __FILE__, __LINE__ + 1
|
20
21
|
def #{scope}_session
|
21
22
|
@#{scope}_session ||= Session.create(scope: :#{scope}, session: session)
|
@@ -44,17 +45,15 @@ module SimpleAuth
|
|
44
45
|
end
|
45
46
|
end
|
46
47
|
|
47
|
-
private
|
48
|
-
|
49
|
-
def simple_auth
|
48
|
+
private def simple_auth
|
50
49
|
@simple_auth ||= SimpleAuth.config
|
51
50
|
end
|
52
51
|
|
53
|
-
def return_to(url)
|
52
|
+
private def return_to(url)
|
54
53
|
session[:return_to] || url
|
55
54
|
end
|
56
55
|
|
57
|
-
def simple_auth_require_logged_scope(scope)
|
56
|
+
private def simple_auth_require_logged_scope(scope)
|
58
57
|
action = RequireLoginAction.new(self, scope)
|
59
58
|
return if action.valid?
|
60
59
|
|
@@ -64,7 +63,7 @@ module SimpleAuth
|
|
64
63
|
redirect_to instance_eval(&simple_auth.login_url)
|
65
64
|
end
|
66
65
|
|
67
|
-
def simple_auth_redirect_logged_scope(scope)
|
66
|
+
private def simple_auth_redirect_logged_scope(scope)
|
68
67
|
scope_session = send("#{scope}_session")
|
69
68
|
return unless scope_session.valid?
|
70
69
|
|
@@ -1,8 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module SimpleAuth
|
2
4
|
module ActionController
|
3
5
|
class RequireLoginAction
|
4
6
|
DEFAULT_UNLOGGED_IN_MESSAGE = "You must be logged in to access this page."
|
5
|
-
DEFAULT_UNAUTHORIZED_MESSAGE =
|
7
|
+
DEFAULT_UNAUTHORIZED_MESSAGE =
|
8
|
+
"You don't have permission to access this page."
|
6
9
|
|
7
10
|
attr_reader :controller, :scope
|
8
11
|
|
@@ -16,30 +19,29 @@ module SimpleAuth
|
|
16
19
|
end
|
17
20
|
|
18
21
|
def message
|
19
|
-
return
|
22
|
+
return if valid?
|
20
23
|
return unauthorized_message unless authorized?
|
24
|
+
|
21
25
|
unlogged_message
|
22
26
|
end
|
23
27
|
|
24
|
-
private
|
25
|
-
|
26
|
-
def valid_session?
|
28
|
+
private def valid_session?
|
27
29
|
controller.send("#{scope}_session").valid?
|
28
30
|
end
|
29
31
|
|
30
|
-
def authorized?
|
32
|
+
private def authorized?
|
31
33
|
controller.send("authorized_#{scope}?")
|
32
34
|
end
|
33
35
|
|
34
|
-
def unauthorized_message
|
36
|
+
private def unauthorized_message
|
35
37
|
translation_for("#{scope}.unauthorized", DEFAULT_UNAUTHORIZED_MESSAGE)
|
36
38
|
end
|
37
39
|
|
38
|
-
def unlogged_message
|
40
|
+
private def unlogged_message
|
39
41
|
translation_for("#{scope}.unlogged_in", DEFAULT_UNLOGGED_IN_MESSAGE)
|
40
42
|
end
|
41
43
|
|
42
|
-
def translation_for(translation_scope, default_message)
|
44
|
+
private def translation_for(translation_scope, default_message)
|
43
45
|
I18n.t(translation_scope, scope: :simple_auth, default: default_message)
|
44
46
|
end
|
45
47
|
end
|
data/lib/simple_auth/config.rb
CHANGED
data/lib/simple_auth/railtie.rb
CHANGED
data/lib/simple_auth/session.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module SimpleAuth
|
2
4
|
class Session
|
3
5
|
def self.create(**kwargs)
|
@@ -11,17 +13,14 @@ module SimpleAuth
|
|
11
13
|
end
|
12
14
|
|
13
15
|
def record=(record)
|
14
|
-
@session[record_key] = record.
|
16
|
+
@session[record_key] = record ? record.to_gid.to_s : nil
|
15
17
|
@record = record
|
16
18
|
end
|
17
19
|
|
18
20
|
def record
|
19
|
-
|
20
|
-
.find_by_id(record_id_from_session) if record_id_from_session
|
21
|
-
end
|
21
|
+
return unless record_id_from_session
|
22
22
|
|
23
|
-
|
24
|
-
@record_class ||= Object.const_get(:"#{@scope.to_s.camelize}")
|
23
|
+
@record ||= GlobalID::Locator.locate(record_id_from_session)
|
25
24
|
end
|
26
25
|
|
27
26
|
def record_key
|
data/lib/simple_auth/version.rb
CHANGED
data/simple_auth.gemspec
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "./lib/simple_auth/version"
|
2
4
|
|
3
5
|
Gem::Specification.new do |s|
|
4
|
-
s.required_ruby_version = ">= 2.2.0"
|
5
6
|
s.name = "simple_auth"
|
6
7
|
s.version = SimpleAuth::VERSION
|
7
8
|
s.platform = Gem::Platform::RUBY
|
@@ -13,14 +14,20 @@ Gem::Specification.new do |s|
|
|
13
14
|
|
14
15
|
s.files = `git ls-files`.split("\n")
|
15
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
-
s.executables = `git ls-files -- bin
|
17
|
+
s.executables = `git ls-files -- bin/*`
|
18
|
+
.split("\n")
|
19
|
+
.map {|f| File.basename(f) }
|
17
20
|
s.require_paths = ["lib"]
|
18
21
|
|
19
|
-
s.add_dependency "
|
20
|
-
s.
|
22
|
+
s.add_dependency "globalid"
|
23
|
+
s.add_dependency "rails"
|
21
24
|
s.add_development_dependency "activerecord"
|
25
|
+
s.add_development_dependency "bcrypt", "~> 3.1.7"
|
22
26
|
s.add_development_dependency "minitest"
|
23
27
|
s.add_development_dependency "minitest-utils"
|
24
|
-
s.add_development_dependency "bcrypt", "~> 3.1.7"
|
25
28
|
s.add_development_dependency "pry-meta"
|
29
|
+
s.add_development_dependency "rubocop"
|
30
|
+
s.add_development_dependency "rubocop-fnando"
|
31
|
+
s.add_development_dependency "simplecov"
|
32
|
+
s.add_development_dependency "sqlite3"
|
26
33
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "test_helper"
|
2
4
|
|
3
5
|
class PagesControllerTest < ActionController::TestCase
|
@@ -6,11 +8,29 @@ class PagesControllerTest < ActionController::TestCase
|
|
6
8
|
@controller.reset_session
|
7
9
|
|
8
10
|
User.delete_all
|
9
|
-
User.create!(password: "test", email: "john@example.com")
|
10
11
|
end
|
11
12
|
|
12
13
|
test "sets flash message while redirecting unlogged user" do
|
13
14
|
get :index
|
14
15
|
assert_equal "You must be logged in to access this page.", flash[:alert]
|
15
16
|
end
|
17
|
+
|
18
|
+
test "redirects to login url" do
|
19
|
+
get :index
|
20
|
+
|
21
|
+
assert_redirected_to login_path
|
22
|
+
end
|
23
|
+
|
24
|
+
test "redirects to requested url" do
|
25
|
+
get :index
|
26
|
+
assert_redirected_to login_path
|
27
|
+
|
28
|
+
get :log_in
|
29
|
+
assert_redirected_to controller: :pages, action: :index
|
30
|
+
end
|
31
|
+
|
32
|
+
test "redirects to default url" do
|
33
|
+
get :log_in
|
34
|
+
assert_redirected_to controller: :pages, action: :logged_area
|
35
|
+
end
|
16
36
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative "../application_controller"
|
2
4
|
|
3
5
|
module Admin
|
@@ -26,9 +28,7 @@ module Admin
|
|
26
28
|
head :ok
|
27
29
|
end
|
28
30
|
|
29
|
-
private
|
30
|
-
|
31
|
-
def authorized?
|
31
|
+
private def authorized?
|
32
32
|
current_admin.present? || current_user.admin?
|
33
33
|
end
|
34
34
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class DashboardController < ApplicationController
|
2
4
|
before_action :require_logged_user, except: %w[log_in not_logged]
|
3
5
|
before_action :redirect_logged_user, only: "not_logged"
|
@@ -15,9 +17,7 @@ class DashboardController < ApplicationController
|
|
15
17
|
head :ok
|
16
18
|
end
|
17
19
|
|
18
|
-
private
|
19
|
-
|
20
|
-
def authorized_user?
|
20
|
+
private def authorized_user?
|
21
21
|
current_user.try(:email).to_s.match(/@example.com\z/)
|
22
22
|
end
|
23
23
|
end
|
@@ -1,7 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class PagesController < ApplicationController
|
2
|
-
before_action :require_logged_user
|
4
|
+
before_action :require_logged_user, except: :log_in
|
3
5
|
|
4
6
|
def index
|
5
7
|
head :ok
|
6
8
|
end
|
9
|
+
|
10
|
+
def logged_area
|
11
|
+
head :ok
|
12
|
+
end
|
13
|
+
|
14
|
+
def log_in
|
15
|
+
user_session.record = User.first
|
16
|
+
redirect_to return_to(pages_logged_area_path)
|
17
|
+
end
|
7
18
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
Rails.application.routes.draw do
|
2
4
|
get "/dashboard", to: "dashboard#index"
|
3
5
|
get "/admin/dashboard", to: "admin/dashboard#index"
|
@@ -10,6 +12,8 @@ Rails.application.routes.draw do
|
|
10
12
|
|
11
13
|
controller :pages do
|
12
14
|
get :index
|
15
|
+
get :log_in
|
16
|
+
get :logged_area, as: "pages_logged_area"
|
13
17
|
end
|
14
18
|
|
15
19
|
namespace :admin do
|
data/test/support/schema.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "simplecov"
|
4
|
+
SimpleCov.start
|
2
5
|
|
3
6
|
require "bundler/setup"
|
4
7
|
require "rack/test"
|
@@ -7,6 +10,7 @@ require "minitest/autorun"
|
|
7
10
|
|
8
11
|
require "./test/support/dummy/config/application"
|
9
12
|
require "./test/support/dummy/config/routes"
|
13
|
+
require "./test/support/dummy/app/controllers/application_controller"
|
10
14
|
|
11
15
|
require "active_record"
|
12
16
|
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
|
metadata
CHANGED
@@ -1,37 +1,37 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: globalid
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
|
-
type: :
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bcrypt
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.1.7
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.1.7
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: minitest
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,21 +95,63 @@ dependencies:
|
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: pry-meta
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - "
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
103
|
+
version: '0'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - "
|
108
|
+
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-fnando
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: sqlite3
|
99
155
|
requirement: !ruby/object:Gem::Requirement
|
100
156
|
requirements:
|
101
157
|
- - ">="
|
@@ -117,6 +173,7 @@ extensions: []
|
|
117
173
|
extra_rdoc_files: []
|
118
174
|
files:
|
119
175
|
- ".gitignore"
|
176
|
+
- ".rubocop.yml"
|
120
177
|
- ".travis.yml"
|
121
178
|
- CHANGELOG.md
|
122
179
|
- Gemfile
|
@@ -124,8 +181,8 @@ files:
|
|
124
181
|
- README.md
|
125
182
|
- Rakefile
|
126
183
|
- bin/console
|
127
|
-
- gemfiles/
|
128
|
-
- gemfiles/
|
184
|
+
- gemfiles/rails_5_2.gemfile
|
185
|
+
- gemfiles/rails_6_0.gemfile
|
129
186
|
- lib/simple_auth.rb
|
130
187
|
- lib/simple_auth/action_controller.rb
|
131
188
|
- lib/simple_auth/action_controller/require_login_action.rb
|
@@ -161,15 +218,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
161
218
|
requirements:
|
162
219
|
- - ">="
|
163
220
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
221
|
+
version: '0'
|
165
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
223
|
requirements:
|
167
224
|
- - ">="
|
168
225
|
- !ruby/object:Gem::Version
|
169
226
|
version: '0'
|
170
227
|
requirements: []
|
171
|
-
|
172
|
-
rubygems_version: 2.5.1
|
228
|
+
rubygems_version: 3.1.2
|
173
229
|
signing_key:
|
174
230
|
specification_version: 4
|
175
231
|
summary: A simple authentication system for Rails apps
|
data/gemfiles/rails_4_2.gemfile
DELETED
data/gemfiles/rails_5_0.gemfile
DELETED