rails_db_admin 2.0.4 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/app/models/report.rb +3 -0
  2. data/lib/rails_db_admin/connection_handler.rb +11 -13
  3. data/lib/rails_db_admin/version.rb +2 -2
  4. data/lib/tasks/rails_db_admin_tasks.rake +4 -4
  5. data/spec/controllers/rails_db_admin/erp_app/desktop/base_controller_spec.rb +8 -8
  6. data/spec/controllers/rails_db_admin/erp_app/desktop/queries_controller_spec.rb +4 -3
  7. data/spec/dummy/config/application.rb +6 -0
  8. data/spec/dummy/config/environments/spec.rb +3 -0
  9. data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +15 -0
  10. data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +12 -0
  11. data/spec/dummy/db/data_migrations/20110608185830_create_default_dynamic_models_and_forms.erp_forms.rb +33 -0
  12. data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +19 -0
  13. data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +252 -0
  14. data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +53 -0
  15. data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +16 -0
  16. data/spec/dummy/db/data_migrations/20110816005525_rails_db_admin_application.rails_db_admin.rb +32 -0
  17. data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +21 -0
  18. data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +32 -0
  19. data/spec/dummy/db/data_migrations/20110828190913_create_desktop_app_dynamic_forms.erp_forms.rb +19 -0
  20. data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +12 -0
  21. data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +23 -0
  22. data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +42 -0
  23. data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +22 -0
  24. data/spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb +14 -0
  25. data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +29 -0
  26. data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +11 -0
  27. data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +19 -0
  28. data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +23 -0
  29. data/spec/dummy/db/data_migrations/20120824013449_create_ticket_form.erp_forms.rb +67 -0
  30. data/spec/dummy/db/data_migrations/20121026013449_update_ticket_form.erp_forms.rb +65 -0
  31. data/spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb +27 -0
  32. data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +20 -0
  33. data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +16 -0
  34. data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +24 -0
  35. data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +23 -0
  36. data/spec/dummy/db/migrate/20121219201515_base_erp_services.erp_base_erp_svcs.rb +461 -0
  37. data/spec/dummy/db/migrate/20121219201516_base_tech_services.erp_tech_svcs.rb +255 -0
  38. data/spec/dummy/db/migrate/20121219201517_create_has_attribute_tables.erp_tech_svcs.rb +39 -0
  39. data/spec/dummy/db/migrate/20121219201518_base_app_framework.erp_app.rb +276 -0
  40. data/spec/dummy/db/migrate/20121219201519_dynamic_forms.erp_forms.rb +95 -0
  41. data/spec/dummy/db/migrate/20121219201520_create_tickets.erp_forms.rb +19 -0
  42. data/spec/dummy/db/migrate/20121219201521_upgrade_dynamic_forms_table.erp_forms.rb +32 -0
  43. data/spec/dummy/db/migrate/20121227215524_add_reports.rails_db_admin.rb +21 -0
  44. data/spec/dummy/db/migrate/20130107181642_create_groups.erp_tech_svcs.rb +19 -0
  45. data/spec/dummy/db/migrate/20130107181643_upgrade_security.erp_tech_svcs.rb +54 -0
  46. data/spec/dummy/db/migrate/20130107181644_upgrade_security2.erp_tech_svcs.rb +270 -0
  47. data/spec/dummy/db/schema.rb +888 -0
  48. data/spec/dummy/db/spec.sqlite3 +0 -0
  49. data/spec/dummy/log/spec.log +38042 -0
  50. data/spec/lib/rails_db_admin/extjs/json_column_builder_spec.rb +2 -3
  51. data/spec/lib/rails_db_admin/table_support_spec.rb +1 -1
  52. data/spec/spec_helper.rb +18 -15
  53. metadata +107 -9
@@ -3,8 +3,8 @@ require "spec_helper"
3
3
  describe RailsDbAdmin::Extjs::JsonColumnBuilder do
4
4
 
5
5
  before(:each) do
6
- @connection_class = RailsDbAdmin::ConnectionHandler.create_connection_class("spec")
7
- @connection = @connection_class.connection
6
+ @connection_class = RailsDbAdmin::ConnectionHandler.create_connection_class ''
7
+ @connection = ActiveRecord::Base.connection
8
8
  end
9
9
 
10
10
  describe "build_grid_columns" do
@@ -197,7 +197,6 @@ describe RailsDbAdmin::Extjs::JsonColumnBuilder do
197
197
  @connection.columns("role_types"),true)
198
198
 
199
199
  result.should eq(expected_result)
200
-
201
200
  end
202
201
 
203
202
  end
@@ -277,7 +277,7 @@ describe RailsDbAdmin::TableSupport do
277
277
  describe "clean_nulls" do
278
278
 
279
279
  before(:each) do
280
- @connection_class = RailsDbAdmin::ConnectionHandler.create_connection_class("spec")
280
+ @connection_class = RailsDbAdmin::ConnectionHandler.create_connection_class ''
281
281
  @instance = RailsDbAdmin::TableSupport.new(@connection_class)
