foobara-foobify-rails-app 0.0.7 → 0.0.8

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: 7671f6685f25a6e04db0faf3636a1c814494d37eaa23c1a591df8940c6e56ee8
4
- data.tar.gz: 1f69816051fc9768adbcd9eea80b4bbf9f71908ce2b58b7a8071dc8631c2f4a1
3
+ metadata.gz: 6eb5f6037c355e47e15313d2c4274996d60849838ad794cf664a1a7d758aa200
4
+ data.tar.gz: 3f119248ad4359760212ae1e45d0fde9fc10a25b5fbf58b78feddc5fd42f3567
5
5
  SHA512:
6
- metadata.gz: 87e65aa73f4ed9a989c80a966eac8e669f208c8669e3948572c83f8597f999c39c6d1a1b479e12d11da66841908271d598ac91ce820b370feb339ce4338ee8d5
7
- data.tar.gz: 1c9113d570f7b95f55a7db4e05fdcc198207fca42265c64e3067f91d1bf387f87e1a6eb24075f689c19fd5b36d56964b554f9b845f2e26654be40bc323701b18
6
+ metadata.gz: dbfed87a6626256f515bc9a9d07a1bce1c60ec22909fb00371ee843f5161a13d38b81ab74c1ccd3ed2e2884088904a385a914613fbbd6e63bbd82e12c182c28e
7
+ data.tar.gz: 39863179a160bb2b31f6462e6f03772f32ddc47e2eccc2b3e6ff17e99711937e08fc5f2399c7bfdc5b9cb2bf0d22bfadfdd9407fa4a4bdcd5b4e0056ef08b0a8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.0.8] - 2025-12-18
2
+
3
+ - Improve some formatting in the generated output
4
+
1
5
  ## [0.0.7] - 2025-12-15
2
6
 
3
7
  - Initial release
@@ -23,7 +23,7 @@ module Foobara
23
23
  if match
24
24
  new_entry = ' config.eager_load_paths << Rails.root.join("app", "commands")'
25
25
 
26
- "#{match.pre_match}\n#{match}\n#{new_entry}#{match.post_match}"
26
+ "#{match.pre_match}\n#{match}\n#{new_entry}\n#{match.post_match}"
27
27
  else
28
28
  # TODO: maybe print a warning and return the original Gemfile
29
29
  # :nocov:
@@ -21,10 +21,10 @@ module Foobara
21
21
 
22
22
  def generate(_elements_to_generate)
23
23
  with_requires_prepended = <<~HERE
24
- require "foobara/rails_command_connector"
24
+ # Uncomment these lines for an example of configuring the RailsCommandConnector
25
+ # require "foobara/rails_command_connector"
25
26
  # require "foobara/auth_http"
26
27
  # Foobara::CommandConnectors::RailsCommandConnector.new(authenticator: Foobara::AuthHttp::BearerAuthenticator)
27
- Foobara::CommandConnectors::RailsCommandConnector.new
28
28
  require "foobara/rails/routes"
29
29
  HERE
30
30
 
@@ -33,14 +33,18 @@ module Foobara
33
33
  match = with_requires_prepended.match(/Rails.application.routes.draw do/)
34
34
 
35
35
  if match
36
- # You can hit /run/ConstructGreeting or /help/ConstructGreeting
37
- new_entry = " command ConstructGreeting"
36
+ new_entry_comment = " # You can hit /run/ConstructGreeting or /help/ConstructGreeting"
37
+ new_entry = "command ConstructGreeting"
38
38
 
39
- unless include_sample_command?
40
- new_entry = "# #{new_entry}"
41
- end
39
+ new_entry_prefix = if include_sample_command?
40
+ " "
41
+ else
42
+ " # "
43
+ end
42
44
 
43
- "#{match.pre_match}\n#{match}\n#{new_entry}#{match.post_match}"
45
+ new_entry = "#{new_entry_comment}\n#{new_entry_prefix}#{new_entry}\n"
46
+
47
+ "#{match.pre_match}\n#{match}\n#{new_entry}\n#{match.post_match}"
44
48
  else
45
49
  # TODO: maybe print a warning and return the original Gemfile
46
50
  # :nocov:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-foobify-rails-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi