early_bird 0.1.1 → 0.1.3
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/README.md +12 -3
- data/app/controllers/early_bird/application_controller.rb +2 -3
- data/lib/early_bird/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68ebd78a76a935c5f2044e05b0f793ec08541ea615f02b0f159d8a25a340ccf9
|
4
|
+
data.tar.gz: 7bfe75352d5e53b1ae722df0eee40b690bcef95a920dbdf69be8f9c53927bbf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 186ad4bd6ca357cc972ea61bbdf80d5c03ced9f4fa4d2b1519a43039e7915223585b510d4b01dbc135b4999e7cfcc0a2f972429c22306a504659f77d806c0d11
|
7
|
+
data.tar.gz: b75fa440bd0c21ba19fe36b580b167cf7a527e47b4623dc70a9ec615916ea51a878ee94c6dbe650e39c782d02fc4fe17e719bb331d22ab68024a93e1419ddfd0
|
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
A very simple Gem to add waitlist functionality to a WIP Rails app.
|
4
4
|
|
5
|
+
## Future Features
|
6
|
+
I plan to add automated invite codes in the near future
|
7
|
+
|
5
8
|
## Usage
|
6
9
|
Follow the installation instructions and you're good to go!
|
7
10
|
|
@@ -32,7 +35,7 @@ And migrate the database:
|
|
32
35
|
$ bin/rails db:migrate
|
33
36
|
```
|
34
37
|
|
35
|
-
EarlyBird requires
|
38
|
+
EarlyBird requires new and show views to be implemented in your app:
|
36
39
|
```ruby
|
37
40
|
# app/views/early_bird/submissions/new.html.erb
|
38
41
|
<%= form_with(model: @submission) do |form| %>
|
@@ -51,10 +54,16 @@ Then mount the engine in your routes.rb file:
|
|
51
54
|
mount EarlyBird::Engine => "/"
|
52
55
|
```
|
53
56
|
|
54
|
-
|
57
|
+
In your application_controller.rb file, define an `authenticate_user!` method, which EarlyBird skips (to allow access to the waitlist while preventing access to the rest of the app):
|
55
58
|
```ruby
|
56
59
|
class ApplicationController < ActionController::Base
|
57
|
-
|
60
|
+
before_action :authenticate_user!
|
61
|
+
|
62
|
+
private
|
63
|
+
|
64
|
+
def authenticate_user!
|
65
|
+
http_basic_authenticate_with name: "dev", password: "secret"
|
66
|
+
end
|
58
67
|
end
|
59
68
|
```
|
60
69
|
|
data/lib/early_bird/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: early_bird
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carl Dawson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|