simple_teams 0.1.0 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +6 -17
- data/app/controllers/simple_teams/related_members_controller.rb +2 -2
- data/app/models/simple_teams/invitation.rb +1 -1
- data/app/models/simple_teams/membership.rb +1 -1
- data/lib/simple_teams/engine.rb +5 -0
- data/lib/simple_teams/version.rb +1 -1
- metadata +7 -7
- /data/app/views/simple_teams/{teams_mailer → mailer}/invitation_notification.html.erb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acdf88bfe936ac559c9454125c3219d9eba2e9a8d029cda43ac7d749231ac273
|
4
|
+
data.tar.gz: 5eb9a31ff2ab4a078e086c80396ad822f0baf718823de36ca3927290ea1b3a2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5dc54ba9215f56f8161b8b22e7e1b110f5e3a73a74be7ed3e57460dc119e38d1bc323c99e21b7ffa92413a942e05144d13892fc9693da96142b0dcbea969326
|
7
|
+
data.tar.gz: c345c9fc4fcbedbf30055ff8af61b48751badceebccfd1b36921a08b038c65757f90088fb41032226ea09e9510896e43fa2c968ef30e192decee50cb31dd9ccd
|
data/MIT-LICENSE
CHANGED
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
|
-
|
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
|
-
|
8
|
+
Pending...
|
6
9
|
|
7
10
|
## Installation
|
8
|
-
|
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.
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module SimpleTeams
|
2
|
-
class
|
2
|
+
class RelatedMembersController < ApplicationController
|
3
3
|
|
4
4
|
def index
|
5
5
|
if params[:term].present?
|
6
6
|
@members = SimpleTeams.member_class
|
7
7
|
.joins(:team_memberships, :teams)
|
8
|
-
.where("
|
8
|
+
.where("simple_teams_teams.id" => current_user.teams.pluck(:id))
|
9
9
|
.where("email ilike ?", "%#{params[:term]}%")
|
10
10
|
.order("#{SimpleTeams.member_class.table_name}.first_name")
|
11
11
|
.uniq
|
data/lib/simple_teams/engine.rb
CHANGED
@@ -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
|
data/lib/simple_teams/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.3
|
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: []
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- app/views/simple_teams/invitations/edit.html.erb
|
113
113
|
- app/views/simple_teams/invitations/new.html.erb
|
114
114
|
- app/views/simple_teams/leave_teams/edit.html.erb
|
115
|
+
- app/views/simple_teams/mailer/invitation_notification.html.erb
|
115
116
|
- app/views/simple_teams/memberships/_form.html.erb
|
116
117
|
- app/views/simple_teams/memberships/_membership.html.erb
|
117
118
|
- app/views/simple_teams/memberships/edit.html.erb
|
@@ -120,7 +121,6 @@ files:
|
|
120
121
|
- app/views/simple_teams/teams/_add_member_link.html.erb
|
121
122
|
- app/views/simple_teams/teams/_members_table.html.erb
|
122
123
|
- app/views/simple_teams/teams/show.html.erb
|
123
|
-
- app/views/simple_teams/teams_mailer/invitation_notification.html.erb
|
124
124
|
- config/locales/simple_teams.en.yml
|
125
125
|
- config/routes.rb
|
126
126
|
- db/migrate/20240311052758_create_simple_teams_teams.rb
|
@@ -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/
|
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/
|
139
|
-
source_code_uri: https://github.com/
|
140
|
-
changelog_uri: https://github.com/
|
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:
|
File without changes
|