New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

early_bird

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

early_bird

  • 0.1.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

EarlyBird

A very simple Gem to add waitlist functionality to a WIP Rails app.

Future Features

I plan to add automated invite codes in the near future

Usage

Follow the installation instructions and you're good to go!

Installation

Add this line to your application's Gemfile:

gem "early_bird"

And then execute:

$ bundle

Or install it yourself as:

$ gem install early_bird

Then install the migrations:

$ bin/rails early_bird:install:migrations

And migrate the database:

$ bin/rails db:migrate

EarlyBird requires new and show views to be implemented in your app:

# app/views/early_bird/submissions/new.html.erb
<%= form_with(model: @submission) do |form| %>
  <%= form.email_field :email, placeholder: "Your email" %>
  <%= form.submit "Join the Waitlist" %>
<% end %>
# app/views/early_bird/submissions/show.html.erb
<p>Thank you! <%= @submission.email %> has been added to the waitlist!</p>

Then mount the engine in your routes.rb file:

mount EarlyBird::Engine => "/"

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):

class ApplicationController < ActionController::Base
  before_action :authenticate_user!

  private 

  def authenticate_user!
    http_basic_authenticate_with name: "dev", password: "secret"
  end
end

Contributing

Contributions welcome

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 29 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc