forked from benbalter/add-to-org-demo
-
Notifications
You must be signed in to change notification settings - Fork 5
/
my_app.rb
20 lines (17 loc) · 1.08 KB
/
my_app.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'add-to-org'
# Optional: Uncomment the final line to use your own views folder
# (e.g., for serving custom ERB templates from `./views`). For more
# information see https://github.com/benbalter/add-to-org#customizing-views.
# AddToOrg.views_dir = File.expand_path("./views", File.dirname(__FILE__))
# Optional: Uncomment the final line to use your own public folder
# (e.g., for static assets from `./public`). For more information see
# https://github.com/benbalter/add-to-org#customizing-static-assets.
# AddToOrg.public_dir = File.expand_path("./public", File.dirname(__FILE__))
# Required: Define your custom validation logic here. You can add additional gems
# to your Gemfile and require them above, e.g., GMan, for advanced functionality.
# The Proc/Block/Lambda will be provided three optional arguments. see
# https://github.com/benbalter/add-to-org#customizing-the-validator for
# additional information on how to configure the validation logic.
AddToOrg.set_validator do |github_user, verified_emails, client|
verified_emails.any? { |email| email[:email] =~ /@github\.com\z/ }
end