avocado 0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e32ef0766b1e70a3d4946f2d512acc59e5fe7d08e7166a751dbb3e5eacc35b41
4
+ data.tar.gz: a822265796d94d9e5d4174894f6a7dea7bf7d845d0ac78eb65686a4ecab7f3cd
5
+ SHA512:
6
+ metadata.gz: 4f3c42f3873e26eec8f11047b5fd5bbf885ccc4dd350aea52f872b3d869dd19917ff24c71a0989fbf1d7a547388a0ddd578ea0cb05eaacb12b8d6962cfb99af7
7
+ data.tar.gz: f3b23cc9b7df23daabe61e9143aea880bd4183b47126c5bea515df271896c42498513add9776eff8c73302f95c3f6097f5acbc9ff360f9c77508817bf1cb56c9
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,11 @@
1
+ require:
2
+ - rubocop-rspec
3
+
4
+ RSpec:
5
+ Enabled: true
6
+
7
+ RSpec/MultipleExpectations:
8
+ Enabled: false
9
+
10
+ RSpec/ExampleLength:
11
+ Enabled: false
data/.standard.yml ADDED
@@ -0,0 +1,6 @@
1
+ parallel: true
2
+ plugins:
3
+ - standard-performance
4
+ - standard-rails
5
+ extend_config:
6
+ - .rubocop/rspec.yml
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-07-14
4
+
5
+ - Initial release
6
+ - Add `Avocado::UserConcern` which calls `has_secure_password`
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Matt Jankowski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # Avocado
2
+
3
+ A collection of authentication tools for use in [Rails] 7.1+ applications.
4
+
5
+ ## Installation
6
+
7
+ With bundler, add to the application's Gemfile by executing:
8
+
9
+ $ bundle add avocado
10
+
11
+ Without bundler, install the gem by executing:
12
+
13
+ $ gem install avocado
14
+
15
+ ## Usage
16
+
17
+ If you have a `User` model in your application and are nervous about using Rails
18
+ features directly, preferring to consume the features via a packaged gem, you
19
+ can use the Rails `has_secure_password` feature in a more convoluted way, by
20
+ adding the `Avocado::UserConcern` to your `User` model:
21
+
22
+ ```ruby
23
+ class User < ApplicationRecord
24
+ include Avocado::UserConcern
25
+ end
26
+ ```
27
+
28
+ Note that behind the scenes this is truly just calling `has_secure_password` for
29
+ you and doing nothing else. It's sort of funny to do this.
30
+
31
+ ## Development
32
+
33
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
34
+ `rake spec` to run the tests. You can also run `bin/console` for an interactive
35
+ prompt that will allow you to experiment.
36
+
37
+ To install this gem onto your local machine, run `bundle exec rake install`. To
38
+ release a new version, update the version number in `version.rb`, and then run
39
+ `bundle exec rake release`, which will create a git tag for the version, push
40
+ git commits and the created tag, and push the `.gem` file to [RubyGems].
41
+
42
+ ## Contributing
43
+
44
+ Bug reports and pull requests are welcome on [GitHub].
45
+
46
+ ## License
47
+
48
+ The gem is available as open source under the terms of the [MIT License].
49
+
50
+ [GitHub]: https://github.com/unicorngroomers/avocado
51
+ [MIT License]: https://opensource.org/licenses/MIT
52
+ [Rails]: https://github.com/rails/rails
53
+ [RubyGems]: https://rubygems.org
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "standard/rake"
9
+
10
+ task default: %i[spec standard]
data/config.ru ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubygems"
4
+ require "bundler"
5
+
6
+ Bundler.require :default, :development
7
+
8
+ Combustion.initialize! :all
9
+ run Combustion::Application
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/concern"
4
+
5
+ module Avocado
6
+ module UserConcern
7
+ extend ActiveSupport::Concern
8
+
9
+ included do
10
+ has_secure_password
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avocado
4
+ VERSION = "0.1.0"
5
+ end
data/lib/avocado.rb ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "avocado/version"
4
+ require_relative "avocado/user_concern"
5
+
6
+ module Avocado
7
+ class Error < StandardError; end
8
+ end
data/sig/avocado.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Avocado
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,114 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: avocado
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Matt Jankowski
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-07-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bcrypt
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 7.1.0.alpha
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 7.1.0.alpha
41
+ - !ruby/object:Gem::Dependency
42
+ name: combustion
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: sqlite3
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description:
70
+ email:
71
+ - matt@jankowski.online
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".rspec"
77
+ - ".rubocop/rspec.yml"
78
+ - ".standard.yml"
79
+ - CHANGELOG.md
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - config.ru
84
+ - lib/avocado.rb
85
+ - lib/avocado/user_concern.rb
86
+ - lib/avocado/version.rb
87
+ - sig/avocado.rbs
88
+ homepage: https://github.com/unicorngroomers/avocado
89
+ licenses:
90
+ - MIT
91
+ metadata:
92
+ homepage_uri: https://github.com/unicorngroomers/avocado
93
+ source_code_uri: https://github.com/unicorngroomers/avocado
94
+ changelog_uri: https://github.com/unicorngroomers/avocado/blob/main/CHANGELOG.md
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 2.6.0
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ requirements: []
110
+ rubygems_version: 3.4.15
111
+ signing_key:
112
+ specification_version: 4
113
+ summary: Simple authentication for Rails (7.1+) applications
114
+ test_files: []