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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11a2fe291571c28805e17591fb53da82eaa775691bc402299fd8ddac2a501863
4
- data.tar.gz: f57f2c41713fdf1ead723ed5a51953589040d482994bf080f921abd19b290133
3
+ metadata.gz: 68ebd78a76a935c5f2044e05b0f793ec08541ea615f02b0f159d8a25a340ccf9
4
+ data.tar.gz: 7bfe75352d5e53b1ae722df0eee40b690bcef95a920dbdf69be8f9c53927bbf3
5
5
  SHA512:
6
- metadata.gz: 94f5c6384a03a83f1138b5f688cc36f0c986eb12ef4d72a6edb0b52aaa9ed8cf6211dc11ef4cd1855bc1199d50d87d5eb2f406e693ef25090310e6152d3607ea
7
- data.tar.gz: 33ea58143db1c5e695588cca8993d0b8d9760700f73c0e2fa68b0bc104bfea72efccf118c042b7f0e12397fbc118ed18f59c7491f2022d51b56eb1af8b5e45b1
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 both new and show views:
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
- And (optionally) prevent access to the rest of the app while you're building it:
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
- http_basic_authenticate_with name: "dev", password: "secret"
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
 
@@ -1,4 +1,3 @@
1
- module EarlyBird
2
- class ApplicationController < ActionController::Base
3
- end
1
+ class EarlyBird::ApplicationController < ::ApplicationController
2
+ skip_before_action :authenticate_user!
4
3
  end
@@ -1,3 +1,3 @@
1
1
  module EarlyBird
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
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.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-28 00:00:00.000000000 Z
11
+ date: 2023-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails