File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ def ensure_template_app_exists(commit, new_app_options)
49
49
end
50
50
51
51
def template_app_path
52
- @template_app_path ||= File . join ( CACHE_DIR , commit , new_app_options_hash , app_name )
52
+ @template_app_path ||= File . join ( CACHE_DIR , commit , rails_new_options_hash , app_name )
53
53
end
54
54
55
55
def rails_path
@@ -167,15 +167,13 @@ def generate_app
167
167
system ( "bundle install >/dev/null 2>&1" )
168
168
end
169
169
170
- rails_new_command = "bundle exec rails new #{ template_app_path } --main --skip-bundle --force --skip-test --skip-system-test --quiet #{ new_app_options } "
171
-
172
170
if railsrc_options
173
- rails_new_command = "#{ rails_new_command } #{ railsrc_options } "
174
-
175
171
puts "Using default options from #{ railsrc_path } :"
176
172
puts " > #{ railsrc_options } \n \n "
177
173
end
178
174
175
+ rails_new_command = "bundle exec rails new #{ template_app_path } --main --skip-bundle --force --skip-test --skip-system-test --quiet #{ rails_new_options } "
176
+
179
177
puts "Generating new Rails application"
180
178
puts " > #{ rails_new_command } \n \n "
181
179
@@ -198,9 +196,9 @@ def latest_commit
198
196
end
199
197
end
200
198
201
- def new_app_options_hash
202
- Digest :: SHA256 . hexdigest ( new_app_options . to_s )
203
- end
199
+ def rails_new_options = [ new_app_options , railsrc_options ] . compact . join ( " " )
200
+
201
+ def rails_new_options_hash = Digest :: SHA256 . hexdigest ( rails_new_options )
204
202
end
205
203
206
204
class CLI < Thor
You can’t perform that action at this time.
0 commit comments