simple_teams 0.1.0 → 0.1.2

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: 7f626da6c44a20f9b042cea11e321034ddaea542c5a96504017c309850d67bdb
4
- data.tar.gz: 5c8bc35a2bbd95fc017ce9e427197cc962bb7118096de9675ca8980cfec0d79c
3
+ metadata.gz: da8068e7298920ff8cce86d505171c99e7e9c37a0dea9423f0847fd28440b455
4
+ data.tar.gz: 7806782011712e2964aeec5d9031e30bc5d4190177e66bd16bafab5aa273e14c
5
5
  SHA512:
6
- metadata.gz: 7012cf09146fa7e7f5c2b86835baf11db9a72d26194cc1125021980aa65567d66fd56a37e7d668634a9989e3665fddad1ea773d1572f37e8a110d50cf8d8c872
7
- data.tar.gz: 4e69cb8dab76dc70b37171e043d89c877daa75d2389c2757a62e85311d6143b8df3d85a6164a232550b368bc46b95979ca625147be109d249d7f9df0e1dd0fe2
6
+ metadata.gz: 387bf7830fbc9badf2b076ae56c7190a2af366aa7e1633fcfb1d39441c3280c6507e22b783e2150e6646c7d9551b440d309109c9644e2b7b4412734050df2e8c
7
+ data.tar.gz: 17401c280915409b8128d13d24492a23916f6fd422f11ae59ff036c7afe0c7efd7c0b68de4734ce5231dc0f54235c40d1ac0b25ac443b493691685f862268ac3
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2024 Laney Stroup
1
+ Copyright 2024 Thomas Laney Stroup
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,25 +1,14 @@
1
+ # WARNING:
2
+ This gem is a work in progress. If you like what we are doing, feel free to watch it for updates, but please do not attempt to use it in production.
3
+
1
4
  # SimpleTeams
2
- Short description and motivation.
5
+ SimpleTeams is an all-in-one solution for implementing teams quickly in a Ruby on Rails (RoR) application. It follows best practices, using the Rails Engine design pattern for easy configurability, CanCan for authorization, and polymorphic association (like ActiveStorage) to avoid dictating model names.
3
6
 
4
7
  ## Usage
5
- How to use my plugin.
8
+ Pending...
6
9
 
7
10
  ## Installation
8
- Add this line to your application's Gemfile:
9
-
10
- ```ruby
11
- gem "simple_teams"
12
- ```
13
-
14
- And then execute:
15
- ```bash
16
- $ bundle
17
- ```
18
-
19
- Or install it yourself as:
20
- ```bash
21
- $ gem install simple_teams
22
- ```
11
+ Pending...
23
12
 
24
13
  ## Contributing
25
14
  Contribution directions go here.
@@ -21,7 +21,7 @@ module SimpleTeams
21
21
  scope :unexpired, -> { where("? <= expires_at", Time.now) }
22
22
 
23
23
  # enums
24
- enum :role, [:member, :administrator, :owner]
24
+ enum :role, SimpleTeams.roles
25
25
  enum :status, [:initial, :accepted, :declined]
26
26
 
27
27
  def expired?
@@ -4,7 +4,7 @@ module SimpleTeams
4
4
  belongs_to :member, :class_name => SimpleTeams.member_class.to_s
5
5
  has_one :invitation, :dependent => :nullify
6
6
 
7
- enum :role, [:member, :administrator, :owner]
7
+ enum :role, SimpleTeams.roles
8
8
 
9
9
  validates_presence_of :role
10
10
 
@@ -6,6 +6,7 @@ module SimpleTeams
6
6
  mattr_accessor :member_class
7
7
  mattr_accessor :parent_controller
8
8
  mattr_accessor :layout
9
+ mattr_accessor :roles
9
10
 
10
11
  def self.member_class
11
12
  (@@member_class || "User").constantize
@@ -19,4 +20,8 @@ module SimpleTeams
19
20
  (@@layout || "simple_teams/application")
20
21
  end
21
22
 
23
+ def self.roles
24
+ (@@roles || [:member, :administrator, :owner])
25
+ end
26
+
22
27
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleTeams
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_teams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
- - Laney Stroup
7
+ - Thomas Laney Stroup
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
@@ -130,14 +130,14 @@ files:
130
130
  - lib/simple_teams/engine.rb
131
131
  - lib/simple_teams/version.rb
132
132
  - lib/tasks/simple_teams_tasks.rake
133
- homepage: https://github.com/laneystroup/simple_teams
133
+ homepage: https://github.com/strouptl/simple_teams
134
134
  licenses:
135
135
  - MIT
136
136
  metadata:
137
137
  allowed_push_host: https://rubygems.org
138
- homepage_uri: https://github.com/laneystroup/simple_teams
139
- source_code_uri: https://github.com/laneystroup/simple_teams
140
- changelog_uri: https://github.com/laneystroup/simple_teams/CHANGELOG.md
138
+ homepage_uri: https://github.com/strouptl/simple_teams
139
+ source_code_uri: https://github.com/strouptl/simple_teams
140
+ changelog_uri: https://github.com/strouptl/simple_teams/blob/main/CHANGELOG.md
141
141
  post_install_message:
142
142
  rdoc_options: []
143
143
  require_paths: