File tree Expand file tree Collapse file tree 5 files changed +45
-3
lines changed
Expand file tree Collapse file tree 5 files changed +45
-3
lines changed Original file line number Diff line number Diff line change 1+ ## [ 0.0.6] - 2025-05-01
2+
3+ - Add SetUserToAuthenticatedUser request mutator
4+
15## [ 0.0.5] - 2025-05-01
26
37- Add an ApiKeyAuthenticator
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- foobara-auth-http (0.0.5 )
4+ foobara-auth-http (0.0.6 )
55 foobara (~> 0.0.108 )
66 foobara-auth (~> 0.0.1 )
77 foobara-http-command-connector (~> 0.0.1 )
8282 foobara-files-generator
8383 foobara-files-generator (0.0.5 )
8484 foobara
85- foobara-http-command-connector (0.0.24 )
85+ foobara-http-command-connector (0.0.25 )
8686 foobara (~> 0.0.88 )
8787 foobara-local-files-crud-driver-generator (0.0.3 )
8888 foobara
Original file line number Diff line number Diff line change 1+ RSpec . describe Foobara ::AuthHttp ::SetUserToAuthenticatedUser do
2+ let ( :command ) do
3+ instance_double ( Foobara ::TransformedCommand , authenticated_user :)
4+ end
5+ let ( :authenticated_user ) { Object . new }
6+ let ( :request ) do
7+ Foobara ::CommandConnectors ::Http ::Request . new (
8+ path : "/whatever"
9+ ) . tap { |r | r . command = command }
10+ end
11+
12+ let ( :mutator ) { described_class . new }
13+
14+ it "fills in the refresh_token input from the cookie" do
15+ expect {
16+ mutator . mutate ( request )
17+ } . to change ( request , :inputs ) . from ( { } ) . to ( user : authenticated_user )
18+ end
19+ end
Original file line number Diff line number Diff line change 1+ module Foobara
2+ module AuthHttp
3+ class SetUserToAuthenticatedUser < Foobara ::CommandConnectors ::Http ::SetInputToProcResult
4+ # TODO: move this into base class as default?
5+ class << self
6+ def requires_declaration_data?
7+ false
8+ end
9+ end
10+
11+ def initialize
12+ self . attribute_name = :user
13+ self . input_value_proc = proc { command . authenticated_user }
14+
15+ super
16+ end
17+ end
18+ end
19+ end
Original file line number Diff line number Diff line change 11module Foobara
22 module AuthHttp
3- VERSION = "0.0.5 " . freeze
3+ VERSION = "0.0.6 " . freeze
44
55 local_ruby_version = File . read ( "#{ __dir__ } /.ruby-version" ) . chomp
66 local_ruby_version_minor = local_ruby_version [ /\A (\d +\. \d +)\. \d +\z / , 1 ]
You can’t perform that action at this time.
0 commit comments