ixtlan-generators 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/generators/ixtlan/audit_base.rb +6 -2
- data/lib/generators/ixtlan/configuration_base.rb +1 -1
- data/lib/generators/ixtlan/error_dumps_base.rb +7 -2
- data/lib/generators/ixtlan/templates/dynamic.rb +3 -3
- data/lib/generators/rails/scaffold_controller/scaffold_controller/singleton_controller.rb +1 -0
- metadata +3 -3
@@ -11,13 +11,17 @@ module Ixtlan
|
|
11
11
|
args << "audit"
|
12
12
|
end
|
13
13
|
|
14
|
-
args
|
14
|
+
args += ['login:string', 'message:string']
|
15
15
|
args += ARGV
|
16
16
|
|
17
|
-
args
|
17
|
+
args += ["--read-only", "--timestamps"]
|
18
18
|
|
19
19
|
generate generator_name, *args
|
20
20
|
end
|
21
|
+
|
22
|
+
def add_gem
|
23
|
+
gem 'ixtlan-audit' unless File.read('Gemfile') =~ /gem\s['"]ixtlan-audit['"]/
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
@@ -11,13 +11,18 @@ module Ixtlan
|
|
11
11
|
args << "error"
|
12
12
|
end
|
13
13
|
|
14
|
-
args
|
14
|
+
args += ['message:string', 'request:text', 'response:text', 'session:text', 'parameters:text', 'clazz:string', 'backtrace:text']
|
15
15
|
args += ARGV
|
16
16
|
|
17
|
-
args << "--read-only
|
17
|
+
args << "--read-only"
|
18
|
+
args << "--timestamps"
|
18
19
|
|
19
20
|
generate generator_name, *args
|
20
21
|
end
|
22
|
+
|
23
|
+
def add_gem
|
24
|
+
gem 'ixtlan-error-handler' unless File.read('Gemfile') =~ /gem\s['"]ixtlan-error-handler['"]/
|
25
|
+
end
|
21
26
|
end
|
22
27
|
end
|
23
28
|
end
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<%= application_name %>::Application.config.error_dumper.base_url = config.errors_base_url
|
13
13
|
<%= application_name %>::Application.config.error_dumper.from_email = config.errors_from_email
|
14
14
|
<%= application_name %>::Application.config.error_dumper.to_emails = config.errors_to_emails
|
15
|
-
<%= application_name %>::Application.config.error_dumper.keep_dumps = config.errors_keep_dumps # days
|
15
|
+
<%= application_name %>::Application.config.error_dumper.keep_dumps = config.errors_keep_dumps || 30 # days
|
16
16
|
end
|
17
17
|
<% end -%>
|
18
18
|
<% if defined? Ixtlan::Sessions -%>
|
@@ -20,7 +20,7 @@ end
|
|
20
20
|
# idle session timeout configuration (in minutes)
|
21
21
|
# -----------------------------------------------
|
22
22
|
<%= application_name %>::Application.config.configuration_manager.register("session_idle_timeout") do |config|
|
23
|
-
<%= application_name %>::Application.config.idle_session_timeout = config.idle_session_timeout
|
23
|
+
<%= application_name %>::Application.config.idle_session_timeout = config.idle_session_timeout || 15
|
24
24
|
end
|
25
25
|
<% end -%>
|
26
26
|
<% if defined? Ixtlan::Audit -%>
|
@@ -32,6 +32,6 @@ end
|
|
32
32
|
# <%= application_name %>::Application.config.audit_manager.username_method = :username # default: :login
|
33
33
|
|
34
34
|
<%= application_name %>::Application.config.configuration_manager.register("audit_manager") do |config|
|
35
|
-
<%= application_name %>::Application.config.audit_manager.keep_logs = config.audits_keep_logs # days
|
35
|
+
<%= application_name %>::Application.config.audit_manager.keep_logs = config.audits_keep_logs || 90 # days
|
36
36
|
end
|
37
37
|
<% end -%>
|
@@ -65,6 +65,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
65
65
|
<% end -%>
|
66
66
|
|
67
67
|
respond_to do |format|
|
68
|
+
<% orm_class # to set inner state - upstream bug -%>
|
68
69
|
if @<%= orm_instance.update_attributes("params[:#{singular_table_name}]") %>
|
69
70
|
format.html { redirect_to(<%= singular_table_name %>_path, :notice => '<%= human_name %> was successfully updated.') }
|
70
71
|
format.xml { render :xml => @<%= singular_table_name %>.to_xml(<%= class_name %>.single_options) }
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: ixtlan-generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- mkristian
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-11-
|
13
|
+
date: 2011-11-18 00:00:00 +05:30
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
requirements:
|
22
22
|
- - ~>
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version:
|
24
|
+
version: 0.7.1
|
25
25
|
type: :development
|
26
26
|
version_requirements: *id001
|
27
27
|
- !ruby/object:Gem::Dependency
|