Use `ActiveRecord::FixtureSet.signed_global_id` defined by the globalid gem

Also make explicit that actiontext depends on the globalid gem.
This commit is contained in:
Rafael Mendonça França 2021-11-24 22:33:45 +00:00
parent d133cc40ff
commit 5fa7049856
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
3 changed files with 8 additions and 14 deletions

View File

@ -55,6 +55,7 @@ PATH
activerecord (= 7.0.0.alpha2) activerecord (= 7.0.0.alpha2)
activestorage (= 7.0.0.alpha2) activestorage (= 7.0.0.alpha2)
activesupport (= 7.0.0.alpha2) activesupport (= 7.0.0.alpha2)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5) nokogiri (>= 1.8.5)
actionview (7.0.0.alpha2) actionview (7.0.0.alpha2)
activesupport (= 7.0.0.alpha2) activesupport (= 7.0.0.alpha2)
@ -244,7 +245,7 @@ GEM
fugit (1.5.0) fugit (1.5.0)
et-orbi (~> 1.1, >= 1.1.8) et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.4) raabro (~> 1.4)
globalid (0.5.2) globalid (0.6.0)
activesupport (>= 5.0) activesupport (>= 5.0)
google-apis-core (0.3.0) google-apis-core (0.3.0)
addressable (~> 2.5, >= 2.5.1) addressable (~> 2.5, >= 2.5.1)
@ -285,7 +286,7 @@ GEM
hiredis (0.6.3) hiredis (0.6.3)
http_parser.rb (0.6.0) http_parser.rb (0.6.0)
httpclient (2.8.3) httpclient (2.8.3)
i18n (1.8.10) i18n (1.8.11)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
image_processing (1.12.1) image_processing (1.12.1)
mini_magick (>= 4.9.5, < 5) mini_magick (>= 4.9.5, < 5)
@ -312,11 +313,11 @@ GEM
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.7.1) mail (2.7.1)
mini_mime (>= 0.1.1) mini_mime (>= 0.1.1)
marcel (1.0.1) marcel (1.0.2)
memoist (0.16.2) memoist (0.16.2)
method_source (1.0.0) method_source (1.0.0)
mini_magick (4.11.0) mini_magick (4.11.0)
mini_mime (1.1.0) mini_mime (1.1.2)
mini_portile2 (2.5.3) mini_portile2 (2.5.3)
minitest (5.14.4) minitest (5.14.4)
minitest-bisect (1.5.1) minitest-bisect (1.5.1)
@ -337,7 +338,7 @@ GEM
ruby2_keywords (~> 0.0.1) ruby2_keywords (~> 0.0.1)
net-http-persistent (4.0.1) net-http-persistent (4.0.1)
connection_pool (~> 2.2) connection_pool (~> 2.2)
nio4r (2.5.7) nio4r (2.5.8)
nokogiri (1.11.7) nokogiri (1.11.7)
mini_portile2 (~> 2.5.0) mini_portile2 (~> 2.5.0)
racc (~> 1.4) racc (~> 1.4)
@ -520,7 +521,7 @@ GEM
websocket-extensions (0.1.5) websocket-extensions (0.1.5)
xpath (3.2.0) xpath (3.2.0)
nokogiri (~> 1.8) nokogiri (~> 1.8)
zeitwerk (2.5.0) zeitwerk (2.5.1)
PLATFORMS PLATFORMS
ruby ruby

View File

@ -38,4 +38,5 @@ Gem::Specification.new do |s|
s.add_dependency "actionpack", version s.add_dependency "actionpack", version
s.add_dependency "nokogiri", ">= 1.8.5" s.add_dependency "nokogiri", ">= 1.8.5"
s.add_dependency "globalid", ">= 0.6.0"
end end

View File

@ -585,14 +585,6 @@ module ActiveRecord
end end
end end
def signed_global_id(fixture_set_name, label, column_type: :integer, **options)
identifier = identify(label, column_type)
model_name = default_fixture_model_name(fixture_set_name)
uri = URI::GID.build([GlobalID.app, model_name, identifier, {}])
SignedGlobalID.new(uri, **options)
end
# Superclass for the evaluation contexts used by ERB fixtures. # Superclass for the evaluation contexts used by ERB fixtures.
def context_class def context_class
@context_class ||= Class.new @context_class ||= Class.new