enju_bookmark 0.1.2.pre20 → 0.1.2.pre21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +8 -1
  3. data/Rakefile +0 -12
  4. data/app/controllers/bookmark_stat_has_manifestations_controller.rb +7 -0
  5. data/app/controllers/bookmark_stats_controller.rb +7 -2
  6. data/app/controllers/bookmarks_controller.rb +8 -3
  7. data/app/controllers/tags_controller.rb +6 -1
  8. data/app/models/bookmark.rb +1 -2
  9. data/app/models/bookmark_stat.rb +5 -2
  10. data/app/models/bookmark_stat_has_manifestation.rb +0 -2
  11. data/app/models/bookmark_stat_transition.rb +1 -1
  12. data/app/models/tag.rb +0 -1
  13. data/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +5 -1
  14. data/lib/enju_bookmark/engine.rb +0 -1
  15. data/lib/enju_bookmark/expire_tag_cloud.rb +1 -1
  16. data/lib/enju_bookmark/user.rb +1 -1
  17. data/lib/enju_bookmark/version.rb +1 -1
  18. data/spec/controllers/bookmarks_controller_spec.rb +4 -4
  19. data/spec/dummy/bin/bundle +3 -0
  20. data/spec/dummy/bin/rails +4 -0
  21. data/spec/dummy/bin/rake +4 -0
  22. data/spec/dummy/bin/setup +29 -0
  23. data/spec/dummy/config/application.yml +12 -3
  24. data/spec/dummy/config/database.yml +23 -18
  25. data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
  26. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -5
  27. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -5
  28. data/spec/dummy/db/migrate/077_create_user_groups.rb +3 -7
  29. data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -10
  30. data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -5
  31. data/spec/dummy/db/migrate/131_create_request_types.rb +1 -5
  32. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
  33. data/spec/dummy/db/migrate/{20111201163718_create_user_has_roles.rb → 20100606065209_create_user_has_roles.rb} +2 -0
  34. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
  35. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +1 -1
  36. data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +5 -1
  37. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +5 -1
  38. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +5 -1
  39. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
  40. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
  41. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
  42. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
  43. data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +5 -1
  44. data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +5 -1
  45. data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +5 -1
  46. data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +5 -1
  47. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
  48. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
  49. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
  50. data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
  51. data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
  52. data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +6 -0
  53. data/spec/dummy/db/schema.rb +28 -10
  54. data/spec/fixtures/content_types.yml +6 -6
  55. data/spec/fixtures/library_groups.yml +0 -2
  56. data/spec/fixtures/manifestations.yml +114 -114
  57. data/spec/fixtures/users.yml +1 -1
  58. data/spec/spec_helper.rb +2 -0
  59. metadata +59 -31
  60. data/spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb +0 -9
  61. data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +0 -11
  62. data/spec/dummy/db/migrate/20111201121844_create_roles.rb +0 -12
  63. data/spec/dummy/script/rails +0 -6
@@ -2,7 +2,11 @@ class CreateAgentImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :agent_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :agent_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserCheckoutStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_checkout_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_checkout_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserReserveStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_reserve_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_reserve_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateManifestationCheckoutStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :manifestation_checkout_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :manifestation_checkout_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateManifestationReserveStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :manifestation_reserve_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :manifestation_reserve_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateResourceExportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :resource_export_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :resource_export_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserExportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_export_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_export_file_id
8
12
  t.timestamps
@@ -0,0 +1,14 @@
1
+ class CreateColors < ActiveRecord::Migration
2
+ def change
3
+ create_table :colors do |t|
4
+ t.integer :library_group_id
5
+ t.string :property
6
+ t.string :code
7
+ t.integer :position
8
+
9
+ t.timestamps
10
+ end
11
+
12
+ add_index :colors, :library_group_id
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ class AddFullNameTranscriptionToProfile < ActiveRecord::Migration
2
+ def change
3
+ add_column :profiles, :full_name_transcription, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddDateOfBirthToProfile < ActiveRecord::Migration
2
+ def change
3
+ add_column :profiles, :date_of_birth, :datetime
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddShelfIdToCheckout < ActiveRecord::Migration
2
+ def change
3
+ add_column :checkouts, :shelf_id, :integer
4
+ add_index :checkouts, :shelf_id
5
+ end
6
+ end
@@ -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: 20141013152013) do
14
+ ActiveRecord::Schema.define(version: 20141014065831) do
15
15
 
