ixtlan-generators 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,13 +11,17 @@ module Ixtlan
11
11
  args << "audit"
12
12
  end
13
13
 
14
- args << 'login:string message:string'
14
+ args += ['login:string', 'message:string']
15
15
  args += ARGV
16
16
 
17
- args << "--read-only --timestamps"
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
@@ -28,7 +28,7 @@ module Ixtlan
28
28
 
29
29
  args += ARGV
30
30
 
31
- args << "--singleton --timestamps"
31
+ args += ["--singleton", "--timestamps"]
32
32
 
33
33
  generate generator_name, *args
34
34
  end
@@ -11,13 +11,18 @@ module Ixtlan
11
11
  args << "error"
12
12
  end
13
13
 
14
- args << 'message:string request:text response:text session:text parameters:text clazz:string backtrace:text'
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 --timestamps"
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.3
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-04 00:00:00 +05:30
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: "0.6"
24
+ version: 0.7.1
25
25
  type: :development
26
26
  version_requirements: *id001
27
27
  - !ruby/object:Gem::Dependency