File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,10 @@ def generate
33
33
34
34
Bundler . with_original_env { abort unless Kernel . system ( env , command ) }
35
35
end
36
+ end
36
37
37
- app_dir
38
+ def app_dir
39
+ @app_dir ||= "#{ base_dir } /#{ app_name } "
38
40
end
39
41
40
42
private
@@ -43,10 +45,6 @@ def base_dir
43
45
@base_dir ||= rails_env == 'test' ? 'tmp/rails' : '.test-rails-apps'
44
46
end
45
47
46
- def app_dir
47
- @app_dir ||= "#{ base_dir } /#{ app_name } "
48
- end
49
-
50
48
def app_name
51
49
return "rails_52" if main_app?
52
50
Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ require_relative "application_generator"
2
2
3
3
desc 'Run a command against the local sample application'
4
4
task :local do
5
- app_folder = ActiveAdmin ::ApplicationGenerator . new (
5
+ generator = ActiveAdmin ::ApplicationGenerator . new (
6
6
rails_env : 'development' ,
7
7
template : 'rails_template_with_data'
8
- ) . generate
8
+ )
9
+
10
+ generator . generate
9
11
10
12
# Discard the "local" argument (name of the task)
11
13
argv = ARGV [ 1 ..-1 ]
@@ -20,7 +22,7 @@ task :local do
20
22
gemfile = ENV [ 'BUNDLE_GEMFILE' ] || File . expand_path ( "../Gemfile" , __dir__ )
21
23
env = { 'BUNDLE_GEMFILE' => gemfile }
22
24
23
- Dir . chdir ( app_folder ) do
25
+ Dir . chdir ( generator . app_dir ) do
24
26
Bundler . with_original_env { Kernel . exec ( env , command ) }
25
27
end
26
28
end
You can’t perform that action at this time.
0 commit comments