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 +4 -4
- data/CHANGELOG.md +4 -0
- data/src/generators/config_application_generator.rb +1 -1
- data/src/generators/routes_generator.rb +12 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6eb5f6037c355e47e15313d2c4274996d60849838ad794cf664a1a7d758aa200
|
|
4
|
+
data.tar.gz: 3f119248ad4359760212ae1e45d0fde9fc10a25b5fbf58b78feddc5fd42f3567
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dbfed87a6626256f515bc9a9d07a1bce1c60ec22909fb00371ee843f5161a13d38b81ab74c1ccd3ed2e2884088904a385a914613fbbd6e63bbd82e12c182c28e
|
|
7
|
+
data.tar.gz: 39863179a160bb2b31f6462e6f03772f32ddc47e2eccc2b3e6ff17e99711937e08fc5f2399c7bfdc5b9cb2bf0d22bfadfdd9407fa4a4bdcd5b4e0056ef08b0a8
|
data/CHANGELOG.md
CHANGED
|
@@ -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
|
-
|
|
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 = "
|
|
36
|
+
new_entry_comment = " # You can hit /run/ConstructGreeting or /help/ConstructGreeting"
|
|
37
|
+
new_entry = "command ConstructGreeting"
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
new_entry_prefix = if include_sample_command?
|
|
40
|
+
" "
|
|
41
|
+
else
|
|
42
|
+
" # "
|
|
43
|
+
end
|
|
42
44
|
|
|
43
|
-
"#{
|
|
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:
|