enju_ndl 0.1.0.pre25 → 0.1.0.pre26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/enju_ndl/ndl_search.rb +8 -8
- data/lib/enju_ndl/version.rb +1 -1
- data/spec/dummy/app/models/user.rb +5 -27
- 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/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 +129 -129
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
- data/spec/models/ndl_book_spec.rb +1 -1
- metadata +34 -38
- data/spec/dummy/db/development.sqlite3 +0 -0
- 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/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/20120511072422_add_patron_identifier_to_patron.rb +0 -6
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee1c48789c634e863b03e8e22228eb35ebfef5d5
|
4
|
+
data.tar.gz: a29e1bac9d9f11dbb171c44c4b870e9d547aacf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a19dcc7d9ba551144e50181df1be9fee83882257f92dde5bf93f0235e35468b9e732764154139809343568fb7f9b781474e4519b0b74e9bbf5f21dbcf5c08161
|
7
|
+
data.tar.gz: db3ad54d5539bd43fb631fe66c1718850951ccc86ac8c55f74c86891619b3f68a2fc4dc2ecf96d47a5d192993ac1c0cc765da7ce723d5006a8e94b4f60a8a92c
|
data/lib/enju_ndl/ndl_search.rb
CHANGED
@@ -85,8 +85,8 @@ module EnjuNdl
|
|
85
85
|
statement_of_responsibility = doc.xpath('//dcndl:BibResource/dc:creator').map{|e| e.content}.join("; ")
|
86
86
|
|
87
87
|
manifestation = nil
|
88
|
-
|
89
|
-
|
88
|
+
Agent.transaction do
|
89
|
+
publisher_agents = Agent.import_agents(publishers)
|
90
90
|
|
91
91
|
manifestation = Manifestation.new(
|
92
92
|
:manifestation_identifier => admin_identifier,
|
@@ -130,7 +130,7 @@ module EnjuNdl
|
|
130
130
|
identifier.each do |k, v|
|
131
131
|
manifestation.identifiers << v if v.valid?
|
132
132
|
end
|
133
|
-
manifestation.publishers <<
|
133
|
+
manifestation.publishers << publisher_agents
|
134
134
|
create_additional_attributes(doc, manifestation)
|
135
135
|
create_series_statement(doc, manifestation)
|
136
136
|
end
|
@@ -148,11 +148,11 @@ module EnjuNdl
|
|
148
148
|
classifications = get_classifications(doc).uniq
|
149
149
|
classification_urls = doc.xpath('//dcterms:subject[@rdf:resource]').map{|subject| subject.attributes['resource'].value}
|
150
150
|
|
151
|
-
|
152
|
-
|
151
|
+
Agent.transaction do
|
152
|
+
creator_agents = Agent.import_agents(creators)
|
153
153
|
language_id = Language.where(:iso_639_2 => language).first.id rescue 1
|
154
154
|
content_type_id = ContentType.where(:name => 'text').first.id rescue 1
|
155
|
-
manifestation.creators <<
|
155
|
+
manifestation.creators << creator_agents
|
156
156
|
|
157
157
|
if defined?(EnjuSubject)
|
158
158
|
subject_heading_type = SubjectHeadingType.where(:name => 'ndlsh').first_or_create
|
@@ -235,7 +235,7 @@ module EnjuNdl
|
|
235
235
|
creators << {
|
236
236
|
:full_name => creator.at('./foaf:name').content,
|
237
237
|
:full_name_transcription => creator.at('./dcndl:transcription').try(:content),
|
238
|
-
:
|
238
|
+
:agent_identifier => creator.attributes["about"].try(:content)
|
239
239
|
}
|
240
240
|
end
|
241
241
|
creators
|
@@ -276,7 +276,7 @@ module EnjuNdl
|
|
276
276
|
publishers << {
|
277
277
|
:full_name => publisher.at('./foaf:name').content,
|
278
278
|
:full_name_transcription => publisher.at('./dcndl:transcription').try(:content),
|
279
|
-
:
|
279
|
+
:agent_identifier => publisher.attributes["about"].try(:content)
|
280
280
|
}
|
281
281
|
end
|
282
282
|
return publishers
|
data/lib/enju_ndl/version.rb
CHANGED
@@ -1,30 +1,8 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
1
2
|
class User < ActiveRecord::Base
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
:recoverable, :rememberable, :trackable, :validatable
|
3
|
+
devise :database_authenticatable, #:registerable,
|
4
|
+
:recoverable, :rememberable, :trackable, #, :validatable
|
5
|
+
:lockable, :lock_strategy => :none, :unlock_strategy => :none
|
6
6
|
|
7
|
-
|
8
|
-
attr_accessible :email, :password, :password_confirmation, :remember_me
|
9
|
-
|
10
|
-
has_one :user_has_role
|
11
|
-
has_one :role, :through => :user_has_role
|
12
|
-
belongs_to :required_role, :class_name => 'Role', :foreign_key => 'required_role_id'
|
13
|
-
has_many :purchase_requests
|
14
|
-
has_many :order_lists
|
15
|
-
extend FriendlyId
|
16
|
-
friendly_id :username
|
17
|
-
|
18
|
-
def has_role?(role_in_question)
|
19
|
-
return false unless role
|
20
|
-
return true if role.name == role_in_question
|
21
|
-
case role.name
|
22
|
-
when 'Administrator'
|
23
|
-
return true
|
24
|
-
when 'Librarian'
|
25
|
-
return true if role_in_question == 'User'
|
26
|
-
else
|
27
|
-
false
|
28
|
-
end
|
29
|
-
end
|
7
|
+
enju_leaf_user_model
|
30
8
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
class
|
1
|
+
class CreateAgents < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
create_table :
|
3
|
+
create_table :agents do |t|
|
4
4
|
t.integer :user_id
|
5
5
|
t.string :last_name
|
6
6
|
t.string :middle_name
|
@@ -35,7 +35,7 @@ class CreatePatrons < ActiveRecord::Migration
|
|
35
35
|
t.datetime :date_of_death
|
36
36
|
t.integer :language_id, :default => 1, :null => false
|
37
37
|
t.integer :country_id, :default => 1, :null => false
|
38
|
-
t.integer :
|
38
|
+
t.integer :agent_type_id, :default => 1, :null => false
|
39
39
|
t.integer :lock_version, :default => 0, :null => false
|
40
40
|
t.text :note
|
41
41
|
t.integer :required_role_id, :default => 1, :null => false
|
@@ -44,10 +44,10 @@ class CreatePatrons < ActiveRecord::Migration
|
|
44
44
|
t.text :email
|
45
45
|
t.text :url
|
46
46
|
end
|
47
|
-
add_index :
|
48
|
-
add_index :
|
49
|
-
add_index :
|
50
|
-
add_index :
|
51
|
-
add_index :
|
47
|
+
add_index :agents, :user_id, :unique => true
|
48
|
+
add_index :agents, :language_id
|
49
|
+
add_index :agents, :country_id
|
50
|
+
add_index :agents, :required_role_id
|
51
|
+
add_index :agents, :full_name
|
52
52
|
end
|
53
53
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateOwns < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :owns do |t|
|
4
|
-
t.references :
|
4
|
+
t.references :agent, :null => false
|
5
5
|
t.references :item, :null => false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :owns, :
|
9
|
+
add_index :owns, :agent_id
|
10
10
|
add_index :owns, :item_id
|
11
11
|
end
|
12
12
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateCreates < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :creates do |t|
|
4
|
-
t.references :
|
4
|
+
t.references :agent, :null => false
|
5
5
|
t.references :work, :null => false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :creates, :
|
9
|
+
add_index :creates, :agent_id
|
10
10
|
add_index :creates, :work_id
|
11
11
|
end
|
12
12
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateProduces < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :produces do |t|
|
4
|
-
t.references :
|
4
|
+
t.references :agent, :null => false
|
5
5
|
t.references :manifestation, :null => false
|
6
6
|
t.integer :position
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :produces, :
|
9
|
+
add_index :produces, :agent_id
|
10
10
|
add_index :produces, :manifestation_id
|
11
11
|
end
|
12
12
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateDonates < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :donates do |t|
|
4
|
-
t.integer :
|
4
|
+
t.integer :agent_id, :null => false
|
5
5
|
t.integer :item_id, :null => false
|
6
6
|
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :donates, :
|
9
|
+
add_index :donates, :agent_id
|
10
10
|
add_index :donates, :item_id
|
11
11
|
end
|
12
12
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class CreateRealizes < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :realizes do |t|
|
4
|
-
t.references :
|
4
|
+
t.references :agent, :null => false
|
5
5
|
t.references :expression, :null => false
|
6
6
|
t.integer :position
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
add_index :realizes, :
|
10
|
+
add_index :realizes, :agent_id
|
11
11
|
add_index :realizes, :expression_id
|
12
12
|
end
|
13
13
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class CreateAgentImportFiles < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :agent_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 :executed_at
|
10
|
+
t.string :state
|
11
|
+
t.string :agent_import_file_name
|
12
|
+
t.string :agent_import_content_type
|
13
|
+
t.integer :agent_import_file_size
|
14
|
+
t.datetime :agent_import_updated_at
|
15
|
+
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
add_index :agent_import_files, :parent_id
|
19
|
+
add_index :agent_import_files, :user_id
|
20
|
+
add_index :agent_import_files, :state
|
21
|
+
end
|
22
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
class
|
1
|
+
class CreateAgentRelationshipTypes < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
create_table :
|
3
|
+
create_table :agent_relationship_types do |t|
|
4
4
|
t.string :name, :null => false
|
5
5
|
t.text :display_name
|
6
6
|
t.text :note
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class AddDcndlSchema < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
3
|
add_column :manifestations, :title_alternative_transcription, :text
|
4
|
-
add_column :
|
4
|
+
add_column :agents, :full_name_alternative_transcription, :text
|
5
5
|
add_column :manifestations, :description, :text
|
6
6
|
add_column :manifestations, :abstract, :text
|
7
7
|
add_column :manifestations, :available_at, :timestamp
|
@@ -14,7 +14,7 @@ class AddDcndlSchema < ActiveRecord::Migration
|
|
14
14
|
|
15
15
|
def self.down
|
16
16
|
remove_column :manifestations, :title_alternative_transcription
|
17
|
-
remove_column :
|
17
|
+
remove_column :agents, :full_name_alternative_transcription
|
18
18
|
remove_column :manifestations, :description
|
19
19
|
remove_column :manifestations, :abstract
|
20
20
|
remove_column :manifestations, :available_at
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateAgentRelationships < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :agent_relationships do |t|
|
4
|
+
t.integer :parent_id
|
5
|
+
t.integer :child_id
|
6
|
+
t.integer :agent_relationship_type_id
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :agent_relationships, :parent_id
|
11
|
+
add_index :agent_relationships, :child_id
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddPositionToAgentRelationship < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :manifestation_relationships, :position, :integer
|
4
|
+
add_column :agent_relationships, :position, :integer
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :agent_relationships, :position
|
9
|
+
remove_column :manifestation_relationships, :position
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddBirthDateAndDeathDateToAgent < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :agents, :birth_date, :string
|
4
|
+
add_column :agents, :death_date, :string
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :agents, :death_date
|
9
|
+
remove_column :agents, :birth_date
|
10
|
+
end
|
11
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -13,6 +13,125 @@
|
|
13
13
|
|
14
14
|
ActiveRecord::Schema.define(:version => 20130509185724) do
|
15
15
|
|
16
|
+
create_table "agent_import_files", :force => true do |t|
|
17
|
+
t.integer "parent_id"
|
18
|
+
t.string "content_type"
|
19
|
+
t.integer "size"
|
20
|
+
t.integer "user_id"
|
21
|
+
t.text "note"
|
22
|
+
t.datetime "executed_at"
|
23
|
+
t.string "state"
|
24
|
+
t.string "agent_import_file_name"
|
25
|
+
t.string "agent_import_content_type"
|
26
|
+
t.integer "agent_import_file_size"
|
27
|
+
t.datetime "agent_import_updated_at"
|
28
|
+
t.datetime "created_at", :null => false
|
29
|
+
t.datetime "updated_at", :null => false
|
30
|
+
t.string "agent_import_fingerprint"
|
31
|
+
t.text "error_message"
|
32
|
+
t.string "edit_mode"
|
33
|
+
end
|
34
|
+
|
35
|
+
add_index "agent_import_files", ["parent_id"], :name => "index_agent_import_files_on_parent_id"
|
36
|
+
add_index "agent_import_files", ["state"], :name => "index_agent_import_files_on_state"
|
37
|
+
add_index "agent_import_files", ["user_id"], :name => "index_agent_import_files_on_user_id"
|
38
|
+
|
39
|
+
create_table "agent_import_results", :force => true do |t|
|
40
|
+
t.integer "agent_import_file_id"
|
41
|
+
t.integer "agent_id"
|
42
|
+
t.integer "user_id"
|
43
|
+
t.text "body"
|
44
|
+
t.datetime "created_at", :null => false
|
45
|
+
t.datetime "updated_at", :null => false
|
46
|
+
end
|
47
|
+
|
48
|
+
create_table "agent_relationship_types", :force => true do |t|
|
49
|
+
t.string "name", :null => false
|
50
|
+
t.text "display_name"
|
51
|
+
t.text "note"
|
52
|
+
t.integer "position"
|
53
|
+
t.datetime "created_at", :null => false
|
54
|
+
t.datetime "updated_at", :null => false
|
55
|
+
end
|
56
|
+
|
57
|
+
create_table "agent_relationships", :force => true do |t|
|
58
|
+
t.integer "parent_id"
|
59
|
+
t.integer "child_id"
|
60
|
+
t.integer "agent_relationship_type_id"
|
61
|
+
t.datetime "created_at", :null => false
|
62
|
+
t.datetime "updated_at", :null => false
|
63
|
+
t.integer "position"
|
64
|
+
end
|
65
|
+
|
66
|
+
add_index "agent_relationships", ["child_id"], :name => "index_agent_relationships_on_child_id"
|
67
|
+
add_index "agent_relationships", ["parent_id"], :name => "index_agent_relationships_on_parent_id"
|
68
|
+
|
69
|
+
create_table "agent_types", :force => true do |t|
|
70
|
+
t.string "name", :null => false
|
71
|
+
t.text "display_name"
|
72
|
+
t.text "note"
|
73
|
+
t.integer "position"
|
74
|
+
t.datetime "created_at", :null => false
|
75
|
+
t.datetime "updated_at", :null => false
|
76
|
+
end
|
77
|
+
|
78
|
+
create_table "agents", :force => true do |t|
|
79
|
+
t.integer "user_id"
|
80
|
+
t.string "last_name"
|
81
|
+
t.string "middle_name"
|
82
|
+
t.string "first_name"
|
83
|
+
t.string "last_name_transcription"
|
84
|
+
t.string "middle_name_transcription"
|
85
|
+
t.string "first_name_transcription"
|
86
|
+
t.string "corporate_name"
|
87
|
+
t.string "corporate_name_transcription"
|
88
|
+
t.string "full_name"
|
89
|
+
t.text "full_name_transcription"
|
90
|
+
t.text "full_name_alternative"
|
91
|
+
t.datetime "created_at", :null => false
|
92
|
+
t.datetime "updated_at", :null => false
|
93
|
+
t.datetime "deleted_at"
|
94
|
+
t.string "zip_code_1"
|
95
|
+
t.string "zip_code_2"
|
96
|
+
t.text "address_1"
|
97
|
+
t.text "address_2"
|
98
|
+
t.text "address_1_note"
|
99
|
+
t.text "address_2_note"
|
100
|
+
t.string "telephone_number_1"
|
101
|
+
t.string "telephone_number_2"
|
102
|
+
t.string "fax_number_1"
|
103
|
+
t.string "fax_number_2"
|
104
|
+
t.text "other_designation"
|
105
|
+
t.text "place"
|
106
|
+
t.string "postal_code"
|
107
|
+
t.text "street"
|
108
|
+
t.text "locality"
|
109
|
+
t.text "region"
|
110
|
+
t.datetime "date_of_birth"
|
111
|
+
t.datetime "date_of_death"
|
112
|
+
t.integer "language_id", :default => 1, :null => false
|
113
|
+
t.integer "country_id", :default => 1, :null => false
|
114
|
+
t.integer "agent_type_id", :default => 1, :null => false
|
115
|
+
t.integer "lock_version", :default => 0, :null => false
|
116
|
+
t.text "note"
|
117
|
+
t.integer "required_role_id", :default => 1, :null => false
|
118
|
+
t.integer "required_score", :default => 0, :null => false
|
119
|
+
t.string "state"
|
120
|
+
t.text "email"
|
121
|
+
t.text "url"
|
122
|
+
t.text "full_name_alternative_transcription"
|
123
|
+
t.string "birth_date"
|
124
|
+
t.string "death_date"
|
125
|
+
t.string "agent_identifier"
|
126
|
+
end
|
127
|
+
|
128
|
+
add_index "agents", ["agent_identifier"], :name => "index_agents_on_agent_identifier"
|
129
|
+
add_index "agents", ["country_id"], :name => "index_agents_on_country_id"
|
130
|
+
add_index "agents", ["full_name"], :name => "index_agents_on_full_name"
|
131
|
+
add_index "agents", ["language_id"], :name => "index_agents_on_language_id"
|
132
|
+
add_index "agents", ["required_role_id"], :name => "index_agents_on_required_role_id"
|
133
|
+
add_index "agents", ["user_id"], :name => "index_agents_on_user_id", :unique => true
|
134
|
+
|
16
135
|
create_table "carrier_types", :force => true do |t|
|
17
136
|
t.string "name", :null => false
|
18
137
|
t.text "display_name"
|
@@ -82,7 +201,7 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
82
201
|
end
|
83
202
|
|
84
203
|
create_table "creates", :force => true do |t|
|
85
|
-
t.integer "
|
204
|
+
t.integer "agent_id", :null => false
|
86
205
|
t.integer "work_id", :null => false
|
87
206
|
t.integer "position"
|
88
207
|
t.datetime "created_at", :null => false
|
@@ -90,18 +209,18 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
90
209
|
t.integer "create_type_id"
|
91
210
|
end
|
92
211
|
|
93
|
-
add_index "creates", ["
|
212
|
+
add_index "creates", ["agent_id"], :name => "index_creates_on_agent_id"
|
94
213
|
add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
|
95
214
|
|
96
215
|
create_table "donates", :force => true do |t|
|
97
|
-
t.integer "
|
216
|
+
t.integer "agent_id", :null => false
|
98
217
|
t.integer "item_id", :null => false
|
99
218
|
t.datetime "created_at", :null => false
|
100
219
|
t.datetime "updated_at", :null => false
|
101
220
|
end
|
102
221
|
|
222
|
+
add_index "donates", ["agent_id"], :name => "index_donates_on_agent_id"
|
103
223
|
add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
|
104
|
-
add_index "donates", ["patron_id"], :name => "index_donates_on_patron_id"
|
105
224
|
|
106
225
|
create_table "exemplifies", :force => true do |t|
|
107
226
|
t.integer "manifestation_id", :null => false
|
@@ -326,134 +445,15 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
326
445
|
end
|
327
446
|
|
328
447
|
create_table "owns", :force => true do |t|
|
329
|
-
t.integer "
|
448
|
+
t.integer "agent_id", :null => false
|
330
449
|
t.integer "item_id", :null => false
|
331
450
|
t.integer "position"
|
332
451
|
t.datetime "created_at", :null => false
|
333
452
|
t.datetime "updated_at", :null => false
|
334
453
|
end
|
335
454
|
|
455
|
+
add_index "owns", ["agent_id"], :name => "index_owns_on_agent_id"
|
336
456
|
add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
|
337
|
-
add_index "owns", ["patron_id"], :name => "index_owns_on_patron_id"
|
338
|
-
|
339
|
-
create_table "patron_import_files", :force => true do |t|
|
340
|
-
t.integer "parent_id"
|
341
|
-
t.string "content_type"
|
342
|
-
t.integer "size"
|
343
|
-
t.integer "user_id"
|
344
|
-
t.text "note"
|
345
|
-
t.datetime "executed_at"
|
346
|
-
t.string "state"
|
347
|
-
t.string "patron_import_file_name"
|
348
|
-
t.string "patron_import_content_type"
|
349
|
-
t.integer "patron_import_file_size"
|
350
|
-
t.datetime "patron_import_updated_at"
|
351
|
-
t.datetime "created_at", :null => false
|
352
|
-
t.datetime "updated_at", :null => false
|
353
|
-
t.string "patron_import_fingerprint"
|
354
|
-
t.text "error_message"
|
355
|
-
t.string "edit_mode"
|
356
|
-
end
|
357
|
-
|
358
|
-
add_index "patron_import_files", ["parent_id"], :name => "index_patron_import_files_on_parent_id"
|
359
|
-
add_index "patron_import_files", ["state"], :name => "index_patron_import_files_on_state"
|
360
|
-
add_index "patron_import_files", ["user_id"], :name => "index_patron_import_files_on_user_id"
|
361
|
-
|
362
|
-
create_table "patron_import_results", :force => true do |t|
|
363
|
-
t.integer "patron_import_file_id"
|
364
|
-
t.integer "patron_id"
|
365
|
-
t.integer "user_id"
|
366
|
-
t.text "body"
|
367
|
-
t.datetime "created_at", :null => false
|
368
|
-
t.datetime "updated_at", :null => false
|
369
|
-
end
|
370
|
-
|
371
|
-
create_table "patron_relationship_types", :force => true do |t|
|
372
|
-
t.string "name", :null => false
|
373
|
-
t.text "display_name"
|
374
|
-
t.text "note"
|
375
|
-
t.integer "position"
|
376
|
-
t.datetime "created_at", :null => false
|
377
|
-
t.datetime "updated_at", :null => false
|
378
|
-
end
|
379
|
-
|
380
|
-
create_table "patron_relationships", :force => true do |t|
|
381
|
-
t.integer "parent_id"
|
382
|
-
t.integer "child_id"
|
383
|
-
t.integer "patron_relationship_type_id"
|
384
|
-
t.datetime "created_at", :null => false
|
385
|
-
t.datetime "updated_at", :null => false
|
386
|
-
t.integer "position"
|
387
|
-
end
|
388
|
-
|
389
|
-
add_index "patron_relationships", ["child_id"], :name => "index_patron_relationships_on_child_id"
|
390
|
-
add_index "patron_relationships", ["parent_id"], :name => "index_patron_relationships_on_parent_id"
|
391
|
-
|
392
|
-
create_table "patron_types", :force => true do |t|
|
393
|
-
t.string "name", :null => false
|
394
|
-
t.text "display_name"
|
395
|
-
t.text "note"
|
396
|
-
t.integer "position"
|
397
|
-
t.datetime "created_at", :null => false
|
398
|
-
t.datetime "updated_at", :null => false
|
399
|
-
end
|
400
|
-
|
401
|
-
create_table "patrons", :force => true do |t|
|
402
|
-
t.integer "user_id"
|
403
|
-
t.string "last_name"
|
404
|
-
t.string "middle_name"
|
405
|
-
t.string "first_name"
|
406
|
-
t.string "last_name_transcription"
|
407
|
-
t.string "middle_name_transcription"
|
408
|
-
t.string "first_name_transcription"
|
409
|
-
t.string "corporate_name"
|
410
|
-
t.string "corporate_name_transcription"
|
411
|
-
t.string "full_name"
|
412
|
-
t.text "full_name_transcription"
|
413
|
-
t.text "full_name_alternative"
|
414
|
-
t.datetime "created_at", :null => false
|
415
|
-
t.datetime "updated_at", :null => false
|
416
|
-
t.datetime "deleted_at"
|
417
|
-
t.string "zip_code_1"
|
418
|
-
t.string "zip_code_2"
|
419
|
-
t.text "address_1"
|
420
|
-
t.text "address_2"
|
421
|
-
t.text "address_1_note"
|
422
|
-
t.text "address_2_note"
|
423
|
-
t.string "telephone_number_1"
|
424
|
-
t.string "telephone_number_2"
|
425
|
-
t.string "fax_number_1"
|
426
|
-
t.string "fax_number_2"
|
427
|
-
t.text "other_designation"
|
428
|
-
t.text "place"
|
429
|
-
t.string "postal_code"
|
430
|
-
t.text "street"
|
431
|
-
t.text "locality"
|
432
|
-
t.text "region"
|
433
|
-
t.datetime "date_of_birth"
|
434
|
-
t.datetime "date_of_death"
|
435
|
-
t.integer "language_id", :default => 1, :null => false
|
436
|
-
t.integer "country_id", :default => 1, :null => false
|
437
|
-
t.integer "patron_type_id", :default => 1, :null => false
|
438
|
-
t.integer "lock_version", :default => 0, :null => false
|
439
|
-
t.text "note"
|
440
|
-
t.integer "required_role_id", :default => 1, :null => false
|
441
|
-
t.integer "required_score", :default => 0, :null => false
|
442
|
-
t.string "state"
|
443
|
-
t.text "email"
|
444
|
-
t.text "url"
|
445
|
-
t.text "full_name_alternative_transcription"
|
446
|
-
t.string "birth_date"
|
447
|
-
t.string "death_date"
|
448
|
-
t.string "patron_identifier"
|
449
|
-
end
|
450
|
-
|
451
|
-
add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id"
|
452
|
-
add_index "patrons", ["full_name"], :name => "index_patrons_on_full_name"
|
453
|
-
add_index "patrons", ["language_id"], :name => "index_patrons_on_language_id"
|
454
|
-
add_index "patrons", ["patron_identifier"], :name => "index_patrons_on_patron_identifier"
|
455
|
-
add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id"
|
456
|
-
add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true
|
457
457
|
|
458
458
|
create_table "picture_files", :force => true do |t|
|
459
459
|
t.integer "picture_attachable_id"
|
@@ -484,7 +484,7 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
484
484
|
end
|
485
485
|
|
486
486
|
create_table "produces", :force => true do |t|
|
487
|
-
t.integer "
|
487
|
+
t.integer "agent_id", :null => false
|
488
488
|
t.integer "manifestation_id", :null => false
|
489
489
|
t.integer "position"
|
490
490
|
t.datetime "created_at", :null => false
|
@@ -492,8 +492,8 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
492
492
|
t.integer "produce_type_id"
|
493
493
|
end
|
494
494
|
|
495
|
+
add_index "produces", ["agent_id"], :name => "index_produces_on_agent_id"
|
495
496
|
add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
|
496
|
-
add_index "produces", ["patron_id"], :name => "index_produces_on_patron_id"
|
497
497
|
|
498
498
|
create_table "realize_types", :force => true do |t|
|
499
499
|
t.string "name"
|
@@ -505,7 +505,7 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
505
505
|
end
|
506
506
|
|
507
507
|
create_table "realizes", :force => true do |t|
|
508
|
-
t.integer "
|
508
|
+
t.integer "agent_id", :null => false
|
509
509
|
t.integer "expression_id", :null => false
|
510
510
|
t.integer "position"
|
511
511
|
t.datetime "created_at", :null => false
|
@@ -513,8 +513,8 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
513
513
|
t.integer "realize_type_id"
|
514
514
|
end
|
515
515
|
|
516
|
+
add_index "realizes", ["agent_id"], :name => "index_realizes_on_agent_id"
|
516
517
|
add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
|
517
|
-
add_index "realizes", ["patron_id"], :name => "index_realizes_on_patron_id"
|
518
518
|
|
519
519
|
create_table "resource_import_files", :force => true do |t|
|
520
520
|
t.integer "parent_id"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1,19 +1,19 @@
|
|
1
1
|
---
|
2
|
-
|
2
|
+
agent_type_00001:
|
3
3
|
id: 1
|
4
4
|
name: Person
|
5
5
|
display_name: Person
|
6
6
|
note:
|
7
7
|
position: 1
|
8
8
|
|
9
|
-
|
9
|
+
agent_type_00002:
|
10
10
|
id: 2
|
11
11
|
name: CorporateBody
|
12
12
|
display_name: CorporateBody
|
13
13
|
note:
|
14
14
|
position: 2
|
15
15
|
|
16
|
-
|
16
|
+
agent_type_00003:
|
17
17
|
id: 3
|
18
18
|
name: Conference
|
19
19
|
display_name: Conference
|
@@ -22,7 +22,7 @@ patron_type_00003:
|
|
22
22
|
|
23
23
|
# == Schema Information
|
24
24
|
#
|
25
|
-
# Table name:
|
25
|
+
# Table name: agent_types
|
26
26
|
#
|
27
27
|
# id :integer not null, primary key
|
28
28
|
# name :string(255) not null
|
@@ -28,7 +28,7 @@ describe NdlBook do
|
|
28
28
|
manifestation.language.name.should eq "Japanese"
|
29
29
|
manifestation.creators.first.full_name.should eq '秋葉, 拓哉'
|
30
30
|
manifestation.creators.first.full_name_transcription.should eq 'アキバ, タクヤ'
|
31
|
-
manifestation.creators.first.
|
31
|
+
manifestation.creators.first.agent_identifier.should eq 'http://id.ndl.go.jp/auth/entity/01208840'
|
32
32
|
manifestation.price.should eq 3280
|
33
33
|
manifestation.start_page.should eq 1
|
34
34
|
manifestation.end_page.should eq 315
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_ndl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.1.0.
|
131
|
+
version: 1.1.0.rc3
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.1.0.
|
138
|
+
version: 1.1.0.rc3
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: enju_question
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - ~>
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.1.0.
|
188
|
-
type: :
|
187
|
+
version: 0.1.0.pre20
|
188
|
+
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - ~>
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.1.0.
|
194
|
+
version: 0.1.0.pre20
|
195
195
|
description: NDL WebAPI wrapper for Next-L Enju
|
196
196
|
email:
|
197
197
|
- tanabe@mwr.mediacom.keio.ac.jp
|
@@ -266,8 +266,7 @@ files:
|
|
266
266
|
- spec/dummy/config/locales/en.yml
|
267
267
|
- spec/dummy/config/routes.rb
|
268
268
|
- spec/dummy/config.ru
|
269
|
-
- spec/dummy/db/
|
270
|
-
- spec/dummy/db/migrate/001_create_patrons.rb
|
269
|
+
- spec/dummy/db/migrate/001_create_agents.rb
|
271
270
|
- spec/dummy/db/migrate/005_create_manifestations.rb
|
272
271
|
- spec/dummy/db/migrate/006_create_items.rb
|
273
272
|
- spec/dummy/db/migrate/012_create_owns.rb
|
@@ -286,11 +285,11 @@ files:
|
|
286
285
|
- spec/dummy/db/migrate/20080606052544_create_work_has_subjects.rb
|
287
286
|
- spec/dummy/db/migrate/20080830154109_create_realizes.rb
|
288
287
|
- spec/dummy/db/migrate/20080830172106_create_exemplifies.rb
|
289
|
-
- spec/dummy/db/migrate/
|
288
|
+
- spec/dummy/db/migrate/20080905191442_create_agent_types.rb
|
290
289
|
- spec/dummy/db/migrate/20081025083323_create_countries.rb
|
291
290
|
- spec/dummy/db/migrate/20081025083905_create_languages.rb
|
292
291
|
- spec/dummy/db/migrate/20081027150907_create_picture_files.rb
|
293
|
-
- spec/dummy/db/migrate/
|
292
|
+
- spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb
|
294
293
|
- spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb
|
295
294
|
- spec/dummy/db/migrate/20090208044541_create_subject_heading_type_has_subjects.rb
|
296
295
|
- spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb
|
@@ -298,7 +297,7 @@ files:
|
|
298
297
|
- spec/dummy/db/migrate/20090719201843_create_extents.rb
|
299
298
|
- spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb
|
300
299
|
- spec/dummy/db/migrate/20090720091429_create_content_types.rb
|
301
|
-
- spec/dummy/db/migrate/
|
300
|
+
- spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb
|
302
301
|
- spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb
|
303
302
|
- spec/dummy/db/migrate/20091025080447_create_licenses.rb
|
304
303
|
- spec/dummy/db/migrate/20091202124834_create_versions.rb
|
@@ -307,14 +306,14 @@ files:
|
|
307
306
|
- spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb
|
308
307
|
- spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb
|
309
308
|
- spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb
|
310
|
-
- spec/dummy/db/migrate/
|
309
|
+
- spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb
|
311
310
|
- spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb
|
312
|
-
- spec/dummy/db/migrate/
|
311
|
+
- spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb
|
313
312
|
- spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb
|
314
|
-
- spec/dummy/db/migrate/
|
313
|
+
- spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb
|
315
314
|
- spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb
|
316
315
|
- spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb
|
317
|
-
- spec/dummy/db/migrate/
|
316
|
+
- spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb
|
318
317
|
- spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb
|
319
318
|
- spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb
|
320
319
|
- spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb
|
@@ -345,15 +344,14 @@ files:
|
|
345
344
|
- spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb
|
346
345
|
- spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb
|
347
346
|
- spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb
|
348
|
-
- spec/dummy/db/migrate/
|
347
|
+
- spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb
|
349
348
|
- spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb
|
350
|
-
- spec/dummy/db/migrate/
|
349
|
+
- spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb
|
351
350
|
- spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb
|
352
|
-
- spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb
|
353
351
|
- spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb
|
354
352
|
- spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb
|
355
|
-
- spec/dummy/db/migrate/
|
356
|
-
- spec/dummy/db/migrate/
|
353
|
+
- spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb
|
354
|
+
- spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb
|
357
355
|
- spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb
|
358
356
|
- spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb
|
359
357
|
- spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb
|
@@ -386,13 +384,13 @@ files:
|
|
386
384
|
- spec/dummy/test/unit/produce_test.rb
|
387
385
|
- spec/dummy/test/unit/role_test.rb
|
388
386
|
- spec/dummy/test/unit/user_test.rb
|
387
|
+
- spec/fixtures/agent_types.yml
|
389
388
|
- spec/fixtures/carrier_types.yml
|
390
389
|
- spec/fixtures/classification_types.yml
|
391
390
|
- spec/fixtures/content_types.yml
|
392
391
|
- spec/fixtures/countries.yml
|
393
392
|
- spec/fixtures/identifier_types.yml
|
394
393
|
- spec/fixtures/languages.yml
|
395
|
-
- spec/fixtures/patron_types.yml
|
396
394
|
- spec/fixtures/roles.yml
|
397
395
|
- spec/fixtures/subject_heading_types.yml
|
398
396
|
- spec/fixtures/subject_types.yml
|
@@ -425,7 +423,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
425
423
|
version: 1.3.1
|
426
424
|
requirements: []
|
427
425
|
rubyforge_project:
|
428
|
-
rubygems_version: 2.0.
|
426
|
+
rubygems_version: 2.0.3
|
429
427
|
signing_key:
|
430
428
|
specification_version: 4
|
431
429
|
summary: enju_ndl plugin
|
@@ -480,8 +478,7 @@ test_files:
|
|
480
478
|
- spec/dummy/config/locales/en.yml
|
481
479
|
- spec/dummy/config/routes.rb
|
482
480
|
- spec/dummy/config.ru
|
483
|
-
- spec/dummy/db/
|
484
|
-
- spec/dummy/db/migrate/001_create_patrons.rb
|
481
|
+
- spec/dummy/db/migrate/001_create_agents.rb
|
485
482
|
- spec/dummy/db/migrate/005_create_manifestations.rb
|
486
483
|
- spec/dummy/db/migrate/006_create_items.rb
|
487
484
|
- spec/dummy/db/migrate/012_create_owns.rb
|
@@ -500,11 +497,11 @@ test_files:
|
|
500
497
|
- spec/dummy/db/migrate/20080606052544_create_work_has_subjects.rb
|
501
498
|
- spec/dummy/db/migrate/20080830154109_create_realizes.rb
|
502
499
|
- spec/dummy/db/migrate/20080830172106_create_exemplifies.rb
|
503
|
-
- spec/dummy/db/migrate/
|
500
|
+
- spec/dummy/db/migrate/20080905191442_create_agent_types.rb
|
504
501
|
- spec/dummy/db/migrate/20081025083323_create_countries.rb
|
505
502
|
- spec/dummy/db/migrate/20081025083905_create_languages.rb
|
506
503
|
- spec/dummy/db/migrate/20081027150907_create_picture_files.rb
|
507
|
-
- spec/dummy/db/migrate/
|
504
|
+
- spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb
|
508
505
|
- spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb
|
509
506
|
- spec/dummy/db/migrate/20090208044541_create_subject_heading_type_has_subjects.rb
|
510
507
|
- spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb
|
@@ -512,7 +509,7 @@ test_files:
|
|
512
509
|
- spec/dummy/db/migrate/20090719201843_create_extents.rb
|
513
510
|
- spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb
|
514
511
|
- spec/dummy/db/migrate/20090720091429_create_content_types.rb
|
515
|
-
- spec/dummy/db/migrate/
|
512
|
+
- spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb
|
516
513
|
- spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb
|
517
514
|
- spec/dummy/db/migrate/20091025080447_create_licenses.rb
|
518
515
|
- spec/dummy/db/migrate/20091202124834_create_versions.rb
|
@@ -521,14 +518,14 @@ test_files:
|
|
521
518
|
- spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb
|
522
519
|
- spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb
|
523
520
|
- spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb
|
524
|
-
- spec/dummy/db/migrate/
|
521
|
+
- spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb
|
525
522
|
- spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb
|
526
|
-
- spec/dummy/db/migrate/
|
523
|
+
- spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb
|
527
524
|
- spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb
|
528
|
-
- spec/dummy/db/migrate/
|
525
|
+
- spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb
|
529
526
|
- spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb
|
530
527
|
- spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb
|
531
|
-
- spec/dummy/db/migrate/
|
528
|
+
- spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb
|
532
529
|
- spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb
|
533
530
|
- spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb
|
534
531
|
- spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb
|
@@ -559,15 +556,14 @@ test_files:
|
|
559
556
|
- spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb
|
560
557
|
- spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb
|
561
558
|
- spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb
|
562
|
-
- spec/dummy/db/migrate/
|
559
|
+
- spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb
|
563
560
|
- spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb
|
564
|
-
- spec/dummy/db/migrate/
|
561
|
+
- spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb
|
565
562
|
- spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb
|
566
|
-
- spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb
|
567
563
|
- spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb
|
568
564
|
- spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb
|
569
|
-
- spec/dummy/db/migrate/
|
570
|
-
- spec/dummy/db/migrate/
|
565
|
+
- spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb
|
566
|
+
- spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb
|
571
567
|
- spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb
|
572
568
|
- spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb
|
573
569
|
- spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb
|
@@ -600,13 +596,13 @@ test_files:
|
|
600
596
|
- spec/dummy/test/unit/produce_test.rb
|
601
597
|
- spec/dummy/test/unit/role_test.rb
|
602
598
|
- spec/dummy/test/unit/user_test.rb
|
599
|
+
- spec/fixtures/agent_types.yml
|
603
600
|
- spec/fixtures/carrier_types.yml
|
604
601
|
- spec/fixtures/classification_types.yml
|
605
602
|
- spec/fixtures/content_types.yml
|
606
603
|
- spec/fixtures/countries.yml
|
607
604
|
- spec/fixtures/identifier_types.yml
|
608
605
|
- spec/fixtures/languages.yml
|
609
|
-
- spec/fixtures/patron_types.yml
|
610
606
|
- spec/fixtures/roles.yml
|
611
607
|
- spec/fixtures/subject_heading_types.yml
|
612
608
|
- spec/fixtures/subject_types.yml
|
Binary file
|
@@ -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
|