enju_circulation 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/reserves_controller.rb +10 -5
- data/app/models/reserve.rb +73 -45
- data/app/views/reserves/_new.html.erb +8 -4
- data/lib/enju_circulation/version.rb +1 -1
- data/spec/controllers/checked_items_controller_spec.rb +2 -1
- data/spec/dummy/app/models/item.rb +222 -83
- data/spec/dummy/db/migrate/005_create_manifestations.rb +3 -3
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
- data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
- data/spec/dummy/db/schema.rb +7 -3
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/checkouts.yml +0 -1
- data/spec/fixtures/exemplifies.yml +8 -0
- data/spec/fixtures/items.yml +10 -4
- data/spec/fixtures/manifestations.yml +13 -6
- data/spec/fixtures/message_templates.yml +24 -19
- data/spec/fixtures/reserves.yml +19 -0
- data/spec/models/reserve_spec.rb +15 -6
- metadata +46 -42
@@ -104,15 +104,20 @@ class ReservesController < ApplicationController
|
|
104
104
|
begin
|
105
105
|
if params[:reserve][:user_number]
|
106
106
|
user = User.where(:user_number => params[:reserve][:user_number]).first
|
107
|
+
else
|
108
|
+
access_denied
|
109
|
+
return
|
107
110
|
end
|
108
111
|
rescue NoMethodError
|
109
112
|
end
|
110
113
|
|
111
114
|
# 図書館員以外は自分の予約しか作成できない
|
112
115
|
unless current_user.has_role?('Librarian')
|
113
|
-
if user
|
114
|
-
|
115
|
-
|
116
|
+
if user
|
117
|
+
if user != current_user
|
118
|
+
access_denied
|
119
|
+
return
|
120
|
+
end
|
116
121
|
end
|
117
122
|
end
|
118
123
|
|
@@ -124,7 +129,7 @@ class ReservesController < ApplicationController
|
|
124
129
|
|
125
130
|
respond_to do |format|
|
126
131
|
if @reserve.save
|
127
|
-
@reserve.
|
132
|
+
@reserve.sm_request!
|
128
133
|
|
129
134
|
#format.html { redirect_to reserve_url(@reserve) }
|
130
135
|
format.html { redirect_to @reserve, :notice => t('controller.successfully_created', :model => t('activerecord.models.reserve')) }
|
@@ -163,7 +168,7 @@ class ReservesController < ApplicationController
|
|
163
168
|
if @reserve.update_attributes(params[:reserve])
|
164
169
|
if @reserve.state == 'canceled'
|
165
170
|
flash[:notice] = t('reserve.reservation_was_canceled')
|
166
|
-
@reserve.send_message
|
171
|
+
@reserve.send_message
|
167
172
|
else
|
168
173
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.reserve'))
|
169
174
|
end
|
data/app/models/reserve.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
class Reserve < ActiveRecord::Base
|
3
3
|
scope :hold, where('item_id IS NOT NULL')
|
4
4
|
scope :not_hold, where(:item_id => nil)
|
5
|
-
scope :waiting, where('canceled_at IS NULL AND expired_at > ? AND state != ?', Time.zone.now, 'completed').order('id DESC')
|
5
|
+
scope :waiting, where('canceled_at IS NULL AND expired_at > ? AND state != ?', Time.zone.now, 'completed').order('reserves.id DESC')
|
6
6
|
scope :completed, where('checked_out_at IS NOT NULL')
|
7
7
|
scope :canceled, where('canceled_at IS NOT NULL')
|
8
8
|
scope :will_expire_retained, lambda {|datetime| {:conditions => ['checked_out_at IS NULL AND canceled_at IS NULL AND expired_at <= ? AND state = ?', datetime, 'retained'], :order => 'expired_at'}}
|
@@ -106,55 +106,52 @@ class Reserve < ActiveRecord::Base
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def next_reservation
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
def retain
|
113
|
-
# TODO: 「取り置き中」の状態を正しく表す
|
114
|
-
self.update_attributes!({:request_status_type => RequestStatusType.where(:name => 'In Process').first, :checked_out_at => Time.zone.now})
|
115
|
-
end
|
116
|
-
|
117
|
-
def expire
|
118
|
-
self.update_attributes!({:request_status_type => RequestStatusType.where(:name => 'Expired').first, :canceled_at => Time.zone.now})
|
119
|
-
logger.info "#{Time.zone.now} reserve_id #{self.id} expired!"
|
120
|
-
end
|
121
|
-
|
122
|
-
def cancel
|
123
|
-
self.update_attributes!({:request_status_type => RequestStatusType.where(:name => 'Cannot Fulfill Request').first, :canceled_at => Time.zone.now})
|
124
|
-
end
|
125
|
-
|
126
|
-
def checkout
|
127
|
-
self.update_attributes!({:request_status_type => RequestStatusType.where(:name => 'Available For Pickup').first, :checked_out_at => Time.zone.now})
|
109
|
+
if item
|
110
|
+
Reserve.waiting.where(:manifestation_id => item.manifestation.id).first
|
111
|
+
end
|
128
112
|
end
|
129
113
|
|
130
|
-
def send_message(
|
131
|
-
|
114
|
+
def send_message(sender = nil)
|
115
|
+
sender = User.find(1) unless sender # TODO: システムからのメッセージの発信者
|
132
116
|
Reserve.transaction do
|
133
|
-
case
|
134
|
-
when '
|
135
|
-
message_template_to_patron = MessageTemplate.localized_template('
|
136
|
-
request = MessageRequest.create!(:sender =>
|
137
|
-
request.save_message_body(:manifestations => Array[
|
117
|
+
case state
|
118
|
+
when 'requested'
|
119
|
+
message_template_to_patron = MessageTemplate.localized_template('reservation_accepted_for_patron', user.locale)
|
120
|
+
request = MessageRequest.create!(:sender => sender, :receiver => user, :message_template => message_template_to_patron)
|
121
|
+
request.save_message_body(:manifestations => Array[manifestation], :user => user)
|
138
122
|
request.sm_send_message! # 受付時は即時送信
|
139
|
-
message_template_to_library = MessageTemplate.localized_template('
|
140
|
-
request = MessageRequest.create!(:sender =>
|
141
|
-
request.save_message_body(:manifestations => Array[
|
123
|
+
message_template_to_library = MessageTemplate.localized_template('reservation_accepted_for_library', user.locale)
|
124
|
+
request = MessageRequest.create!(:sender => sender, :receiver => sender, :message_template => message_template_to_library)
|
125
|
+
request.save_message_body(:manifestations => Array[manifestation], :user => user)
|
142
126
|
request.sm_send_message! # 受付時は即時送信
|
143
127
|
when 'canceled'
|
144
|
-
message_template_to_patron = MessageTemplate.localized_template('reservation_canceled_for_patron',
|
145
|
-
request = MessageRequest.create!(:sender =>
|
146
|
-
request.save_message_body(:manifestations => Array[
|
128
|
+
message_template_to_patron = MessageTemplate.localized_template('reservation_canceled_for_patron', user.locale)
|
129
|
+
request = MessageRequest.create!(:sender => sender, :receiver => user, :message_template => message_template_to_patron)
|
130
|
+
request.save_message_body(:manifestations => Array[manifestation], :user => user)
|
147
131
|
request.sm_send_message! # キャンセル時は即時送信
|
148
|
-
message_template_to_library = MessageTemplate.localized_template('reservation_canceled_for_library',
|
149
|
-
request = MessageRequest.create!(:sender =>
|
150
|
-
request.save_message_body(:manifestations => Array[
|
132
|
+
message_template_to_library = MessageTemplate.localized_template('reservation_canceled_for_library', user.locale)
|
133
|
+
request = MessageRequest.create!(:sender => sender, :receiver => sender, :message_template => message_template_to_library)
|
134
|
+
request.save_message_body(:manifestations => Array[manifestation], :user => user)
|
151
135
|
request.sm_send_message! # キャンセル時は即時送信
|
152
136
|
when 'expired'
|
153
|
-
message_template_to_patron = MessageTemplate.localized_template('reservation_expired_for_patron',
|
154
|
-
request = MessageRequest.create!(:sender =>
|
155
|
-
request.save_message_body(:manifestations => Array[
|
156
|
-
request.sm_send_message!
|
137
|
+
message_template_to_patron = MessageTemplate.localized_template('reservation_expired_for_patron', user.locale)
|
138
|
+
request = MessageRequest.create!(:sender => sender, :receiver => user, :message_template => message_template_to_patron)
|
139
|
+
request.save_message_body(:manifestations => Array[manifestation], :user => user)
|
140
|
+
request.sm_send_message!
|
157
141
|
self.update_attribute(:expiration_notice_to_patron, true)
|
142
|
+
message_template_to_library = MessageTemplate.localized_template('reservation_expired_for_library', sender.locale)
|
143
|
+
request = MessageRequest.create!(:sender => sender, :receiver => sender, :message_template => message_template_to_library)
|
144
|
+
request.save_message_body(:manifestations => Array[manifestation], :user => sender)
|
145
|
+
request.sm_send_message!
|
146
|
+
when 'retained'
|
147
|
+
message_template_for_patron = MessageTemplate.localized_template('item_received_for_patron', user.locale)
|
148
|
+
request = MessageRequest.create!(:sender => sender, :receiver => user, :message_template => message_template_for_patron)
|
149
|
+
request.save_message_body(:manifestations => Array[item.manifestation], :user => user)
|
150
|
+
request.sm_send_message!
|
151
|
+
message_template_for_library = MessageTemplate.localized_template('item_received_for_library', user.locale)
|
152
|
+
request = MessageRequest.create!(:sender => sender, :receiver => sender, :message_template => message_template_for_library)
|
153
|
+
request.save_message_body(:manifestations => Array[item.manifestation], :user => user)
|
154
|
+
request.sm_send_message!
|
158
155
|
else
|
159
156
|
raise 'status not defined'
|
160
157
|
end
|
@@ -162,18 +159,18 @@ class Reserve < ActiveRecord::Base
|
|
162
159
|
end
|
163
160
|
|
164
161
|
def self.send_message_to_library(status, options = {})
|
165
|
-
|
162
|
+
sender = User.find(1) # TODO: システムからのメッセージの発信者
|
166
163
|
case status
|
167
164
|
when 'expired'
|
168
|
-
message_template_to_library = MessageTemplate.localized_template('reservation_expired_for_library',
|
169
|
-
request = MessageRequest.create!(:sender =>
|
165
|
+
message_template_to_library = MessageTemplate.localized_template('reservation_expired_for_library', sender.locale)
|
166
|
+
request = MessageRequest.create!(:sender => sender, :receiver => sender, :message_template => message_template_to_library)
|
170
167
|
request.save_message_body(:manifestations => options[:manifestations])
|
171
168
|
self.not_sent_expiration_notice_to_library.each do |reserve|
|
172
169
|
reserve.update_attribute(:expiration_notice_to_library, true)
|
173
170
|
end
|
174
171
|
#when 'canceled'
|
175
|
-
# message_template_to_library = MessageTemplate.localized_template('reservation_canceled_for_library',
|
176
|
-
# request = MessageRequest.create!(:sender =>
|
172
|
+
# message_template_to_library = MessageTemplate.localized_template('reservation_canceled_for_library', sender.locale)
|
173
|
+
# request = MessageRequest.create!(:sender => sender, :receiver => sender, :message_template => message_template_to_library)
|
177
174
|
# request.save_message_body(:manifestations => self.not_sent_expiration_notice_to_library.collect(&:manifestation))
|
178
175
|
# self.not_sent_cancel_notice_to_library.each do |reserve|
|
179
176
|
# reserve.update_attribute(:expiration_notice_to_library, true)
|
@@ -219,6 +216,37 @@ class Reserve < ActiveRecord::Base
|
|
219
216
|
end
|
220
217
|
end
|
221
218
|
end
|
219
|
+
|
220
|
+
private
|
221
|
+
def retain
|
222
|
+
# TODO: 「取り置き中」の状態を正しく表す
|
223
|
+
self.update_attributes!({:request_status_type => RequestStatusType.where(:name => 'In Process').first, :checked_out_at => Time.zone.now})
|
224
|
+
end
|
225
|
+
|
226
|
+
def expire
|
227
|
+
self.update_attributes!({:request_status_type => RequestStatusType.where(:name => 'Expired').first, :canceled_at => Time.zone.now})
|
228
|
+
logger.info "#{Time.zone.now} reserve_id #{self.id} expired!"
|
229
|
+
reserve = next_reservation
|
230
|
+
if reserve
|
231
|
+
reserve.item = item
|
232
|
+
reserve.sm_retain!
|
233
|
+
reserve.send_message
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
def cancel
|
238
|
+
self.update_attributes!({:request_status_type => RequestStatusType.where(:name => 'Cannot Fulfill Request').first, :canceled_at => Time.zone.now})
|
239
|
+
reserve = next_reservation
|
240
|
+
if reserve
|
241
|
+
reserve.item = item
|
242
|
+
reserve.sm_retain!
|
243
|
+
reserve.send_message
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
def checkout
|
248
|
+
self.update_attributes!({:request_status_type => RequestStatusType.where(:name => 'Available For Pickup').first, :checked_out_at => Time.zone.now})
|
249
|
+
end
|
222
250
|
end
|
223
251
|
|
224
252
|
# == Schema Information
|
@@ -20,10 +20,14 @@
|
|
20
20
|
<%= f.text_field :expired_at, :value => @reserve.expired_at.try(:strftime, "%Y-%m-%d"), :class => 'date_field', :placeholder => "#{t('page.example')}: 2011-04-12"-%>
|
21
21
|
</div>
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
<% if current_user.has_role?('Librarian') %>
|
24
|
+
<div class="field">
|
25
|
+
<%= f.label t('activerecord.attributes.user.user_number') -%><br />
|
26
|
+
<%= f.text_field :user_number, :class => 'resource_user_number' -%>
|
27
|
+
</div>
|
28
|
+
<% else %>
|
29
|
+
<%= f.hidden_field :user_number, :class => 'resource_user_number' -%>
|
30
|
+
<% end %>
|
27
31
|
|
28
32
|
<div class="actions">
|
29
33
|
<%= f.submit t('page.create') -%>
|
@@ -239,9 +239,10 @@ describe CheckedItemsController do
|
|
239
239
|
|
240
240
|
describe "When the item is reserved" do
|
241
241
|
it "assigns a newly created checked_item as @checked_item" do
|
242
|
+
old_count = items(:item_00021).manifestation.reserves.waiting.count
|
242
243
|
post :create, :checked_item => {:item_identifier => '00021'} , :basket_id => 11
|
243
244
|
assigns(:checked_item).should be_valid
|
244
|
-
assigns(:checked_item).item.manifestation.reserves.waiting.should
|
245
|
+
assigns(:checked_item).item.manifestation.reserves.waiting.count.should eq old_count - 1
|
245
246
|
end
|
246
247
|
end
|
247
248
|
|
@@ -2,124 +2,263 @@
|
|
2
2
|
class Item < ActiveRecord::Base
|
3
3
|
scope :on_shelf, where('shelf_id != 1')
|
4
4
|
scope :on_web, where(:shelf_id => 1)
|
5
|
-
|
6
|
-
scope :for_checkout, where('item_identifier IS NOT NULL')
|
7
|
-
scope :not_for_checkout, where(:item_identifier => nil)
|
8
5
|
has_one :exemplify
|
9
6
|
has_one :manifestation, :through => :exemplify
|
10
|
-
has_many :
|
11
|
-
has_many :
|
12
|
-
has_many :reserved_patrons, :through => :reserves, :class_name => 'Patron'
|
13
|
-
has_many :checked_items, :dependent => :destroy
|
14
|
-
has_many :baskets, :through => :checked_items
|
15
|
-
belongs_to :circulation_status, :validate => true
|
16
|
-
belongs_to :checkout_type
|
17
|
-
has_many :lending_policies, :dependent => :destroy
|
18
|
-
has_one :item_has_use_restriction, :dependent => :destroy
|
19
|
-
has_one :use_restriction, :through => :item_has_use_restriction
|
7
|
+
#has_many :owns
|
8
|
+
#has_many :patrons, :through => :owns
|
20
9
|
belongs_to :shelf, :counter_cache => true, :validate => true
|
10
|
+
delegate :display_name, :to => :shelf, :prefix => true
|
11
|
+
belongs_to :bookstore, :validate => true
|
12
|
+
#has_many :donates
|
13
|
+
#has_many :donors, :through => :donates, :source => :patron
|
14
|
+
belongs_to :required_role, :class_name => 'Role', :foreign_key => 'required_role_id', :validate => true
|
15
|
+
#has_one :resource_import_result
|
16
|
+
belongs_to :budget_type
|
17
|
+
|
18
|
+
validates_associated :shelf, :bookstore
|
19
|
+
validates :manifestation_id, :presence => true, :on => :create
|
20
|
+
validates :item_identifier, :allow_blank => true, :uniqueness => true,
|
21
|
+
:format => {:with => /\A[0-9A-Za-z_]+\Z/}
|
22
|
+
validates :url, :url => true, :allow_blank => true, :length => {:maximum => 255}
|
23
|
+
validates_date :acquired_at, :allow_blank => true
|
24
|
+
|
25
|
+
normalize_attributes :item_identifier
|
21
26
|
|
22
|
-
validates_associated :circulation_status, :checkout_type
|
23
|
-
validates_presence_of :circulation_status, :checkout_type
|
24
|
-
before_save :set_use_restriction
|
25
27
|
searchable do
|
26
|
-
|
28
|
+
text :item_identifier, :note, :title #, :creator, :contributor, :publisher
|
29
|
+
string :item_identifier
|
30
|
+
string :library do
|
31
|
+
shelf.library.name if shelf
|
32
|
+
end
|
33
|
+
integer :required_role_id
|
34
|
+
integer :manifestation_id do
|
35
|
+
manifestation.id if manifestation
|
36
|
+
end
|
37
|
+
integer :shelf_id
|
38
|
+
#integer :patron_ids, :multiple => true
|
39
|
+
time :created_at
|
40
|
+
time :updated_at
|
27
41
|
end
|
28
|
-
|
42
|
+
|
29
43
|
attr_accessor :library_id, :manifestation_id
|
30
44
|
|
31
|
-
|
32
|
-
|
33
|
-
|
45
|
+
if defined?(EnjuCirculation)
|
46
|
+
scope :for_checkout, where('item_identifier IS NOT NULL')
|
47
|
+
scope :not_for_checkout, where(:item_identifier => nil)
|
48
|
+
has_many :checkouts
|
49
|
+
has_many :reserves
|
50
|
+
has_many :reserved_patrons, :through => :reserves, :class_name => 'Patron'
|
51
|
+
has_many :checked_items, :dependent => :destroy
|
52
|
+
has_many :baskets, :through => :checked_items
|
53
|
+
belongs_to :circulation_status, :validate => true
|
54
|
+
belongs_to :checkout_type
|
55
|
+
has_many :lending_policies, :dependent => :destroy
|
56
|
+
has_one :item_has_use_restriction, :dependent => :destroy
|
57
|
+
has_one :use_restriction, :through => :item_has_use_restriction
|
58
|
+
validates_associated :circulation_status, :checkout_type
|
59
|
+
validates_presence_of :circulation_status, :checkout_type
|
60
|
+
before_save :set_use_restriction
|
61
|
+
searchable do
|
62
|
+
integer :circulation_status_id
|
63
|
+
end
|
64
|
+
attr_accessor :use_restriction_id
|
34
65
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
self.
|
66
|
+
def set_circulation_status
|
67
|
+
self.circulation_status = CirculationStatus.where(:name => 'In Process').first if self.circulation_status.nil?
|
68
|
+
end
|
69
|
+
|
70
|
+
def set_use_restriction
|
71
|
+
if self.use_restriction_id
|
72
|
+
self.use_restriction = UseRestriction.where(:id => self.use_restriction_id).first
|
73
|
+
else
|
74
|
+
return if use_restriction
|
75
|
+
self.use_restriction = UseRestriction.where(:name => 'Limited Circulation, Normal Loan Period').first
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def checkout_status(user)
|
80
|
+
user.user_group.user_group_has_checkout_types.where(:checkout_type_id => self.checkout_type.id).first
|
81
|
+
end
|
82
|
+
|
83
|
+
def next_reservation
|
84
|
+
Reserve.waiting.where(:manifestation_id => self.manifestation.id).first
|
85
|
+
end
|
86
|
+
|
87
|
+
def reserved?
|
88
|
+
return true if self.next_reservation
|
89
|
+
false
|
90
|
+
end
|
91
|
+
|
92
|
+
def rent?
|
93
|
+
return true if self.checkouts.not_returned.select(:item_id).detect{|checkout| checkout.item_id == self.id}
|
94
|
+
false
|
95
|
+
end
|
96
|
+
|
97
|
+
def reserved_by_user?(user)
|
98
|
+
if self.next_reservation
|
99
|
+
return true if self.next_reservation.user == user
|
100
|
+
end
|
101
|
+
false
|
102
|
+
end
|
103
|
+
|
104
|
+
def available_for_checkout?
|
105
|
+
circulation_statuses = CirculationStatus.available_for_checkout.select(:id)
|
106
|
+
return true if circulation_statuses.include?(self.circulation_status)
|
107
|
+
false
|
108
|
+
end
|
109
|
+
|
110
|
+
def checkout!(user)
|
111
|
+
self.circulation_status = CirculationStatus.where(:name => 'On Loan').first
|
112
|
+
if self.reserved_by_user?(user)
|
113
|
+
self.next_reservation.update_attributes(:checked_out_at => Time.zone.now)
|
114
|
+
self.next_reservation.sm_complete!
|
115
|
+
end
|
116
|
+
save!
|
41
117
|
end
|
42
|
-
end
|
43
118
|
|
44
|
-
|
45
|
-
|
119
|
+
def checkin!
|
120
|
+
self.circulation_status = CirculationStatus.where(:name => 'Available On Shelf').first
|
121
|
+
save(:validate => false)
|
122
|
+
end
|
123
|
+
|
124
|
+
def retain(librarian)
|
125
|
+
Item.transaction do
|
126
|
+
reservation = self.manifestation.next_reservation
|
127
|
+
unless reservation.nil?
|
128
|
+
reservation.item = self
|
129
|
+
reservation.sm_retain!
|
130
|
+
reservation.send_message(librarian)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
def lending_rule(user)
|
136
|
+
lending_policies.where(:user_group_id => user.user_group.id).first
|
137
|
+
end
|
138
|
+
|
139
|
+
def not_for_loan?
|
140
|
+
if use_restriction.try(:name) == 'Not For Loan'
|
141
|
+
true
|
142
|
+
else
|
143
|
+
false
|
144
|
+
end
|
145
|
+
end
|
46
146
|
end
|
47
147
|
|
48
|
-
|
49
|
-
|
148
|
+
if defined?(EnjuInventory)
|
149
|
+
has_many :inventories, :dependent => :destroy
|
150
|
+
has_many :inventory_files, :through => :inventories
|
151
|
+
searchable do
|
152
|
+
integer :inventory_file_ids, :multiple => true
|
153
|
+
end
|
154
|
+
|
155
|
+
def self.inventory_items(inventory_file, mode = 'not_on_shelf')
|
156
|
+
item_ids = Item.select(:id).collect(&:id)
|
157
|
+
inventory_item_ids = inventory_file.items.select('items.id').collect(&:id)
|
158
|
+
case mode
|
159
|
+
when 'not_on_shelf'
|
160
|
+
Item.where(:id => (item_ids - inventory_item_ids))
|
161
|
+
when 'not_in_catalog'
|
162
|
+
Item.where(:id => (inventory_item_ids - item_ids))
|
163
|
+
end
|
164
|
+
rescue
|
165
|
+
nil
|
166
|
+
end
|
50
167
|
end
|
51
168
|
|
52
|
-
|
53
|
-
|
54
|
-
|
169
|
+
if defined?(EnjuQuestion)
|
170
|
+
has_many :answer_has_items, :dependent => :destroy
|
171
|
+
has_many :answers, :through => :answer_has_items
|
55
172
|
end
|
56
173
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
true
|
62
|
-
else
|
63
|
-
false
|
174
|
+
if defined?(EnjuInterLibraryLoan)
|
175
|
+
has_many :inter_library_loans, :dependent => :destroy
|
176
|
+
def inter_library_loaned?
|
177
|
+
true if self.inter_library_loans.size > 0
|
64
178
|
end
|
65
179
|
end
|
66
180
|
|
67
|
-
def
|
68
|
-
|
69
|
-
false
|
181
|
+
def self.per_page
|
182
|
+
10
|
70
183
|
end
|
71
184
|
|
72
|
-
def
|
73
|
-
|
74
|
-
return true if self.next_reservation.user == user
|
75
|
-
end
|
76
|
-
false
|
185
|
+
def title
|
186
|
+
manifestation.try(:original_title)
|
77
187
|
end
|
78
188
|
|
79
|
-
def
|
80
|
-
|
81
|
-
|
82
|
-
|
189
|
+
#def creator
|
190
|
+
# manifestation.try(:creator)
|
191
|
+
#end
|
192
|
+
|
193
|
+
#def contributor
|
194
|
+
# manifestation.try(:contributor)
|
195
|
+
#end
|
196
|
+
|
197
|
+
#def publisher
|
198
|
+
# manifestation.try(:publisher)
|
199
|
+
#end
|
200
|
+
|
201
|
+
def shelf_name
|
202
|
+
shelf.name
|
83
203
|
end
|
84
204
|
|
85
|
-
def
|
86
|
-
|
87
|
-
|
88
|
-
self.next_reservation.update_attributes(:checked_out_at => Time.zone.now)
|
89
|
-
self.next_reservation.sm_complete!
|
90
|
-
end
|
91
|
-
save!
|
205
|
+
def hold?(library)
|
206
|
+
return true if self.shelf.library == library
|
207
|
+
false
|
92
208
|
end
|
93
209
|
|
94
|
-
def
|
95
|
-
|
96
|
-
save(:validate => false)
|
210
|
+
def owned(patron)
|
211
|
+
owns.where(:patron_id => patron.id).first
|
97
212
|
end
|
98
213
|
|
99
|
-
def
|
100
|
-
|
101
|
-
reservation = self.manifestation.next_reservation
|
102
|
-
unless reservation.nil?
|
103
|
-
reservation.item = self
|
104
|
-
reservation.sm_retain!
|
105
|
-
reservation.update_attributes({:request_status_type => RequestStatusType.where(:name => 'In Process').first})
|
106
|
-
request = MessageRequest.new(:sender_id => librarian.id, :receiver_id => reservation.user_id)
|
107
|
-
message_template = MessageTemplate.localized_template('item_received', reservation.user.locale)
|
108
|
-
request.message_template = message_template
|
109
|
-
request.save!
|
110
|
-
end
|
111
|
-
end
|
214
|
+
def library_url
|
215
|
+
"#{LibraryGroup.site_config.url}libraries/#{self.shelf.library.name}"
|
112
216
|
end
|
113
217
|
|
114
|
-
def
|
115
|
-
|
218
|
+
def manifestation_url
|
219
|
+
Addressable::URI.parse("#{LibraryGroup.site_config.url}manifestations/#{self.manifestation.id}").normalize.to_s if self.manifestation
|
116
220
|
end
|
117
221
|
|
118
|
-
def
|
119
|
-
if
|
120
|
-
|
222
|
+
def deletable?
|
223
|
+
if circulation_status.name == 'Removed'
|
224
|
+
return false
|
121
225
|
else
|
122
|
-
|
226
|
+
if defined?(EnjuCirculation)
|
227
|
+
checkouts.not_returned.empty?
|
228
|
+
else
|
229
|
+
true
|
230
|
+
end
|
123
231
|
end
|
124
232
|
end
|
125
233
|
end
|
234
|
+
|
235
|
+
|
236
|
+
# == Schema Information
|
237
|
+
#
|
238
|
+
# Table name: items
|
239
|
+
#
|
240
|
+
# id :integer not null, primary key
|
241
|
+
# call_number :string(255)
|
242
|
+
# item_identifier :string(255)
|
243
|
+
# circulation_status_id :integer default(5), not null
|
244
|
+
# checkout_type_id :integer default(1), not null
|
245
|
+
# created_at :datetime not null
|
246
|
+
# updated_at :datetime not null
|
247
|
+
# deleted_at :datetime
|
248
|
+
# shelf_id :integer default(1), not null
|
249
|
+
# include_supplements :boolean default(FALSE), not null
|
250
|
+
# checkouts_count :integer default(0), not null
|
251
|
+
# owns_count :integer default(0), not null
|
252
|
+
# note :text
|
253
|
+
# url :string(255)
|
254
|
+
# price :integer
|
255
|
+
# lock_version :integer default(0), not null
|
256
|
+
# required_role_id :integer default(1), not null
|
257
|
+
# state :string(255)
|
258
|
+
# required_score :integer default(0), not null
|
259
|
+
# acquired_at :datetime
|
260
|
+
# bookstore_id :integer
|
261
|
+
# missing_since :datetime
|
262
|
+
# budget_type_id :integer
|
263
|
+
#
|
264
|
+
|
@@ -16,9 +16,9 @@ class CreateManifestations < ActiveRecord::Migration
|
|
16
16
|
t.integer :extent_id, :default => 1, :null => false
|
17
17
|
t.integer :start_page
|
18
18
|
t.integer :end_page
|
19
|
-
t.
|
20
|
-
t.
|
21
|
-
t.
|
19
|
+
t.integer :height
|
20
|
+
t.integer :width
|
21
|
+
t.integer :depth
|
22
22
|
t.string :isbn
|
23
23
|
t.string :isbn10
|
24
24
|
t.string :wrong_isbn
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddVolumeNumberToManifestation < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :manifestations, :volume_number, :integer
|
4
|
+
add_column :manifestations, :issue_number, :integer
|
5
|
+
add_column :manifestations, :serial_number, :integer
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :manifestations, :serial_number
|
10
|
+
remove_column :manifestations, :issue_number
|
11
|
+
remove_column :manifestations, :volume_number
|
12
|
+
end
|
13
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -217,6 +217,7 @@ ActiveRecord::Schema.define(:version => 20120224094141) do
|
|
217
217
|
t.integer "required_role_id", :default => 1, :null => false
|
218
218
|
t.string "state"
|
219
219
|
t.integer "required_score", :default => 0, :null => false
|
220
|
+
t.datetime "acquired_at"
|
220
221
|
end
|
221
222
|
|
222
223
|
add_index "items", ["checkout_type_id"], :name => "index_items_on_checkout_type_id"
|
@@ -349,9 +350,9 @@ ActiveRecord::Schema.define(:version => 20120224094141) do
|
|
349
350
|
t.integer "extent_id", :default => 1, :null => false
|
350
351
|
t.integer "start_page"
|
351
352
|
t.integer "end_page"
|
352
|
-
t.
|
353
|
-
t.
|
354
|
-
t.
|
353
|
+
t.integer "height"
|
354
|
+
t.integer "width"
|
355
|
+
t.integer "depth"
|
355
356
|
t.string "isbn"
|
356
357
|
t.string "isbn10"
|
357
358
|
t.string "wrong_isbn"
|
@@ -377,6 +378,9 @@ ActiveRecord::Schema.define(:version => 20120224094141) do
|
|
377
378
|
t.integer "required_score", :default => 0, :null => false
|
378
379
|
t.integer "frequency_id", :default => 1, :null => false
|
379
380
|
t.boolean "subscription_master", :default => false, :null => false
|
381
|
+
t.integer "volume_number"
|
382
|
+
t.integer "issue_number"
|
383
|
+
t.integer "serial_number"
|
380
384
|
end
|
381
385
|
|
382
386
|
add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/spec/fixtures/checkouts.yml
CHANGED
@@ -5,6 +5,7 @@ exemplify_00001:
|
|
5
5
|
manifestation_id: 1
|
6
6
|
id: 1
|
7
7
|
created_at: 2008-01-11 23:28:19.277110 +09:00
|
8
|
+
position: 1
|
8
9
|
exemplify_00002:
|
9
10
|
updated_at: 2008-01-11 23:28:57.068191 +09:00
|
10
11
|
item_id: 2
|
@@ -23,6 +24,7 @@ exemplify_00004:
|
|
23
24
|
manifestation_id: 1
|
24
25
|
id: 4
|
25
26
|
created_at: 2008-01-11 02:34:20.183962 +09:00
|
27
|
+
position: 2
|
26
28
|
exemplify_00005:
|
27
29
|
updated_at: 2008-01-11 02:34:32.352223 +09:00
|
28
30
|
item_id: 5
|
@@ -125,6 +127,12 @@ exemplify_00021:
|
|
125
127
|
manifestation_id: 11
|
126
128
|
id: 21
|
127
129
|
created_at: 2008-01-11 02:44:37.135721 +09:00
|
130
|
+
exemplify_00022:
|
131
|
+
updated_at: 2008-01-11 02:44:37.135721 +09:00
|
132
|
+
item_id: 22
|
133
|
+
manifestation_id: 11
|
134
|
+
id: 22
|
135
|
+
created_at: 2008-01-11 02:44:37.135721 +09:00
|
128
136
|
|
129
137
|
# == Schema Information
|
130
138
|
#
|
data/spec/fixtures/items.yml
CHANGED
@@ -209,10 +209,16 @@ item_00021:
|
|
209
209
|
id: 21
|
210
210
|
include_supplements: false
|
211
211
|
created_at: 2007-08-24 23:46:20.484813 +09:00
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
212
|
+
item_00022:
|
213
|
+
updated_at: 2007-08-24 23:46:20.484813 +09:00
|
214
|
+
item_identifier: '00022'
|
215
|
+
circulation_status_id: 2
|
216
|
+
checkout_type_id: 3
|
217
|
+
shelf_id: 1
|
218
|
+
call_number:
|
219
|
+
id: 22
|
220
|
+
include_supplements: false
|
221
|
+
created_at: 2007-08-24 23:46:20.484813 +09:00
|
216
222
|
|
217
223
|
|
218
224
|
# == Schema Information
|
@@ -1712,6 +1712,9 @@ manifestation_00202:
|
|
1712
1712
|
created_at: 2007-11-19 17:55:41 UTC
|
1713
1713
|
frequency_id: 3
|
1714
1714
|
issn: 12345678
|
1715
|
+
serial_number: 2
|
1716
|
+
volume_number: 1
|
1717
|
+
issue_number: 2
|
1715
1718
|
manifestation_00203:
|
1716
1719
|
carrier_type_id: 1
|
1717
1720
|
language_id: 1
|
@@ -1958,8 +1961,8 @@ manifestation_00216:
|
|
1958
1961
|
# manifestation_identifier :string(255)
|
1959
1962
|
# date_of_publication :datetime
|
1960
1963
|
# date_copyrighted :datetime
|
1961
|
-
# created_at :datetime
|
1962
|
-
# updated_at :datetime
|
1964
|
+
# created_at :datetime not null
|
1965
|
+
# updated_at :datetime not null
|
1963
1966
|
# deleted_at :datetime
|
1964
1967
|
# access_address :string(255)
|
1965
1968
|
# language_id :integer default(1), not null
|
@@ -1967,9 +1970,9 @@ manifestation_00216:
|
|
1967
1970
|
# extent_id :integer default(1), not null
|
1968
1971
|
# start_page :integer
|
1969
1972
|
# end_page :integer
|
1970
|
-
# height :
|
1971
|
-
# width :
|
1972
|
-
# depth :
|
1973
|
+
# height :integer
|
1974
|
+
# width :integer
|
1975
|
+
# depth :integer
|
1973
1976
|
# isbn :string(255)
|
1974
1977
|
# isbn10 :string(255)
|
1975
1978
|
# wrong_isbn :string(255)
|
@@ -2006,12 +2009,16 @@ manifestation_00216:
|
|
2006
2009
|
# date_accepted :datetime
|
2007
2010
|
# date_caputured :datetime
|
2008
2011
|
# ndl_bib_id :string(255)
|
2009
|
-
# file_hash :string(255)
|
2010
2012
|
# pub_date :string(255)
|
2011
2013
|
# edition_string :string(255)
|
2012
2014
|
# volume_number :integer
|
2013
2015
|
# issue_number :integer
|
2014
2016
|
# serial_number :integer
|
2015
2017
|
# ndc :string(255)
|
2018
|
+
# content_type_id :integer default(1)
|
2019
|
+
# year_of_publication :integer
|
2020
|
+
# attachment_fingerprint :string(255)
|
2021
|
+
# attachment_meta :text
|
2022
|
+
# month_of_publication :integer
|
2016
2023
|
#
|
2017
2024
|
|
@@ -1,65 +1,70 @@
|
|
1
1
|
message_template_00001:
|
2
2
|
id: 1
|
3
|
-
status:
|
3
|
+
status: reservation_accepted_for_patron
|
4
4
|
title: Reservation accepted
|
5
5
|
body: Reservation accepted
|
6
6
|
position: 1
|
7
|
+
locale: ja
|
7
8
|
message_template_00002:
|
8
9
|
id: 2
|
9
|
-
status:
|
10
|
+
status: item_received_for_patron
|
10
11
|
title: Item received
|
11
12
|
body: Item received
|
12
13
|
position: 2
|
14
|
+
locale: ja
|
13
15
|
message_template_00003:
|
14
16
|
id: 3
|
15
17
|
status: reservation_expired_for_patron
|
16
18
|
title: Reservation expired
|
17
19
|
body: Reservation expired
|
18
20
|
position: 3
|
21
|
+
locale: ja
|
19
22
|
message_template_00004:
|
20
23
|
id: 4
|
21
24
|
status: reservation_expired_for_library
|
22
25
|
title: Reservation expired
|
23
26
|
body: Reservation expired
|
24
27
|
position: 4
|
28
|
+
locale: ja
|
25
29
|
message_template_00005:
|
26
30
|
id: 5
|
27
31
|
status: reservation_canceled_for_patron
|
28
32
|
title: Reservation canceled
|
29
33
|
body: Reservation canceled
|
30
34
|
position: 5
|
35
|
+
locale: ja
|
31
36
|
message_template_00006:
|
32
37
|
id: 6
|
33
38
|
status: reservation_canceled_for_library
|
34
39
|
title: Reservation canceled
|
35
40
|
body: Reservation canceled
|
36
41
|
position: 6
|
42
|
+
locale: ja
|
37
43
|
message_template_00007:
|
38
44
|
id: 7
|
39
45
|
status: recall_item
|
40
46
|
title: Recall item
|
41
47
|
body: Recall item
|
42
48
|
position: 7
|
49
|
+
locale: ja
|
43
50
|
message_template_00008:
|
44
51
|
id: 8
|
45
52
|
status: recall_overdue_item
|
46
53
|
title: Recall overdue item
|
47
54
|
body: Recall overdue item
|
48
55
|
position: 8
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
#
|
65
|
-
|
56
|
+
locale: ja
|
57
|
+
message_template_00009:
|
58
|
+
id: 9
|
59
|
+
status: reservation_accepted_for_library
|
60
|
+
title: Reservation accepted
|
61
|
+
body: Reservation accepted
|
62
|
+
position: 9
|
63
|
+
locale: ja
|
64
|
+
message_template_00010:
|
65
|
+
id: 10
|
66
|
+
status: item_received_for_library
|
67
|
+
title: Item received
|
68
|
+
body: Item received
|
69
|
+
position: 10
|
70
|
+
locale: ja
|
data/spec/fixtures/reserves.yml
CHANGED
@@ -117,6 +117,25 @@ reserve_00013:
|
|
117
117
|
created_at: 2007-09-01 14:20:05.530854 +09:00
|
118
118
|
expired_at: <%= 1.day.ago %>
|
119
119
|
state: requested
|
120
|
+
reserve_00014:
|
121
|
+
updated_at: 2007-09-01 14:20:05.530854 +09:00
|
122
|
+
manifestation_id: 11
|
123
|
+
user_id: 4
|
124
|
+
request_status_type_id: 3
|
125
|
+
id: 14
|
126
|
+
created_at: 2007-09-01 14:20:05.530854 +09:00
|
127
|
+
expired_at: <%= 1.day.from_now %>
|
128
|
+
state: retained
|
129
|
+
item_id: 21
|
130
|
+
reserve_00015:
|
131
|
+
updated_at: 2007-09-01 14:20:05.530854 +09:00
|
132
|
+
manifestation_id: 11
|
133
|
+
user_id: 4
|
134
|
+
request_status_type_id: 3
|
135
|
+
id: 15
|
136
|
+
created_at: 2007-09-01 14:20:05.530854 +09:00
|
137
|
+
expired_at: <%= 1.day.from_now %>
|
138
|
+
state: requested
|
120
139
|
|
121
140
|
# == Schema Information
|
122
141
|
#
|
data/spec/models/reserve_spec.rb
CHANGED
@@ -5,16 +5,25 @@ describe Reserve do
|
|
5
5
|
fixtures :all
|
6
6
|
|
7
7
|
it "should have next reservation" do
|
8
|
-
reserves(:
|
8
|
+
reserves(:reserve_00014).next_reservation.should be_true
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should notify a next reservation" do
|
12
|
+
old_count = Message.count
|
13
|
+
reserve = reserves(:reserve_00014)
|
14
|
+
reserve.sm_expire!
|
15
|
+
reserve.state.should eq 'expired'
|
16
|
+
reserve.next_reservation.item.should eq reserve.item
|
17
|
+
Message.count.should eq old_count + 2
|
9
18
|
end
|
10
19
|
|
11
20
|
it "should expire reservation" do
|
12
|
-
reserves(:reserve_00001).
|
21
|
+
reserves(:reserve_00001).sm_expire!
|
13
22
|
reserves(:reserve_00001).request_status_type.name.should eq 'Expired'
|
14
23
|
end
|
15
24
|
|
16
25
|
it "should cancel reservation" do
|
17
|
-
reserves(:reserve_00001).
|
26
|
+
reserves(:reserve_00001).sm_cancel!
|
18
27
|
reserves(:reserve_00001).canceled_at.should be_true
|
19
28
|
reserves(:reserve_00001).request_status_type.name.should eq 'Cannot Fulfill Request'
|
20
29
|
end
|
@@ -26,7 +35,7 @@ describe Reserve do
|
|
26
35
|
it "should send accepted message" do
|
27
36
|
old_admin_count = User.find('admin').received_messages.count
|
28
37
|
old_user_count = reserves(:reserve_00002).user.received_messages.count
|
29
|
-
reserves(:reserve_00002).send_message
|
38
|
+
reserves(:reserve_00002).send_message.should be_true
|
30
39
|
# 予約者と図書館の両方に送られる
|
31
40
|
User.find('admin').received_messages.count.should eq old_admin_count + 1
|
32
41
|
reserves(:reserve_00002).user.received_messages.count.should eq old_user_count + 1
|
@@ -34,8 +43,8 @@ describe Reserve do
|
|
34
43
|
|
35
44
|
it "should send expired message" do
|
36
45
|
old_count = MessageRequest.count
|
37
|
-
reserves(:
|
38
|
-
MessageRequest.count.should eq old_count +
|
46
|
+
reserves(:reserve_00006).send_message.should be_true
|
47
|
+
MessageRequest.count.should eq old_count + 2
|
39
48
|
end
|
40
49
|
|
41
50
|
it "should send message to library" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_circulation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.28
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70274896189320 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70274896189320
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: simple_form
|
27
|
-
requirement: &
|
27
|
+
requirement: &70274896188900 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70274896188900
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: devise
|
38
|
-
requirement: &
|
38
|
+
requirement: &70274896188380 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70274896188380
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: cancan
|
49
|
-
requirement: &
|
49
|
+
requirement: &70274896187860 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70274896187860
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: validates_timeliness
|
60
|
-
requirement: &
|
60
|
+
requirement: &70274896187300 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70274896187300
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: attribute_normalizer
|
71
|
-
requirement: &
|
71
|
+
requirement: &70274896186560 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '1.1'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70274896186560
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: inherited_resources
|
82
|
-
requirement: &
|
82
|
+
requirement: &70274896185940 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70274896185940
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: state_machine
|
93
|
-
requirement: &
|
93
|
+
requirement: &70274896185480 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70274896185480
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: friendly_id
|
104
|
-
requirement: &
|
104
|
+
requirement: &70274896184820 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '4.0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70274896184820
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: sunspot_rails
|
115
|
-
requirement: &
|
115
|
+
requirement: &70274896184220 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70274896184220
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: sunspot_solr
|
126
|
-
requirement: &
|
126
|
+
requirement: &70274896183620 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70274896183620
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: will_paginate
|
137
|
-
requirement: &
|
137
|
+
requirement: &70274896199100 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ~>
|
@@ -142,32 +142,32 @@ dependencies:
|
|
142
142
|
version: '3.0'
|
143
143
|
type: :runtime
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70274896199100
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: acts_as_list
|
148
|
-
requirement: &
|
148
|
+
requirement: &70274896198540 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ~>
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: 0.1.
|
153
|
+
version: 0.1.6
|
154
154
|
type: :runtime
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *70274896198540
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: enju_message
|
159
|
-
requirement: &
|
159
|
+
requirement: &70274896198040 !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|
162
162
|
- - ~>
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version: 0.0.
|
164
|
+
version: 0.0.17
|
165
165
|
type: :runtime
|
166
166
|
prerelease: false
|
167
|
-
version_requirements: *
|
167
|
+
version_requirements: *70274896198040
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: enju_event
|
170
|
-
requirement: &
|
170
|
+
requirement: &70274896197380 !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
173
173
|
- - ! '>='
|
@@ -175,10 +175,10 @@ dependencies:
|
|
175
175
|
version: 0.0.12
|
176
176
|
type: :runtime
|
177
177
|
prerelease: false
|
178
|
-
version_requirements: *
|
178
|
+
version_requirements: *70274896197380
|
179
179
|
- !ruby/object:Gem::Dependency
|
180
180
|
name: sqlite3
|
181
|
-
requirement: &
|
181
|
+
requirement: &70274896196820 !ruby/object:Gem::Requirement
|
182
182
|
none: false
|
183
183
|
requirements:
|
184
184
|
- - ! '>='
|
@@ -186,10 +186,10 @@ dependencies:
|
|
186
186
|
version: '0'
|
187
187
|
type: :development
|
188
188
|
prerelease: false
|
189
|
-
version_requirements: *
|
189
|
+
version_requirements: *70274896196820
|
190
190
|
- !ruby/object:Gem::Dependency
|
191
191
|
name: rspec-rails
|
192
|
-
requirement: &
|
192
|
+
requirement: &70274896196140 !ruby/object:Gem::Requirement
|
193
193
|
none: false
|
194
194
|
requirements:
|
195
195
|
- - ! '>='
|
@@ -197,10 +197,10 @@ dependencies:
|
|
197
197
|
version: '0'
|
198
198
|
type: :development
|
199
199
|
prerelease: false
|
200
|
-
version_requirements: *
|
200
|
+
version_requirements: *70274896196140
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
202
|
name: factory_girl_rails
|
203
|
-
requirement: &
|
203
|
+
requirement: &70274896195360 !ruby/object:Gem::Requirement
|
204
204
|
none: false
|
205
205
|
requirements:
|
206
206
|
- - ~>
|
@@ -208,10 +208,10 @@ dependencies:
|
|
208
208
|
version: '3.1'
|
209
209
|
type: :development
|
210
210
|
prerelease: false
|
211
|
-
version_requirements: *
|
211
|
+
version_requirements: *70274896195360
|
212
212
|
- !ruby/object:Gem::Dependency
|
213
213
|
name: sunspot-rails-tester
|
214
|
-
requirement: &
|
214
|
+
requirement: &70274896194720 !ruby/object:Gem::Requirement
|
215
215
|
none: false
|
216
216
|
requirements:
|
217
217
|
- - ! '>='
|
@@ -219,7 +219,7 @@ dependencies:
|
|
219
219
|
version: '0'
|
220
220
|
type: :development
|
221
221
|
prerelease: false
|
222
|
-
version_requirements: *
|
222
|
+
version_requirements: *70274896194720
|
223
223
|
description: Circulation management for Next-L Enju
|
224
224
|
email:
|
225
225
|
- tanabe@mwr.mediacom.keio.ac.jp
|
@@ -525,9 +525,11 @@ files:
|
|
525
525
|
- spec/dummy/db/migrate/20081025083905_create_languages.rb
|
526
526
|
- spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb
|
527
527
|
- spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb
|
528
|
+
- spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb
|
528
529
|
- spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb
|
529
530
|
- spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb
|
530
531
|
- spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb
|
532
|
+
- spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb
|
531
533
|
- spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb
|
532
534
|
- spec/dummy/db/migrate/20111201121844_create_roles.rb
|
533
535
|
- spec/dummy/db/migrate/20111201155456_create_users.rb
|
@@ -755,9 +757,11 @@ test_files:
|
|
755
757
|
- spec/dummy/db/migrate/20081025083905_create_languages.rb
|
756
758
|
- spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb
|
757
759
|
- spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb
|
760
|
+
- spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb
|
758
761
|
- spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb
|
759
762
|
- spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb
|
760
763
|
- spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb
|
764
|
+
- spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb
|
761
765
|
- spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb
|
762
766
|
- spec/dummy/db/migrate/20111201121844_create_roles.rb
|
763
767
|
- spec/dummy/db/migrate/20111201155456_create_users.rb
|