bullet_train-api 1.2.27 → 1.3.1

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: 45134d698bbcd0ba4d11ee47fc1b6f47d9c73230dfefebd6256900c478c6ca48
4
- data.tar.gz: 5fa310cfd48d7ec513da2c75e8c459873182e778d8ec2c8d275d7bcff08147f4
3
+ metadata.gz: b7a1446b4db34fee41db5dbe0c54996b74e47440b1f48c36099824e4211cda72
4
+ data.tar.gz: 6a97d2ff864a65dff67c31db1fee4d745812cc086fe3cfa6b24fd98b72e479d6
5
5
  SHA512:
6
- metadata.gz: 4736cf493e57c8364997d468ad194e9acb950df4d9b156c79e2064a9d15a9fc1a2ee4de01ba269227abcc8766743edaab018912a02875339999e1a0f7cf0a4c4
7
- data.tar.gz: c7cd01b6fdb8c54d4009ff7b53106db505fe60c9fa8ef2f6ecd53dc52c55c14a59e7ec5aaf16dfeb1019c0b4ade3d98612e74d69bb4e9cae5f6fa7be86adf604
6
+ metadata.gz: d7256dbde69cb5eb0b23a20501e5db04a374f42a2598fbe757749baf071fad5a5c06994d30c2ed4c380ab160e1196e055abf922d18da927a2a0c5126f785c389
7
+ data.tar.gz: 6bc7e7c9a907bce8f19b7dec41f281387ac7d0c7449678294cfdf84c4ab26c13a14c33fbc802994b3e098938cc89beaddff836398a9da55d35bbf91225ccc1f6
@@ -72,7 +72,6 @@ module Api::Controllers::Base
72
72
  end
73
73
 
74
74
  # TODO Remove this rescue once workspace clusters can write to this column on the identity server.
75
- # TODO Make this logic configurable so that downstream developers can write different methods for this column getting updated.
76
75
  if doorkeeper_token
77
76
  begin
78
77
  doorkeeper_token.update(last_used_at: Time.zone.now)
@@ -14,7 +14,10 @@ module Api::V1::Users::ControllerBase
14
14
  :first_name,
15
15
  :last_name,
16
16
  :time_zone,
17
- :locale
17
+ :locale,
18
+ :profile_photo_id, # For Cloudinary
19
+ :profile_photo, # For ActiveStorage
20
+ :profile_photo_removal
18
21
  ]
19
22
 
20
23
  selected_fields = if params.is_a?(BulletTrain::Api::StrongParametersReporter)
@@ -38,7 +38,7 @@ module Api
38
38
  output += render(custom_actions_file_path) if lookup_context.exists?(custom_actions_file_path, [], true)
39
39
 
40
40
  # There are some placeholders specific to this method that we still need to transform.
41
- model_symbol = model.name.underscore.tr("/", "_")
41
+ model_symbol = model.name.underscore.tr("/", "_").to_sym
42
42
 
43
43
  if (get_example = FactoryBot.get_example(model_symbol, version: @version))
44
44
  output.gsub!("🚅 get_example", get_example)
@@ -1,4 +1,4 @@
1
- class Platform::AccessToken < ApplicationRecord
1
+ class Platform::AccessToken < BulletTrain::Api.base_class.constantize
2
2
  self.table_name = "oauth_access_tokens"
3
3
 
4
4
  include Doorkeeper::Orm::ActiveRecord::Mixins::AccessToken
@@ -1,4 +1,4 @@
1
- class Platform::Application < ApplicationRecord
1
+ class Platform::Application < BulletTrain::Api.base_class.constantize
2
2
  self.table_name = "oauth_applications"
3
3
 
4
4
  include Doorkeeper::Orm::ActiveRecord::Mixins::Application
@@ -8,7 +8,7 @@
8
8
  <% pagy, access_tokens = pagy(access_tokens, page_param: :access_tokens_page) %>
9
9
 
