cow_auth 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08bc282855f351e65f119c983bd016fe5d1e1bd25e12ba949022ef07c04df8a6'
4
- data.tar.gz: 7fc1a92f50a815fa7f534f24129f032bbaa0f741d2118977a03ff50daf341bb4
3
+ metadata.gz: 5287296159ba0b9e6768102d3efda06d2622072a10b04ad3a1dbcd276e276a39
4
+ data.tar.gz: 8b1b885c4689735f6af90fbbd8156f0ecc646194fa7733d3a6262d2a4cbefec2
5
5
  SHA512:
6
- metadata.gz: 1b499e57597af0995b6aabd9f9184f666b102d32ca6e5cbb067ca7ee2dc6649d0f67cb223fb1fcb97c25f2ca4adaca836e76d1185016612fa0e276b328dc5e60
7
- data.tar.gz: 8a1ac0b95249ab9f286554cb735feaef539c8bb70beb0ce180a12e4e40283e6ab4a27eaa472506cffc03f6791aaf3ac9c85d7737f0892628e8a45588b946d68c
6
+ metadata.gz: 3fc07060b931733576d1acf0358f90fc7c6274e974d6833854da995dc074fcb007d714a4a9d168e8778ee72d1aee7f032428784b763ae7b7334fa63cbd2b3448
7
+ data.tar.gz: 2272403f84cf980a3603e74943d24e37408d91e771ac658c7aedc8fdda48263019c008431eca3ea4adfa975d3e3fde83ce350be5872e5441c7267134fef6aba1
data/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
+
5
+ ## [Unreleased]
6
+
7
+ - OAuth
8
+
9
+ ## [0.8.0] - 2022-10-04
10
+
11
+ ### Changed
12
+
13
+ - Update dependencies.
14
+ - Regenerate project files.
data/CODE_OF_CONDUCT.md CHANGED
@@ -2,73 +2,83 @@
2
2
 
3
3
  ## Our Pledge
4
4
 
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
11
8
 
12
9
  ## Our Standards
13
10
 
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
11
+ Examples of behavior that contributes to a positive environment for our community include:
16
12
 
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
22
18
 
23
- Examples of unacceptable behavior by participants include:
19
+ Examples of unacceptable behavior include:
24
20
 
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
28
24
  * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
31
27
  * Other conduct which could reasonably be considered inappropriate in a
32
28
  professional setting
33
29
 
34
- ## Our Responsibilities
30
+ ## Enforcement Responsibilities
35
31
 
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
39
33
 
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
45
35
 
46
36
  ## Scope
47
37
 
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
54
39
 
55
40
  ## Enforcement
56
41
 
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at mickey@cowden.tech. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at mickey@cowden.tech. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
63
59
 
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
67
73
 
68
74
  ## Attribution
