enju_event 0.1.17.pre12 → 0.1.17.pre13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/event_import_results_controller.rb +1 -1
- data/app/controllers/events_controller.rb +1 -1
- data/app/models/event.rb +1 -1
- data/app/models/event_import_file.rb +5 -6
- data/app/models/participate.rb +5 -5
- data/app/views/event_import_results/show.html.erb +1 -1
- data/app/views/participates/edit.html.erb +2 -2
- data/app/views/participates/index.html.erb +2 -2
- data/app/views/participates/new.html.erb +2 -2
- data/app/views/participates/show.html.erb +2 -2
- data/db/migrate/20090519203307_create_participates.rb +2 -2
- data/lib/enju_event/version.rb +1 -1
- data/spec/dummy/app/controllers/application_controller.rb +4 -105
- data/spec/dummy/config/application.rb +2 -2
- data/spec/dummy/config/initializers/mime_types.rb +0 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/{001_create_patrons.rb → 001_create_agents.rb} +8 -8
- data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
- data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
- data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
- data/spec/dummy/db/migrate/059_create_libraries.rb +2 -2
- data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
- data/spec/dummy/db/migrate/{20080905191442_create_patron_types.rb → 20080905191442_create_agent_types.rb} +2 -2
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +22 -0
- data/spec/dummy/db/migrate/{20090812151902_create_patron_relationship_types.rb → 20090812151902_create_agent_relationship_types.rb} +2 -2
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
- data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
- data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +12 -0
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/schema.rb +136 -134
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_destroy_file.tsv +4 -0
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample1.tsv +1 -1
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample2.tsv +1 -1
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_update_file.tsv +4 -0
- data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/invalid_file.tsv +3 -0
- data/spec/dummy/solr/data/test/index/{_i4.fdt → _q6.fdt} +0 -0
- data/spec/dummy/solr/data/test/index/{_i4.fdx → _q6.fdx} +0 -0
- data/spec/dummy/solr/data/test/index/{_i4.fnm → _q6.fnm} +0 -0
- data/spec/dummy/solr/data/test/index/{_i4.frq → _q6.frq} +0 -0
- data/spec/dummy/solr/data/test/index/{_i4.nrm → _q6.nrm} +0 -0
- data/spec/dummy/solr/data/test/index/{_i4.prx → _q6.prx} +0 -0
- data/spec/dummy/solr/data/test/index/{_i4.tii → _q6.tii} +0 -0
- data/spec/dummy/solr/data/test/index/{_i4.tis → _q6.tis} +0 -0
- data/spec/dummy/solr/data/test/index/{_i5.fdt → _q7.fdt} +0 -0
- data/spec/dummy/solr/data/test/index/{_i5.fdx → _q7.fdx} +0 -0
- data/spec/dummy/solr/data/test/index/{_i5.fnm → _q7.fnm} +0 -0
- data/spec/dummy/solr/data/test/index/{_i5.frq → _q7.frq} +0 -0
- data/spec/dummy/solr/data/test/index/{_i5.nrm → _q7.nrm} +0 -0
- data/spec/dummy/solr/data/test/index/{_i5.prx → _q7.prx} +0 -0
- data/spec/dummy/solr/data/test/index/{_i5.tii → _q7.tii} +0 -0
- data/spec/dummy/solr/data/test/index/_q7.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_13d +0 -0
- data/spec/factories/{patron.rb → agent.rb} +3 -3
- data/spec/factories/participate.rb +1 -1
- data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
- data/spec/fixtures/{patrons.yml → agents.yml} +46 -46
- data/spec/fixtures/event_categories.yml +3 -3
- data/spec/fixtures/event_import_files.yml +1 -2
- data/spec/fixtures/libraries.yml +6 -6
- data/spec/fixtures/participates.yml +3 -3
- data/spec/models/event_import_file_spec.rb +1 -2
- data/spec/models/participate_spec.rb +1 -1
- metadata +92 -108
- data/spec/dummy/app/models/role.rb +0 -46
- data/spec/dummy/app/models/user_group.rb +0 -40
- data/spec/dummy/app/models/user_has_role.rb +0 -5
- data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +0 -22
- data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +0 -13
- data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +0 -11
- data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +0 -12
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +0 -11
- data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +0 -13
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +0 -5
- data/spec/dummy/solr/data/test/index/_i5.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments_ql +0 -0
@@ -1,46 +0,0 @@
|
|
1
|
-
class Role < ActiveRecord::Base
|
2
|
-
include MasterModel
|
3
|
-
default_scope :order => "roles.position"
|
4
|
-
has_many :user_has_roles
|
5
|
-
has_many :users, :through => :user_has_roles
|
6
|
-
after_save :clear_all_cache
|
7
|
-
after_destroy :clear_all_cache
|
8
|
-
|
9
|
-
extend FriendlyId
|
10
|
-
friendly_id :name
|
11
|
-
|
12
|
-
def localized_name
|
13
|
-
display_name.localize
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.all_cache
|
17
|
-
if Rails.env == 'production'
|
18
|
-
Rails.cache.fetch('role_all'){Role.select(:name).all}
|
19
|
-
else
|
20
|
-
Role.select(:name)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def clear_all_cache
|
25
|
-
Rails.cache.delete('role_all')
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.default_role
|
29
|
-
Rails.cache.fetch('default_role'){Role.find('Guest')}
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
# == Schema Information
|
34
|
-
#
|
35
|
-
# Table name: roles
|
36
|
-
#
|
37
|
-
# id :integer not null, primary key
|
38
|
-
# name :string(255) not null
|
39
|
-
# display_name :string(255)
|
40
|
-
# note :text
|
41
|
-
# created_at :datetime
|
42
|
-
# updated_at :datetime
|
43
|
-
# score :integer default(0), not null
|
44
|
-
# position :integer
|
45
|
-
#
|
46
|
-
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
class UserGroup < ActiveRecord::Base
|
3
|
-
attr_accessible :name, :display_name, :note, :valid_period_for_new_user,
|
4
|
-
:expired_at, :number_of_day_to_notify_overdue,
|
5
|
-
:number_of_day_to_notify_overdue,
|
6
|
-
:number_of_day_to_notify_due_date,
|
7
|
-
:number_of_time_to_notify_overdue
|
8
|
-
|
9
|
-
include MasterModel
|
10
|
-
default_scope :order => "user_groups.position"
|
11
|
-
has_many :users
|
12
|
-
|
13
|
-
validates_numericality_of :valid_period_for_new_user,
|
14
|
-
:greater_than_or_equal_to => 0,
|
15
|
-
:allow_blank => true
|
16
|
-
|
17
|
-
def self.per_page
|
18
|
-
10
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# == Schema Information
|
23
|
-
#
|
24
|
-
# Table name: user_groups
|
25
|
-
#
|
26
|
-
# id :integer not null, primary key
|
27
|
-
# name :string(255)
|
28
|
-
# display_name :text
|
29
|
-
# note :text
|
30
|
-
# position :integer
|
31
|
-
# created_at :datetime
|
32
|
-
# updated_at :datetime
|
33
|
-
# deleted_at :datetime
|
34
|
-
# valid_period_for_new_user :integer default(0), not null
|
35
|
-
# expired_at :datetime
|
36
|
-
# number_of_day_to_notify_overdue :integer default(1), not null
|
37
|
-
# number_of_day_to_notify_due_date :integer default(7), not null
|
38
|
-
# number_of_time_to_notify_overdue :integer default(3), not null
|
39
|
-
#
|
40
|
-
|
@@ -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,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,13 +0,0 @@
|
|
1
|
-
class RenameSeriesStatementManifestationIdToRootManifestationId < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
remove_index :series_statements, :series_statement_identifier
|
4
|
-
rename_column :series_statements, :manifestation_id, :root_manifestation_id
|
5
|
-
add_index :series_statements, :series_statement_identifier
|
6
|
-
end
|
7
|
-
|
8
|
-
def self.down
|
9
|
-
remove_index :series_statements, :series_statement_identifier
|
10
|
-
rename_column :series_statements, :root_manifestation_id, :manifestation_id
|
11
|
-
add_index :series_statements, :series_statement_identifier
|
12
|
-
end
|
13
|
-
end
|
Binary file
|
Binary file
|