avocado 0.7.0 → 0.8.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 +4 -4
- data/.standard.yml +1 -0
- data/Appraisals +14 -0
- data/CHANGELOG.md +6 -1
- data/README.md +14 -1
- data/app/controllers/avocado/sessions_controller.rb +1 -1
- data/avocado.gemspec +35 -0
- data/docs/USAGE.md +9 -11
- data/gemfiles/rails_7.1.gemfile +20 -0
- data/gemfiles/rails_7.2.gemfile +20 -0
- data/gemfiles/rails_8.0.gemfile +20 -0
- data/lib/avocado/authentication.rb +1 -1
- data/lib/avocado/version.rb +3 -1
- metadata +19 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08d664f6d291a21013b089cd5828f447e400cb6d8314715b503ab2e3b1f0a174'
|
4
|
+
data.tar.gz: 302cf7c4940831925bf5e26d3dab5363995ae9aa1a3191a2fe5da2744df2a838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97def5337c7ccaa178b3a33a40b5c7601f89ff4155d6ee0c7e0bff7025e329ae2ab6694b6ceeb5454345cf989a43431f82c2db7b7ac7cfc7abd9cb6ada7ad894
|
7
|
+
data.tar.gz: 7ddeea306e591a49a4705337d3941518a1f8e900f502e2510e397cd860ce6576c7a14cb45226646cefd87c98a77e0de5a116b00dda0d71fa85fe9523ea855a9d
|
data/.standard.yml
CHANGED
data/Appraisals
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
appraise "rails_7.1" do
|
2
|
+
gem "rails", "~> 7.1.0"
|
3
|
+
gem "sqlite3", "~> 1.7"
|
4
|
+
end
|
5
|
+
|
6
|
+
appraise "rails_7.2" do
|
7
|
+
gem "rails", "~> 7.2.0"
|
8
|
+
gem "sqlite3", "~> 1.7"
|
9
|
+
end
|
10
|
+
|
11
|
+
appraise "rails_8.0" do
|
12
|
+
gem "rails", "~> 8.0.0.rc1"
|
13
|
+
gem "sqlite3", "~> 2.0"
|
14
|
+
end
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
Authentication library for [Rails] 7.1+ applications.
|
4
4
|
|
5
|
+
When most people notice the trifecta of `has_secure_password`,
|
6
|
+
`authenticate_by`, and `generates_token_for` in [Rails 7.1] they think to
|
7
|
+
themselves "Sweet sassy molassey, I bet you could DIY a nice auth solution with
|
8
|
+
these dog-gone methods!" and then they slap the roof of their cars and yell
|
9
|
+
"Everyone to the coder-cycle! Let's rev this bad boy up and build us an SDK!"
|
10
|
+
|
11
|
+
But then again, maybe it's too soon for that, or maybe you're nervous about
|
12
|
+
writing authentication code in your own application and would prefer to consume
|
13
|
+
such code in scrumpulent gem form instead. The 🥑 gem is an extraction of the
|
14
|
+
authentication portion of an experimental next-generation Rails codebase built
|
15
|
+
in our research group.
|
16
|
+
|
5
17
|
## Installation
|
6
18
|
|
7
19
|
Add to the application's Gemfile by executing:
|
@@ -10,7 +22,7 @@ Add to the application's Gemfile by executing:
|
|
10
22
|
|
11
23
|
## Usage
|
12
24
|
|
13
|
-
Read the [documentation] for more details
|
25
|
+
Read the [documentation] for more details.
|
14
26
|
|
15
27
|
## Development
|
16
28
|
|
@@ -31,3 +43,4 @@ The gem is available as open source under the terms of the [MIT License].
|
|
31
43
|
[MIT License]: https://opensource.org/licenses/MIT
|
32
44
|
[Rails]: https://github.com/rails/rails
|
33
45
|
[wiki]: https://github.com/tcuwp/avocado/wiki
|
46
|
+
[Rails 7.1]: https://guides.rubyonrails.org/7_1_release_notes.html
|
data/avocado.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require_relative "lib/avocado/version"
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "avocado"
|
5
|
+
spec.version = Avocado::VERSION
|
6
|
+
spec.authors = ["Matt Jankowski"]
|
7
|
+
spec.email = ["info@tcuwp.co"]
|
8
|
+
|
9
|
+
spec.summary = "Simple authentication for Rails applications"
|
10
|
+
spec.homepage = "https://github.com/tcuwp/avocado"
|
11
|
+
spec.license = "MIT"
|
12
|
+
spec.required_ruby_version = Avocado::MINIMUM_RUBY_VERSION
|
13
|
+
|
14
|
+
spec.metadata["bug_tracker_uri"] = "https://github.com/tcuwp/avocado/issues"
|
15
|
+
spec.metadata["changelog_uri"] = "https://github.com/tcuwp/avocado/blob/main/CHANGELOG.md"
|
16
|
+
spec.metadata["documentation_uri"] = "https://github.com/tcuwp/avocado/blob/main/docs/USAGE.md"
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/tcuwp/avocado/tree/main"
|
19
|
+
spec.metadata["wiki_uri"] = "https://github.com/tcuwp/avocado/wiki"
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(__dir__) do
|
24
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
25
|
+
(File.expand_path(f) == __FILE__) ||
|
26
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_dependency "bcrypt", "~> 3.1"
|
34
|
+
spec.add_dependency "rails", Avocado::RAILS_VERSION
|
35
|
+
end
|
data/docs/USAGE.md
CHANGED
@@ -120,17 +120,16 @@ There is an `Avocado::Mailer` which gets called to send emails. The mailer views
|
|
120
120
|
here are very basic, and should be overriden within applications. Place views
|
121
121
|
within `app/views/avocado/mailer/` to make this happen.
|
122
122
|
|
123
|
-
###
|
123
|
+
### Filters
|
124
124
|
|
125
|
-
There
|
126
|
-
`before_action :authenticate`. Any actions which do not need to be authenticated
|
127
|
-
should disable this with `skip_before_action :authenticate`, or inherit from a
|
128
|
-
controller which performs the skip.
|
125
|
+
There are two methods added to the default `before_action` stack:
|
129
126
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
127
|
+
- The `authenticate` method defaults controller behavior to require a signed in
|
128
|
+
session. Actions can disable it with `skip_before_action :authenticate`, or
|
129
|
+
inherit from a controller which performs the skip.
|
130
|
+
- The `set_current_request_details` method makes some loggable request meta
|
131
|
+
information (User Agent, IP Address) values available in `Current` so that
|
132
|
+
they are accesible to code elsewhere in the 🥑 gem.
|
134
133
|
|
135
134
|
### Helpers
|
136
135
|
|
@@ -149,8 +148,7 @@ There is not any configuration. To override functionality:
|
|
149
148
|
|
150
149
|
- Redefine a method created in one of the models by the included module
|
151
150
|
- Subclass a controller and update the routing to go to the subclass
|
152
|
-
- Place views in the app where
|
153
|
-
override the defaults
|
151
|
+
- Place views in the app where 🥑 expects them (`app/views/avocado`) to override
|
154
152
|
|
155
153
|
There is an `avocado:views` generator which will copy all the views as a
|
156
154
|
starting point for further modification.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "appraisal"
|
6
|
+
gem "capybara"
|
7
|
+
gem "combustion"
|
8
|
+
gem "factory_bot_rails"
|
9
|
+
gem "rake"
|
10
|
+
gem "rspec-rails"
|
11
|
+
gem "rubocop-rspec"
|
12
|
+
gem "shoulda-matchers"
|
13
|
+
gem "simplecov", require: false
|
14
|
+
gem "sqlite3", "~> 1.7"
|
15
|
+
gem "standard-performance"
|
16
|
+
gem "standard-rails"
|
17
|
+
gem "standard"
|
18
|
+
gem "rails", "~> 7.1.0"
|
19
|
+
|
20
|
+
gemspec path: "../"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "appraisal"
|
6
|
+
gem "capybara"
|
7
|
+
gem "combustion"
|
8
|
+
gem "factory_bot_rails"
|
9
|
+
gem "rake"
|
10
|
+
gem "rspec-rails"
|
11
|
+
gem "rubocop-rspec"
|
12
|
+
gem "shoulda-matchers"
|
13
|
+
gem "simplecov", require: false
|
14
|
+
gem "sqlite3", "~> 1.7"
|
15
|
+
gem "standard-performance"
|
16
|
+
gem "standard-rails"
|
17
|
+
gem "standard"
|
18
|
+
gem "rails", "~> 7.2.0"
|
19
|
+
|
20
|
+
gemspec path: "../"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "appraisal"
|
6
|
+
gem "capybara"
|
7
|
+
gem "combustion"
|
8
|
+
gem "factory_bot_rails"
|
9
|
+
gem "rake"
|
10
|
+
gem "rspec-rails"
|
11
|
+
gem "rubocop-rspec"
|
12
|
+
gem "shoulda-matchers"
|
13
|
+
gem "simplecov", require: false
|
14
|
+
gem "sqlite3", "~> 2.0"
|
15
|
+
gem "standard-performance"
|
16
|
+
gem "standard-rails"
|
17
|
+
gem "standard"
|
18
|
+
gem "rails", "~> 8.0.0.rc1"
|
19
|
+
|
20
|
+
gemspec path: "../"
|
data/lib/avocado/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avocado
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Jankowski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 7.1
|
33
|
+
version: '7.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 7.1
|
40
|
+
version: '7.1'
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- info@tcuwp.co
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- ".rspec"
|
49
49
|
- ".rubocop/rspec.yml"
|
50
50
|
- ".standard.yml"
|
51
|
+
- Appraisals
|
51
52
|
- CHANGELOG.md
|
52
53
|
- LICENSE.txt
|
53
54
|
- README.md
|
@@ -85,10 +86,14 @@ files:
|
|
85
86
|
- app/views/avocado/sessions/index.html.erb
|
86
87
|
- app/views/avocado/sessions/new.html.erb
|
87
88
|
- app/views/avocado/verifications/edit.html.erb
|
89
|
+
- avocado.gemspec
|
88
90
|
- config.ru
|
89
91
|
- config/locales/en.yml
|
90
92
|
- config/routes/avocado.rb
|
91
93
|
- docs/USAGE.md
|
94
|
+
- gemfiles/rails_7.1.gemfile
|
95
|
+
- gemfiles/rails_7.2.gemfile
|
96
|
+
- gemfiles/rails_8.0.gemfile
|
92
97
|
- lib/avocado.rb
|
93
98
|
- lib/avocado/authentication.rb
|
94
99
|
- lib/avocado/current.rb
|
@@ -112,9 +117,12 @@ homepage: https://github.com/tcuwp/avocado
|
|
112
117
|
licenses:
|
113
118
|
- MIT
|
114
119
|
metadata:
|
115
|
-
|
116
|
-
source_code_uri: https://github.com/tcuwp/avocado
|
120
|
+
bug_tracker_uri: https://github.com/tcuwp/avocado/issues
|
117
121
|
changelog_uri: https://github.com/tcuwp/avocado/blob/main/CHANGELOG.md
|
122
|
+
documentation_uri: https://github.com/tcuwp/avocado/blob/main/docs/USAGE.md
|
123
|
+
homepage_uri: https://github.com/tcuwp/avocado
|
124
|
+
source_code_uri: https://github.com/tcuwp/avocado/tree/main
|
125
|
+
wiki_uri: https://github.com/tcuwp/avocado/wiki
|
118
126
|
post_install_message:
|
119
127
|
rdoc_options: []
|
120
128
|
require_paths:
|
@@ -123,15 +131,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
131
|
requirements:
|
124
132
|
- - ">="
|
125
133
|
- !ruby/object:Gem::Version
|
126
|
-
version: 2.
|
134
|
+
version: 3.2.0
|
127
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
136
|
requirements:
|
129
137
|
- - ">="
|
130
138
|
- !ruby/object:Gem::Version
|
131
139
|
version: '0'
|
132
140
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
141
|
+
rubygems_version: 3.5.22
|
134
142
|
signing_key:
|
135
143
|
specification_version: 4
|
136
|
-
summary: Simple authentication for Rails
|
144
|
+
summary: Simple authentication for Rails applications
|
137
145
|
test_files: []
|