erp_work_effort 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
1
  Party.class_eval do
2
2
  has_many :resource_availabilities, :class_name => 'PartyResourceAvailability', :dependent => :destroy
3
+ has_many :assigned_to_work_efforts, :as => 'assigned_to', :class_name => 'WorkEffortAssignment', :dependent => :destroy
4
+ has_many :assigned_by_work_efforts, :as => 'assigned_by', :class_name => 'WorkEffortAssignment', :dependent => :destroy
3
5
  end
@@ -2,7 +2,7 @@ module ErpWorkEffort
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
@@ -4,7 +4,7 @@ class BaseErpServices < ActiveRecord::Migration
4
4
 
5
5
  unless table_exists?(:compass_ae_instances)
6
6
  create_table :compass_ae_instances do |t|
7
- t.decimal :version, :scale => 8, :precision => 3
7
+ t.decimal :version, :precision => 8, :scale => 3
8
8
 
9
9
  t.timestamps
10
10
  end
@@ -50,9 +50,16 @@ class BaseTechServices < ActiveRecord::Migration
50
50
 
51
51
  end
52
52
 
53
- unless table_exists?(:roles)
53
+ unless table_exists?(:groups)
54
+ create_table :groups do |t|
55
+ t.column :description, :string
56
+ t.timestamps
57
+ end
58
+ end
59
+
60
+ unless table_exists?(:security_roles)
54
61
  # create the roles table
55
- create_table :roles do |t|
62
+ create_table :security_roles do |t|
56
63
  t.column :description, :string
57
64
  t.column :internal_identifier, :string
58
65
  t.column :external_identifier, :string
@@ -140,24 +147,6 @@ class BaseTechServices < ActiveRecord::Migration
140
147
  end
141
148
  end
142
149
 
143
- unless table_exists?(:secured_models)
144
- create_table :secured_models do |t|
145
- t.references :secured_record, :polymorphic => true
146
-
147
- t.timestamps
148
- end
149
- add_index :secured_models, [:secured_record_id, :secured_record_type], :name => 'secured_record_idx'
150
- end
151
-
152
- unless table_exists?(:roles_secured_models)
153
- create_table :roles_secured_models, :id => false do |t|
154
- t.references :secured_model
155
- t.references :role
156
- end
157
- add_index :roles_secured_models, :secured_model_id
158
- add_index :roles_secured_models, :role_id
159
- end
160
-
161
150
  unless table_exists?(:file_assets)
162
151
  create_table :file_assets do |t|
163
152
  t.references :file_asset_holder, :polymorphic => true
@@ -218,34 +207,61 @@ class BaseTechServices < ActiveRecord::Migration
218
207
  unless table_exists?(:capabilities)
219
208
  # create the roles table
220
209
  create_table :capabilities do |t|
221
- t.string :resource
210
+ t.string :description
222
211
  t.references :capability_type
212
+ t.string :capability_resource_type
213
+ t.integer :capability_resource_id
214
+ t.integer :scope_type_id
215
+ t.text :scope_query
223
216
  t.timestamps
224
217
  end
225
218
 
226
219
  add_index :capabilities, :capability_type_id
220
+ add_index :capabilities, :scope_type_id
221
+ add_index :capabilities, [:capability_resource_id, :capability_resource_type], :name => 'capability_resource_index'
227
222
  end
228
223
 
229
- unless table_exists?(:capabilities_capable_models)
230
- # create the roles table
231
- create_table :capabilities_capable_models, :id => false do |t|
232
- t.references :capable_model
233
- t.references :capability
224
+ unless table_exists?(:capability_accessors)
225
+ create_table :capability_accessors do |t|
226
+ t.string :capability_accessor_record_type
227
+ t.integer :capability_accessor_record_id
228
+ t.integer :capability_id
229
+ t.timestamps
230
+ end
231
+
232
+ add_index :capability_accessors, :capability_id
233
+ add_index :capability_accessors, [:capability_accessor_record_id, :capability_accessor_record_type], :name => 'capability_accessor_record_index'
234
+ end
235
+
236
+ unless table_exists?(:scope_types)
237
+ create_table :scope_types do |t|
238
+ t.string :description
239
+ t.string :internal_identifier
240
+ t.timestamps
241
+ end
242
+
243
+ add_index :scope_types, :internal_identifier
244
+ end
245
+
246
+ unless table_exists?(:parties_security_roles)
247
+ create_table :parties_security_roles, :id => false do |t|
248
+ t.integer :party_id
249
+ t.integer :security_role_id
234
250
  end
