rails_db_admin 2.0.0 → 2.0.1
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.
- data/README.md +19 -3
- data/app/controllers/rails_db_admin/erp_app/desktop/base_controller.rb +1 -1
- data/db/data_migrations/20110816005525_rails_db_admin_application.rb +0 -0
- data/lib/rails_db_admin.rb +1 -0
- data/lib/rails_db_admin/config.rb +3 -1
- data/lib/rails_db_admin/engine.rb +7 -0
- data/lib/rails_db_admin/extjs/json_data_builder.rb +7 -2
- data/lib/rails_db_admin/query_support.rb +8 -2
- data/lib/rails_db_admin/table_support.rb +9 -6
- data/lib/rails_db_admin/version.rb +7 -1
- data/public/javascripts/erp_app/desktop/applications/rails_db_admin/module.js +29 -34
- data/public/javascripts/erp_app/desktop/applications/rails_db_admin/queries_tree_menu.js +0 -4
- data/public/javascripts/erp_app/desktop/applications/rails_db_admin/query_panel.js +1 -2
- data/public/javascripts/erp_app/desktop/applications/rails_db_admin/tables_tree_menu.js +0 -4
- data/spec/controllers/rails_db_admin/{base_controller_spec.rb → erp_app/desktop/base_controller_spec.rb} +7 -7
- data/spec/controllers/rails_db_admin/{queries_controller_spec.rb → erp_app/desktop/queries_controller_spec.rb} +2 -3
- data/spec/lib/rails_db_admin/query_support_spec.rb +1 -1
- data/spec/spec_helper.rb +15 -10
- metadata +78 -79
- data/config/initializers/rails_db_admin.rb +0 -4
data/README.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
|
-

|
2
|
-
|
3
1
|
#Rails DB Admin
|
4
2
|
|
5
|
-
Rails DB Admin is an application that sits on top of the Compass AE framework that adds database management capabilities.
|
3
|
+
Rails DB Admin is an application that sits on top of the Compass AE framework that adds database management capabilities.
|
4
|
+
|
5
|
+

