enju_oai 0.2.0.beta.1 → 0.2.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/enju_oai/engine.rb +0 -1
- data/lib/enju_oai/version.rb +1 -1
- data/spec/dummy/app/controllers/application_controller.rb +1 -3
- data/spec/dummy/app/models/user.rb +1 -1
- data/spec/dummy/config/application.rb +2 -0
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +5 -0
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +13 -0
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160813130535_add_email_to_library_group.rb +5 -0
- data/spec/dummy/db/schema.rb +30 -2
- metadata +35 -49
- data/spec/dummy/app/models/ability.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 328bd3be1f0de895dc62fe0af4fd666ea0fcb55a
|
4
|
+
data.tar.gz: 62f6aa1220faa8d7a239c5730a7dca972565724a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e156fc49edc35a863b1e0dbaecd0022b137931872b7d9c750485d8ce427df3412374bcfdf4d9b64cdd96e11aa0c4d862407a33ec3ced2e5fb703573391c514dd
|
7
|
+
data.tar.gz: 5d8ec84ed2afd8fa3c888642284da00131e3219a64f051173e8596dd201aceed718c8b79f5bea8920672ac81f8e5ceea83dc3b561c8a92740d31fc315aa4bb68
|
data/lib/enju_oai/engine.rb
CHANGED
data/lib/enju_oai/version.rb
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
class ApplicationController < ActionController::Base
|
2
2
|
protect_from_forgery
|
3
|
-
include EnjuLeaf::Controller
|
4
|
-
include EnjuBiblio::Controller
|
5
3
|
include EnjuLibrary::Controller
|
6
|
-
include
|
4
|
+
include EnjuBiblio::Controller
|
7
5
|
after_action :verify_authorized
|
8
6
|
|
9
7
|
include Pundit
|
@@ -6,7 +6,7 @@ class CreateUserImportFiles < ActiveRecord::Migration
|
|
6
6
|
t.datetime :executed_at
|
7
7
|
t.string :user_import_file_name
|
8
8
|
t.string :user_import_content_type
|
9
|
-
t.
|
9
|
+
t.integer :user_import_file_size
|
10
10
|
t.datetime :user_import_updated_at
|
11
11
|
t.string :user_import_fingerprint
|
12
12
|
t.string :edit_mode
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateWithdraws < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :withdraws do |t|
|
4
|
+
t.integer :basket_id
|
5
|
+
t.integer :item_id
|
6
|
+
t.integer :librarian_id
|
7
|
+
|
8
|
+
t.timestamps null: false
|
9
|
+
end
|
10
|
+
add_index :withdraws, :basket_id
|
11
|
+
add_index :withdraws, :item_id
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
LibraryGroup.create_translation_table!({
|
4
|
+
login_banner: :text
|
5
|
+
}, {
|
6
|
+
migrate_data: true
|
7
|
+
})
|
8
|
+
end
|
9
|
+
|
10
|
+
def down
|
11
|
+
LibraryGroup.drop_translation_table! migrate_data: true
|
12
|
+
end
|
13
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20160813130535) do
|
15
15
|
|
16
16
|
create_table "accepts", force: :cascade do |t|
|
17
17
|
t.integer "basket_id"
|
@@ -674,6 +674,18 @@ ActiveRecord::Schema.define(version: 20150221063719) do
|
|
674
674
|
add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
|
675
675
|
add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
|
676
676
|
|
677
|
+
create_table "library_group_translations", force: :cascade do |t|
|
678
|
+
t.integer "library_group_id", null: false
|
679
|
+
t.string "locale", null: false
|
680
|
+
t.datetime "created_at", null: false
|
681
|
+
t.datetime "updated_at", null: false
|
682
|
+
t.text "login_banner"
|
683
|
+
t.text "footer_banner"
|
684
|
+
end
|
685
|
+
|
686
|
+
add_index "library_group_translations", ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
|
687
|
+
add_index "library_group_translations", ["locale"], name: "index_library_group_translations_on_locale"
|
688
|
+
|
677
689
|
create_table "library_groups", force: :cascade do |t|
|
678
690
|
t.string "name", null: false
|
679
691
|
t.text "display_name"
|
@@ -688,6 +700,8 @@ ActiveRecord::Schema.define(version: 20150221063719) do
|
|
688
700
|
t.text "admin_networks"
|
689
701
|
t.string "url", default: "http://localhost:3000/"
|
690
702
|
t.text "settings"
|
703
|
+
t.text "html_snippet"
|
704
|
+
t.string "email"
|
691
705
|
end
|
692
706
|
|
693
707
|
add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
|
@@ -1303,6 +1317,7 @@ ActiveRecord::Schema.define(version: 20150221063719) do
|
|
1303
1317
|
t.integer "user_export_file_id"
|
1304
1318
|
t.datetime "created_at"
|
1305
1319
|
t.datetime "updated_at"
|
1320
|
+
t.boolean "most_recent"
|
1306
1321
|
end
|
1307
1322
|
|
1308
1323
|
add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
@@ -1371,6 +1386,7 @@ ActiveRecord::Schema.define(version: 20150221063719) do
|
|
1371
1386
|
t.integer "user_import_file_id"
|
1372
1387
|
t.datetime "created_at"
|
1373
1388
|
t.datetime "updated_at"
|
1389
|
+
t.boolean "most_recent"
|
1374
1390
|
end
|
1375
1391
|
|
1376
1392
|
add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
@@ -1382,7 +1398,7 @@ ActiveRecord::Schema.define(version: 20150221063719) do
|
|
1382
1398
|
t.datetime "executed_at"
|
1383
1399
|
t.string "user_import_file_name"
|
1384
1400
|
t.string "user_import_content_type"
|
1385
|
-
t.
|
1401
|
+
t.integer "user_import_file_size"
|
1386
1402
|
t.datetime "user_import_updated_at"
|
1387
1403
|
t.string "user_import_fingerprint"
|
1388
1404
|
t.string "edit_mode"
|
@@ -1400,6 +1416,7 @@ ActiveRecord::Schema.define(version: 20150221063719) do
|
|
1400
1416
|
t.text "body"
|
1401
1417
|
t.datetime "created_at"
|
1402
1418
|
t.datetime "updated_at"
|
1419
|
+
t.text "error_message"
|
1403
1420
|
end
|
1404
1421
|
|
1405
1422
|
create_table "user_reserve_stat_transitions", force: :cascade do |t|
|
@@ -1468,4 +1485,15 @@ ActiveRecord::Schema.define(version: 20150221063719) do
|
|
1468
1485
|
|
1469
1486
|
add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
1470
1487
|
|
1488
|
+
create_table "withdraws", force: :cascade do |t|
|
1489
|
+
t.integer "basket_id"
|
1490
|
+
t.integer "item_id"
|
1491
|
+
t.integer "librarian_id"
|
1492
|
+
t.datetime "created_at", null: false
|
1493
|
+
t.datetime "updated_at", null: false
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
|
1497
|
+
add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
|
1498
|
+
|
1471
1499
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_oai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.beta.
|
4
|
+
version: 0.2.0.beta.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: enju_biblio
|
@@ -16,98 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.0.beta.
|
19
|
+
version: 0.2.0.beta.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2.0.beta.
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: enju_subject
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.2.0.beta.1
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.2.0.beta.1
|
26
|
+
version: 0.2.0.beta.2
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: enju_leaf
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
31
|
- - "~>"
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.2.0.beta.
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.2.0.beta.1
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: enju_library
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.2.0.beta.1
|
33
|
+
version: 1.2.0.beta.2
|
62
34
|
type: :development
|
63
35
|
prerelease: false
|
64
36
|
version_requirements: !ruby/object:Gem::Requirement
|
65
37
|
requirements:
|
66
38
|
- - "~>"
|
67
39
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
40
|
+
version: 1.2.0.beta.2
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
42
|
+
name: enju_nii
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
72
44
|
requirements:
|
73
45
|
- - "~>"
|
74
46
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.2.0.beta.
|
47
|
+
version: 0.2.0.beta.2
|
76
48
|
type: :development
|
77
49
|
prerelease: false
|
78
50
|
version_requirements: !ruby/object:Gem::Requirement
|
79
51
|
requirements:
|
80
52
|
- - "~>"
|
81
53
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.2.0.beta.
|
54
|
+
version: 0.2.0.beta.2
|
83
55
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
56
|
+
name: globalize
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
86
58
|
requirements:
|
87
|
-
- - "
|
59
|
+
- - ">="
|
88
60
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
61
|
+
version: '0'
|
90
62
|
type: :development
|
91
63
|
prerelease: false
|
92
64
|
version_requirements: !ruby/object:Gem::Requirement
|
93
65
|
requirements:
|
94
|
-
- - "
|
66
|
+
- - ">="
|
95
67
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0
|
68
|
+
version: '0'
|
97
69
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
70
|
+
name: globalize-accessors
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|
100
72
|
requirements:
|
101
|
-
- - "
|
73
|
+
- - ">="
|
102
74
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0
|
75
|
+
version: '0'
|
104
76
|
type: :development
|
105
77
|
prerelease: false
|
106
78
|
version_requirements: !ruby/object:Gem::Requirement
|
107
79
|
requirements:
|
108
|
-
- - "
|
80
|
+
- - ">="
|
109
81
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0
|
82
|
+
version: '0'
|
111
83
|
- !ruby/object:Gem::Dependency
|
112
84
|
name: sqlite3
|
113
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -272,7 +244,6 @@ files:
|
|
272
244
|
- spec/dummy/app/assets/stylesheets/application.css
|
273
245
|
- spec/dummy/app/controllers/application_controller.rb
|
274
246
|
- spec/dummy/app/helpers/application_helper.rb
|
275
|
-
- spec/dummy/app/models/ability.rb
|
276
247
|
- spec/dummy/app/models/user.rb
|
277
248
|
- spec/dummy/app/views/layouts/application.html.erb
|
278
249
|
- spec/dummy/bin/bundle
|
@@ -493,6 +464,14 @@ files:
|
|
493
464
|
- spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
|
494
465
|
- spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb
|
495
466
|
- spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
|
467
|
+
- spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb
|
468
|
+
- spec/dummy/db/migrate/20150924115059_create_withdraws.rb
|
469
|
+
- spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
|
470
|
+
- spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
|
471
|
+
- spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
|
472
|
+
- spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
|
473
|
+
- spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
|
474
|
+
- spec/dummy/db/migrate/20160813130535_add_email_to_library_group.rb
|
496
475
|
- spec/dummy/db/schema.rb
|
497
476
|
- spec/dummy/public/404.html
|
498
477
|
- spec/dummy/public/422.html
|
@@ -588,7 +567,6 @@ test_files:
|
|
588
567
|
- spec/dummy/app/assets/stylesheets/application.css
|
589
568
|
- spec/dummy/app/controllers/application_controller.rb
|
590
569
|
- spec/dummy/app/helpers/application_helper.rb
|
591
|
-
- spec/dummy/app/models/ability.rb
|
592
570
|
- spec/dummy/app/models/user.rb
|
593
571
|
- spec/dummy/app/views/layouts/application.html.erb
|
594
572
|
- spec/dummy/bin/bundle
|
@@ -809,6 +787,14 @@ test_files:
|
|
809
787
|
- spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
|
810
788
|
- spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb
|
811
789
|
- spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
|
790
|
+
- spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb
|
791
|
+
- spec/dummy/db/migrate/20150924115059_create_withdraws.rb
|
792
|
+
- spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
|
793
|
+
- spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
|
794
|
+
- spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
|
795
|
+
- spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb
|
796
|
+
- spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
|
797
|
+
- spec/dummy/db/migrate/20160813130535_add_email_to_library_group.rb
|
812
798
|
- spec/dummy/db/schema.rb
|
813
799
|
- spec/dummy/public/404.html
|
814
800
|
- spec/dummy/public/422.html
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class Ability
|
2
|
-
include CanCan::Ability
|
3
|
-
|
4
|
-
def initialize(user)
|
5
|
-
case user.try(:role).try(:name)
|
6
|
-
when 'Administrator'
|
7
|
-
can [:read, :create, :update], Manifestation
|
8
|
-
when 'Librarian'
|
9
|
-
can [:read, :create, :update], Manifestation
|
10
|
-
when 'User'
|
11
|
-
can :read, Manifestation do |manifestation|
|
12
|
-
manifestation.required_role_id <= 2
|
13
|
-
end
|
14
|
-
else
|
15
|
-
can :read, Manifestation
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|