69
75
 
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [https://contributor-covenant.org/version/1/4][version]
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
72
82
 
73
- [homepage]: https://contributor-covenant.org
74
- [version]: https://contributor-covenant.org/version/1/4/
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile CHANGED
@@ -3,5 +3,6 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in cow_auth.gemspec
4
4
  gemspec
5
5
 
6
- gem 'rake', '~> 12.0'
6
+ gem 'rake', '~> 13.0'
7
+
7
8
  gem 'minitest', '~> 5.0'
data/Gemfile.lock CHANGED
@@ -1,38 +1,36 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cow_auth (0.7.1)
5
- activerecord (~> 6.0)
4
+ cow_auth (0.8.0)
5
+ activerecord (~> 7.0)
6
6
  scrypt (~> 3.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (6.1.3)
12
- activesupport (= 6.1.3)
13
- activerecord (6.1.3)
14
- activemodel (= 6.1.3)
15
- activesupport (= 6.1.3)
16
- activesupport (6.1.3)
11
+ activemodel (7.0.4)
12
+ activesupport (= 7.0.4)
13
+ activerecord (7.0.4)
14
+ activemodel (= 7.0.4)
15
+ activesupport (= 7.0.4)
16
+ activesupport (7.0.4)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
20
20
  tzinfo (~> 2.0)
21
- zeitwerk (~> 2.3)
22
- concurrent-ruby (1.1.8)
23
- ffi (1.15.0)
21
+ concurrent-ruby (1.1.10)
22
+ ffi (1.15.5)
24
23
  ffi-compiler (1.0.1)
25
24
  ffi (>= 1.0.0)
26
25
  rake
27
- i18n (1.8.9)
26
+ i18n (1.12.0)
28
27
  concurrent-ruby (~> 1.0)
29
- minitest (5.14.4)
30
- rake (12.3.3)
28
+ minitest (5.16.3)
29
+ rake (13.0.6)
31
30
  scrypt (3.0.7)
32
31
  ffi-compiler (>= 1.0, < 2.0)
33
- tzinfo (2.0.4)
32
+ tzinfo (2.0.5)
34
33
  concurrent-ruby (~> 1.0)
35
- zeitwerk (2.4.2)
36
34
 
37
35
  PLATFORMS
38
36
  ruby
@@ -40,7 +38,7 @@ PLATFORMS
40
38
  DEPENDENCIES
41
39
  cow_auth!
42
40
  minitest (~> 5.0)
43
- rake (~> 12.0)
41
+ rake (~> 13.0)
44
42
 
45
43
  BUNDLED WITH
46
- 2.2.15
44
+ 2.3.22
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Mickey Cowden
3
+ Copyright (c) 2022 Mickey Cowden
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -26,12 +26,12 @@ Configure your user model to add the authentication mechanism.
26
26
 
27
27
  #### Generator (Example)
28
28
 
29
- $ bundle exec rails generate model user uuid:string:uniq email:string:uniq sid:string:uniq encrypted_password:string locale:string first_name:string last_name:string sign_in_count:integer is_enabled:boolean is_deleted:boolean
29
+ $ bundle exec rails generate model user uuid:string:uniq email:string:uniq sid:string:uniq locale:string encrypted_password:string auth_token:string first_name:string last_name:string sign_in_count:integer is_enabled:boolean is_deleted:boolean expires_at:timestamp
30
30
 
31
31
  #### Migration (Example)
32
32
 
33
33
  # Modified migration; includes indexes and other stuff you might not want.
34
- class CreateUsers < ActiveRecord::Migration[6.0]
34
+ class CreateUsers < ActiveRecord::Migration[7.0]
35
35
  def change
36
36
  create_table :users do |t|
37
37
  t.string :uuid, null: false
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/testtask'
4
4
  Rake::TestTask.new(:test) do |t|
5
5
  t.libs << 'test'
6
6
  t.libs << 'lib'
7
- t.test_files = FileList['test/**/*_test.rb']
7
+ t.test_files = FileList['test/**/test_*.rb']
8
8
  end
9
9
 
10
10
  task default: :test
@@ -1,3 +1,3 @@
1
1
  module CowAuth
2
- VERSION = '0.7.1'
2
+ VERSION = '0.8.0'
3
3
  end
data/lib/cow_auth.rb CHANGED
@@ -1,12 +1,14 @@
1
- require 'cow_auth/version'
2
- require 'cow_auth/user'
3
- require 'cow_auth/exceptions'
4
- require 'cow_auth/session_auth/session_endpoints'
5
- require 'cow_auth/session_auth/authenticate_request'
6
- require 'cow_auth/token_auth/session_endpoints'
7
- require 'cow_auth/token_auth/authenticate_request'
1
+ require_relative 'cow_auth/version'
2
+ require_relative 'cow_auth/user'
3
+ require_relative 'cow_auth/exceptions'
4
+ require_relative 'cow_auth/session_auth/session_endpoints'
5
+ require_relative 'cow_auth/session_auth/authenticate_request'
6
+ require_relative 'cow_auth/token_auth/session_endpoints'
7
+ require_relative 'cow_auth/token_auth/authenticate_request'
8
8
 
9
9
  module CowAuth
10
+ class Error < StandardError; end
11
+
10
12
  def self.moo
11
13
  puts 'Moo Cow: ' + CowAuth::VERSION
12
14
  return CowAuth::User.new
data/sig/cow_auth.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module CowAuth
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cow_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickey Cowden
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-23 00:00:00.000000000 Z
11
+ date: 2022-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
19
+ version: '7.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: '6.0'
26
+ version: '7.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: scrypt
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -46,17 +46,13 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - ".gitignore"
50
- - ".travis.yml"
49
+ - CHANGELOG.md
51
50
  - CODE_OF_CONDUCT.md
52
51
  - Gemfile
53
52
  - Gemfile.lock
54
53
  - LICENSE.txt
55
54
  - README.md
56
55
  - Rakefile
57
- - bin/console
58
- - bin/setup
59
- - cow_auth.gemspec
60
56
  - lib/cow_auth.rb
61
57
  - lib/cow_auth/exceptions.rb
62
58
  - lib/cow_auth/session_auth/authenticate_request.rb
@@ -65,6 +61,7 @@ files:
65
61
  - lib/cow_auth/token_auth/session_endpoints.rb
66
62
  - lib/cow_auth/user.rb
67
63
  - lib/cow_auth/version.rb
64
+ - sig/cow_auth.rbs
68
65
  homepage: https://github.com/mickey13/cow-auth
69
66
  licenses:
70
67
  - MIT
@@ -80,14 +77,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
77
  requirements:
81
78
  - - ">="
82
79
  - !ruby/object:Gem::Version
83
- version: 2.3.0
80
+ version: 2.6.0
84
81
  required_rubygems_version: !ruby/object:Gem::Requirement
85
82
  requirements:
86
83
  - - ">="
87
84
  - !ruby/object:Gem::Version
88
85
  version: '0'
89
86
  requirements: []
90
- rubygems_version: 3.2.15
87
+ rubygems_version: 3.3.22
91
88
  signing_key:
92
89
  specification_version: 4
93
90
  summary: Authentication gem
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.7.1
6
- before_install: gem install bundler -v 2.1.4
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'cow_auth'
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require 'pry'
11
- # Pry.start
12
-
13
- require 'irb'
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/cow_auth.gemspec DELETED
@@ -1,30 +0,0 @@
1
- require_relative 'lib/cow_auth/version'
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = 'cow_auth'
5
- spec.version = CowAuth::VERSION
6
- spec.authors = ['Mickey Cowden']
7
- spec.email = ['mickey@cowden.tech']
8
-
9
- spec.summary = 'Authentication gem'
10
- spec.description = 'The goal of this gem is to provide token-based authentication for Rails (or Rails-like) web applications.'
11
- spec.homepage = 'https://github.com/mickey13/cow-auth'
12
- spec.license = 'MIT'
13
- spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
14
-
15
- spec.metadata['homepage_uri'] = spec.homepage
16
- spec.metadata['source_code_uri'] = spec.homepage
17
- spec.metadata['changelog_uri'] = spec.homepage
18
-
19
- # Specify which files should be added to the gem when it is released.
20
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
22
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
- end
24
- spec.bindir = 'exe'
25
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
- spec.require_paths = ['lib']
27
-
28
- spec.add_runtime_dependency 'activerecord', '~> 6.0'
29
- spec.add_runtime_dependency 'scrypt', '~> 3.0'
30
- end