16
16
  create_table "accepts", force: true do |t|
17
17
  t.integer "basket_id"
@@ -337,6 +337,7 @@ ActiveRecord::Schema.define(version: 20141013152013) do
337
337
  t.integer "lock_version", default: 0, null: false
338
338
  t.datetime "created_at"
339
339
  t.datetime "updated_at"
340
+ t.integer "shelf_id"
340
341
  end
341
342
 
342
343
  add_index "checkouts", ["basket_id"], name: "index_checkouts_on_basket_id"
@@ -344,6 +345,7 @@ ActiveRecord::Schema.define(version: 20141013152013) do
344
345
  add_index "checkouts", ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
345
346
  add_index "checkouts", ["item_id"], name: "index_checkouts_on_item_id"
346
347
  add_index "checkouts", ["librarian_id"], name: "index_checkouts_on_librarian_id"
348
+ add_index "checkouts", ["shelf_id"], name: "index_checkouts_on_shelf_id"
347
349
  add_index "checkouts", ["user_id"], name: "index_checkouts_on_user_id"
348
350
 
349
351
  create_table "circulation_statuses", force: true do |t|
@@ -381,6 +383,17 @@ ActiveRecord::Schema.define(version: 20141013152013) do
381
383
  add_index "classifications", ["manifestation_id"], name: "index_classifications_on_manifestation_id"
382
384
  add_index "classifications", ["parent_id"], name: "index_classifications_on_parent_id"
383
385
 
386
+ create_table "colors", force: true do |t|
387
+ t.integer "library_group_id"
388
+ t.string "property"
389
+ t.string "code"
390
+ t.integer "position"
391
+ t.datetime "created_at"
392
+ t.datetime "updated_at"
393
+ end
394
+
395
+ add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
396
+
384
397
  create_table "content_types", force: true do |t|
385
398
  t.string "name", null: false
386
399
  t.text "display_name"
@@ -658,7 +671,10 @@ ActiveRecord::Schema.define(version: 20141013152013) do
658
671
  t.datetime "created_at"
659
672
  t.datetime "updated_at"
660
673
  t.datetime "deleted_at"
674
+ t.text "opening_hour"
661
675
  t.string "isil"
676
+ t.float "latitude"
677
+ t.float "longitude"
662
678
  end
663
679
 
664
680
  add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
@@ -668,18 +684,15 @@ ActiveRecord::Schema.define(version: 20141013152013) do
668
684
  t.string "name", null: false
669
685
  t.text "display_name"
670
686
  t.string "short_name", null: false
671
- t.string "email"
672
687
  t.text "my_networks"
673
688
  t.text "login_banner"
674
689
  t.text "note"
675
- t.integer "valid_period_for_new_user", default: 365, null: false
676
- t.boolean "post_to_union_catalog", default: false, null: false
677
690
  t.integer "country_id"
691
+ t.integer "position"
678
692
  t.datetime "created_at"
679
693
  t.datetime "updated_at"
680
694
  t.text "admin_networks"
681
695
  t.boolean "allow_bookmark_external_url", default: false, null: false
682
- t.integer "position"
683
696
  t.string "url", default: "http://localhost:3000/"
684
697
  end
685
698
 
@@ -977,11 +990,13 @@ ActiveRecord::Schema.define(version: 20141013152013) do
977
990
  t.boolean "save_checkout_history", default: false, null: false
978
991
  t.datetime "expired_at"
979
992
  t.boolean "share_bookmarks"
993
+ t.text "full_name_transcription"
994
+ t.datetime "date_of_birth"
980
995
  end
981
996
 
