20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/bear/cli.rb', line 20
def new(project)
opts = options.dup
if !opts[:auth]
opts[:admin] = false;
opts[:roles] = false;
end
ENV['BEAR_AUTH'] = "true" if opts[:auth]
ENV['BEAR_ADMIN'] = "true" if opts[:admin]
ENV['BEAR_ROLES'] = "true" if opts[:roles]
ENV['BEAR_USER_NAME'] = git_user_name if opts[:admin]
ENV['BEAR_USER_EMAIL'] = git_user_email if opts[:admin]
ENV['BEAR_USER_PASSWORD'] = user_password if opts[:admin]
exec(<<-COMMAND)
rails new #{project} \
--template=#{template} \
--skip-test-unit \
--skip-prototype \
--database=mysql
COMMAND
end
|