bullet_train 1.0.22 → 1.0.25
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/app/controllers/concerns/documentation_support.rb +8 -0
- data/app/controllers/concerns/invite_only_support.rb +19 -0
- data/app/controllers/concerns/root_redirect.rb +11 -0
- data/config/routes.rb +13 -0
- data/lib/bullet_train/version.rb +1 -1
- data/lib/bullet_train.rb +0 -1
- metadata +4 -16
- data/lib/tasks/release.rake +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f53e93d30c7a323663e913316ef0d2b705a052ab3f8f075e0ea25bcfb233f8ec
|
4
|
+
data.tar.gz: 8e33b7ca547682b3cc6b045167ecef56c133c15dd3b2e1996dd660af7871929b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a676d76f96eedefab979c6c6dd3b871351133fb799e0b0618748b2738831ab444e814ddfe3634cd19bd408ad844e43901eac091c836156039865e78618bb7b2
|
7
|
+
data.tar.gz: 9f99942b4e68d2a21468fd557edaf14796482f69b385e5b1115af71eabce415d5968d418bb29525da65fd6d88344665cc06d5b4c2e6de0549bba02e76a6b39a5
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module InviteOnlySupport
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
def invitation
|
5
|
+
return not_found unless invitation_only?
|
6
|
+
return not_found unless params[:key].present?
|
7
|
+
return not_found unless invitation_keys.include?(params[:key])
|
8
|
+
session[:invitation_key] = params[:key]
|
9
|
+
if user_signed_in?
|
10
|
+
redirect_to new_account_team_path
|
11
|
+
else
|
12
|
+
redirect_to new_user_registration_path
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def not_found
|
17
|
+
render file: "#{Rails.root}/public/404.html", layout: false, status: :not_found
|
18
|
+
end
|
19
|
+
end
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
+
scope module: "public" do
|
3
|
+
root to: "home#index"
|
4
|
+
get "invitation" => "home#invitation", :as => "invitation"
|
5
|
+
|
6
|
+
if Rails.env.production? ? ENV["ENABLE_DOCS"].present? : true
|
7
|
+
get "docs", to: "home#docs"
|
8
|
+
get "docs/*page", to: "home#docs"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
2
12
|
namespace :account do
|
3
13
|
shallow do
|
14
|
+
# TODO we need to either implement a dashboard or deprecate this.
|
15
|
+
root to: "dashboard#index", as: "dashboard"
|
16
|
+
|
4
17
|
resource :two_factor, only: [:create, :destroy]
|
5
18
|
|
6
19
|
# user-level onboarding tasks.
|
data/lib/bullet_train/version.rb
CHANGED
data/lib/bullet_train.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
@@ -122,20 +122,6 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: doorkeeper
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: possessive
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -387,7 +373,10 @@ files:
|
|
387
373
|
- app/controllers/concerns/account/users/controller_base.rb
|
388
374
|
- app/controllers/concerns/controllers/base.rb
|
389
375
|
- app/controllers/concerns/devise_current_attributes.rb
|
376
|
+
- app/controllers/concerns/documentation_support.rb
|
377
|
+
- app/controllers/concerns/invite_only_support.rb
|
390
378
|
- app/controllers/concerns/registrations/controller_base.rb
|
379
|
+
- app/controllers/concerns/root_redirect.rb
|
391
380
|
- app/controllers/concerns/sessions/controller_base.rb
|
392
381
|
- app/controllers/registrations_controller.rb
|
393
382
|
- app/controllers/sessions_controller.rb
|
@@ -523,7 +512,6 @@ files:
|
|
523
512
|
- lib/bullet_train/engine.rb
|
524
513
|
- lib/bullet_train/version.rb
|
525
514
|
- lib/tasks/bullet_train_tasks.rake
|
526
|
-
- lib/tasks/release.rake
|
527
515
|
homepage: https://github.com/bullet-train-co/bullet_train
|
528
516
|
licenses:
|
529
517
|
- MIT
|