235
251
 
236
- add_index :capabilities_capable_models, :capable_model_id
237
- add_index :capabilities_capable_models, :capability_id
252
+ add_index :parties_security_roles, :party_id
253
+ add_index :parties_security_roles, :security_role_id
238
254
  end
239
255
 
240
256
  end
241
257
 
242
258
  def self.down
243
259
  # check that each table exists before trying to delete it.
244
- [
260
+ [ :groups,
245
261
  :audit_logs, :sessions, :simple_captcha_data,
246
- :capable_models, :capability_types, :capabilities,:capabilities_capable_models,
247
- :roles_users, :roles, :audit_log_items, :audit_log_item_types,
248
- :users, :secured_models, :roles_secured_models, :file_assets, :delayed_jobs
262
+ :capability_accessors, :capability_types, :capabilities,:scope_types,
263
+ :parties_security_roles, :roles, :audit_log_items, :audit_log_item_types,
264
+ :users, :file_assets, :delayed_jobs
249
265
  ].each do |tbl|
250
266
  if table_exists?(tbl)
251
267
  drop_table tbl
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20121219191146) do
14
+ ActiveRecord::Schema.define(:version => 20130107204435) do
15
15
 
16
16
  create_table "attribute_types", :force => true do |t|
17
17
  t.string "internal_identifier"
@@ -88,21 +88,30 @@ ActiveRecord::Schema.define(:version => 20121219191146) do
88
88
  add_index "audit_logs", ["party_id"], :name => "index_audit_logs_on_party_id"
89
89
 
90
90
  create_table "capabilities", :force => true do |t|
91
- t.string "resource"
91
+ t.string "description"
92
92
  t.integer "capability_type_id"
93
- t.datetime "created_at", :null => false
94
- t.datetime "updated_at", :null => false
93
+ t.string "capability_resource_type"
94
+ t.integer "capability_resource_id"
95
+ t.integer "scope_type_id"
96
+ t.text "scope_query"
97
+ t.datetime "created_at", :null => false
98
+ t.datetime "updated_at", :null => false
95
99
  end
96
100
 
101
+ add_index "capabilities", ["capability_resource_id", "capability_resource_type"], :name => "capability_resource_index"
97
102
  add_index "capabilities", ["capability_type_id"], :name => "index_capabilities_on_capability_type_id"
103
+ add_index "capabilities", ["scope_type_id"], :name => "index_capabilities_on_scope_type_id"
98
104
 
99
- create_table "capabilities_capable_models", :id => false, :force => true do |t|
100
- t.integer "capable_model_id"
101
- t.integer "capability_id"
105
+ create_table "capability_accessors", :force => true do |t|
106
+ t.string "capability_accessor_record_type"
107
+ t.integer "capability_accessor_record_id"
108
+ t.integer "capability_id"
109
+ t.datetime "created_at", :null => false
110
+ t.datetime "updated_at", :null => false
102
111
  end
103
112
 
104
- add_index "capabilities_capable_models", ["capability_id"], :name => "index_capabilities_capable_models_on_capability_id"
105
- add_index "capabilities_capable_models", ["capable_model_id"], :name => "index_capabilities_capable_models_on_capable_model_id"
113
+ add_index "capability_accessors", ["capability_accessor_record_id", "capability_accessor_record_type"], :name => "capability_accessor_record_index"
114
+ add_index "capability_accessors", ["capability_id"], :name => "index_capability_accessors_on_capability_id"
106
115
 
107
116
  create_table "capability_types", :force => true do |t|
108
117
  t.string "internal_identifier"
@@ -150,7 +159,7 @@ ActiveRecord::Schema.define(:version => 20121219191146) do
150
159
  add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
151
160
 
152
161
  create_table "compass_ae_instances", :force => true do |t|
153
- t.decimal "version", :precision => 3, :scale => 8
162
+ t.decimal "version", :precision => 8, :scale => 3
154
163
  t.datetime "created_at", :null => false
155
164
  t.datetime "updated_at", :null => false
156
165
  end
@@ -310,6 +319,12 @@ ActiveRecord::Schema.define(:version => 20121219191146) do
310
319
  add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
