enju_biblio 0.1.0.pre41 → 0.1.0.pre42

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/app/controllers/manifestations_controller.rb +22 -17
  3. data/app/controllers/patron_import_results_controller.rb +1 -1
  4. data/app/controllers/resource_import_results_controller.rb +1 -1
  5. data/app/models/item.rb +0 -1
  6. data/app/models/manifestation.rb +1 -2
  7. data/app/models/patron.rb +0 -8
  8. data/app/views/notifier/manifestation_info.en.text.erb +18 -0
  9. data/app/views/notifier/manifestation_info.ja.text.erb +18 -0
  10. data/lib/enju_biblio/version.rb +1 -1
  11. data/spec/cassette_library/ImportRequest/import/should_import_bibliographic_record.yml +12 -12
  12. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_isbn_which_is_already_imported/redirects_to_the_created_import_request.yml +12 -12
  13. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +12 -12
  14. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml +13 -13
  15. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +13 -13
  16. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml +12 -12
  17. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_has_only_isbn/should_be_imported.yml +613 -0
  18. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_shift_jis/should_be_imported.yml +431 -0
  19. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_be_imported.yml +431 -0
  20. data/spec/controllers/items_controller_spec.rb +16 -8
  21. data/spec/controllers/patrons_controller_spec.rb +8 -4
  22. data/spec/dummy/app/controllers/application_controller.rb +1 -174
  23. data/spec/dummy/config/application.rb +1 -1
  24. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  25. data/spec/dummy/db/test.sqlite3 +0 -0
  26. data/spec/dummy/private/system/picture_files/pictures/000/000/005/medium/spinner.gif +0 -0
  27. data/spec/dummy/private/system/picture_files/pictures/000/000/005/thumb/spinner.gif +0 -0
  28. data/spec/dummy/solr/data/test/index/_goc.fdt +0 -0
  29. data/spec/dummy/solr/data/test/index/_goc.fdx +0 -0
  30. data/spec/dummy/solr/data/test/index/_goc.fnm +7 -0
  31. data/spec/dummy/solr/data/test/index/_goc.frq +0 -0
  32. data/spec/dummy/solr/data/test/index/_goc.nrm +1 -0
  33. data/spec/dummy/solr/data/test/index/_goc.prx +0 -0
  34. data/spec/dummy/solr/data/test/index/_goc.tii +0 -0
  35. data/spec/dummy/solr/data/test/index/_goc.tis +0 -0
  36. data/spec/dummy/solr/data/test/index/_god.fdt +0 -0
  37. data/spec/dummy/solr/data/test/index/_god.fdx +0 -0
  38. data/spec/dummy/solr/data/test/index/_god.fnm +7 -0
  39. data/spec/dummy/solr/data/test/index/_god.frq +0 -0
  40. data/spec/dummy/solr/data/test/index/_god.nrm +1 -0
  41. data/spec/dummy/solr/data/test/index/_god.prx +0 -0
  42. data/spec/dummy/solr/data/test/index/_god.tii +0 -0
  43. data/spec/dummy/solr/data/test/index/_god.tis +0 -0
  44. data/spec/dummy/solr/data/test/index/_goe.fdt +0 -0
  45. data/spec/dummy/solr/data/test/index/_goe.fdx +0 -0
  46. data/spec/dummy/solr/data/test/index/_goe.fnm +8 -0
  47. data/spec/dummy/solr/data/test/index/_goe.frq +0 -0
  48. data/spec/dummy/solr/data/test/index/_goe.nrm +1 -0
  49. data/spec/dummy/solr/data/test/index/_goe.prx +0 -0
  50. data/spec/dummy/solr/data/test/index/_goe.tii +0 -0
  51. data/spec/dummy/solr/data/test/index/_goe.tis +0 -0
  52. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  53. data/spec/dummy/solr/data/test/index/segments_otc +0 -0
  54. data/spec/dummy/tmp/cache/4AD/470/country_all +0 -0
  55. data/spec/fixtures/manifestations.yml +1 -1
  56. data/spec/models/manifestation_spec.rb +1 -1
  57. data/spec/models/resource_import_file_spec.rb +135 -137
  58. metadata +73 -39
  59. data/spec/cassette_library/Manifestation/should_import_isbn.yml +0 -3643
  60. data/spec/dummy/app/models/role.rb +0 -46
  61. data/spec/dummy/app/models/user_group.rb +0 -40
  62. data/spec/dummy/app/models/user_has_role.rb +0 -5
  63. data/spec/dummy/solr/data/test/index/segments_nq2 +0 -0
@@ -1,46 +0,0 @@
1
- class Role < ActiveRecord::Base
2
- include MasterModel
3
- default_scope :order => "roles.position"
4
- has_many :user_has_roles
5
- has_many :users, :through => :user_has_roles
6
- after_save :clear_all_cache
7
- after_destroy :clear_all_cache
8
-
9
- extend FriendlyId
10
- friendly_id :name
11
-
12
- def localized_name
13
- display_name.localize
14
- end
15
-
16
- def self.all_cache
17
- if Rails.env == 'production'
18
- Rails.cache.fetch('role_all'){Role.select(:name).all}
19
- else
20
- Role.select(:name)
21
- end
22
- end
23
-
24
- def clear_all_cache
25
- Rails.cache.delete('role_all')
26
- end
27
-
28
- def self.default_role
29
- Rails.cache.fetch('default_role'){Role.find('Guest')}
30
- end
31
- end
32
-
33
- # == Schema Information
34
- #
35
- # Table name: roles
36
- #
37
- # id :integer not null, primary key
38
- # name :string(255) not null
39
- # display_name :string(255)
40
- # note :text
41
- # created_at :datetime
42
- # updated_at :datetime
43
- # score :integer default(0), not null
44
- # position :integer
45
- #
46
-
@@ -1,40 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- class UserGroup < ActiveRecord::Base
3
- attr_accessible :name, :display_name, :note, :valid_period_for_new_user,
4
- :expired_at, :number_of_day_to_notify_overdue,
5
- :number_of_day_to_notify_overdue,
6
- :number_of_day_to_notify_due_date,
7
- :number_of_time_to_notify_overdue
8
-
9
- include MasterModel
10
- default_scope :order => "user_groups.position"
11
- has_many :users
12
-
13
- validates_numericality_of :valid_period_for_new_user,
14
- :greater_than_or_equal_to => 0,
15
- :allow_blank => true
16
-
17
- def self.per_page
18
- 10
19
- end
20
- end
21
-
22
- # == Schema Information
23
- #
24
- # Table name: user_groups
25
- #
26
- # id :integer not null, primary key
27
- # name :string(255)
28
- # display_name :text
29
- # note :text
30
- # position :integer
31
- # created_at :datetime
32
- # updated_at :datetime
33
- # deleted_at :datetime
34
- # valid_period_for_new_user :integer default(0), not null
35
- # expired_at :datetime
36
- # number_of_day_to_notify_overdue :integer default(1), not null
37
- # number_of_day_to_notify_due_date :integer default(7), not null
38
- # number_of_time_to_notify_overdue :integer default(3), not null
39
- #
40
-
@@ -1,5 +0,0 @@
1
- class UserHasRole < ActiveRecord::Base
2
- attr_accessible :user_id, :role_id
3
- belongs_to :user
4
- belongs_to :role
5
- end