982
997
  add_index "profiles", ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
983
998
  add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
984
- add_index "profiles", ["user_number"], name: "index_profiles_on_user_number"
999
+ add_index "profiles", ["user_number"], name: "index_profiles_on_user_number", unique: true
985
1000
 
986
1001
  create_table "realize_types", force: true do |t|
987
1002
  t.string "name"
@@ -1152,12 +1167,13 @@ ActiveRecord::Schema.define(version: 20141013152013) do
1152
1167
  add_index "resource_import_results", ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
1153
1168
 
1154
1169
  create_table "roles", force: true do |t|
1155
- t.string "name"
1156
- t.text "display_name"
1170
+ t.string "name", null: false
1171
+ t.string "display_name"
1157
1172
  t.text "note"
1158
- t.integer "position"
1159
1173
  t.datetime "created_at"
1160
1174
  t.datetime "updated_at"
1175
+ t.integer "score", default: 0, null: false
1176
+ t.integer "position"
1161
1177
  end
1162
1178
 
1163
1179
  create_table "search_engines", force: true do |t|
@@ -1422,7 +1438,6 @@ ActiveRecord::Schema.define(version: 20141013152013) do
1422
1438
 
1423
1439
  create_table "user_groups", force: true do |t|
1424
1440
  t.string "name"
1425
- t.text "string"
1426
1441
  t.text "display_name"
1427
1442
  t.text "note"
1428
1443
  t.integer "position"
@@ -1443,6 +1458,9 @@ ActiveRecord::Schema.define(version: 20141013152013) do
1443
1458
  t.datetime "updated_at"
1444
1459
  end
1445
1460
 
1461
+ add_index "user_has_roles", ["role_id"], name: "index_user_has_roles_on_role_id"
1462
+ add_index "user_has_roles", ["user_id"], name: "index_user_has_roles_on_user_id"
1463
+
1446
1464
  create_table "user_import_file_transitions", force: true do |t|
1447
1465
  t.string "to_state"
1448
1466
  t.text "metadata", default: "{}"
@@ -6,8 +6,8 @@ one:
6
6
  display_name: text
7
7
  note: MyText
8
8
  position: 1
9
- created_at: <%= Time.zone.now %>
10
- updated_at: <%= Time.zone.now %>
9
+ created_at: <%= Time.zone.now.to_s(:db) %>
10
+ updated_at: <%= Time.zone.now.to_s(:db) %>
11
11
 
12
12
  two:
13
13
  id: 2
@@ -15,8 +15,8 @@ two:
15
15
  display_name: Cartographic Dataset
16
16
  note: MyText
17
17
  position: 2
18
- created_at: <%= Time.zone.now %>
19
- updated_at: <%= Time.zone.now %>
18
+ created_at: <%= Time.zone.now.to_s(:db) %>
19
+ updated_at: <%= Time.zone.now.to_s(:db) %>
20
20
 
21
21
  three:
22
22
  id: 3
@@ -24,8 +24,8 @@ three:
24
24
  display_name: Cartographic Image
25
25
  note: MyText
26
26
  position: 3
27
- created_at: <%= Time.zone.now %>
28
- updated_at: <%= Time.zone.now %>
27
+ created_at: <%= Time.zone.now.to_s(:db) %>
28
+ updated_at: <%= Time.zone.now.to_s(:db) %>
29
29
 
30
30
  # == Schema Information
31
31
  #
@@ -4,7 +4,6 @@ one:
4
4
  name: enju_library
5
5
  display_name: "<%= I18n.locale %>: Enju Library"
6
6
  short_name: enju
7
- email: next-l@library.example.jp
8
7
  note:
9
8
  my_networks: 0.0.0.0/0
10
9
  url: "http://localhost:3000/"
@@ -19,7 +18,6 @@ one:
19
18
  # name :string(255) not null
20
19
  # display_name :text
21
20
  # short_name :string(255) not null
22
- # email :string(255)
23
21
  # my_networks :text
24
22
  # login_banner :text
25
23
  # note :text