|
6
|
+
|
7
|
+
##Initializer Options
|
8
|
+
|
9
|
+
- query\_location
|
10
|
+
- This is the location to save queries to, in respect to Rails.root.
|
11
|
+
- Default : File.join('lib', 'rails_db_admin', 'queries')
|
12
|
+
|
13
|
+
### Override Initializer
|
14
|
+
|
15
|
+
To override these settings simple create a rails_db_admin.rb file in your initializers and override the config options you want
|
16
|
+
|
17
|
+
Rails.application.config.rails_db_admin.configure do |config|
|
18
|
+
config.query_location = File.join('lib', 'rails_db_admin', 'queries')
|
19
|
+
end
|
20
|
+
Rails.application.config.rails_db_admin.configure!
|
21
|
+
|
@@ -26,7 +26,7 @@ module RailsDbAdmin
|
|
26
26
|
tables.sort! { |a,b| a[:name].downcase <=> b[:name].downcase }
|
27
27
|
|
28
28
|
tables.each do |table|
|
29
|
-
result_hash <<
|
29
|
+
result_hash << {:isTable => true,
|
30
30
|
:text => table[:display],
|
31
31
|
:id => table[:display],
|
32
32
|
:iconCls => 'icon-data',
|
File without changes
|
data/lib/rails_db_admin.rb
CHANGED
@@ -7,5 +7,12 @@ module RailsDbAdmin
|
|
7
7
|
initializer "rails_db_admin.merge_public" do |app|
|
8
8
|
app.middleware.insert_before Rack::Lock, ::ActionDispatch::Static, "#{root}/public"
|
9
9
|
end
|
10
|
+
|
11
|
+
engine = self
|
12
|
+
config.to_prepare do
|
13
|
+
ErpBaseErpSvcs.register_compass_ae_engine(engine)
|
14
|
+
::ErpApp::Widgets::Loader.load_compass_ae_widgets(engine)
|
15
|
+
end
|
16
|
+
|
10
17
|
end
|
11
18
|
end
|
@@ -30,15 +30,20 @@ module RailsDbAdmin
|
|
30
30
|
query = arel_table.project(Arel.sql('*'))
|
31
31
|
end
|
32
32
|
|
33
|
+
# This is a temporary partial fix to handle postgres boolean columns which is use activerecord when possible
|
34
|
+
begin
|
35
|
+
rows = options[:table].classify.constantize.find_by_sql(query.to_sql)
|
36
|
+
rescue
|
37
|
+
rows = @connection.select_all(query.to_sql)
|
38
|
+
end
|
33
39
|
|
34
|
-
rows = @connection.select_all(query.to_sql)
|
35
40
|
records = RailsDbAdmin::TableSupport.database_rows_to_hash(rows)
|
36
41
|
|
37
42
|
if !records.empty? && !records[0].has_key?("id")
|
38
43
|
records = RailsDbAdmin::TableSupport.add_fake_id_col(records)
|
39
44
|
end
|
40
45
|
|
41
|
-
{:
|
46
|
+
{:total => total_count, :data => records}
|
42
47
|
end
|
43
48
|
|
44
49
|
def get_row_data(table, id)
|
@@ -3,7 +3,7 @@ require 'fileutils'
|
|
3
3
|
module RailsDbAdmin
|
4
4
|
class QuerySupport
|
5
5
|
def initialize(database_connection_class, database_connection_name)
|
6
|
-
@path = File.join(Rails.application.config.rails_db_admin.query_location, database_connection_name)
|
6
|
+
@path = File.join(Rails.root, Rails.application.config.rails_db_admin.query_location, database_connection_name)
|
7
7
|
@connection = database_connection_class.connection
|
8
8
|
end
|
9
9
|
|
@@ -33,7 +33,13 @@ module RailsDbAdmin
|
|
33
33
|
query = ar.project(Arel.sql('*')).take(50)
|
34
34
|
#query = "SELECT * FROM #{table} LIMIT #{@connection.sanitize_limit(50)}"
|
35
35
|
|
36
|
-
|
36
|
+
# This is a temporary partial fix to handle postgres boolean columns which is use activerecord when possible
|
37
|
+
begin
|
38
|
+
rows = table.classify.constantize.find_by_sql(query.to_sql)
|
39
|
+
rescue
|
40
|
+
rows = @connection.select_all(query.to_sql)
|
41
|
+
end
|
42
|
+
|
37
43
|
records = RailsDbAdmin::TableSupport.database_rows_to_hash(rows)
|
38
44
|
|
39
45
|
return query.to_sql, records
|
@@ -76,7 +76,7 @@ module RailsDbAdmin
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def primary_key?(table)
|
79
|
-
@connection.supports_primary_key? &&
|
79
|
+
@connection.supports_primary_key? && !@connection.primary_key(table).nil?
|
80
80
|
end
|
81
81
|
|
82
82
|
|
@@ -110,11 +110,14 @@ module RailsDbAdmin
|
|
110
110
|
records = []
|
111
111
|
|
112
112
|
rows.each do |row|
|
113
|
-
record = nil
|
114
|
-
row.each {|k, v|
|
115
|
-
|
116
|
-
}
|
117
|
-
records << record
|
113
|
+
# record = nil
|
114
|
+
# row.each {|k, v|
|
115
|
+
# record = record.nil? ? {k.to_sym => v} : record.merge({k.to_sym => v})
|
116
|
+
# }
|
117
|
+
# records << record
|
118
|
+
|
119
|
+
# simplifying the above with to_hash.symbolize_keys
|
120
|
+
records << row.to_hash.symbolize_keys
|
118
121
|
end
|
119
122
|
|
120
123
|
records.reverse
|
@@ -15,9 +15,9 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
15
15
|
},
|
16
16
|
|
17
17
|
getTableData : function(table){
|
18
|
-
var
|
19
|
-
|
20
|
-
var grid =
|
18
|
+
var self = this;
|
19
|
+
|
20
|
+
var grid = Ext.create('Compass.ErpApp.Shared.DynamicEditableGridLoaderPanel',{
|
21
21
|
title:table,
|
22
22
|
setupUrl:'/rails_db_admin/erp_app/desktop/base/setup_table_grid/' + table,
|
23
23
|
dataUrl:'/rails_db_admin/erp_app/desktop/base/table_data/' + table,
|
@@ -29,7 +29,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
29
29
|
loadErrorMessage:'Tables Without Ids Can Not Be Edited',
|
30
30
|
closable:true,
|
31
31
|
params:{
|
32
|
-
database:
|
32
|
+
database: self.getDatabase()
|
33
33
|
},
|
34
34
|
grid_listeners:{
|
35
35
|
validateedit:{
|
@@ -67,7 +67,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
67
67
|
exception: function(proxy, response, operation){
|
68
68
|
var msg;
|
69
69
|
if (operation.getError() === undefined) {
|
70
|
-
responseObject = Ext.JSON.decode(response.responseText);
|
70
|
+
var responseObject = Ext.JSON.decode(response.responseText);
|
71
71
|
msg = responseObject.exception;
|
72
72
|
} else {
|
73
73
|
msg = operation.getError();
|
@@ -89,15 +89,13 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
89
89
|
|
90
90
|
selectTopFifty : function(table){
|
91
91
|
this.setWindowStatus('Selecting Top 50 from '+ table +'...');
|
92
|
-
var database = this.getDatabase();
|
93
92
|
var self = this;
|
94
93
|
|
95
|
-
|
96
|
-
conn.request({
|
94
|
+
Ext.Ajax.request({
|
97
95
|
url: '/rails_db_admin/erp_app/desktop/queries/select_top_fifty/' + table,
|
98
96
|
timeout:60000,
|
99
97
|
params:{
|
100
|
-
database:
|
98
|
+
database: self.getDatabase()
|
101
99
|
},
|
102
100
|
success: function(responseObject) {
|
103
101
|
self.clearWindowStatus();
|
@@ -117,10 +115,10 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
117
115
|
module:self,
|
118
116
|
sqlQuery:sql
|
119
117
|
});
|
120
|
-
|
118
|
+
|
121
119
|
self.container.add(queryPanel);
|
122
120
|
self.container.setActiveTab(queryPanel.id);
|
123
|
-
|
121
|
+
|
124
122
|
queryPanel.gridContainer.add(readOnlyDataGrid);
|
125
123
|
queryPanel.gridContainer.getLayout().setActiveItem(0);
|
126
124
|
},
|
@@ -140,7 +138,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
140
138
|
},
|
141
139
|
|
142
140
|
connectToDatatbase : function(){
|
143
|
-
var database =
|
141
|
+
var database = this.getDatabase();
|
144
142
|
var tablestreePanelStore = this.accordion.query('.railsdbadmin_tablestreemenu')[0].store;
|
145
143
|
var queriesTreePanelStore = this.accordion.query('.railsdbadmin_queriestreemenu')[0].store;
|
146
144
|
|
@@ -164,23 +162,22 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
164
162
|
},
|
165
163
|
|
166
164
|
getDatabase : function(){
|
167
|
-
var database = Ext.
|
165
|
+
var database = Ext.getCmp('databaseCombo').getValue();
|
168
166
|
return database;
|
169
167
|
},
|
170
|
-
|
168
|
+
|
171
169
|
deleteQuery : function(queryName){
|
172
170
|
var self = this;
|
173
171
|
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this query?', function(btn){
|
174
|
-
if(btn
|
172
|
+
if(btn === 'no'){
|
175
173
|
return false;
|
176
174
|
}
|
177
175
|
else
|
178
|
-
if(btn
|
176
|
+
if(btn === 'yes')
|
179
177
|
{
|
180
178
|
self.setWindowStatus('Deleting '+ queryName +'...');
|
181
179
|
var database = self.getDatabase();
|
182
|
-
|
183
|
-
conn.request({
|
180
|
+
Ext.Ajax.request({
|
184
181
|
url: '/rails_db_admin/erp_app/desktop/queries/delete_query/',
|
185
182
|
params:{
|
186
183
|
database:database,
|
@@ -216,13 +213,12 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
216
213
|
}
|
217
214
|
});
|
218
215
|
},
|
219
|
-
|
216
|
+
|
220
217
|
displayAndExecuteQuery : function(queryName){
|
221
218
|
this.setWindowStatus('Executing '+ queryName +'...');
|
222
219
|
var self = this;
|
223
220
|
var database = this.getDatabase();
|
224
|
-
|
225
|
-
conn.request({
|
221
|
+
Ext.Ajax.request({
|
226
222
|
url: '/rails_db_admin/erp_app/desktop/queries/open_and_execute_query/',
|
227
223
|
params:{
|
228
224
|
database:database,
|
@@ -231,9 +227,9 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
231
227
|
success: function(responseObject) {
|
232
228
|
var response = Ext.decode(responseObject.responseText);
|
233
229
|
var query = response.query;
|
234
|
-
|
230
|
+
|
235
231
|
var queryPanel = null;
|
236
|
-
|
232
|
+
|
237
233
|
if(response.success)
|
238
234
|
{
|
239
235
|
self.clearWindowStatus();
|
@@ -251,10 +247,10 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
251
247
|
module:self,
|
252
248
|
sqlQuery:query
|
253
249
|
});
|
254
|
-
|
250
|
+
|
255
251
|
self.container.add(queryPanel);
|
256
252
|
self.container.setActiveTab(self.container.items.length - 1);
|
257
|
-
|
253
|
+
|
258
254
|
queryPanel.gridContainer.add(readOnlyDataGrid);
|
259
255
|
queryPanel.gridContainer.getLayout().setActiveItem(0);
|
260
256
|
}
|
@@ -265,11 +261,11 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
265
261
|
module:self,
|
266
262
|
sqlQuery:query
|
267
263
|
});
|
268
|
-
|
264
|
+
|
269
265
|
self.container.add(queryPanel);
|
270
266
|
self.container.setActiveTab(self.container.items.length - 1);
|
271
267
|
}
|
272
|
-
|
268
|
+
|
273
269
|
},
|
274
270
|
failure: function() {
|
275
271
|
self.clearWindowStatus();
|
@@ -284,15 +280,14 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin",{
|
|
284
280
|
iconCls:'icon-rails_db_admin',
|
285
281
|
handler : this.createWindow,
|
286
282
|
scope: this
|
287
|
-
}
|
283
|
+
};
|
288
284
|
},
|
289
|
-
|
285
|
+
|
290
286
|
displayQuery : function(queryName){
|
291
287
|
this.setWindowStatus('Retrieving '+ queryName +'...');
|
292
288
|
var self = this;
|
293
289
|
var database = this.getDatabase();
|
294
|
-
|
295
|
-
conn.request({
|
290
|
+
Ext.Ajax.request({
|
296
291
|
url: '/rails_db_admin/erp_app/desktop/queries/open_query/',
|
297
292
|
params:{
|
298
293
|
database:database,
|
@@ -406,7 +401,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin.BooleanEditor",{
|
|
406
401
|
fields: ['display', 'value'],
|
407
402
|
data: [['False', '0'],['True', '1']]
|
408
403
|
});
|
409
|
-
|
404
|
+
|
410
405
|
this.store = trueFalseStore;
|
411
406
|
|
412
407
|
this.callParent(arguments);
|
@@ -420,10 +415,10 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin.BooleanEditor",{
|
|
420
415
|
mode:'local'
|
421
416
|
}, config);
|
422
417
|
|
423
|
-
this.callParent([config])
|
418
|
+
this.callParent([config]);
|
424
419
|
}
|
425
420
|
});
|
426
421
|
|
427
422
|
Compass.ErpApp.Desktop.Applications.RailsDbAdmin.renderBooleanColumn = function(v){
|
428
423
|
return (v == 1) ? "True" : "False";
|
429
|
-
}
|
424
|
+
};
|
@@ -21,10 +21,6 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin.QueriesMenuTreePane
|
|
21
21
|
}
|
22
22
|
}),
|
23
23
|
animate:false,
|
24
|
-
//TODO_EXTJS4 this is added to fix error should be removed when extjs 4 releases fix.
|
25
|
-
viewConfig:{
|
26
|
-
loadMask: false
|
27
|
-
},
|
28
24
|
listeners:{
|
29
25
|
'itemclick':function(view, record, item, index, e){
|
30
26
|
e.stopEvent();
|
@@ -67,8 +67,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin.QueryPanel",{
|
|
67
67
|
|
68
68
|
messageBox = Ext.Msg.wait('Status', 'Executing..');
|
69
69
|
|
70
|
-
|
71
|
-
conn.request({
|
70
|
+
Ext.Ajax.request({
|
72
71
|
url: '/rails_db_admin/erp_app/desktop/queries/execute_query',
|
73
72
|
params:{
|
74
73
|
sql:sql,
|
@@ -41,10 +41,6 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin.TablesMenuTreePanel
|
|
41
41
|
]
|
42
42
|
}),
|
43
43
|
animate:false,
|
44
|
-
//TODO_EXTJS4 this is added to fix error should be removed when extjs 4 releases fix.
|
45
|
-
viewConfig:{
|
46
|
-
loadMask: false
|
47
|
-
},
|
48
44
|
listeners:{
|
49
45
|
'itemcontextmenu':function(view, record, item, index, e){
|
50
46
|
e.stopEvent();
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe RailsDbAdmin::BaseController do
|
3
|
+
describe RailsDbAdmin::ErpApp::Desktop::BaseController do
|
4
4
|
|
5
5
|
#handle devise user auth
|
6
6
|
before(:each) do
|
@@ -101,10 +101,10 @@ describe RailsDbAdmin::BaseController do
|
|
101
101
|
:table => "role_types"}
|
102
102
|
|
103
103
|
parsed_body = JSON.parse(response.body)
|
104
|
-
parsed_body["
|
104
|
+
parsed_body["total"].should eq(2)
|
105
105
|
end
|
106
106
|
|
107
|
-
it "should return 1 row because start is increased by 1, but
|
107
|
+
it "should return 1 row because start is increased by 1, but total should remain 2" do
|
108
108
|
|
109
109
|
get :base, {:use_route => :rails_db_admin,
|
110
110
|
:action => "table_data",
|
@@ -112,11 +112,11 @@ describe RailsDbAdmin::BaseController do
|
|
112
112
|
:start => "1"}
|
113
113
|
|
114
114
|
parsed_body = JSON.parse(response.body)
|
115
|
-
parsed_body["
|
115
|
+
parsed_body["total"].should eq(2)
|
116
116
|
parsed_body["data"].length.should eq(1)
|
117
117
|
end
|
118
118
|
|
119
|
-
it "should return 1 row because limit is set to 1, but
|
119
|
+
it "should return 1 row because limit is set to 1, but total should remain 2" do
|
120
120
|
|
121
121
|
get :base, {:use_route => :rails_db_admin,
|
122
122
|
:action => "table_data",
|
@@ -124,7 +124,7 @@ describe RailsDbAdmin::BaseController do
|
|
124
124
|
:limit => "1"}
|
125
125
|
|
126
126
|
parsed_body = JSON.parse(response.body)
|
127
|
-
parsed_body["
|
127
|
+
parsed_body["total"].should eq(2)
|
128
128
|
parsed_body["data"].length.should eq(1)
|
129
129
|
end
|
130
130
|
|
@@ -136,7 +136,7 @@ describe RailsDbAdmin::BaseController do
|
|
136
136
|
:table => 'preference_options_preference_types'}
|
137
137
|
|
138
138
|
parsed_body = JSON.parse(response.body)
|
139
|
-
parsed_body["
|
139
|
+
parsed_body["total"].should eq(13)
|
140
140
|
end
|
141
141
|
end
|
142
142
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe RailsDbAdmin::QueriesController do
|
3
|
+
describe RailsDbAdmin::ErpApp::Desktop::QueriesController do
|
4
4
|
|
5
5
|
#handle devise user auth
|
6
6
|
before(:each) do
|
@@ -64,8 +64,7 @@ describe RailsDbAdmin::QueriesController do
|
|
64
64
|
:sql => @sql}
|
65
65
|
|
66
66
|
parsed_body = JSON.parse(response.body)
|
67
|
-
parsed_body["success"].should eq(
|
68
|
-
parsed_body["exception"].should eq("Empty result set")
|
67
|
+
parsed_body["success"].should eq(true)
|
69
68
|
end
|
70
69
|
|
71
70
|
it "should work on input of multiple queries spanning several lines each " do
|
@@ -6,7 +6,7 @@ describe RailsDbAdmin::QuerySupport do
|
|
6
6
|
@connection_class = double(ActiveRecord::Base)
|
7
7
|
@adapter = double(ActiveRecord::ConnectionAdapters::AbstractAdapter)
|
8
8
|
@connection_class.should_receive(:connection).and_return(@adapter)
|
9
|
-
@instance = RailsDbAdmin::QuerySupport.new(@connection_class)
|
9
|
+
@instance = RailsDbAdmin::QuerySupport.new(@connection_class, 'spec')
|
10
10
|
end
|
11
11
|
|
12
12
|
describe "select_top_fifty" do
|
data/spec/spec_helper.rb
CHANGED
@@ -22,6 +22,21 @@ Spork.prefork do
|
|
22
22
|
ActiveRecord::Base.establish_connection(ENV["DB"] || "spec")
|
23
23
|
ActiveRecord::Migration.verbose = false
|
24
24
|
|
25
|
+
#We have to execute the migrations from dummy app directory
|
26
|
+
Dir.chdir DUMMY_APP_ROOT
|
27
|
+
`rake db:drop`
|
28
|
+
Dir.chdir ENGINE_RAILS_ROOT
|
29
|
+
|
30
|
+
#We have to execute the migrations from dummy app directory
|
31
|
+
Dir.chdir DUMMY_APP_ROOT
|
32
|
+
`rake db:migrate`
|
33
|
+
Dir.chdir ENGINE_RAILS_ROOT
|
34
|
+
|
35
|
+
#We have to execute the migrations from dummy app directory
|
36
|
+
Dir.chdir DUMMY_APP_ROOT
|
37
|
+
`rake db:migrate_data`
|
38
|
+
Dir.chdir ENGINE_RAILS_ROOT
|
39
|
+
|
25
40
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
26
41
|
# in spec/support/ and its subdirectories.
|
27
42
|
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
|
@@ -38,16 +53,6 @@ Spork.prefork do
|
|
38
53
|
end
|
39
54
|
|
40
55
|
Spork.each_run do
|
41
|
-
#We have to execute the migrations from dummy app directory
|
42
|
-
Dir.chdir DUMMY_APP_ROOT
|
43
|
-
`rake db:drop`
|
44
|
-
Dir.chdir ENGINE_RAILS_ROOT
|
45
|
-
|
46
|
-
#We have to execute the migrations from dummy app directory
|
47
|
-
Dir.chdir DUMMY_APP_ROOT
|
48
|
-
`rake db:migrate`
|
49
|
-
Dir.chdir ENGINE_RAILS_ROOT
|
50
|
-
|
51
56
|
ErpDevSvcs::FactorySupport.load_engine_factories
|
52
57
|
|
53
58
|
require 'simplecov'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_db_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,41 +9,41 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: erp_app
|
16
|
-
requirement: &
|
16
|
+
requirement: &74769260 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - =
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 3.0.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *74769260
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: erp_forms
|
27
|
-
requirement: &
|
27
|
+
requirement: &74766630 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
|
-
- -
|
30
|
+
- - =
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 2.0.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *74766630
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: erp_dev_svcs
|
38
|
-
requirement: &
|
38
|
+
requirement: &74764700 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - =
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 3.0.1
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *74764700
|
47
47
|
description: RailsDB Admin is similar in functionality to PHPMyAdmin and other database
|
48
48
|
browsing and data editing tools. It uses the CompassAE database connection information
|
49
49
|
to discover the schema for an installation, and generates Extjs UIs for creating
|
@@ -54,74 +54,73 @@ executables: []
|
|
54
54
|
extensions: []
|
55
55
|
extra_rdoc_files: []
|
56
56
|
files:
|
57
|
-
- public/
|
58
|
-
- public/images/icons/rails_db_admin/rails_db_admin_24x24.png
|
57
|
+
- public/stylesheets/erp_app/desktop/applications/rails_db_admin/rails_db_admin.css
|
59
58
|
- public/images/icons/rails_db_admin/rails_db_admin_32x32.png
|
59
|
+
- public/images/icons/rails_db_admin/rails_db_admin_16x16.png
|
60
60
|
- public/images/icons/rails_db_admin/rails_db_admin_48x48.png
|
61
|
-
- public/
|
61
|
+
- public/images/icons/rails_db_admin/rails_db_admin_24x24.png
|
62
|
+
- public/javascripts/erp_app/desktop/applications/rails_db_admin/query_panel.js
|
63
|
+
- public/javascripts/erp_app/desktop/applications/rails_db_admin/tables_tree_menu.js
|
62
64
|
- public/javascripts/erp_app/desktop/applications/rails_db_admin/module.js
|
63
65
|
- public/javascripts/erp_app/desktop/applications/rails_db_admin/queries_tree_menu.js
|
64
|
-
- public/javascripts/erp_app/desktop/applications/rails_db_admin/query_panel.js
|
65
66
|
- public/javascripts/erp_app/desktop/applications/rails_db_admin/readonly_table_data_grid.js
|
66
|
-
- public/javascripts/erp_app/desktop/applications/rails_db_admin/
|
67
|
-
- public/stylesheets/erp_app/desktop/applications/rails_db_admin/rails_db_admin.css
|
68
|
-
- app/assets/javascripts/rails_db_admin/application.js
|
67
|
+
- public/javascripts/erp_app/desktop/applications/rails_db_admin/database_combo.js
|
69
68
|
- app/assets/stylesheets/rails_db_admin/application.css
|
70
|
-
- app/
|
71
|
-
- app/controllers/rails_db_admin/erp_app/desktop/queries_controller.rb
|
72
|
-
- app/helpers/rails_db_admin/application_helper.rb
|
69
|
+
- app/assets/javascripts/rails_db_admin/application.js
|
73
70
|
- app/views/layouts/application.html.erb
|
74
71
|
- app/views/layouts/rails_db_admin/application.html.erb
|
75
|
-
-
|
72
|
+
- app/helpers/rails_db_admin/application_helper.rb
|
73
|
+
- app/controllers/rails_db_admin/erp_app/desktop/base_controller.rb
|
74
|
+
- app/controllers/rails_db_admin/erp_app/desktop/queries_controller.rb
|
76
75
|
- config/routes.rb
|
77
76
|
- db/data_migrations/20110816005525_rails_db_admin_application.rb
|
78
|
-
- lib/rails_db_admin
|
77
|
+
- lib/rails_db_admin.rb
|
78
|
+
- lib/tasks/rails_db_admin_tasks.rake
|
79
|
+
- lib/rails_db_admin/extjs.rb
|
79
80
|
- lib/rails_db_admin/connection_handler.rb
|
80
81
|
- lib/rails_db_admin/engine.rb
|
81
|
-
- lib/rails_db_admin/
|
82
|
+
- lib/rails_db_admin/config.rb
|
82
83
|
- lib/rails_db_admin/extjs/json_data_builder.rb
|
83
|
-
- lib/rails_db_admin/extjs.rb
|
84
|
-
- lib/rails_db_admin/query_support.rb
|
84
|
+
- lib/rails_db_admin/extjs/json_column_builder.rb
|
85
85
|
- lib/rails_db_admin/table_support.rb
|
86
|
+
- lib/rails_db_admin/query_support.rb
|
86
87
|
- lib/rails_db_admin/version.rb
|
87
|
-
- lib/rails_db_admin.rb
|
88
|
-
- lib/tasks/rails_db_admin_tasks.rake
|
89
88
|
- GPL-3-LICENSE
|
90
89
|
- Rakefile
|
91
90
|
- README.md
|
92
|
-
- spec/
|
93
|
-
- spec/
|
94
|
-
- spec/
|
91
|
+
- spec/spec_helper.rb
|
92
|
+
- spec/lib/rails_db_admin/extjs/json_column_builder_spec.rb
|
93
|
+
- spec/lib/rails_db_admin/extjs/json_data_builder_spec.rb
|
94
|
+
- spec/lib/rails_db_admin/query_support_spec.rb
|
95
|
+
- spec/lib/rails_db_admin/table_support_spec.rb
|
96
|
+
- spec/dummy/public/422.html
|
97
|
+
- spec/dummy/public/404.html
|
98
|
+
- spec/dummy/public/500.html
|
99
|
+
- spec/dummy/public/favicon.ico
|
100
|
+
- spec/dummy/config.ru
|
95
101
|
- spec/dummy/app/assets/stylesheets/application.css
|
96
|
-
- spec/dummy/app/
|
97
|
-
- spec/dummy/app/helpers/application_helper.rb
|
102
|
+
- spec/dummy/app/assets/javascripts/application.js
|
98
103
|
- spec/dummy/app/views/layouts/application.html.erb
|
99
|
-
- spec/dummy/
|
104
|
+
- spec/dummy/app/helpers/application_helper.rb
|
105
|
+
- spec/dummy/app/controllers/application_controller.rb
|
106
|
+
- spec/dummy/config/routes.rb
|
107
|
+
- spec/dummy/config/locales/en.yml
|
100
108
|
- spec/dummy/config/boot.rb
|
101
|
-
- spec/dummy/config/
|
102
|
-
- spec/dummy/config/environment.rb
|
103
|
-
- spec/dummy/config/environments/cucumber.rb
|
109
|
+
- spec/dummy/config/application.rb
|
104
110
|
- spec/dummy/config/environments/spec.rb
|
105
|
-
- spec/dummy/config/
|
106
|
-
- spec/dummy/config/initializers/inflections.rb
|
111
|
+
- spec/dummy/config/environments/cucumber.rb
|
107
112
|
- spec/dummy/config/initializers/mime_types.rb
|
108
|
-
- spec/dummy/config/initializers/secret_token.rb
|
109
113
|
- spec/dummy/config/initializers/session_store.rb
|
114
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
110
115
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
111
|
-
- spec/dummy/config/
|
112
|
-
- spec/dummy/config/
|
113
|
-
- spec/dummy/config.
|
114
|
-
- spec/dummy/
|
115
|
-
- spec/dummy/public/422.html
|
116
|
-
- spec/dummy/public/500.html
|
117
|
-
- spec/dummy/public/favicon.ico
|
116
|
+
- spec/dummy/config/initializers/inflections.rb
|
117
|
+
- spec/dummy/config/initializers/secret_token.rb
|
118
|
+
- spec/dummy/config/environment.rb
|
119
|
+
- spec/dummy/config/database.yml
|
118
120
|
- spec/dummy/Rakefile
|
119
121
|
- spec/dummy/script/rails
|
120
|
-
- spec/
|
121
|
-
- spec/
|
122
|
-
- spec/lib/rails_db_admin/query_support_spec.rb
|
123
|
-
- spec/lib/rails_db_admin/table_support_spec.rb
|
124
|
-
- spec/spec_helper.rb
|
122
|
+
- spec/controllers/rails_db_admin/erp_app/desktop/base_controller_spec.rb
|
123
|
+
- spec/controllers/rails_db_admin/erp_app/desktop/queries_controller_spec.rb
|
125
124
|
homepage: http://development.compassagile.com
|
126
125
|
licenses: []
|
127
126
|
post_install_message:
|
@@ -148,36 +147,36 @@ specification_version: 3
|
|
148
147
|
summary: RailsDB Admin is similar in functionality to PHPMyAdmin and other database
|
149
148
|
browsing and data editing tools.
|
150
149
|
test_files:
|
151
|
-
- spec/
|
152
|
-
- spec/
|
153
|
-
- spec/
|
150
|
+
- spec/spec_helper.rb
|
151
|
+
- spec/lib/rails_db_admin/extjs/json_column_builder_spec.rb
|
152
|
+
- spec/lib/rails_db_admin/extjs/json_data_builder_spec.rb
|
153
|
+
- spec/lib/rails_db_admin/query_support_spec.rb
|
154
|
+
- spec/lib/rails_db_admin/table_support_spec.rb
|
155
|
+
- spec/dummy/public/422.html
|
156
|
+
- spec/dummy/public/404.html
|
157
|
+
- spec/dummy/public/500.html
|
158
|
+
- spec/dummy/public/favicon.ico
|
159
|
+
- spec/dummy/config.ru
|
154
160
|
- spec/dummy/app/assets/stylesheets/application.css
|
155
|
-
- spec/dummy/app/
|
156
|
-
- spec/dummy/app/helpers/application_helper.rb
|
161
|
+
- spec/dummy/app/assets/javascripts/application.js
|
157
162
|
- spec/dummy/app/views/layouts/application.html.erb
|
158
|
-
- spec/dummy/
|
163
|
+
- spec/dummy/app/helpers/application_helper.rb
|
164
|
+
- spec/dummy/app/controllers/application_controller.rb
|
165
|
+
- spec/dummy/config/routes.rb
|
166
|
+
- spec/dummy/config/locales/en.yml
|
159
167
|
- spec/dummy/config/boot.rb
|
160
|
-
- spec/dummy/config/
|
161
|
-
- spec/dummy/config/environment.rb
|
162
|
-
- spec/dummy/config/environments/cucumber.rb
|
168
|
+
- spec/dummy/config/application.rb
|
163
169
|
- spec/dummy/config/environments/spec.rb
|
164
|
-
- spec/dummy/config/
|
165
|
-
- spec/dummy/config/initializers/inflections.rb
|
170
|
+
- spec/dummy/config/environments/cucumber.rb
|
166
171
|
- spec/dummy/config/initializers/mime_types.rb
|
167
|
-
- spec/dummy/config/initializers/secret_token.rb
|
168
172
|
- spec/dummy/config/initializers/session_store.rb
|
173
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
169
174
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
170
|
-
- spec/dummy/config/
|
171
|
-
- spec/dummy/config/
|
172
|
-
- spec/dummy/config.
|
173
|
-
- spec/dummy/
|
174
|
-
- spec/dummy/public/422.html
|
175
|
-
- spec/dummy/public/500.html
|
176
|
-
- spec/dummy/public/favicon.ico
|
175
|
+
- spec/dummy/config/initializers/inflections.rb
|
176
|
+
- spec/dummy/config/initializers/secret_token.rb
|
177
|
+
- spec/dummy/config/environment.rb
|
178
|
+
- spec/dummy/config/database.yml
|
177
179
|
- spec/dummy/Rakefile
|
178
180
|
- spec/dummy/script/rails
|
179
|
-
- spec/
|
180
|
-
- spec/
|
181
|
-
- spec/lib/rails_db_admin/query_support_spec.rb
|
182
|
-
- spec/lib/rails_db_admin/table_support_spec.rb
|
183
|
-
- spec/spec_helper.rb
|
181
|
+
- spec/controllers/rails_db_admin/erp_app/desktop/base_controller_spec.rb
|
182
|
+
- spec/controllers/rails_db_admin/erp_app/desktop/queries_controller_spec.rb
|