enju_oai 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/views/manifestations/list_identifiers.oai.builder +1 -1
- data/app/views/manifestations/list_records.oai.builder +1 -1
- data/lib/enju_oai/oai_controller.rb +32 -0
- data/lib/enju_oai/version.rb +1 -1
- data/spec/controllers/manifestations_controller_spec.rb +45 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +76 -0
- data/spec/dummy/app/controllers/manifestations_controller.rb +519 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/ability.rb +29 -0
- data/spec/dummy/app/models/carrier_type.rb +33 -0
- data/spec/dummy/app/models/create.rb +38 -0
- data/spec/dummy/app/models/exemplify.rb +45 -0
- data/spec/dummy/app/models/item.rb +276 -0
- data/spec/dummy/app/models/manifestation.rb +631 -0
- data/spec/dummy/app/models/patron.rb +290 -0
- data/spec/dummy/app/models/produce.rb +39 -0
- data/spec/dummy/app/models/realize.rb +38 -0
- data/spec/dummy/app/models/role.rb +46 -0
- data/spec/dummy/app/models/search_engine.rb +51 -0
- data/spec/dummy/app/models/user.rb +94 -0
- data/spec/dummy/app/models/user_has_role.rb +4 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config/application.rb +57 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/configatron/cucumber.rb +4 -0
- data/spec/dummy/config/configatron/defaults.rb +28 -0
- data/spec/dummy/config/configatron/development.rb +4 -0
- data/spec/dummy/config/configatron/production.rb.sample +12 -0
- data/spec/dummy/config/configatron/test.rb +7 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/configatron.rb +2 -0
- data/spec/dummy/config/initializers/devise.rb +209 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +14 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +60 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/001_create_patrons.rb +53 -0
- data/spec/dummy/db/migrate/002_devise_create_users.rb +71 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +59 -0
- data/spec/dummy/db/migrate/006_create_items.rb +28 -0
- data/spec/dummy/db/migrate/012_create_owns.rb +14 -0
- data/spec/dummy/db/migrate/015_create_creates.rb +14 -0
- data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
- data/spec/dummy/db/migrate/047_create_produces.rb +14 -0
- data/spec/dummy/db/migrate/059_create_libraries.rb +30 -0
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
- data/spec/dummy/db/migrate/077_create_user_groups.rb +12 -0
- data/spec/dummy/db/migrate/080_create_library_groups.rb +21 -0
- data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +15 -0
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +15 -0
- data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +12 -0
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +23 -0
- data/spec/dummy/db/migrate/20090719201843_create_extents.rb +12 -0
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +12 -0
- data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20100326024214_add_date_index_to_resource.rb +11 -0
- data/spec/dummy/db/migrate/20100502171926_add_latitude_and_longitude_to_library.rb +11 -0
- data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +12 -0
- data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20100627193848_add_enju_access_key_to_user.rb +10 -0
- data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +11 -0
- data/spec/dummy/db/migrate/20100919121500_drop_user_email_unique_index.rb +11 -0
- data/spec/dummy/db/migrate/20101103090330_add_title_to_patron.rb +9 -0
- data/spec/dummy/db/migrate/20101103090457_rename_manifestation_identifier_to_identifier.rb +9 -0
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
- data/spec/dummy/db/migrate/20101228081401_rename_postal_code_to_zip_code.rb +11 -0
- data/spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +11 -0
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +13 -0
- data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
- data/spec/dummy/db/migrate/20110927135845_add_missing_since_to_item.rb +9 -0
- data/spec/dummy/db/migrate/20111103221239_rename_manifestation_identifier_to_manifestation_identifier.rb +9 -0
- data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
- data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
- data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120413225628_add_fingerprint_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120426034355_add_unique_index_to_item_identifier.rb +11 -0
- data/spec/dummy/db/migrate/20120426042730_add_unique_index_to_manifestation_identifier.rb +11 -0
- data/spec/dummy/db/schema.rb +564 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/enju_leaf/calculate_stat.rb +30 -0
- data/spec/dummy/lib/enju_leaf/expire_editable_fragment.rb +30 -0
- data/spec/dummy/lib/enju_leaf/expire_fragment_cache.rb +17 -0
- data/spec/dummy/lib/enju_leaf/import_file.rb +13 -0
- data/spec/dummy/lib/enju_leaf/localized_name.rb +13 -0
- data/spec/dummy/lib/enju_leaf/master_model.rb +19 -0
- data/spec/dummy/lib/enju_leaf/url_validator.rb +10 -0
- data/spec/dummy/lib/enju_leaf.rb +8 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
- data/spec/factories/manifestation.rb +6 -0
- data/spec/factories/user.rb +34 -0
- data/spec/fixtures/carrier_types.yml +51 -0
- data/spec/fixtures/creates.yml +66 -0
- data/spec/fixtures/exemplifies.yml +156 -0
- data/spec/fixtures/items.yml +262 -0
- data/spec/fixtures/libraries.yml +109 -0
- data/spec/fixtures/library_groups.yml +36 -0
- data/spec/fixtures/manifestations.yml +2024 -0
- data/spec/fixtures/patron_types.yml +41 -0
- data/spec/fixtures/patrons.yml +338 -0
- data/spec/fixtures/produces.yml +150 -0
- data/spec/fixtures/realizes.yml +87 -0
- data/spec/fixtures/roles.yml +21 -0
- data/spec/fixtures/user_has_roles.yml +41 -0
- data/spec/fixtures/users.yml +93 -0
- data/spec/spec_helper.rb +38 -0
- data/spec/support/controller_macros.rb +48 -0
- data/spec/support/devise.rb +4 -0
- metadata +290 -6
- data/test/enju_oai_test.rb +0 -7
- data/test/test_helper.rb +0 -15
@@ -0,0 +1,9 @@
|
|
1
|
+
class RenameManifestationIdentifierToIdentifier < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
rename_column :manifestations, :manifestation_identifier, :identifier
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.down
|
7
|
+
rename_column :manifestations, :identifier, :manifestation_identifier
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class RenamePostalCodeToZipCode < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
remove_column :patrons, :postal_code
|
4
|
+
rename_column :libraries, :postal_code, :zip_code
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
add_column :patrons, :postal_code, :string
|
9
|
+
rename_column :libraries, :zip_code, :postal_code
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
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
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :user_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
|
4
|
+
add_column :user_groups, :expired_at, :timestamp
|
5
|
+
remove_column :library_groups, :valid_period_for_new_user
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :user_groups, :valid_period_for_new_user
|
10
|
+
remove_column :user_groups, :expired_at
|
11
|
+
add_column :library_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
|
12
|
+
end
|
13
|
+
end
|
data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddNumberOfDayToNotifyOverdueToUserGroup < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :user_groups, :number_of_day_to_notify_overdue, :integer, :default => 1, :null => false
|
4
|
+
add_column :user_groups, :number_of_day_to_notify_due_date, :integer, :default => 7, :null => false
|
5
|
+
add_column :user_groups, :number_of_time_to_notify_overdue, :integer, :default => 3, :null => false
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :user_groups, :number_of_time_to_notify_overdue
|
10
|
+
remove_column :user_groups, :number_of_day_to_notify_due_date
|
11
|
+
remove_column :user_groups, :number_of_day_to_notify_overdue
|
12
|
+
end
|
13
|
+
end
|
data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class RenameManifestationNumberListToNumberString < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
rename_column :manifestations, :volume_number_list, :volume_number_string
|
4
|
+
rename_column :manifestations, :issue_number_list, :issue_number_string
|
5
|
+
rename_column :manifestations, :serial_number_list, :serial_number_string
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
rename_column :manifestations, :serial_number_string, :serial_number_list
|
10
|
+
rename_column :manifestations, :issue_number_string, :issue_number_list
|
11
|
+
rename_column :manifestations, :volume_number_string, :volume_number_list
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddVolumeNumberToManifestation < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :manifestations, :volume_number, :integer
|
4
|
+
add_column :manifestations, :issue_number, :integer
|
5
|
+
add_column :manifestations, :serial_number, :integer
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :manifestations, :serial_number
|
10
|
+
remove_column :manifestations, :issue_number
|
11
|
+
remove_column :manifestations, :volume_number
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class RenameManifestationIdentifierToManifestationIdentifier < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
rename_column :manifestations, :identifier, :manifestation_identifier
|
4
|
+
end
|
5
|
+
|
6
|
+
def down
|
7
|
+
rename_column :manifestations, :manifestation_identifier, :identifier
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddUniqueIndexToItemIdentifier < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
remove_index :items, :item_identifier
|
4
|
+
add_index :items, :item_identifier, :unique => true
|
5
|
+
end
|
6
|
+
|
7
|
+
def down
|
8
|
+
remove_index :items, :item_identifier
|
9
|
+
add_index :items, :item_identifier
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddUniqueIndexToManifestationIdentifier < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
remove_index :manifestations, :manifestation_identifier
|
4
|
+
add_index :manifestations, :manifestation_identifier, :unique => true
|
5
|
+
end
|
6
|
+
|
7
|
+
def down
|
8
|
+
remove_index :manifestations, :manifestation_identifier
|
9
|
+
add_index :manifestations, :manifestation_identifier
|
10
|
+
end
|
11
|
+
end
|