10
10
  <%= action_model_select_controller do %>
11
- <%= updates_for context, collection do %>
11
+ <%= cable_ready_updates_for context, collection do %>
12
12
  <%= render 'account/shared/box', pagy: pagy do |box| %>
13
13
  <% box.title t(".contexts.#{context.class.name.underscore}.header") %>
14
14
  <% box.description t(".contexts.#{context.class.name.underscore}.description") %>
@@ -1,7 +1,7 @@
1
1
  <%= render 'account/shared/page' do |page| %>
2
2
  <% page.title t('.section') %>
3
3
  <% page.body.render 'account/shared/box', divider: true do |box| %>
4
- <% box.t :description, title: t('.header') %>
4
+ <% box.t :description, title: '.header' %>
5
5
  <% box.body.render 'form', access_token: @access_token %>
6
6
  <% end %>
7
7
  <% end %>
@@ -1,7 +1,7 @@
1
1
  <%= render 'account/shared/page' do |page| %>
2
2
  <% page.title t('.section') %>
3
3
  <% page.body do %>
4
- <%= updates_for @access_token do %>
4
+ <%= cable_ready_updates_for @access_token do %>
5
5
  <%= render 'account/shared/box', divider: true do |box| %>
6
6
  <% box.title t('.header') %>
7
7
  <% box.description do %>
data/config/routes.rb CHANGED
@@ -17,9 +17,7 @@ Rails.application.routes.draw do
17
17
  end
18
18
  end
19
19
 
20
- if ENV["TESTING_PROVISION_KEY"].present?
21
- get "/testing/provision", to: "account/platform/applications#provision"
22
- end
20
+ get "/testing/provision", to: "account/platform/applications#provision"
23
21
 
24
22
  namespace :api do
25
23
  match "*version/openapi.yaml" => "open_api#index", :via => :get
@@ -48,11 +48,6 @@ module FactoryBot
48
48
  private
49
49
 
50
50
  def factory(model)
51
- # TODO Why do we sometimes get a real object here and sometimes just a model name as a symbol?
52
- unless model.is_a?(String)
53
- model = model.name.underscore.tr("/", "_").to_sym
54
- end
55
-
56
51
  factories = FactoryBot.factories.instance_variable_get(:@items).keys
57
52
  factories.include?("#{model}_example") ? "#{model}_example".to_sym : model
58
53
  end
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module Api
3
- VERSION = "1.2.27"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
@@ -16,6 +16,7 @@ require "jbuilder/schema"
16
16
 
17
17
  module BulletTrain
18
18
  module Api
19
+ mattr_accessor :base_class, default: "ApplicationRecord"
19
20
  mattr_accessor :endpoints, default: []
20
21
  mattr_accessor :current_version, default: "v1"
21
22
  mattr_accessor :initial_version, default: "v1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.27
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-27 00:00:00.000000000 Z
11
+ date: 2023-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -210,13 +210,13 @@ files:
210
210
  - lib/bullet_train/platform/connection_workflow.rb
211
211
  - lib/tasks/bullet_train/api_tasks.rake
212
212
  - lib/tokens_controller.rb
213
- homepage: https://github.com/bullet-train-co/bullet_train-api
213
+ homepage: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-api
214
214
  licenses:
215
215
  - MIT
216
216
  metadata:
217
- homepage_uri: https://github.com/bullet-train-co/bullet_train-api
218
- source_code_uri: https://github.com/bullet-train-co/bullet_train-api
219
- post_install_message:
217
+ homepage_uri: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-api
218
+ source_code_uri: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-api
219
+ post_install_message:
220
220
  rdoc_options: []
221
221
  require_paths:
222
222
  - lib
@@ -232,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
232
  version: '0'
233
233
  requirements: []
234
234
  rubygems_version: 3.4.10
235
- signing_key:
235
+ signing_key:
236
236
  specification_version: 4
237
237
  summary: Bullet Train API
238
238
  test_files: []