erp_forms 2.0.0

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.
Files changed (75) hide show
  1. data/GPL-3-LICENSE +674 -0
  2. data/README.rdoc +2 -0
  3. data/Rakefile +30 -0
  4. data/app/assets/javascripts/erp_forms/application.js +9 -0
  5. data/app/assets/stylesheets/erp_forms/application.css +7 -0
  6. data/app/controllers/erp_forms/erp_app/desktop/dynamic_forms/base_controller.rb +47 -0
  7. data/app/controllers/erp_forms/erp_app/desktop/dynamic_forms/data_controller.rb +87 -0
  8. data/app/controllers/erp_forms/erp_app/desktop/dynamic_forms/forms_controller.rb +79 -0
  9. data/app/controllers/erp_forms/erp_app/desktop/dynamic_forms/models_controller.rb +45 -0
  10. data/app/helpers/erp_forms/application_helper.rb +4 -0
  11. data/app/models/dynamic_datum.rb +65 -0
  12. data/app/models/dynamic_form.rb +191 -0
  13. data/app/models/dynamic_form_document.rb +29 -0
  14. data/app/models/dynamic_form_model.rb +42 -0
  15. data/app/views/layouts/application.html.erb +14 -0
  16. data/app/views/layouts/erp_forms/application.html.erb +14 -0
  17. data/app/widgets/dynamic_forms/base.rb +61 -0
  18. data/app/widgets/dynamic_forms/javascript/dynamic_forms.js +109 -0
  19. data/app/widgets/dynamic_forms/views/error.html.erb +4 -0
  20. data/app/widgets/dynamic_forms/views/index.html.erb +8 -0
  21. data/app/widgets/dynamic_forms/views/success.html.erb +4 -0
  22. data/config/routes.rb +6 -0
  23. data/db/data_migrations/20110608185830_create_default_dynamic_models_and_forms.rb +30 -0
  24. data/db/data_migrations/20110822170240_update_contact_form_validation.rb +22 -0
  25. data/db/data_migrations/20110828190913_create_desktop_app_dynamic_forms.rb +18 -0
  26. data/db/data_migrations/20110830170240_update_contact_form.rb +23 -0
  27. data/db/migrate/20110530193446_dynamic_forms.rb +82 -0
  28. data/lib/erp_forms/dynamic_attributes_patch.rb +10 -0
  29. data/lib/erp_forms/dynamic_form_field.rb +130 -0
  30. data/lib/erp_forms/dynamic_grid_column.rb +108 -0
  31. data/lib/erp_forms/engine.rb +22 -0
  32. data/lib/erp_forms/extensions/active_record/has_dynamic_data.rb +54 -0
  33. data/lib/erp_forms/extensions/active_record/has_dynamic_forms.rb +70 -0
  34. data/lib/erp_forms/extensions/extensions.rb +6 -0
  35. data/lib/erp_forms/extensions/railties/action_view.rb +20 -0
  36. data/lib/erp_forms/version.rb +3 -0
  37. data/lib/erp_forms.rb +11 -0
  38. data/lib/tasks/erp_forms_tasks.rake +4 -0
  39. data/public/javascripts/erp_app/desktop/applications/dynamic_forms/center_region.js +23 -0
  40. data/public/javascripts/erp_app/desktop/applications/dynamic_forms/dynamic_data_grid.js +81 -0
  41. data/public/javascripts/erp_app/desktop/applications/dynamic_forms/form_builder.js +93 -0
  42. data/public/javascripts/erp_app/desktop/applications/dynamic_forms/module.js +37 -0
  43. data/public/javascripts/erp_app/desktop/applications/dynamic_forms/west_region.js +468 -0
  44. data/public/javascripts/erp_app/shared/dynamic_forms/dynamic_forms_validation.js +4 -0
  45. data/spec/dummy/Rakefile +7 -0
  46. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  47. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  48. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  49. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  50. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  51. data/spec/dummy/config/application.rb +45 -0
  52. data/spec/dummy/config/boot.rb +10 -0
  53. data/spec/dummy/config/database.yml +8 -0
  54. data/spec/dummy/config/environment.rb +5 -0
  55. data/spec/dummy/config/environments/spec.rb +27 -0
  56. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  57. data/spec/dummy/config/initializers/inflections.rb +10 -0
  58. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  59. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  60. data/spec/dummy/config/initializers/session_store.rb +8 -0
  61. data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
  62. data/spec/dummy/config/locales/en.yml +5 -0
  63. data/spec/dummy/config/routes.rb +4 -0
  64. data/spec/dummy/config.ru +4 -0
  65. data/spec/dummy/public/404.html +26 -0
  66. data/spec/dummy/public/422.html +26 -0
  67. data/spec/dummy/public/500.html +26 -0
  68. data/spec/dummy/public/favicon.ico +0 -0
  69. data/spec/dummy/script/rails +6 -0
  70. data/spec/models/dynamic_datum_spec.rb +9 -0
  71. data/spec/models/dynamic_form_document_spec.rb +11 -0
  72. data/spec/models/dynamic_form_model_spec.rb +11 -0
  73. data/spec/models/dynamic_form_spec.rb +11 -0
  74. data/spec/spec_helper.rb +60 -0
  75. metadata +183 -0