311
320
  add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
312
321
 
322
+ create_table "groups", :force => true do |t|
323
+ t.string "description"
324
+ t.datetime "created_at", :null => false
325
+ t.datetime "updated_at", :null => false
326
+ end
327
+
313
328
  create_table "individuals", :force => true do |t|
314
329
  t.integer "party_id"
315
330
  t.string "current_last_name"
@@ -397,6 +412,14 @@ ActiveRecord::Schema.define(:version => 20121219191146) do
397
412
 
398
413
  add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
399
414
 
415
+ create_table "parties_security_roles", :id => false, :force => true do |t|
416
+ t.integer "party_id"
417
+ t.integer "security_role_id"
418
+ end
419
+
420
+ add_index "parties_security_roles", ["party_id"], :name => "index_parties_security_roles_on_party_id"
421
+ add_index "parties_security_roles", ["security_role_id"], :name => "index_parties_security_roles_on_security_role_id"
422
+
400
423
  create_table "party_relationships", :force => true do |t|
401
424
  t.string "description"
402
425
  t.integer "party_id_from"
@@ -536,32 +559,24 @@ ActiveRecord::Schema.define(:version => 20121219191146) do
536
559
  t.datetime "updated_at", :null => false
537
560
  end
538
561
 
539
- create_table "roles", :force => true do |t|
562
+ create_table "scope_types", :force => true do |t|
540
563
  t.string "description"
541
564
  t.string "internal_identifier"
542
- t.string "external_identifier"
543
- t.string "external_id_source"
544
565
  t.datetime "created_at", :null => false
545
566
  t.datetime "updated_at", :null => false
546
567
  end
547
568
 
548
- create_table "roles_secured_models", :id => false, :force => true do |t|
549
- t.integer "secured_model_id"
550
- t.integer "role_id"
551
- end
552
-
553
- add_index "roles_secured_models", ["role_id"], :name => "index_roles_secured_models_on_role_id"
554
- add_index "roles_secured_models", ["secured_model_id"], :name => "index_roles_secured_models_on_secured_model_id"
569
+ add_index "scope_types", ["internal_identifier"], :name => "index_scope_types_on_internal_identifier"
555
570
 
556
- create_table "secured_models", :force => true do |t|
557
- t.integer "secured_record_id"
558
- t.string "secured_record_type"
571
+ create_table "security_roles", :force => true do |t|
572
+ t.string "description"
573
+ t.string "internal_identifier"
574
+ t.string "external_identifier"
575
+ t.string "external_id_source"
559
576
  t.datetime "created_at", :null => false
560
577
  t.datetime "updated_at", :null => false
561
578
  end
562
579
 
563
- add_index "secured_models", ["secured_record_id", "secured_record_type"], :name => "secured_record_idx"
564
-
565
580
  create_table "sessions", :force => true do |t|
566
581
  t.string "session_id", :null => false
567
582
  t.text "data"
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erp_work_effort
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-11 00:00:00.000000000 Z
12
+ date: 2013-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erp_tech_svcs
@@ -110,19 +110,17 @@ files:
110
110
  - spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb
111
111
  - spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb
112
112
  - spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb
113
- - spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb
114
113
  - spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb
115
114
  - spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb
116
- - spec/dummy/db/migrate/20121219191143_base_erp_services.erp_base_erp_svcs.rb
117
- - spec/dummy/db/migrate/20121219191144_base_work_efforts.erp_work_effort.rb
118
- - spec/dummy/db/migrate/20121219191145_base_tech_services.erp_tech_svcs.rb
119
- - spec/dummy/db/migrate/20121219191146_create_has_attribute_tables.erp_tech_svcs.rb
120
- - spec/dummy/db/migrate/20130107180754_create_groups.erp_tech_svcs.rb
121
- - spec/dummy/db/migrate/20130107180755_upgrade_security.erp_tech_svcs.rb
122
- - spec/dummy/db/migrate/20130107180756_upgrade_security2.erp_tech_svcs.rb
115
+ - spec/dummy/db/migrate/20130107204429_base_erp_services.erp_base_erp_svcs.rb
116
+ - spec/dummy/db/migrate/20130107204430_base_work_efforts.erp_work_effort.rb
117
+ - spec/dummy/db/migrate/20130107204431_base_tech_services.erp_tech_svcs.rb
118
+ - spec/dummy/db/migrate/20130107204432_create_has_attribute_tables.erp_tech_svcs.rb
119
+ - spec/dummy/db/migrate/20130107204433_create_groups.erp_tech_svcs.rb
120
+ - spec/dummy/db/migrate/20130107204434_upgrade_security.erp_tech_svcs.rb
121
+ - spec/dummy/db/migrate/20130107204435_upgrade_security2.erp_tech_svcs.rb
123
122
  - spec/dummy/db/schema.rb
124
123
  - spec/dummy/db/spec.sqlite3
125
- - spec/dummy/log/spec.log
126
124
  - spec/dummy/public/404.html
127
125
  - spec/dummy/public/422.html
128
126
  - spec/dummy/public/500.html
@@ -157,21 +155,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
157
155
  - - ! '>='
158
156
  - !ruby/object:Gem::Version
159
157
  version: '0'
160
- segments:
161
- - 0
162
- hash: -4587745674460819857
163
158
  required_rubygems_version: !ruby/object:Gem::Requirement
164
159
  none: false
165
160
  requirements:
166
161
  - - ! '>='
167
162
  - !ruby/object:Gem::Version
168
163
  version: '0'
169
- segments:
170
- - 0
171
- hash: -4587745674460819857
172
164
  requirements: []
173
165
  rubyforge_project:
174
- rubygems_version: 1.8.24
166
+ rubygems_version: 1.8.23
175
167
  signing_key:
176
168
  specification_version: 3
177
169
  summary: Summary of ErpWorkEffort.
@@ -201,19 +193,17 @@ test_files:
201
193
  - spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb
202
194
  - spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb
203
195
  - spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb
204
- - spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb
205
196
  - spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb
206
197
  - spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb
207
- - spec/dummy/db/migrate/20121219191143_base_erp_services.erp_base_erp_svcs.rb
208
- - spec/dummy/db/migrate/20121219191144_base_work_efforts.erp_work_effort.rb
209
- - spec/dummy/db/migrate/20121219191145_base_tech_services.erp_tech_svcs.rb
210
- - spec/dummy/db/migrate/20121219191146_create_has_attribute_tables.erp_tech_svcs.rb
211
- - spec/dummy/db/migrate/20130107180754_create_groups.erp_tech_svcs.rb
212
- - spec/dummy/db/migrate/20130107180755_upgrade_security.erp_tech_svcs.rb
213
- - spec/dummy/db/migrate/20130107180756_upgrade_security2.erp_tech_svcs.rb
198
+ - spec/dummy/db/migrate/20130107204429_base_erp_services.erp_base_erp_svcs.rb
199
+ - spec/dummy/db/migrate/20130107204430_base_work_efforts.erp_work_effort.rb
200
+ - spec/dummy/db/migrate/20130107204431_base_tech_services.erp_tech_svcs.rb
201
+ - spec/dummy/db/migrate/20130107204432_create_has_attribute_tables.erp_tech_svcs.rb
202
+ - spec/dummy/db/migrate/20130107204433_create_groups.erp_tech_svcs.rb
203
+ - spec/dummy/db/migrate/20130107204434_upgrade_security.erp_tech_svcs.rb
204
+ - spec/dummy/db/migrate/20130107204435_upgrade_security2.erp_tech_svcs.rb
214
205
  - spec/dummy/db/schema.rb
215
206
  - spec/dummy/db/spec.sqlite3
216
- - spec/dummy/log/spec.log
217
207
  - spec/dummy/public/404.html
218
208
  - spec/dummy/public/422.html
219
209
  - spec/dummy/public/500.html
@@ -1,14 +0,0 @@
1
- # This migration comes from erp_tech_svcs (originally 20120109173616)
2
- class CreateDownloadCapabilityType
3
-
4
- def self.up
5
- CapabilityType.create(:internal_identifier => 'download', :description => 'Download')
6
- Role.create(:description => 'File Downloader', :internal_identifier => 'file_downloader')
7
- end
8
-
9
- def self.down
10
- CapabilityType.where("internal_identifier = 'download'").first.destroy unless Role.where("internal_identifier = 'download'").first.nil?
11
- Role.where("internal_identifier = 'file_downloader'").first.destroy unless Role.where("internal_identifier = 'file_downloader'").first.nil?
12
- end
13
-
14
- end