Class: Ixtlan::Generators::ConfigurationBase
- Inherits:
-
Base
- Object
- Rails::Generators::Base
- Base
- Ixtlan::Generators::ConfigurationBase
show all
- Defined in:
- lib/generators/ixtlan/configuration_base.rb
Instance Method Summary
collapse
Methods inherited from Base
#create_initializer_file
Instance Method Details
#create ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/generators/ixtlan/configuration_base.rb', line 6
def create
args = []
if name
args << ARGV.shift
else
args << "configuration"
end
if defined? ::Ixtlan::Errors
args << "errors_keep_dumps:integer"
args << "errors_base_url:string"
args << "errors_from_email:string"
args << "errors_to_emails:string"
end
if defined? ::Ixtlan::Sessions
args << "idle_session_timeout:integer"
end
if defined? ::Ixtlan::Audit
args << "audits_keep_logs:integer"
end
args += ARGV
args += ["--singleton", "--timestamps"]
generate generator_name, *args
end
|
#create_seed ⇒ Object
36
37
38
|
# File 'lib/generators/ixtlan/configuration_base.rb', line 36
def create_seed
template 'seed.rb', File.join('db', 'seed.rb')
end
|