@@ -0,0 +1,468 @@
1
+ Ext.define("Compass.ErpApp.Desktop.Applications.DynamicForms.WestRegion",{
2
+ extend:"Ext.tab.Panel",
3
+ alias:'widget.dynamic_forms_westregion',
4
+ setWindowStatus : function(status){
5
+ this.findParentByType('statuswindow').setStatus(status);
6
+ },
7
+
8
+ clearWindowStatus : function(){
9
+ this.findParentByType('statuswindow').clearStatus();
10
+ },
11
+
12
+ deleteModel : function(node){
13
+ var self = this;
14
+ Ext.MessageBox.confirm('Confirm',
15
+ 'Are you sure you want to delete this dynamic form model? WARNING: All forms belonging to this model will be deleted and any/all data will be orphaned!',
16
+ function(btn){
17
+ if(btn == 'no'){
18
+ return false;
19
+ }
20
+ else if(btn == 'yes')
21
+ {
22
+ self.setWindowStatus('Deleting Dynamic Model...');
23
+ var conn = new Ext.data.Connection();
24
+ conn.request({
25
+ url: '/erp_forms/erp_app/desktop/dynamic_forms/models/delete',
26
+ method: 'POST',
27
+ params:{
28
+ id:node.data.modelId
29
+ },
30
+ success: function(response) {
31
+ self.clearWindowStatus();
32
+ var obj = Ext.decode(response.responseText);
33
+ if(obj.success){
34
+ node.remove(true);
35
+ }
36
+ else{
37
+ Ext.Msg.alert('Error', 'Error deleting model');
38
+ }
39
+ },
40
+ failure: function(response) {
41
+ self.clearWindowStatus();
42
+ Ext.Msg.alert('Error', 'Error deleting model');
43
+ }
44
+ });
45
+ }
46
+ });
47
+ },
48
+
49
+ deleteForm : function(node){
50
+ var self = this;
51
+ Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this form? WARNING: Data will be orphaned if there is no form for this model.', function(btn){
52
+ if(btn == 'no'){
53
+ return false;
54
+ }
55
+ else
56
+ if(btn == 'yes')
57
+ {
58
+ self.setWindowStatus('Deleting form...');
59
+ var conn = new Ext.data.Connection();
60
+ conn.request({
61
+ url: '/erp_forms/erp_app/desktop/dynamic_forms/forms/delete',
62
+ method: 'POST',
63
+ params:{
64
+ id:node.data.formId
65
+ },
66
+ success: function(response) {
67
+ self.clearWindowStatus();
68
+ var obj = Ext.decode(response.responseText);
69
+ if(obj.success){
70
+ node.remove(true);
71
+ }
72
+ else{
73
+ Ext.Msg.alert('Error', 'Error deleting form');
74
+ }
75
+ },
76
+ failure: function(response) {
77
+ self.clearWindowStatus();
78
+ Ext.Msg.alert('Error', 'Error deleting form');
79
+ }
80
+ });
81
+ }
82
+ });
83
+ },
84
+
85
+ setDefaultForm : function(node){
86
+ var self = this;
87
+ self.setWindowStatus('Setting Default form...');
88
+ var conn = new Ext.data.Connection();
89
+ conn.request({
90
+ url: '/erp_forms/erp_app/desktop/dynamic_forms/models/set_default_form',
91
+ method: 'POST',
92
+ params:{
93
+ id:node.data.formId,
94
+ model_name:node.data.modelName
95
+ },
96
+ success: function(response) {
97
+ self.clearWindowStatus();
98
+ var obj = Ext.decode(response.responseText);
99
+ if(obj.success){
100
+ //reload model tree node
101
+ self.sitesTree.getStore().load({
102
+ // node:node.parentNode
103
+ });
104
+ node.parentNode.expand();
105
+ }
106
+ else{
107
+ Ext.Msg.alert('Error', 'Error setting default form');
108
+ }
109
+ },
110
+ failure: function(response) {
111
+ self.clearWindowStatus();
112
+ Ext.Msg.alert('Error', 'Error setting default form');
113
+ }
114
+ });
115
+ },
116
+
117
+ getDynamicForm : function(record){
118
+ var self = this;
119
+ self.setWindowStatus('Loading section template...');
120
+ var conn = new Ext.data.Connection();
121
+ conn.request({
122
+ url: '/erp_forms/erp_app/desktop/dynamic_forms/forms/get',
123
+ method: 'POST',
124
+ params:{
125
+ id:record.get('formId')
126
+ },
127
+ success: function(response) {
128
+ self.initialConfig['centerRegion'].editSectionLayout(
129
+ sectionName,
130
+ websiteId,
131
+ sectionId,
132
+ response.responseText,
133
+ [{
134
+ text: 'Insert Content Area',
135
+ handler: function(btn){
136
+ var codeMirror = btn.findParentByType('codemirror');
137
+ Ext.MessageBox.prompt('New File', 'Please enter content area name:', function(btn, text){
138
+ if(btn == 'ok'){
139
+ codeMirror.insertContent('<%=render_content_area(:'+text+')%>');
140
+ }
141
+
142
+ });
143
+ }
144
+ }]);
145
+ self.clearWindowStatus();
146
+ },
147
+ failure: function(response) {
148
+ self.clearWindowStatus();
149
+ Ext.Msg.alert('Error', 'Error loading section layout.');
150
+ }
151
+ });
152
+ },
153
+
154
+ getDynamicData : function(record, title){
155
+ var self = this;
156
+ var centerRegionLayout = Ext.create("Ext.panel.Panel",{
157
+ layout:'border',
158
+ title: record.data.text + " Dynamic Data",
159
+ closable:true,
160
+ items:[
161
+ {
162
+ xtype:'dynamic_forms_DynamicDataGridPanel',
163
+ model_name:record.data.text,
164
+ dataUrl: '/erp_forms/erp_app/desktop/dynamic_forms/data/index/'+record.data.text,
165
+ setupUrl: '/erp_forms/erp_app/desktop/dynamic_forms/data/setup/'+record.data.text,
166
+ region:'center',
167
+ height:300,
168
+ collapsible:false,
169
+ centerRegion:self
170
+ }],
171
+ tbar:{
172
+ items:[
173
+ {
174
+ text: "New " + record.data.text + " Record",
175
+ iconCls:'icon-add',
176
+ handler:function(btn){
177
+ self.setWindowStatus('Getting form...');
178
+ var conn = new Ext.data.Connection();
179
+ conn.request({
180
+ url: '/erp_forms/erp_app/desktop/dynamic_forms/forms/get',
181
+ method: 'POST',
182
+ params:{
183
+ model_name:record.data.text,
184
+ form_action: 'create'
185
+ },
186
+ success: function(response) {
187
+ self.clearWindowStatus();
188
+ form_definition = Ext.decode(response.responseText);
189
+ var newRecordWindow = Ext.create("Ext.window.Window",{
190
+ layout:'fit',
191
+ title:'New Record',
192
+ y: 100, // this fixes chrome and safari rendering the window at the bottom of the screen
193
+ plain: true,
194
+ buttonAlign:'center',
195
+ items: form_definition
196
+ });
197
+ newRecordWindow.show();
198
+ },
199
+ failure: function(response) {
200
+ self.clearWindowStatus();
201
+ Ext.Msg.alert('Error', 'Error getting form');
202
+ }
203
+ });
204
+ }
205
+ }
206
+ ]
207
+ }
208
+ });
209
+
210
+ this.centerRegion.workArea.add(centerRegionLayout);
211
+ this.centerRegion.workArea.setActiveTab(this.centerRegion.workArea.items.length - 1);
212
+ },
213
+
214
+ initComponent: function() {
215
+ var self = this;
216
+
217
+ var store = Ext.create('Ext.data.TreeStore', {
218
+ proxy:{
219
+ type: 'ajax',
220
+ url: '/erp_forms/erp_app/desktop/dynamic_forms/forms/get_tree'
221
+ },
222
+ root: {
223
+ text: 'Dynamic Forms',
224
+ expanded: true
225
+ },
226
+ fields:[
227
+ {
228
+ name:'id'
229
+ },
230
+ {
231
+ name:'iconCls'
232
+ },
233
+ {
234
+ name:'text',
235
+ sortDir: 'ASC'
236
+ },
237
+ {
238
+ name:'isModel'
239
+ },
240
+ {
241
+ name:'modelName'
242
+ },
243
+ {
244
+ name:'isDefault'
245
+ },
246
+ {
247
+ name:'isForm'
248
+ },
249
+ {
250
+ name:'modelId'
251
+ },
252
+ {
253
+ name:'formId'
254
+ },
255
+ {
256
+ name:'leaf'
257
+ },
258
+ {
259
+ name:'children'
260
+ }
261
+ ]
262
+ });
263
+
264
+ this.sitesTree = new Ext.tree.TreePanel({
265
+ viewConfig: {
266
+ //TODO_EXTJS4 this is added to fix error should be removed when extjs 4 releases fix.
267
+ loadMask: false
268
+ },
269
+ store:store,
270
+ dataUrl: '/erp_forms/erp_app/desktop/dynamic_forms/forms/get_tree',
271
+ region: 'center',
272
+ rootVisible:false,
273
+ enableDD :true,
274
+ listeners:{
275
+ 'load':function(){
276
+ self.sitesTree.getStore().sort('text', 'ASC');
277
+ },
278
+ 'itemclick':function(view, record, item, index, e){
279
+ e.stopEvent();
280
+ if(record.data['isModel']){
281
+ self.getDynamicData(record);
282
+ }
283
+ else if(record.data['isForm']){
284
+ self.getDynamicForm(record);
285
+ }
286
+ },
287
+ 'itemcontextmenu':function(view, record, htmlItem, index, e){
288
+ e.stopEvent();
289
+ var items = [];
290
+
291
+ if(record.data['isModel']){
292
+
293
+ // can only display data if there is a form to provide a definition
294
+ if (record.data['children'].length > 0){
295
+ items.push({
296
+ text:'View Dynamic Data',
297
+ iconCls:'icon-document',
298
+ listeners:{
299
+ 'click':function(){
300
+ self.getDynamicData(record);
301
+ }
302
+ }
303
+ });
304
+ }
305
+
306
+ items.push({
307
+ text:'Add Dynamic Form',
308
+ iconCls:'icon-add',
309
+ listeners:{
310
+ 'click':function(){
311
+ self.addDynamicForm(record);
312
+ }
313
+ }
314
+ });
315
+
316
+ if(record.data['text'] != 'DynamicFormDocument'){
317
+ items.push({
318
+ text:'Delete Model',
319
+ iconCls:'icon-delete',
320
+ listeners:{
321
+ 'click':function(){
322
+ self.deleteModel(record);
323
+ }
324
+ }
325
+ });
326
+ }
327
+ }
328
+ else if(record.data['isForm']){
329
+
330
+ items.push({
331
+ text:'Edit Dynamic Form',
332
+ iconCls:'icon-edit',
333
+ listeners:{
334
+ 'click':function(){
335
+ self.getDynamicForm(record);
336
+ }
337
+ }
338
+ });
339
+ if(!record.data['isDefault']){
340
+ items.push({
341
+ text:'Set As Default',
342
+ iconCls:'icon-edit',
343
+ listeners:{
344
+ 'click':function(){
345
+ self.setDefaultForm(record);
346
+ }
347
+ }
348
+ });
349
+ }
350
+
351
+ items.push({
352
+ text:'Delete',
353
+ iconCls:'icon-delete',
354
+ listeners:{
355
+ 'click':function(){
356
+ self.deleteForm(record);
357
+ }
358
+ }
359
+ });
360
+ }
361
+
362
+ var contextMenu = Ext.create("Ext.menu.Menu",{
363
+ items:items
364
+ });
365
+ contextMenu.showAt(e.xy);
366
+ }
367
+ }
368
+ });
369
+
370
+ var layout = new Ext.Panel({
371
+ layout: 'border',
372
+ autoDestroy:true,
373
+ title:'Dynamic Forms',
374
+ items: [this.sitesTree],
375
+ tbar:{
376
+ items:[
377
+ {
378
+ text:'New Dynamic Form Model',
379
+ iconCls:'icon-add',
380
+ handler:function(btn){
381
+ var newModelWindow = Ext.create("Ext.window.Window",{
382
+ layout:'fit',
383
+ width:375,
384
+ title:'New Dynamic Form Model',
385
+ height:100,
386
+ plain: true,
387
+ buttonAlign:'center',
388
+ items: new Ext.FormPanel({
389
+ labelWidth: 110,
390
+ frame:false,
391
+ fileUpload: true,
392
+ bodyStyle:'padding:5px 5px 0',
393
+ url:'/erp_forms/erp_app/desktop/dynamic_forms/models/create',
394
+ defaults: {
395
+ width: 225
396
+ },
397
+ items: [
398
+ {
399
+ xtype:'textfield',
400
+ fieldLabel:'Model Name',
401
+ allowBlank:false,
402
+ name:'model_name'
403
+ }
404
+ ]
405
+ }),
406
+ buttons: [{
407
+ text:'Submit',
408
+ listeners:{
409
+ 'click':function(button){
410
+ var window = button.findParentByType('window');
411
+ var formPanel = window.query('form')[0];
412
+ self.setWindowStatus('Adding new dynamic form model ...');
413
+ formPanel.getForm().submit({
414
+ success:function(form, action){
415
+ self.clearWindowStatus();
416
+ var obj = Ext.decode(action.response.responseText);
417
+ if(obj.success){
418
+ self.sitesTree.getStore().load();
419
+ newModelWindow.close();
420
+ }
421
+ else{
422
+ Ext.Msg.alert("Error", obj.message);
423
+ }
424
+ },
425
+ failure:function(form, action){
426
+ self.clearWindowStatus();
427
+ var obj = Ext.decode(action.response.responseText);
428
+ if(obj != null){
429
+ Ext.Msg.alert("Error", obj.message);
430
+ }
431
+ else{
432
+ Ext.Msg.alert("Error", "Error importing website");
433
+ }
434
+ }
435
+ });
436
+ }
437
+ }
438
+ },{
439
+ text: 'Close',
440
+ handler: function(){
441
+ newModelWindow.close();
442
+ }
443
+ }]
444
+ });
445
+ newModelWindow.show();
446
+ }
447
+ }
448
+ ]
449
+ }
450
+ });
451
+
452
+ this.items = [layout];
453
+ this.callParent(arguments);
454
+ this.setActiveTab(0);
455
+ },
456
+
457
+ constructor : function(config) {
458
+ config = Ext.apply({
459
+ id: 'westregionPanel',
460
+ region:'west',
461
+ split:true,
462
+ width:200,
463
+ collapsible:false
464
+ }, config);
465
+
466
+ this.callParent([config]);
467
+ }
468
+ });
@@ -0,0 +1,4 @@
1
+ function validate_regex(v, pattern){
2
+ var regex = new RegExp(pattern);
3
+ return regex.test(v);
4
+ }
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ Dummy::Application.load_tasks
@@ -0,0 +1,9 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require_tree .
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,45 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(:default)
6
+ require 'erp_forms'
7
+ require 'erp_app'
8
+
9
+
10
+
11
+ module Dummy
12
+ class Application < Rails::Application
13
+ # Settings in config/environments/* take precedence over those specified here.
14
+ # Application configuration should go into files in config/initializers
15
+ # -- all .rb files in that directory are automatically loaded.
16
+
17
+ # Custom directories with classes and modules you want to be autoloadable.
18
+ # config.autoload_paths += %W(#{config.root}/extras)
19
+
20
+ # Only load the plugins named here, in the order given (default is alphabetical).
21
+ # :all can be used as a placeholder for all plugins not explicitly named.
22
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
23
+
24
+ # Activate observers that should always be running.
25
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
26
+
27
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
28
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
29
+ # config.time_zone = 'Central Time (US & Canada)'
30
+
31
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
32
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
33
+ # config.i18n.default_locale = :de
34
+
35
+ # Configure the default encoding used in templates for Ruby 1.9.
36
+ config.encoding = "utf-8"
37
+
38
+ # Configure sensitive parameters which will be filtered from the log file.
39
+ config.filter_parameters += [:password]
40
+
41
+ # Enable the asset pipeline
42
+ config.assets.enabled = true
43
+ end
44
+ end
45
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,8 @@
1
+ # Warning: The database defined as "test" will be erased and
2
+ # re-generated from your development database when you run "rake".
3
+ # Do not set this db to the same as development or production.
4
+ spec:
5
+ adapter: sqlite3
6
+ database: db/spec.sqlite3
7
+ pool: 5
8
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,27 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Do not compress assets
26
+ config.assets.compress = false
27
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = 'ae0d58840f73a49e40850c9d815a6a135e169865cdb8721cec7f335a738af09f3483de0f99d7c131f8fdecf2d8b508f8fd5e2e33c8d0565dcc9030eadb227695'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store