foobara-rails-command-connector 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c82d23ac51a683a323ec7b818c23576bc09d4b5eba02702244e2b283da5d3071
4
- data.tar.gz: d3ac1925680b0f9e91d27bfe5b1543ec6edf25b89f25321d5bce2dd6ed38d905
3
+ metadata.gz: 9d6f556bf7ef7e787d345c3a35965a1663a679f06ee6fc685f038cf9202593b0
4
+ data.tar.gz: 63d2e03b42f8c1f221ad98e3d18a2601c7bd04f87238f128e9be0bfc07262ce0
5
5
  SHA512:
6
- metadata.gz: 14d78b832cbe1a1930a6141bfbfc02126077d647a5dc6f22bf33992ccc18bc8233919d76a45ce80aee7ebcd0bef0d63101ece48725187cdbfc409d9b9b482033
7
- data.tar.gz: 041add2bddd85e3ef0821eb57de88c7e904904027b488d03b8a20b64ac1d15e67c5c292b308269f7e1269286c6bb1e2be7fe7b7d328a57d832020434b4d053f5
6
+ metadata.gz: 2ae9acfdf941631908e8124ff8e2782614cb1be36e44cc3a4a7c033bc80feffc758fa01a8ef4575b881a12c448b45b6863539a16b8851a1f20c30989eb2861e8
7
+ data.tar.gz: 6ba333b97fd1912e69f7db554aeb87ff5e3d5c4e9e38436cbe935a10f86aba16f19dbf0b8e431b58a8af10efd39b257319de60c1e08d1438725dd15f0d5a4e56
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.4] - 2025-12-18
2
+
3
+ - Fix bug where rails config #foobara_command_connector does not exist yet
4
+
1
5
  ## [0.1.3] - 2025-12-18
2
6
 
3
7
  - Automatically create a RailsCommandConnector if one doesn't exist
@@ -1,14 +1,19 @@
1
1
  ActionDispatch::Routing::Mapper.class_eval do
2
2
  define_method :command do |*args, **opts, &block|
3
- command_connector = Rails.application.config.foobara_command_connector
3
+ rails_config = Rails.application.config
4
+
5
+ command_connector = if rails_config.respond_to?(:foobara_command_connector)
6
+ rails_config.foobara_command_connector
7
+ end
4
8
 
5
9
  unless command_connector
6
10
  require "foobara/rails_command_connector"
7
11
  command_connector = Foobara::CommandConnectors::RailsCommandConnector.new
12
+
8
13
  # Ensure the connector is attached to config even if install! was skipped
9
14
  # (e.g., if installation was already done by a previous connector)
10
15
  # We check again in case install! attached a different instance (shouldn't happen, but safe)
11
- command_connector.attach_to_rails_application_config! if Rails.application.config.foobara_command_connector.nil?
16
+ command_connector.attach_to_rails_application_config! if rails_config.foobara_command_connector.nil?
12
17
  end
13
18
 
14
19
  command_connector.connect(*args, **opts, &block)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-rails-command-connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi