enju_subject 0.1.0.pre20 → 0.1.0.pre21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/enju_subject/version.rb +1 -1
  3. data/spec/controllers/classification_types_controller_spec.rb +1 -1
  4. data/spec/controllers/subject_heading_types_controller_spec.rb +1 -1
  5. data/spec/controllers/subject_types_controller_spec.rb +1 -1
  6. data/spec/dummy/db/development.sqlite3 +0 -0
  7. data/spec/dummy/db/migrate/{001_create_patrons.rb → 001_create_agents.rb} +8 -8
  8. data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
  9. data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
  10. data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
  11. data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
  12. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
  13. data/spec/dummy/db/migrate/{20080905191442_create_patron_types.rb → 20080905191442_create_agent_types.rb} +2 -2
  14. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +22 -0
  15. data/spec/dummy/db/migrate/{20090812151902_create_patron_relationship_types.rb → 20090812151902_create_agent_relationship_types.rb} +2 -2
  16. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  17. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
  18. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
  19. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +12 -0
  20. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
  21. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
  22. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
  23. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
  24. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
  25. data/spec/dummy/db/schema.rb +129 -127
  26. data/spec/dummy/db/test.sqlite3 +0 -0
  27. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  28. data/spec/dummy/solr/data/test/index/segments_23f +0 -0
  29. data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
  30. data/spec/fixtures/{patrons.yml → agents.yml} +39 -39
  31. metadata +35 -41
  32. data/spec/dummy/app/models/role.rb +0 -47
  33. data/spec/dummy/app/models/user_group.rb +0 -2
  34. data/spec/dummy/app/models/user_has_role.rb +0 -4
  35. data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +0 -22
  36. data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +0 -13
  37. data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +0 -11
  38. data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +0 -12
  39. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +0 -11
  40. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +0 -5
  41. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +0 -5
  42. data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +0 -9
  43. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +0 -5
  44. data/spec/dummy/solr/data/test/index/segments_22n +0 -0
@@ -1,47 +0,0 @@
1
- class Role < ActiveRecord::Base
2
- attr_accessible :name, :display_name, :note
3
- include MasterModel
4
- default_scope :order => "roles.position"
5
- has_many :user_has_roles
6
- has_many :users, :through => :user_has_roles
7
- after_save :clear_all_cache
8
- after_destroy :clear_all_cache
9
-
10
- extend FriendlyId
11
- friendly_id :name
12
-
13
- def localized_name
14
- display_name.localize
15
- end
16
-
17
- def self.all_cache
18
- if Rails.env == 'production'
19
- Rails.cache.fetch('role_all'){Role.select(:name).all}
20
- else
21
- Role.select(:name)
22
- end
23
- end
24
-
25
- def clear_all_cache
26
- Rails.cache.delete('role_all')
27
- end
28
-
29
- def self.default_role
30
- Rails.cache.fetch('default_role'){Role.find('Guest')}
31
- end
32
- end
33
-
34
- # == Schema Information
35
- #
36
- # Table name: roles
37
- #
38
- # id :integer not null, primary key
39
- # name :string(255) not null
40
- # display_name :string(255)
41
- # note :text
42
- # created_at :datetime
43
- # updated_at :datetime
44
- # score :integer default(0), not null
45
- # position :integer
46
- #
47
-
@@ -1,2 +0,0 @@
1
- class UserGroup < ActiveRecord::Base
2
- end
@@ -1,4 +0,0 @@
1
- class UserHasRole < ActiveRecord::Base
2
- belongs_to :user
3
- belongs_to :role
4
- end
@@ -1,22 +0,0 @@
1
- class CreatePatronImportFiles < ActiveRecord::Migration
2
- def change
3
- create_table :patron_import_files do |t|
4
- t.integer :parent_id
5
- t.string :content_type
6
- t.integer :size
7
- t.integer :user_id
8
- t.text :note
9
- t.datetime :imported_at
10
- t.string :state
11
- t.string :patron_import_file_name
12
- t.string :patron_import_content_type
13
- t.integer :patron_import_file_size
14
- t.datetime :patron_import_updated_at
15
-
16
- t.timestamps
17
- end
18
- add_index :patron_import_files, :parent_id
19
- add_index :patron_import_files, :user_id
20
- add_index :patron_import_files, :state
21
- end
22
- end
@@ -1,13 +0,0 @@
1
- class CreatePatronRelationships < ActiveRecord::Migration
2
- def change
3
- create_table :patron_relationships do |t|
4
- t.integer :parent_id
5
- t.integer :child_id
6
- t.integer :patron_relationship_type_id
7
-
8
- t.timestamps
9
- end
10
- add_index :patron_relationships, :parent_id
11
- add_index :patron_relationships, :child_id
12
- end
13
- end
@@ -1,11 +0,0 @@
1
- class AddPositionToPatronRelationship < ActiveRecord::Migration
2
- def self.up
3
- add_column :manifestation_relationships, :position, :integer
4
- add_column :patron_relationships, :position, :integer
5
- end
6
-
7
- def self.down
8
- remove_column :patron_relationships, :position
9
- remove_column :manifestation_relationships, :position
10
- end
11
- end
@@ -1,12 +0,0 @@
1
- class CreatePatronImportResults < ActiveRecord::Migration
2
- def change
3
- create_table :patron_import_results do |t|
4
- t.integer :patron_import_file_id
5
- t.integer :patron_id
6
- t.integer :user_id
7
- t.text :body
8
-
9
- t.timestamps
10
- end
11
- end
12
- end
@@ -1,11 +0,0 @@
1
- class AddBirthDateAndDeathDateToPatron < ActiveRecord::Migration
2
- def self.up
3
- add_column :patrons, :birth_date, :string
4
- add_column :patrons, :death_date, :string
5
- end
6
-
7
- def self.down
8
- remove_column :patrons, :death_date
9
- remove_column :patrons, :birth_date
10
- end
11
- end
@@ -1,5 +0,0 @@
1
- class AddFingerprintToPatronImportFile < ActiveRecord::Migration
2
- def change
3
- add_column :patron_import_files, :patron_import_fingerprint, :string
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddErrorMessageToPatronImportFile < ActiveRecord::Migration
2
- def change
3
- add_column :patron_import_files, :error_message, :text
4
- end
5
- end
@@ -1,9 +0,0 @@
1
- class RenamePatronImportFileImportedAtToExecutedAt < ActiveRecord::Migration
2
- def up
3
- rename_column :patron_import_files, :imported_at, :executed_at
4
- end
5
-
6
- def down
7
- rename_column :patron_import_files, :executed_at, :imported_at
8
- end
9
- end
@@ -1,5 +0,0 @@
1
- class AddEditModeToPatronImportFile < ActiveRecord::Migration
2
- def change
3
- add_column :patron_import_files, :edit_mode, :string
4
- end
5
- end