282
282
  @data_hash = {"description" => "",
283
283
  "parent_id" => 0,
@@ -1,5 +1,6 @@
1
1
  require 'spork'
2
2
  require 'rake'
3
+ require 'factory_girl'
3
4
 
4
5
  Spork.prefork do
5
6
  # Loading more in this block will cause your tests to run faster. However,
@@ -22,21 +23,6 @@ Spork.prefork do
22
23
  ActiveRecord::Base.establish_connection(ENV["DB"] || "spec")
23
24
  ActiveRecord::Migration.verbose = false
24
25
 
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
-
40
26
  # Requires supporting ruby files with custom matchers and macros, etc,
41
27
  # in spec/support/ and its subdirectories.
42
28
  Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
@@ -46,6 +32,7 @@ Spork.prefork do
46
32
 
47
33
  RSpec.configure do |config|
48
34
  config.use_transactional_fixtures = true
35
+ config.include FactoryGirl::Syntax::Methods
49
36
  config.include Sorcery::TestHelpers::Rails
50
37
  config.include ErpDevSvcs
51
38
  config.include ErpDevSvcs::ControllerSupport, :type => :controller
@@ -53,6 +40,21 @@ Spork.prefork do
53
40
  end
54
41
 
55
42
  Spork.each_run do
43
+ #We have to execute the migrations from dummy app directory
44
+ Dir.chdir DUMMY_APP_ROOT
45
+ `rake db:drop RAILS_ENV=spec`
46
+ Dir.chdir ENGINE_RAILS_ROOT
47
+
48
+ #We have to execute the migratiapp:compass_ae:install:data_migrationsons from dummy app directory
49
+ Dir.chdir DUMMY_APP_ROOT
50
+
51
+
52
+ `rake compass_ae:install:migrations RAILS_ENV=spec`
53
+ `rake compass_ae:install:data_migrations RAILS_ENV=spec`
54
+ `rake db:migrate RAILS_ENV=spec`
55
+ `rake db:migrate_data RAILS_ENV=spec`
56
+ Dir.chdir ENGINE_RAILS_ROOT
57
+
56
58
  ErpDevSvcs::FactorySupport.load_engine_factories
57
59
 
58
60
  require 'simplecov'
@@ -62,4 +64,5 @@ Spork.each_run do
62
64
  #Need to explictly load the files in lib/ until we figure out how to
63
65
  #get rails to autoload them for spec like it used to...
64
66
  Dir[File.join(ENGINE_RAILS_ROOT, "lib/**/*.rb")].each {|f| load f}
67
+ Dir[File.join(ENGINE_RAILS_ROOT, "app/models/extensions/**/*.rb")].each {|f| load f}
65
68
  end
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
4
+ version: 2.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,30 +9,40 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-10 00:00:00.000000000 Z
12
+ date: 2013-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erp_forms
16
- requirement: &70219717203920 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '2.0'
21
+ version: '2.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70219717203920
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '2.1'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: erp_dev_svcs
27
- requirement: &70219717203200 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
31
36
  - !ruby/object:Gem::Version
32
- version: '3.0'
37
+ version: '3.1'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *70219717203200
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '3.1'
36
46
  description: RailsDB Admin is similar in functionality to PHPMyAdmin and other database
37
47
  browsing and data editing tools. It uses the CompassAE database connection information
38
48
  to discover the schema for an installation, and generates Extjs UIs for creating
@@ -108,6 +118,47 @@ files:
108
118
  - spec/dummy/config/locales/en.yml
109
119
  - spec/dummy/config/routes.rb
110
120
  - spec/dummy/config.ru
121
+ - spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb
122
+ - spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb
123
+ - spec/dummy/db/data_migrations/20110608185830_create_default_dynamic_models_and_forms.erp_forms.rb
124
+ - spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb
125
+ - spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb
126
+ - spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb
127
+ - spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb
128
+ - spec/dummy/db/data_migrations/20110816005525_rails_db_admin_application.rails_db_admin.rb
129
+ - spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb
130
+ - spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb
131
+ - spec/dummy/db/data_migrations/20110828190913_create_desktop_app_dynamic_forms.erp_forms.rb
132
+ - spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb
133
+ - spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb
134
+ - spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
135
+ - spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb
136
+ - spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb
137
+ - spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb
138
+ - spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb
139
+ - spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb
140
+ - spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb
141
+ - spec/dummy/db/data_migrations/20120824013449_create_ticket_form.erp_forms.rb
142
+ - spec/dummy/db/data_migrations/20121026013449_update_ticket_form.erp_forms.rb
143
+ - spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
144
+ - spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb
145
+ - spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb
146
+ - spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb
147
+ - spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb
148
+ - spec/dummy/db/migrate/20121219201515_base_erp_services.erp_base_erp_svcs.rb
149
+ - spec/dummy/db/migrate/20121219201516_base_tech_services.erp_tech_svcs.rb
150
+ - spec/dummy/db/migrate/20121219201517_create_has_attribute_tables.erp_tech_svcs.rb
151
+ - spec/dummy/db/migrate/20121219201518_base_app_framework.erp_app.rb
152
+ - spec/dummy/db/migrate/20121219201519_dynamic_forms.erp_forms.rb
153
+ - spec/dummy/db/migrate/20121219201520_create_tickets.erp_forms.rb
154
+ - spec/dummy/db/migrate/20121219201521_upgrade_dynamic_forms_table.erp_forms.rb
155
+ - spec/dummy/db/migrate/20121227215524_add_reports.rails_db_admin.rb
156
+ - spec/dummy/db/migrate/20130107181642_create_groups.erp_tech_svcs.rb
157
+ - spec/dummy/db/migrate/20130107181643_upgrade_security.erp_tech_svcs.rb
158
+ - spec/dummy/db/migrate/20130107181644_upgrade_security2.erp_tech_svcs.rb
159
+ - spec/dummy/db/schema.rb
160
+ - spec/dummy/db/spec.sqlite3
161
+ - spec/dummy/log/spec.log
111
162
  - spec/dummy/public/404.html
112
163
  - spec/dummy/public/422.html
113
164
  - spec/dummy/public/500.html
@@ -131,15 +182,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
182
  - - ! '>='
132
183
  - !ruby/object:Gem::Version
133
184
  version: '0'
185
+ segments:
186
+ - 0
187
+ hash: 1802735392733090315
134
188
  required_rubygems_version: !ruby/object:Gem::Requirement
135
189
  none: false
136
190
  requirements:
137
191
  - - ! '>='
138
192
  - !ruby/object:Gem::Version
139
193
  version: '0'
194
+ segments:
195
+ - 0
196
+ hash: 1802735392733090315
140
197
  requirements: []
141
198
  rubyforge_project:
142
- rubygems_version: 1.8.11
199
+ rubygems_version: 1.8.24
143
200
  signing_key:
144
201
  specification_version: 3
145
202
  summary: RailsDB Admin is similar in functionality to PHPMyAdmin and other database
@@ -167,6 +224,47 @@ test_files:
167
224
  - spec/dummy/config/locales/en.yml
168
225
  - spec/dummy/config/routes.rb
169
226
  - spec/dummy/config.ru
227
+ - spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb
228
+ - spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb
229
+ - spec/dummy/db/data_migrations/20110608185830_create_default_dynamic_models_and_forms.erp_forms.rb
230
+ - spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb
231
+ - spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb
232
+ - spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb
233
+ - spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb
234
+ - spec/dummy/db/data_migrations/20110816005525_rails_db_admin_application.rails_db_admin.rb
235
+ - spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb
236
+ - spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb
237
+ - spec/dummy/db/data_migrations/20110828190913_create_desktop_app_dynamic_forms.erp_forms.rb
238
+ - spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb
239
+ - spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb
240
+ - spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
241
+ - spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb
242
+ - spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb
243
+ - spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb
244
+ - spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb
245
+ - spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb
246
+ - spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb
247
+ - spec/dummy/db/data_migrations/20120824013449_create_ticket_form.erp_forms.rb
248
+ - spec/dummy/db/data_migrations/20121026013449_update_ticket_form.erp_forms.rb
249
+ - spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
250
+ - spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb
251
+ - spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb
252
+ - spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb
253
+ - spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb
254
+ - spec/dummy/db/migrate/20121219201515_base_erp_services.erp_base_erp_svcs.rb
255
+ - spec/dummy/db/migrate/20121219201516_base_tech_services.erp_tech_svcs.rb
256
+ - spec/dummy/db/migrate/20121219201517_create_has_attribute_tables.erp_tech_svcs.rb
257
+ - spec/dummy/db/migrate/20121219201518_base_app_framework.erp_app.rb
258
+ - spec/dummy/db/migrate/20121219201519_dynamic_forms.erp_forms.rb
259
+ - spec/dummy/db/migrate/20121219201520_create_tickets.erp_forms.rb
260
+ - spec/dummy/db/migrate/20121219201521_upgrade_dynamic_forms_table.erp_forms.rb
261
+ - spec/dummy/db/migrate/20121227215524_add_reports.rails_db_admin.rb
262
+ - spec/dummy/db/migrate/20130107181642_create_groups.erp_tech_svcs.rb
263
+ - spec/dummy/db/migrate/20130107181643_upgrade_security.erp_tech_svcs.rb
264
+ - spec/dummy/db/migrate/20130107181644_upgrade_security2.erp_tech_svcs.rb
265
+ - spec/dummy/db/schema.rb
266
+ - spec/dummy/db/spec.sqlite3
267
+ - spec/dummy/log/spec.log
170
268
  - spec/dummy/public/404.html
171
269
  - spec/dummy/public/422.html
172
270
  - spec/dummy/public/500.html