enju_subject 0.1.0.pre5 → 0.1.0.pre6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/enju_subject/ability.rb +68 -0
- data/lib/enju_subject/version.rb +1 -1
- data/spec/controllers/subjects_controller_spec.rb +2 -0
- data/spec/controllers/work_has_subjects_controller_spec.rb +1 -1
- data/spec/dummy/app/models/ability.rb +70 -42
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/db/migrate/059_create_libraries.rb +28 -0
- data/spec/dummy/db/migrate/069_create_shelves.rb +15 -0
- data/spec/dummy/db/migrate/080_create_library_groups.rb +18 -0
- data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
- data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
- data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_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/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
- data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
- data/spec/dummy/db/schema.rb +167 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_14k +0 -0
- data/spec/fixtures/library_groups.yml +33 -0
- metadata +57 -6
- data/spec/dummy/solr/data/test/index/segments_b4 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b3fbd0d3b98bafeb64ba65c66d786198cf02d81
|
4
|
+
data.tar.gz: 03e8e768a6ee6ab072aad5bc5fc33cf4b9d7391c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a1d84d4be7cc56d4f938f835589c29a8ae737d9941574e50275e7e54296bd19c29a1265138fda50790e758a0da76e82d2f2ff99ff0379a0d0435967a1112e83
|
7
|
+
data.tar.gz: 2d1aef73854ab35545774f28924cd3aa83aaf5aab9f2e557d73129d12ba3e5e9cdf969d6ca86ab51c7641c7b97cc07695393466da014db149bd3d24dab5e5954
|
@@ -0,0 +1,68 @@
|
|
1
|
+
module EnjuSubject
|
2
|
+
class Ability
|
3
|
+
include CanCan::Ability
|
4
|
+
|
5
|
+
def initialize(user, ip_address = nil)
|
6
|
+
case user.try(:role).try(:name)
|
7
|
+
when 'Administrator'
|
8
|
+
can :manage, [
|
9
|
+
Classification,
|
10
|
+
Subject,
|
11
|
+
SubjectHasClassification,
|
12
|
+
SubjectHeadingTypeHasSubject
|
13
|
+
]
|
14
|
+
can :manage, WorkHasSubject
|
15
|
+
if LibraryGroup.site_config.network_access_allowed?(ip_address)
|
16
|
+
can [:read, :create, :update], ClassificationType
|
17
|
+
can :destroy, ClassificationType do |classification_type|
|
18
|
+
classification_type.classifications.empty?
|
19
|
+
end
|
20
|
+
can :manage, [
|
21
|
+
Classification,
|
22
|
+
Subject,
|
23
|
+
SubjectHasClassification,
|
24
|
+
SubjectHeadingType,
|
25
|
+
SubjectType
|
26
|
+
]
|
27
|
+
else
|
28
|
+
can :read, [
|
29
|
+
ClassificationType,
|
30
|
+
SubjectHeadingType,
|
31
|
+
SubjectType
|
32
|
+
]
|
33
|
+
end
|
34
|
+
when 'Librarian'
|
35
|
+
can :manage, [
|
36
|
+
SubjectHasClassification,
|
37
|
+
WorkHasSubject
|
38
|
+
]
|
39
|
+
can :read, [
|
40
|
+
Classification,
|
41
|
+
ClassificationType,
|
42
|
+
Subject,
|
43
|
+
SubjectType,
|
44
|
+
SubjectHeadingType,
|
45
|
+
SubjectHeadingTypeHasSubject
|
46
|
+
]
|
47
|
+
when 'User'
|
48
|
+
can :read, [
|
49
|
+
Classification,
|
50
|
+
ClassificationType,
|
51
|
+
Subject,
|
52
|
+
SubjectHasClassification,
|
53
|
+
SubjectHeadingType,
|
54
|
+
WorkHasSubject
|
55
|
+
]
|
56
|
+
else
|
57
|
+
can :read, [
|
58
|
+
Classification,
|
59
|
+
ClassificationType,
|
60
|
+
Subject,
|
61
|
+
SubjectHasClassification,
|
62
|
+
SubjectHeadingType,
|
63
|
+
WorkHasSubject
|
64
|
+
]
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
data/lib/enju_subject/version.rb
CHANGED
@@ -42,11 +42,13 @@ describe SubjectsController do
|
|
42
42
|
describe "When not logged in" do
|
43
43
|
it "assigns all subjects as @subjects" do
|
44
44
|
get :index
|
45
|
+
response.should be_success
|
45
46
|
assigns(:subjects).should_not be_nil
|
46
47
|
end
|
47
48
|
|
48
49
|
it "assigns all subjects as @subjects with work_id" do
|
49
50
|
get :index, :work_id => 1
|
51
|
+
response.should be_success
|
50
52
|
assigns(:subjects).should_not be_nil
|
51
53
|
end
|
52
54
|
end
|
@@ -38,7 +38,7 @@ describe WorkHasSubjectsController do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
describe "When not logged in" do
|
41
|
-
it "
|
41
|
+
it "assigns all work_has_subjects as @work_has_subjects" do
|
42
42
|
get :index
|
43
43
|
assigns(:work_has_subjects).should eq(WorkHasSubject.all)
|
44
44
|
end
|
@@ -1,44 +1,72 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
1
|
+
#module EnjuSubject
|
2
|
+
class Ability
|
3
|
+
include CanCan::Ability
|
4
|
+
|
5
|
+
def initialize(user, ip_address = '0.0.0.0')
|
6
|
+
case user.try(:role).try(:name)
|
7
|
+
when 'Administrator'
|
8
|
+
can :manage, [
|
9
|
+
Classification,
|
10
|
+
Subject,
|
11
|
+
SubjectHasClassification,
|
12
|
+
SubjectHeadingTypeHasSubject
|
13
|
+
]
|
14
|
+
can :manage, WorkHasSubject
|
15
|
+
if LibraryGroup.site_config.network_access_allowed?(ip_address)
|
16
|
+
can [:read, :create, :update], ClassificationType
|
17
|
+
can :destroy, ClassificationType do |classification_type|
|
18
|
+
classification_type.classifications.empty?
|
19
|
+
end
|
20
|
+
can :manage, [
|
21
|
+
Classification,
|
22
|
+
Subject,
|
23
|
+
SubjectHasClassification,
|
24
|
+
SubjectHeadingType,
|
25
|
+
SubjectType
|
26
|
+
]
|
27
|
+
else
|
28
|
+
can :read, [
|
29
|
+
ClassificationType,
|
30
|
+
SubjectHeadingType,
|
31
|
+
SubjectType
|
32
|
+
]
|
33
|
+
end
|
34
|
+
can :read, Manifestation
|
35
|
+
when 'Librarian'
|
36
|
+
can :manage, [
|
37
|
+
SubjectHasClassification,
|
38
|
+
WorkHasSubject
|
39
|
+
]
|
40
|
+
can :read, [
|
41
|
+
Classification,
|
42
|
+
ClassificationType,
|
43
|
+
Subject,
|
44
|
+
SubjectType,
|
45
|
+
SubjectHeadingType,
|
46
|
+
SubjectHeadingTypeHasSubject
|
47
|
+
]
|
48
|
+
can :read, Manifestation
|
49
|
+
when 'User'
|
50
|
+
can :read, [
|
51
|
+
Classification,
|
52
|
+
ClassificationType,
|
53
|
+
Subject,
|
54
|
+
SubjectHasClassification,
|
55
|
+
SubjectHeadingType,
|
56
|
+
WorkHasSubject
|
57
|
+
]
|
58
|
+
can :read, Manifestation
|
59
|
+
else
|
60
|
+
can :read, [
|
61
|
+
Classification,
|
62
|
+
ClassificationType,
|
63
|
+
Subject,
|
64
|
+
SubjectHasClassification,
|
65
|
+
SubjectHeadingType,
|
66
|
+
WorkHasSubject
|
67
|
+
]
|
68
|
+
can :read, Manifestation
|
69
|
+
end
|
42
70
|
end
|
43
71
|
end
|
44
|
-
end
|
72
|
+
#end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class CreateLibraries < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :libraries do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.text :display_name
|
6
|
+
t.string :short_display_name, :null => false
|
7
|
+
t.string :zip_code
|
8
|
+
t.text :street
|
9
|
+
t.text :locality
|
10
|
+
t.text :region
|
11
|
+
t.string :telephone_number_1
|
12
|
+
t.string :telephone_number_2
|
13
|
+
t.string :fax_number
|
14
|
+
t.text :note
|
15
|
+
t.integer :call_number_rows, :default => 1, :null => false
|
16
|
+
t.string :call_number_delimiter, :default => "|", :null => false
|
17
|
+
t.integer :library_group_id, :default => 1, :null => false
|
18
|
+
t.integer :users_count, :default => 0, :null => false
|
19
|
+
t.integer :position
|
20
|
+
t.integer :country_id
|
21
|
+
|
22
|
+
t.timestamps
|
23
|
+
t.datetime :deleted_at
|
24
|
+
end
|
25
|
+
add_index :libraries, :library_group_id
|
26
|
+
add_index :libraries, :name, :unique => true
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateShelves < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :shelves do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.text :display_name
|
6
|
+
t.text :note
|
7
|
+
t.integer :library_id, :default => 1, :null => false
|
8
|
+
t.integer :items_count, :default => 0, :null => false
|
9
|
+
t.integer :position
|
10
|
+
t.timestamps
|
11
|
+
t.datetime :deleted_at
|
12
|
+
end
|
13
|
+
add_index :shelves, :library_id
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateLibraryGroups < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :library_groups do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.text :display_name
|
6
|
+
t.string :short_name, :null => false
|
7
|
+
t.string :email
|
8
|
+
t.text :my_networks
|
9
|
+
t.text :login_banner
|
10
|
+
t.text :note
|
11
|
+
t.integer :country_id
|
12
|
+
t.integer :position
|
13
|
+
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
add_index :library_groups, :short_name
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateBookstores < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :bookstores do |t|
|
4
|
+
t.text :name, :null => false
|
5
|
+
t.string :zip_code
|
6
|
+
t.text :address
|
7
|
+
t.text :note
|
8
|
+
t.string :telephone_number
|
9
|
+
t.string :fax_number
|
10
|
+
t.string :url
|
11
|
+
t.integer :position
|
12
|
+
t.datetime :deleted_at
|
13
|
+
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateSubscriptions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :subscriptions do |t|
|
4
|
+
t.text :title, :null => false
|
5
|
+
t.text :note
|
6
|
+
#t.integer :subscription_list_id, :integer
|
7
|
+
t.integer :user_id
|
8
|
+
t.integer :order_list_id
|
9
|
+
t.datetime :deleted_at
|
10
|
+
t.integer :subscribes_count, :default => 0, :null => false
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
add_index :subscriptions, :user_id
|
15
|
+
add_index :subscriptions, :order_list_id
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateSubscribes < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :subscribes do |t|
|
4
|
+
t.integer :subscription_id, :null => false
|
5
|
+
t.integer :work_id, :null => false
|
6
|
+
t.datetime :start_at, :null => false
|
7
|
+
t.datetime :end_at, :null => false
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :subscribes, :subscription_id
|
12
|
+
add_index :subscribes, :work_id
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateSearchEngines < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :search_engines do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.text :display_name
|
6
|
+
t.string :url, :null => false
|
7
|
+
t.text :base_url, :null => false
|
8
|
+
t.text :http_method, :null => false
|
9
|
+
t.text :query_param, :null => false
|
10
|
+
t.text :additional_param
|
11
|
+
t.text :note
|
12
|
+
t.integer :position
|
13
|
+
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
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
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateAccepts < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :accepts do |t|
|
4
|
+
t.integer :basket_id
|
5
|
+
t.integer :item_id
|
6
|
+
t.integer :librarian_id
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :accepts, :basket_id
|
12
|
+
add_index :accepts, :item_id
|
13
|
+
end
|
14
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -13,6 +13,50 @@
|
|
13
13
|
|
14
14
|
ActiveRecord::Schema.define(:version => 20120602141129) do
|
15
15
|
|
16
|
+
create_table "accepts", :force => true do |t|
|
17
|
+
t.integer "basket_id"
|
18
|
+
t.integer "item_id"
|
19
|
+
t.integer "librarian_id"
|
20
|
+
t.datetime "created_at", :null => false
|
21
|
+
t.datetime "updated_at", :null => false
|
22
|
+
end
|
23
|
+
|
24
|
+
add_index "accepts", ["basket_id"], :name => "index_accepts_on_basket_id"
|
25
|
+
add_index "accepts", ["item_id"], :name => "index_accepts_on_item_id"
|
26
|
+
|
27
|
+
create_table "baskets", :force => true do |t|
|
28
|
+
t.integer "user_id"
|
29
|
+
t.text "note"
|
30
|
+
t.integer "lock_version", :default => 0, :null => false
|
31
|
+
t.datetime "created_at", :null => false
|
32
|
+
t.datetime "updated_at", :null => false
|
33
|
+
end
|
34
|
+
|
35
|
+
add_index "baskets", ["user_id"], :name => "index_baskets_on_user_id"
|
36
|
+
|
37
|
+
create_table "bookstores", :force => true do |t|
|
38
|
+
t.text "name", :null => false
|
39
|
+
t.string "zip_code"
|
40
|
+
t.text "address"
|
41
|
+
t.text "note"
|
42
|
+
t.string "telephone_number"
|
43
|
+
t.string "fax_number"
|
44
|
+
t.string "url"
|
45
|
+
t.integer "position"
|
46
|
+
t.datetime "deleted_at"
|
47
|
+
t.datetime "created_at", :null => false
|
48
|
+
t.datetime "updated_at", :null => false
|
49
|
+
end
|
50
|
+
|
51
|
+
create_table "budget_types", :force => true do |t|
|
52
|
+
t.string "name"
|
53
|
+
t.text "display_name"
|
54
|
+
t.text "note"
|
55
|
+
t.integer "position"
|
56
|
+
t.datetime "created_at", :null => false
|
57
|
+
t.datetime "updated_at", :null => false
|
58
|
+
end
|
59
|
+
|
16
60
|
create_table "carrier_types", :force => true do |t|
|
17
61
|
t.string "name", :null => false
|
18
62
|
t.text "display_name"
|
@@ -197,6 +241,51 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
|
|
197
241
|
add_index "languages", ["iso_639_3"], :name => "index_languages_on_iso_639_3"
|
198
242
|
add_index "languages", ["name"], :name => "index_languages_on_name", :unique => true
|
199
243
|
|
244
|
+
create_table "libraries", :force => true do |t|
|
245
|
+
t.string "name", :null => false
|
246
|
+
t.text "display_name"
|
247
|
+
t.string "short_display_name", :null => false
|
248
|
+
t.string "zip_code"
|
249
|
+
t.text "street"
|
250
|
+
t.text "locality"
|
251
|
+
t.text "region"
|
252
|
+
t.string "telephone_number_1"
|
253
|
+
t.string "telephone_number_2"
|
254
|
+
t.string "fax_number"
|
255
|
+
t.text "note"
|
256
|
+
t.integer "call_number_rows", :default => 1, :null => false
|
257
|
+
t.string "call_number_delimiter", :default => "|", :null => false
|
258
|
+
t.integer "library_group_id", :default => 1, :null => false
|
259
|
+
t.integer "users_count", :default => 0, :null => false
|
260
|
+
t.integer "position"
|
261
|
+
t.integer "country_id"
|
262
|
+
t.datetime "created_at", :null => false
|
263
|
+
t.datetime "updated_at", :null => false
|
264
|
+
t.datetime "deleted_at"
|
265
|
+
t.string "isil"
|
266
|
+
end
|
267
|
+
|
268
|
+
add_index "libraries", ["library_group_id"], :name => "index_libraries_on_library_group_id"
|
269
|
+
add_index "libraries", ["name"], :name => "index_libraries_on_name", :unique => true
|
270
|
+
|
271
|
+
create_table "library_groups", :force => true do |t|
|
272
|
+
t.string "name", :null => false
|
273
|
+
t.text "display_name"
|
274
|
+
t.string "short_name", :null => false
|
275
|
+
t.string "email"
|
276
|
+
t.text "my_networks"
|
277
|
+
t.text "login_banner"
|
278
|
+
t.text "note"
|
279
|
+
t.integer "country_id"
|
280
|
+
t.integer "position"
|
281
|
+
t.datetime "created_at", :null => false
|
282
|
+
t.datetime "updated_at", :null => false
|
283
|
+
t.text "admin_networks"
|
284
|
+
t.string "url", :default => "http://localhost:3000/"
|
285
|
+
end
|
286
|
+
|
287
|
+
add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name"
|
288
|
+
|
200
289
|
create_table "licenses", :force => true do |t|
|
201
290
|
t.string "name", :null => false
|
202
291
|
t.string "display_name"
|
@@ -502,6 +591,24 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
|
|
502
591
|
add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
|
503
592
|
add_index "realizes", ["patron_id"], :name => "index_realizes_on_patron_id"
|
504
593
|
|
594
|
+
create_table "request_status_types", :force => true do |t|
|
595
|
+
t.string "name", :null => false
|
596
|
+
t.text "display_name"
|
597
|
+
t.text "note"
|
598
|
+
t.integer "position"
|
599
|
+
t.datetime "created_at", :null => false
|
600
|
+
t.datetime "updated_at", :null => false
|
601
|
+
end
|
602
|
+
|
603
|
+
create_table "request_types", :force => true do |t|
|
604
|
+
t.string "name", :null => false
|
605
|
+
t.text "display_name"
|
606
|
+
t.text "note"
|
607
|
+
t.integer "position"
|
608
|
+
t.datetime "created_at", :null => false
|
609
|
+
t.datetime "updated_at", :null => false
|
610
|
+
end
|
611
|
+
|
505
612
|
create_table "resource_import_files", :force => true do |t|
|
506
613
|
t.integer "parent_id"
|
507
614
|
t.string "content_type"
|
@@ -547,6 +654,20 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
|
|
547
654
|
t.datetime "updated_at", :null => false
|
548
655
|
end
|
549
656
|
|
657
|
+
create_table "search_engines", :force => true do |t|
|
658
|
+
t.string "name", :null => false
|
659
|
+
t.text "display_name"
|
660
|
+
t.string "url", :null => false
|
661
|
+
t.text "base_url", :null => false
|
662
|
+
t.text "http_method", :null => false
|
663
|
+
t.text "query_param", :null => false
|
664
|
+
t.text "additional_param"
|
665
|
+
t.text "note"
|
666
|
+
t.integer "position"
|
667
|
+
t.datetime "created_at", :null => false
|
668
|
+
t.datetime "updated_at", :null => false
|
669
|
+
end
|
670
|
+
|
550
671
|
create_table "series_has_manifestations", :force => true do |t|
|
551
672
|
t.integer "series_statement_id"
|
552
673
|
t.integer "manifestation_id"
|
@@ -595,6 +716,21 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
|
|
595
716
|
add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_manifestation_id"
|
596
717
|
add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
|
597
718
|
|
719
|
+
create_table "shelves", :force => true do |t|
|
720
|
+
t.string "name", :null => false
|
721
|
+
t.text "display_name"
|
722
|
+
t.text "note"
|
723
|
+
t.integer "library_id", :default => 1, :null => false
|
724
|
+
t.integer "items_count", :default => 0, :null => false
|
725
|
+
t.integer "position"
|
726
|
+
t.datetime "created_at", :null => false
|
727
|
+
t.datetime "updated_at", :null => false
|
728
|
+
t.datetime "deleted_at"
|
729
|
+
t.boolean "closed", :default => false, :null => false
|
730
|
+
end
|
731
|
+
|
732
|
+
add_index "shelves", ["library_id"], :name => "index_shelves_on_library_id"
|
733
|
+
|
598
734
|
create_table "subject_has_classifications", :force => true do |t|
|
599
735
|
t.integer "subject_id"
|
600
736
|
t.string "subject_type"
|
@@ -656,13 +792,42 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
|
|
656
792
|
add_index "subjects", ["term"], :name => "index_subjects_on_term"
|
657
793
|
add_index "subjects", ["use_term_id"], :name => "index_subjects_on_use_term_id"
|
658
794
|
|
795
|
+
create_table "subscribes", :force => true do |t|
|
796
|
+
t.integer "subscription_id", :null => false
|
797
|
+
t.integer "work_id", :null => false
|
798
|
+
t.datetime "start_at", :null => false
|
799
|
+
t.datetime "end_at", :null => false
|
800
|
+
t.datetime "created_at", :null => false
|
801
|
+
t.datetime "updated_at", :null => false
|
802
|
+
end
|
803
|
+
|
804
|
+
add_index "subscribes", ["subscription_id"], :name => "index_subscribes_on_subscription_id"
|
805
|
+
add_index "subscribes", ["work_id"], :name => "index_subscribes_on_work_id"
|
806
|
+
|
807
|
+
create_table "subscriptions", :force => true do |t|
|
808
|
+
t.text "title", :null => false
|
809
|
+
t.text "note"
|
810
|
+
t.integer "user_id"
|
811
|
+
t.integer "order_list_id"
|
812
|
+
t.datetime "deleted_at"
|
813
|
+
t.integer "subscribes_count", :default => 0, :null => false
|
814
|
+
t.datetime "created_at", :null => false
|
815
|
+
t.datetime "updated_at", :null => false
|
816
|
+
end
|
817
|
+
|
818
|
+
add_index "subscriptions", ["order_list_id"], :name => "index_subscriptions_on_order_list_id"
|
819
|
+
add_index "subscriptions", ["user_id"], :name => "index_subscriptions_on_user_id"
|
820
|
+
|
659
821
|
create_table "user_groups", :force => true do |t|
|
660
822
|
t.string "name"
|
661
823
|
t.text "display_name"
|
662
824
|
t.text "note"
|
663
825
|
t.integer "position"
|
664
|
-
t.datetime "created_at",
|
665
|
-
t.datetime "updated_at",
|
826
|
+
t.datetime "created_at", :null => false
|
827
|
+
t.datetime "updated_at", :null => false
|
828
|
+
t.integer "number_of_day_to_notify_overdue", :default => 1, :null => false
|
829
|
+
t.integer "number_of_day_to_notify_due_date", :default => 7, :null => false
|
830
|
+
t.integer "number_of_time_to_notify_overdue", :default => 3, :null => false
|
666
831
|
end
|
667
832
|
|
668
833
|
create_table "user_has_roles", :force => true do |t|
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
2
|
+
one:
|
3
|
+
id: 1
|
4
|
+
name: enju_library
|
5
|
+
display_name: "<%= I18n.locale %>: Enju Library"
|
6
|
+
short_name: enju
|
7
|
+
email: next-l@library.example.jp
|
8
|
+
note:
|
9
|
+
my_networks: 0.0.0.0/0
|
10
|
+
url: "http://localhost:3000/"
|
11
|
+
position: 1
|
12
|
+
login_banner: "*Next-L Enju*"
|
13
|
+
|
14
|
+
# == Schema Information
|
15
|
+
#
|
16
|
+
# Table name: library_groups
|
17
|
+
#
|
18
|
+
# id :integer not null, primary key
|
19
|
+
# name :string(255) not null
|
20
|
+
# display_name :text
|
21
|
+
# short_name :string(255) not null
|
22
|
+
# email :string(255)
|
23
|
+
# my_networks :text
|
24
|
+
# login_banner :text
|
25
|
+
# note :text
|
26
|
+
# country_id :integer
|
27
|
+
# position :integer
|
28
|
+
# created_at :datetime not null
|
29
|
+
# updated_at :datetime not null
|
30
|
+
# admin_networks :text
|
31
|
+
# url :string(255) default("http://localhost:3000/")
|
32
|
+
#
|
33
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_subject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre6
|
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-03-
|
11
|
+
date: 2013-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -128,14 +128,28 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.1.0.
|
131
|
+
version: 0.1.0.pre23
|
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: 0.1.0.
|
138
|
+
version: 0.1.0.pre23
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: enju_library
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ~>
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.1.0.pre12
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ~>
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.1.0.pre12
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: sunspot_solr
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -167,6 +181,7 @@ files:
|
|
167
181
|
- app/controllers/work_has_subjects_controller.rb
|
168
182
|
- app/models/classification.rb
|
169
183
|
- app/models/classification_type.rb
|
184
|
+
- app/models/enju_subject/ability.rb
|
170
185
|
- app/models/subject.rb
|
171
186
|
- app/models/subject_has_classification.rb
|
172
187
|
- app/models/subject_heading_type.rb
|
@@ -296,13 +311,23 @@ files:
|
|
296
311
|
- spec/dummy/db/migrate/012_create_owns.rb
|
297
312
|
- spec/dummy/db/migrate/015_create_creates.rb
|
298
313
|
- spec/dummy/db/migrate/047_create_produces.rb
|
314
|
+
- spec/dummy/db/migrate/059_create_libraries.rb
|
315
|
+
- spec/dummy/db/migrate/069_create_shelves.rb
|
299
316
|
- spec/dummy/db/migrate/073_create_carrier_types.rb
|
317
|
+
- spec/dummy/db/migrate/080_create_library_groups.rb
|
300
318
|
- spec/dummy/db/migrate/112_create_frequencies.rb
|
301
319
|
- spec/dummy/db/migrate/117_create_form_of_works.rb
|
320
|
+
- spec/dummy/db/migrate/120_create_baskets.rb
|
321
|
+
- spec/dummy/db/migrate/124_create_bookstores.rb
|
302
322
|
- spec/dummy/db/migrate/125_create_donates.rb
|
323
|
+
- spec/dummy/db/migrate/130_create_request_status_types.rb
|
324
|
+
- spec/dummy/db/migrate/131_create_request_types.rb
|
303
325
|
- spec/dummy/db/migrate/20080830154109_create_realizes.rb
|
304
326
|
- spec/dummy/db/migrate/20080830172106_create_exemplifies.rb
|
305
327
|
- spec/dummy/db/migrate/20080905191442_create_patron_types.rb
|
328
|
+
- spec/dummy/db/migrate/20081006090811_create_subscriptions.rb
|
329
|
+
- spec/dummy/db/migrate/20081006093246_create_subscribes.rb
|
330
|
+
- spec/dummy/db/migrate/20081023092436_create_search_engines.rb
|
306
331
|
- spec/dummy/db/migrate/20081025083323_create_countries.rb
|
307
332
|
- spec/dummy/db/migrate/20081025083905_create_languages.rb
|
308
333
|
- spec/dummy/db/migrate/20081027150907_create_picture_files.rb
|
@@ -319,6 +344,7 @@ files:
|
|
319
344
|
- spec/dummy/db/migrate/20091202124834_create_versions.rb
|
320
345
|
- spec/dummy/db/migrate/20091214131723_create_series_statements.rb
|
321
346
|
- spec/dummy/db/migrate/20100129142347_create_import_requests.rb
|
347
|
+
- spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb
|
322
348
|
- spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb
|
323
349
|
- spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb
|
324
350
|
- spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb
|
@@ -328,6 +354,7 @@ files:
|
|
328
354
|
- spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb
|
329
355
|
- spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb
|
330
356
|
- spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb
|
357
|
+
- spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb
|
331
358
|
- spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb
|
332
359
|
- spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb
|
333
360
|
- spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb
|
@@ -337,6 +364,7 @@ files:
|
|
337
364
|
- spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb
|
338
365
|
- spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb
|
339
366
|
- spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb
|
367
|
+
- spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb
|
340
368
|
- spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb
|
341
369
|
- spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb
|
342
370
|
- spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb
|
@@ -353,9 +381,12 @@ files:
|
|
353
381
|
- spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb
|
354
382
|
- spec/dummy/db/migrate/20111201163342_create_user_groups.rb
|
355
383
|
- spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb
|
384
|
+
- spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb
|
356
385
|
- spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb
|
386
|
+
- spec/dummy/db/migrate/20120129014038_create_budget_types.rb
|
357
387
|
- spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb
|
358
388
|
- spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb
|
389
|
+
- spec/dummy/db/migrate/20120319173203_create_accepts.rb
|
359
390
|
- spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb
|
360
391
|
- spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb
|
361
392
|
- spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb
|
@@ -367,6 +398,7 @@ files:
|
|
367
398
|
- spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb
|
368
399
|
- spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb
|
369
400
|
- spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb
|
401
|
+
- spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb
|
370
402
|
- spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb
|
371
403
|
- spec/dummy/db/schema.rb
|
372
404
|
- spec/dummy/db/seeds.rb
|
@@ -388,7 +420,7 @@ files:
|
|
388
420
|
- spec/dummy/solr/conf/stopwords.txt
|
389
421
|
- spec/dummy/solr/conf/synonyms.txt
|
390
422
|
- spec/dummy/solr/data/test/index/segments.gen
|
391
|
-
- spec/dummy/solr/data/test/index/
|
423
|
+
- spec/dummy/solr/data/test/index/segments_14k
|
392
424
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
393
425
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
394
426
|
- spec/dummy/spec/fixtures/subjects.yml
|
@@ -413,6 +445,7 @@ files:
|
|
413
445
|
- spec/fixtures/classification_types.yml
|
414
446
|
- spec/fixtures/classifications.yml
|
415
447
|
- spec/fixtures/languages.yml
|
448
|
+
- spec/fixtures/library_groups.yml
|
416
449
|
- spec/fixtures/manifestations.yml
|
417
450
|
- spec/fixtures/patron_types.yml
|
418
451
|
- spec/fixtures/patrons.yml
|
@@ -512,13 +545,23 @@ test_files:
|
|
512
545
|
- spec/dummy/db/migrate/012_create_owns.rb
|
513
546
|
- spec/dummy/db/migrate/015_create_creates.rb
|
514
547
|
- spec/dummy/db/migrate/047_create_produces.rb
|
548
|
+
- spec/dummy/db/migrate/059_create_libraries.rb
|
549
|
+
- spec/dummy/db/migrate/069_create_shelves.rb
|
515
550
|
- spec/dummy/db/migrate/073_create_carrier_types.rb
|
551
|
+
- spec/dummy/db/migrate/080_create_library_groups.rb
|
516
552
|
- spec/dummy/db/migrate/112_create_frequencies.rb
|
517
553
|
- spec/dummy/db/migrate/117_create_form_of_works.rb
|
554
|
+
- spec/dummy/db/migrate/120_create_baskets.rb
|
555
|
+
- spec/dummy/db/migrate/124_create_bookstores.rb
|
518
556
|
- spec/dummy/db/migrate/125_create_donates.rb
|
557
|
+
- spec/dummy/db/migrate/130_create_request_status_types.rb
|
558
|
+
- spec/dummy/db/migrate/131_create_request_types.rb
|
519
559
|
- spec/dummy/db/migrate/20080830154109_create_realizes.rb
|
520
560
|
- spec/dummy/db/migrate/20080830172106_create_exemplifies.rb
|
521
561
|
- spec/dummy/db/migrate/20080905191442_create_patron_types.rb
|
562
|
+
- spec/dummy/db/migrate/20081006090811_create_subscriptions.rb
|
563
|
+
- spec/dummy/db/migrate/20081006093246_create_subscribes.rb
|
564
|
+
- spec/dummy/db/migrate/20081023092436_create_search_engines.rb
|
522
565
|
- spec/dummy/db/migrate/20081025083323_create_countries.rb
|
523
566
|
- spec/dummy/db/migrate/20081025083905_create_languages.rb
|
524
567
|
- spec/dummy/db/migrate/20081027150907_create_picture_files.rb
|
@@ -535,6 +578,7 @@ test_files:
|
|
535
578
|
- spec/dummy/db/migrate/20091202124834_create_versions.rb
|
536
579
|
- spec/dummy/db/migrate/20091214131723_create_series_statements.rb
|
537
580
|
- spec/dummy/db/migrate/20100129142347_create_import_requests.rb
|
581
|
+
- spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb
|
538
582
|
- spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb
|
539
583
|
- spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb
|
540
584
|
- spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb
|
@@ -544,6 +588,7 @@ test_files:
|
|
544
588
|
- spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb
|
545
589
|
- spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb
|
546
590
|
- spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb
|
591
|
+
- spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb
|
547
592
|
- spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb
|
548
593
|
- spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb
|
549
594
|
- spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb
|
@@ -553,6 +598,7 @@ test_files:
|
|
553
598
|
- spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb
|
554
599
|
- spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb
|
555
600
|
- spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb
|
601
|
+
- spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb
|
556
602
|
- spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb
|
557
603
|
- spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb
|
558
604
|
- spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb
|
@@ -569,9 +615,12 @@ test_files:
|
|
569
615
|
- spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb
|
570
616
|
- spec/dummy/db/migrate/20111201163342_create_user_groups.rb
|
571
617
|
- spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb
|
618
|
+
- spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb
|
572
619
|
- spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb
|
620
|
+
- spec/dummy/db/migrate/20120129014038_create_budget_types.rb
|
573
621
|
- spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb
|
574
622
|
- spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb
|
623
|
+
- spec/dummy/db/migrate/20120319173203_create_accepts.rb
|
575
624
|
- spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb
|
576
625
|
- spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb
|
577
626
|
- spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb
|
@@ -583,6 +632,7 @@ test_files:
|
|
583
632
|
- spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb
|
584
633
|
- spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb
|
585
634
|
- spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb
|
635
|
+
- spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb
|
586
636
|
- spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb
|
587
637
|
- spec/dummy/db/schema.rb
|
588
638
|
- spec/dummy/db/seeds.rb
|
@@ -604,7 +654,7 @@ test_files:
|
|
604
654
|
- spec/dummy/solr/conf/stopwords.txt
|
605
655
|
- spec/dummy/solr/conf/synonyms.txt
|
606
656
|
- spec/dummy/solr/data/test/index/segments.gen
|
607
|
-
- spec/dummy/solr/data/test/index/
|
657
|
+
- spec/dummy/solr/data/test/index/segments_14k
|
608
658
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
609
659
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
610
660
|
- spec/dummy/spec/fixtures/subjects.yml
|
@@ -629,6 +679,7 @@ test_files:
|
|
629
679
|
- spec/fixtures/classification_types.yml
|
630
680
|
- spec/fixtures/classifications.yml
|
631
681
|
- spec/fixtures/languages.yml
|
682
|
+
- spec/fixtures/library_groups.yml
|
632
683
|
- spec/fixtures/manifestations.yml
|
633
684
|
- spec/fixtures/patron_types.yml
|
634
685
|
- spec/fixtures/patrons.yml
|
Binary file
|