bullet_train 1.0.22 → 1.0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8a4d21291eb07acbecfc3997e069ae0403bb33cfaa259a43ef9cf1b65f4403e
4
- data.tar.gz: 9647a22cfa1758bcf7977922f01ded2eeaccc3fe384ad1f984217deaf6b00b87
3
+ metadata.gz: f53e93d30c7a323663e913316ef0d2b705a052ab3f8f075e0ea25bcfb233f8ec
4
+ data.tar.gz: 8e33b7ca547682b3cc6b045167ecef56c133c15dd3b2e1996dd660af7871929b
5
5
  SHA512:
6
- metadata.gz: 710d164f2b91e3485f3f9a14f26e840fbd15d096637d09869aab580b65c3005001ff16a26a935fbf698c9761af7ade10b2c2184da065185c06839b12059ff207
7
- data.tar.gz: 6beb1cd993f15c4e45757f5dac8f8479fee071c527652d28e73a4f2f9a9a7402a778f30f70efe41542586df070cc77b90802194b9dc501164b3c6e05f4467bfb
6
+ metadata.gz: 8a676d76f96eedefab979c6c6dd3b871351133fb799e0b0618748b2738831ab444e814ddfe3634cd19bd408ad844e43901eac091c836156039865e78618bb7b2
7
+ data.tar.gz: 9f99942b4e68d2a21468fd557edaf14796482f69b385e5b1115af71eabce415d5968d418bb29525da65fd6d88344665cc06d5b4c2e6de0549bba02e76a6b39a5
@@ -0,0 +1,8 @@
1
+ module DocumentationSupport
2
+ extend ActiveSupport::Concern
3
+
4
+ def docs
5
+ @file = params[:page].presence || "index"
6
+ render :docs, layout: "docs"
7
+ end
8
+ end
@@ -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
@@ -0,0 +1,11 @@
1
+ module RootRedirect
2
+ extend ActiveSupport::Concern
3
+
4
+ def index
5
+ if ENV["MARKETING_SITE_URL"]
6
+ redirect_to ENV["MARKETING_SITE_URL"]
7
+ else
8
+ redirect_to new_user_session_path
9
+ end
10
+ end
11
+ 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.
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.0.22"
2
+ VERSION = "1.0.25"
3
3
  end
data/lib/bullet_train.rb CHANGED
@@ -11,7 +11,6 @@ require "devise"
11
11
  # require "devise-two-factor"
12
12
  # require "rqrcode"
13
13
  require "cancancan"
14
- require "doorkeeper"
15
14
  require "possessive"
16
15
  require "sidekiq"
17
16
  require "fastimage"
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.22
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
@@ -1,8 +0,0 @@
1
- desc "Cut a release."
2
- task :release do
3
- puts `bump patch`
4
- puts `gem build`
5
- puts `gem push *.gem`
6
- puts `rm *.gem`
7
- puts `git push origin main`
8
- end