22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/forest_admin_rpc_agent/thor/install.rb', line 22
def install(auth_secret)
if rails_app?
say_status('info', 'Rails framework detected ✅', :green)
setup_rails(auth_secret)
elsif sinatra_app?
if options[:app_file].nil?
say_status('error', 'You must specify the main file of the Sinatra application with --app_file', :red)
raise ::Thor::Error, 'You must specify the main file of the Sinatra application with --app_file'
end
say_status('info', 'Sinatra framework detected ✅', :green)
setup_sinatra(auth_secret)
else
say_status('error', 'Unsupported framework', :red)
raise ::Thor::Error, 'Unsupported framework, only Rails and Sinatra are supported with ForestAdmin RPC Agent'
end
end
|