enju_circulation 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/baskets_controller.rb +7 -10
- data/app/controllers/carrier_type_has_checkout_types_controller.rb +5 -5
- data/app/controllers/checked_items_controller.rb +4 -4
- data/app/controllers/checkins_controller.rb +7 -8
- data/app/controllers/checkout_stat_has_manifestations_controller.rb +5 -5
- data/app/controllers/checkout_stat_has_users_controller.rb +5 -5
- data/app/controllers/checkout_types_controller.rb +5 -5
- data/app/controllers/checkouts_controller.rb +11 -13
- data/app/controllers/item_has_use_restrictions_controller.rb +5 -5
- data/app/controllers/manifestation_checkout_stats_controller.rb +5 -5
- data/app/controllers/manifestation_reserve_stats_controller.rb +5 -5
- data/app/controllers/reserve_stat_has_manifestations_controller.rb +5 -7
- data/app/controllers/reserve_stat_has_users_controller.rb +4 -4
- data/app/controllers/reserves_controller.rb +9 -11
- data/app/controllers/user_checkout_stats_controller.rb +5 -7
- data/app/controllers/user_group_has_checkout_types_controller.rb +4 -4
- data/app/controllers/user_reserve_stats_controller.rb +5 -7
- data/app/models/checkout.rb +1 -1
- data/app/models/user_group_has_checkout_type.rb +7 -4
- data/app/views/checkins/_list.html.erb +1 -1
- data/db/migrate/20090831220301_create_lending_policies.rb +1 -2
- data/lib/enju_circulation/engine.rb +1 -0
- data/lib/enju_circulation/version.rb +1 -1
- data/spec/dummy/app/controllers/application_controller.rb +6 -2
- data/spec/dummy/app/models/item.rb +1 -0
- data/spec/dummy/db/schema.rb +1 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/factories/item.rb +7 -0
- data/spec/factories/item_has_use_restriction.rb +6 -0
- data/spec/factories/lending_policy.rb +6 -0
- data/spec/factories/use_restriction.rb +5 -0
- metadata +49 -42
- data/spec/dummy/db/development.sqlite3 +0 -0
@@ -1,6 +1,5 @@
|
|
1
1
|
class BasketsController < ApplicationController
|
2
2
|
load_and_authorize_resource
|
3
|
-
helper_method :get_user
|
4
3
|
cache_sweeper :circulation_sweeper, :only => [:create, :update, :destroy]
|
5
4
|
|
6
5
|
# GET /baskets
|
@@ -57,8 +56,7 @@ class BasketsController < ApplicationController
|
|
57
56
|
|
58
57
|
respond_to do |format|
|
59
58
|
if @basket.save
|
60
|
-
|
61
|
-
format.html { redirect_to basket_checked_items_url(@basket) }
|
59
|
+
format.html { redirect_to basket_checked_items_url(@basket), :notice => t('controller.successfully_created', :model => t('activerecord.models.basket')) }
|
62
60
|
format.json { render :json => @basket, :status => :created, :location => @basket }
|
63
61
|
else
|
64
62
|
format.html { render :action => "new" }
|
@@ -81,12 +79,11 @@ class BasketsController < ApplicationController
|
|
81
79
|
#if @basket.update_attributes({})
|
82
80
|
if @basket.save(:validate => false)
|
83
81
|
# 貸出完了時
|
84
|
-
|
85
|
-
format.
|
86
|
-
format.json { head :ok }
|
82
|
+
format.html { redirect_to user_checkouts_url(@basket.user), :notice => t('basket.checkout_completed') }
|
83
|
+
format.json { head :no_content }
|
87
84
|
else
|
88
|
-
format.html { redirect_to
|
89
|
-
format.json {
|
85
|
+
format.html { redirect_to basket_checked_items_url(@basket) }
|
86
|
+
format.json { render :json => @basket.errors, :status => :unprocessable_entity }
|
90
87
|
end
|
91
88
|
end
|
92
89
|
|
@@ -99,8 +96,8 @@ class BasketsController < ApplicationController
|
|
99
96
|
|
100
97
|
respond_to do |format|
|
101
98
|
#format.html { redirect_to(user_baskets_url(@user)) }
|
102
|
-
format.html { redirect_to
|
103
|
-
format.json { head :
|
99
|
+
format.html { redirect_to user_checkouts_url(@basket.user) }
|
100
|
+
format.json { head :no_content }
|
104
101
|
end
|
105
102
|
end
|
106
103
|
end
|
@@ -48,7 +48,7 @@ class CarrierTypeHasCheckoutTypesController < ApplicationController
|
|
48
48
|
respond_to do |format|
|
49
49
|
if @carrier_type_has_checkout_type.save
|
50
50
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.carrier_type_has_checkout_type'))
|
51
|
-
format.html { redirect_to
|
51
|
+
format.html { redirect_to @carrier_type_has_checkout_type }
|
52
52
|
format.json { render :json => @carrier_type_has_checkout_type, :status => :created, :location => @carrier_type_has_checkout_type }
|
53
53
|
else
|
54
54
|
prepare_options
|
@@ -64,8 +64,8 @@ class CarrierTypeHasCheckoutTypesController < ApplicationController
|
|
64
64
|
respond_to do |format|
|
65
65
|
if @carrier_type_has_checkout_type.update_attributes(params[:carrier_type_has_checkout_type])
|
66
66
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.carrier_type_has_checkout_type'))
|
67
|
-
format.html { redirect_to
|
68
|
-
format.json { head :
|
67
|
+
format.html { redirect_to @carrier_type_has_checkout_type }
|
68
|
+
format.json { head :no_content }
|
69
69
|
else
|
70
70
|
prepare_options
|
71
71
|
format.html { render :action => "edit" }
|
@@ -80,8 +80,8 @@ class CarrierTypeHasCheckoutTypesController < ApplicationController
|
|
80
80
|
@carrier_type_has_checkout_type.destroy
|
81
81
|
|
82
82
|
respond_to do |format|
|
83
|
-
format.html { redirect_to
|
84
|
-
format.json { head :
|
83
|
+
format.html { redirect_to carrier_type_has_checkout_types_url }
|
84
|
+
format.json { head :no_content }
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
@@ -109,8 +109,8 @@ class CheckedItemsController < ApplicationController
|
|
109
109
|
respond_to do |format|
|
110
110
|
if @checked_item.update_attributes(params[:checked_item])
|
111
111
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.checked_item'))
|
112
|
-
format.html { redirect_to
|
113
|
-
format.json { head :
|
112
|
+
format.html { redirect_to @checked_item }
|
113
|
+
format.json { head :no_content }
|
114
114
|
else
|
115
115
|
format.html { render :action => "edit" }
|
116
116
|
format.json { render :json => @checked_item.errors, :status => :unprocessable_entity }
|
@@ -124,8 +124,8 @@ class CheckedItemsController < ApplicationController
|
|
124
124
|
@checked_item.destroy
|
125
125
|
|
126
126
|
respond_to do |format|
|
127
|
-
format.html { redirect_to
|
128
|
-
format.json { head :
|
127
|
+
format.html { redirect_to basket_checked_items_url(@checked_item.basket) }
|
128
|
+
format.json { head :no_content }
|
129
129
|
end
|
130
130
|
end
|
131
131
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class CheckinsController < ApplicationController
|
2
2
|
load_and_authorize_resource :except => :index
|
3
3
|
authorize_resource :only => :index
|
4
|
-
before_filter :
|
4
|
+
before_filter :get_user
|
5
5
|
helper_method :get_basket
|
6
6
|
cache_sweeper :circulation_sweeper, :only => [:create, :update, :destroy]
|
7
7
|
|
@@ -21,7 +21,7 @@ class CheckinsController < ApplicationController
|
|
21
21
|
|
22
22
|
respond_to do |format|
|
23
23
|
format.html # index.rhtml
|
24
|
-
format.json { render :json => @checkins
|
24
|
+
format.json { render :json => @checkins }
|
25
25
|
format.js
|
26
26
|
end
|
27
27
|
end
|
@@ -33,7 +33,7 @@ class CheckinsController < ApplicationController
|
|
33
33
|
|
34
34
|
respond_to do |format|
|
35
35
|
format.html # show.rhtml
|
36
|
-
format.json { render :json => @checkin
|
36
|
+
format.json { render :json => @checkin }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -43,7 +43,7 @@ class CheckinsController < ApplicationController
|
|
43
43
|
redirect_to checkins_url
|
44
44
|
end
|
45
45
|
|
46
|
-
# GET /checkins/1
|
46
|
+
# GET /checkins/1/edit
|
47
47
|
def edit
|
48
48
|
#@checkin = Checkin.find(params[:id])
|
49
49
|
end
|
@@ -116,9 +116,8 @@ class CheckinsController < ApplicationController
|
|
116
116
|
|
117
117
|
respond_to do |format|
|
118
118
|
if @checkin.update_attributes(params[:checkin])
|
119
|
-
|
120
|
-
format.
|
121
|
-
format.json { head :ok }
|
119
|
+
format.html { redirect_to @checkin, :notice => t('controller.successfully_updated', :model => t('activerecord.models.checkin')) }
|
120
|
+
format.json { head :no_content }
|
122
121
|
else
|
123
122
|
format.html { render :action => "edit" }
|
124
123
|
format.json { render :json => @checkin.errors, :status => :unprocessable_entity }
|
@@ -134,7 +133,7 @@ class CheckinsController < ApplicationController
|
|
134
133
|
|
135
134
|
respond_to do |format|
|
136
135
|
format.html { redirect_to checkins_url }
|
137
|
-
format.json { head :
|
136
|
+
format.json { head :no_content }
|
138
137
|
end
|
139
138
|
end
|
140
139
|
end
|
@@ -44,7 +44,7 @@ class CheckoutStatHasManifestationsController < ApplicationController
|
|
44
44
|
respond_to do |format|
|
45
45
|
if @checkout_stat_has_manifestation.save
|
46
46
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.checkout_stat_has_manifestation'))
|
47
|
-
format.html { redirect_to
|
47
|
+
format.html { redirect_to @checkout_stat_has_manifestation }
|
48
48
|
format.json { render :json => @checkout_stat_has_manifestation, :status => :created, :location => @checkout_stat_has_manifestation }
|
49
49
|
else
|
50
50
|
format.html { render :action => "new" }
|
@@ -59,8 +59,8 @@ class CheckoutStatHasManifestationsController < ApplicationController
|
|
59
59
|
respond_to do |format|
|
60
60
|
if @checkout_stat_has_manifestation.update_attributes(params[:checkout_stat_has_manifestation])
|
61
61
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.checkout_stat_has_manifestation'))
|
62
|
-
format.html { redirect_to
|
63
|
-
format.json { head :
|
62
|
+
format.html { redirect_to @checkout_stat_has_manifestation }
|
63
|
+
format.json { head :no_content }
|
64
64
|
else
|
65
65
|
format.html { render :action => "edit" }
|
66
66
|
format.json { render :json => @checkout_stat_has_manifestation.errors, :status => :unprocessable_entity }
|
@@ -74,8 +74,8 @@ class CheckoutStatHasManifestationsController < ApplicationController
|
|
74
74
|
@checkout_stat_has_manifestation.destroy
|
75
75
|
|
76
76
|
respond_to do |format|
|
77
|
-
format.html { redirect_to
|
78
|
-
format.json { head :
|
77
|
+
format.html { redirect_to checkout_stat_has_manifestations_url }
|
78
|
+
format.json { head :no_content }
|
79
79
|
end
|
80
80
|
end
|
81
81
|
end
|
@@ -44,7 +44,7 @@ class CheckoutStatHasUsersController < ApplicationController
|
|
44
44
|
respond_to do |format|
|
45
45
|
if @checkout_stat_has_user.save
|
46
46
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.checkout_stat_has_user'))
|
47
|
-
format.html { redirect_to
|
47
|
+
format.html { redirect_to @checkout_stat_has_user }
|
48
48
|
format.json { render :json => @checkout_stat_has_user, :status => :created, :location => @checkout_stat_has_user }
|
49
49
|
else
|
50
50
|
format.html { render :action => "new" }
|
@@ -59,8 +59,8 @@ class CheckoutStatHasUsersController < ApplicationController
|
|
59
59
|
respond_to do |format|
|
60
60
|
if @checkout_stat_has_user.update_attributes(params[:checkout_stat_has_user])
|
61
61
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.checkout_stat_has_user'))
|
62
|
-
format.html { redirect_to
|
63
|
-
format.json { head :
|
62
|
+
format.html { redirect_to @checkout_stat_has_user }
|
63
|
+
format.json { head :no_content }
|
64
64
|
else
|
65
65
|
format.html { render :action => "edit" }
|
66
66
|
format.json { render :json => @checkout_stat_has_user.errors, :status => :unprocessable_entity }
|
@@ -74,8 +74,8 @@ class CheckoutStatHasUsersController < ApplicationController
|
|
74
74
|
@checkout_stat_has_user.destroy
|
75
75
|
|
76
76
|
respond_to do |format|
|
77
|
-
format.html { redirect_to
|
78
|
-
format.json { head :
|
77
|
+
format.html { redirect_to checkout_stat_has_users_url }
|
78
|
+
format.json { head :no_content }
|
79
79
|
end
|
80
80
|
end
|
81
81
|
end
|
@@ -64,7 +64,7 @@ class CheckoutTypesController < ApplicationController
|
|
64
64
|
respond_to do |format|
|
65
65
|
if @checkout_type.save
|
66
66
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.checkout_type'))
|
67
|
-
format.html { redirect_to
|
67
|
+
format.html { redirect_to @checkout_type }
|
68
68
|
format.json { render :json => @checkout_type, :status => :created, :location => @checkout_type }
|
69
69
|
else
|
70
70
|
format.html { render :action => "new" }
|
@@ -88,8 +88,8 @@ class CheckoutTypesController < ApplicationController
|
|
88
88
|
respond_to do |format|
|
89
89
|
if @checkout_type.update_attributes(params[:checkout_type])
|
90
90
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.checkout_type'))
|
91
|
-
format.html { redirect_to
|
92
|
-
format.json { head :
|
91
|
+
format.html { redirect_to @checkout_type }
|
92
|
+
format.json { head :no_content }
|
93
93
|
else
|
94
94
|
format.html { render :action => "edit" }
|
95
95
|
format.json { render :json => @checkout_type.errors, :status => :unprocessable_entity }
|
@@ -106,8 +106,8 @@ class CheckoutTypesController < ApplicationController
|
|
106
106
|
@checkout_type.destroy
|
107
107
|
|
108
108
|
respond_to do |format|
|
109
|
-
format.html { redirect_to
|
110
|
-
format.json { head :
|
109
|
+
format.html { redirect_to checkout_types_url }
|
110
|
+
format.json { head :no_content }
|
111
111
|
end
|
112
112
|
end
|
113
113
|
end
|
@@ -2,7 +2,7 @@ class CheckoutsController < ApplicationController
|
|
2
2
|
before_filter :store_location, :only => :index
|
3
3
|
load_and_authorize_resource :except => :index
|
4
4
|
authorize_resource :only => :index
|
5
|
-
before_filter :
|
5
|
+
before_filter :get_user, :only => :index
|
6
6
|
helper_method :get_item
|
7
7
|
after_filter :convert_charset, :only => :index
|
8
8
|
cache_sweeper :circulation_sweeper, :only => [:create, :update, :destroy]
|
@@ -50,7 +50,7 @@ class CheckoutsController < ApplicationController
|
|
50
50
|
access_denied
|
51
51
|
return
|
52
52
|
else
|
53
|
-
checkouts = current_user.checkouts.not_returned.order('checkouts.id DESC')
|
53
|
+
checkouts = current_user.checkouts.not_returned.order('checkouts.id DESC').page(params[:page])
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
@@ -65,7 +65,7 @@ class CheckoutsController < ApplicationController
|
|
65
65
|
|
66
66
|
respond_to do |format|
|
67
67
|
format.html # index.rhtml
|
68
|
-
format.json { render :json => @checkouts
|
68
|
+
format.json { render :json => @checkouts }
|
69
69
|
format.rss { render :layout => false }
|
70
70
|
format.ics
|
71
71
|
format.csv
|
@@ -78,11 +78,11 @@ class CheckoutsController < ApplicationController
|
|
78
78
|
def show
|
79
79
|
respond_to do |format|
|
80
80
|
format.html # show.rhtml
|
81
|
-
format.json { render :json => @checkout
|
81
|
+
format.json { render :json => @checkout }
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
-
# GET /checkouts/1
|
85
|
+
# GET /checkouts/1/edit
|
86
86
|
def edit
|
87
87
|
@new_due_date = @checkout.get_new_due_date
|
88
88
|
end
|
@@ -102,19 +102,18 @@ class CheckoutsController < ApplicationController
|
|
102
102
|
end
|
103
103
|
if @checkout.overdue?
|
104
104
|
flash[:notice] = t('checkout.you_have_overdue_item')
|
105
|
-
|
105
|
+
unless current_user.has_role?('Librarian')
|
106
106
|
redirect_to edit_checkout_url(@checkout)
|
107
107
|
return
|
108
|
-
|
108
|
+
end
|
109
109
|
end
|
110
110
|
@checkout.reload
|
111
111
|
@checkout.checkout_renewal_count += 1
|
112
112
|
|
113
113
|
respond_to do |format|
|
114
114
|
if @checkout.update_attributes(params[:checkout])
|
115
|
-
|
116
|
-
format.
|
117
|
-
format.json { head :ok }
|
115
|
+
format.html { redirect_to @checkout, :notice => t('controller.successfully_updated', :model => t('activerecord.models.checkout')) }
|
116
|
+
format.json { head :no_content }
|
118
117
|
else
|
119
118
|
format.html { render :action => "edit" }
|
120
119
|
format.json { render :json => @checkout.errors, :status => :unprocessable_entity }
|
@@ -130,9 +129,8 @@ class CheckoutsController < ApplicationController
|
|
130
129
|
@checkout.save!
|
131
130
|
|
132
131
|
respond_to do |format|
|
133
|
-
|
134
|
-
format.
|
135
|
-
format.json { head :ok }
|
132
|
+
format.html { redirect_to user_checkouts_url(user), :notice => t('controller.successfully_deleted', :model => t('activerecord.models.checkout')) }
|
133
|
+
format.json { head :no_content }
|
136
134
|
end
|
137
135
|
end
|
138
136
|
end
|
@@ -50,7 +50,7 @@ class ItemHasUseRestrictionsController < ApplicationController
|
|
50
50
|
respond_to do |format|
|
51
51
|
if @item_has_use_restriction.save
|
52
52
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.item_has_use_restriction'))
|
53
|
-
format.html { redirect_to
|
53
|
+
format.html { redirect_to @item_has_use_restriction }
|
54
54
|
format.json { render :json => @item_has_use_restriction, :status => :created, :location => @item_has_use_restriction }
|
55
55
|
else
|
56
56
|
@use_restrictions = UseRestriction.all
|
@@ -66,8 +66,8 @@ class ItemHasUseRestrictionsController < ApplicationController
|
|
66
66
|
respond_to do |format|
|
67
67
|
if @item_has_use_restriction.update_attributes(params[:item_has_use_restriction])
|
68
68
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.item_has_use_restriction'))
|
69
|
-
format.html { redirect_to
|
70
|
-
format.json { head :
|
69
|
+
format.html { redirect_to @item_has_use_restriction }
|
70
|
+
format.json { head :no_content }
|
71
71
|
else
|
72
72
|
@use_restrictions = UseRestriction.all
|
73
73
|
format.html { render :action => "edit" }
|
@@ -82,8 +82,8 @@ class ItemHasUseRestrictionsController < ApplicationController
|
|
82
82
|
@item_has_use_restriction.destroy
|
83
83
|
|
84
84
|
respond_to do |format|
|
85
|
-
format.html { redirect_to
|
86
|
-
format.json { head :
|
85
|
+
format.html { redirect_to item_has_use_restrictions_url }
|
86
|
+
format.json { head :no_content }
|
87
87
|
end
|
88
88
|
end
|
89
89
|
end
|
@@ -49,7 +49,7 @@ class ManifestationCheckoutStatsController < ApplicationController
|
|
49
49
|
respond_to do |format|
|
50
50
|
if @manifestation_checkout_stat.save
|
51
51
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.manifestation_checkout_stat'))
|
52
|
-
format.html { redirect_to
|
52
|
+
format.html { redirect_to @manifestation_checkout_stat }
|
53
53
|
format.json { render :json => @manifestation_checkout_stat, :status => :created, :location => @manifestation_checkout_stat }
|
54
54
|
else
|
55
55
|
format.html { render :action => "new" }
|
@@ -64,8 +64,8 @@ class ManifestationCheckoutStatsController < ApplicationController
|
|
64
64
|
respond_to do |format|
|
65
65
|
if @manifestation_checkout_stat.update_attributes(params[:manifestation_checkout_stat])
|
66
66
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.manifestation_checkout_stat'))
|
67
|
-
format.html { redirect_to
|
68
|
-
format.json { head :
|
67
|
+
format.html { redirect_to @manifestation_checkout_stat }
|
68
|
+
format.json { head :no_content }
|
69
69
|
else
|
70
70
|
format.html { render :action => "edit" }
|
71
71
|
format.json { render :json => @manifestation_checkout_stat.errors, :status => :unprocessable_entity }
|
@@ -79,8 +79,8 @@ class ManifestationCheckoutStatsController < ApplicationController
|
|
79
79
|
@manifestation_checkout_stat.destroy
|
80
80
|
|
81
81
|
respond_to do |format|
|
82
|
-
format.html { redirect_to
|
83
|
-
format.json { head :
|
82
|
+
format.html { redirect_to manifestation_checkout_stats_url }
|
83
|
+
format.json { head :no_content }
|
84
84
|
end
|
85
85
|
end
|
86
86
|
end
|
@@ -49,7 +49,7 @@ class ManifestationReserveStatsController < ApplicationController
|
|
49
49
|
respond_to do |format|
|
50
50
|
if @manifestation_reserve_stat.save
|
51
51
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.manifestation_reserve_stat'))
|
52
|
-
format.html { redirect_to
|
52
|
+
format.html { redirect_to @manifestation_reserve_stat }
|
53
53
|
format.json { render :json => @manifestation_reserve_stat, :status => :created, :location => @manifestation_reserve_stat }
|
54
54
|
else
|
55
55
|
format.html { render :action => "new" }
|
@@ -64,8 +64,8 @@ class ManifestationReserveStatsController < ApplicationController
|
|
64
64
|
respond_to do |format|
|
65
65
|
if @manifestation_reserve_stat.update_attributes(params[:manifestation_reserve_stat])
|
66
66
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.manifestation_reserve_stat'))
|
67
|
-
format.html { redirect_to
|
68
|
-
format.json { head :
|
67
|
+
format.html { redirect_to @manifestation_reserve_stat }
|
68
|
+
format.json { head :no_content }
|
69
69
|
else
|
70
70
|
format.html { render :action => "edit" }
|
71
71
|
format.json { render :json => @manifestation_reserve_stat.errors, :status => :unprocessable_entity }
|
@@ -79,8 +79,8 @@ class ManifestationReserveStatsController < ApplicationController
|
|
79
79
|
@manifestation_reserve_stat.destroy
|
80
80
|
|
81
81
|
respond_to do |format|
|
82
|
-
format.html { redirect_to
|
83
|
-
format.json { head :
|
82
|
+
format.html { redirect_to manifestation_reserve_stats_url }
|
83
|
+
format.json { head :no_content }
|
84
84
|
end
|
85
85
|
end
|
86
86
|
end
|
@@ -43,8 +43,7 @@ class ReserveStatHasManifestationsController < ApplicationController
|
|
43
43
|
|
44
44
|
respond_to do |format|
|
45
45
|
if @reserve_stat_has_manifestation.save
|
46
|
-
|
47
|
-
format.html { redirect_to(@reserve_stat_has_manifestation) }
|
46
|
+
format.html { redirect_to @reserve_stat_has_manifestation, :notice => t('controller.successfully_created', :model => t('activerecord.models.reserve_stat_has_manifestation')) }
|
48
47
|
format.json { render :json => @reserve_stat_has_manifestation, :status => :created, :location => @reserve_stat_has_manifestation }
|
49
48
|
else
|
50
49
|
format.html { render :action => "new" }
|
@@ -58,9 +57,8 @@ class ReserveStatHasManifestationsController < ApplicationController
|
|
58
57
|
def update
|
59
58
|
respond_to do |format|
|
60
59
|
if @reserve_stat_has_manifestation.update_attributes(params[:reserve_stat_has_manifestation])
|
61
|
-
|
62
|
-
format.
|
63
|
-
format.json { head :ok }
|
60
|
+
format.html { redirect_to @reserve_stat_has_manifestation, :notice => t('controller.successfully_updated', :model => t('activerecord.models.reserve_stat_has_manifestation')) }
|
61
|
+
format.json { head :no_content }
|
64
62
|
else
|
65
63
|
format.html { render :action => "edit" }
|
66
64
|
format.json { render :json => @reserve_stat_has_manifestation.errors, :status => :unprocessable_entity }
|
@@ -74,8 +72,8 @@ class ReserveStatHasManifestationsController < ApplicationController
|
|
74
72
|
@reserve_stat_has_manifestation.destroy
|
75
73
|
|
76
74
|
respond_to do |format|
|
77
|
-
format.html { redirect_to
|
78
|
-
format.json { head :
|
75
|
+
format.html { redirect_to reserve_stat_has_manifestations_url }
|
76
|
+
format.json { head :no_content }
|
79
77
|
end
|
80
78
|
end
|
81
79
|
end
|
@@ -44,7 +44,7 @@ class ReserveStatHasUsersController < ApplicationController
|
|
44
44
|
respond_to do |format|
|
45
45
|
if @reserve_stat_has_user.save
|
46
46
|
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.reserve_stat_has_user'))
|
47
|
-
format.html { redirect_to
|
47
|
+
format.html { redirect_to @reserve_stat_has_user }
|
48
48
|
format.json { render :json => @reserve_stat_has_user, :status => :created, :location => @reserve_stat_has_user }
|
49
49
|
else
|
50
50
|
format.html { render :action => "new" }
|
@@ -59,8 +59,8 @@ class ReserveStatHasUsersController < ApplicationController
|
|
59
59
|
respond_to do |format|
|
60
60
|
if @reserve_stat_has_user.update_attributes(params[:reserve_stat_has_user])
|
61
61
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.reserve_stat_has_user'))
|
62
|
-
format.html { redirect_to
|
63
|
-
format.json { head :
|
62
|
+
format.html { redirect_to @reserve_stat_has_user }
|
63
|
+
format.json { head :no_content }
|
64
64
|
else
|
65
65
|
format.html { render :action => "edit" }
|
66
66
|
format.json { render :json => @reserve_stat_has_user.errors, :status => :unprocessable_entity }
|
@@ -75,7 +75,7 @@ class ReserveStatHasUsersController < ApplicationController
|
|
75
75
|
|
76
76
|
respond_to do |format|
|
77
77
|
format.html { redirect_to(reserve_stat_has_users_url) }
|
78
|
-
format.json { head :
|
78
|
+
format.json { head :no_content }
|
79
79
|
end
|
80
80
|
end
|
81
81
|
end
|
@@ -3,7 +3,7 @@ class ReservesController < ApplicationController
|
|
3
3
|
before_filter :store_location, :only => :index
|
4
4
|
load_and_authorize_resource :except => :index
|
5
5
|
authorize_resource :only => :index
|
6
|
-
before_filter :
|
6
|
+
before_filter :get_user, :only => [:index, :new]
|
7
7
|
before_filter :store_page
|
8
8
|
helper_method :get_manifestation
|
9
9
|
helper_method :get_item
|
@@ -42,7 +42,7 @@ class ReservesController < ApplicationController
|
|
42
42
|
|
43
43
|
respond_to do |format|
|
44
44
|
format.html # index.rhtml
|
45
|
-
format.json { render :json => @reserves
|
45
|
+
format.json { render :json => @reserves }
|
46
46
|
format.rss { render :layout => false }
|
47
47
|
format.atom
|
48
48
|
format.csv
|
@@ -54,7 +54,7 @@ class ReservesController < ApplicationController
|
|
54
54
|
def show
|
55
55
|
respond_to do |format|
|
56
56
|
format.html # show.rhtml
|
57
|
-
format.json { render :json => @reserve
|
57
|
+
format.json { render :json => @reserve }
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
@@ -94,7 +94,7 @@ class ReservesController < ApplicationController
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
# GET /reserves/1
|
97
|
+
# GET /reserves/1/edit
|
98
98
|
def edit
|
99
99
|
end
|
100
100
|
|
@@ -126,9 +126,8 @@ class ReservesController < ApplicationController
|
|
126
126
|
if @reserve.save
|
127
127
|
@reserve.send_message('accepted')
|
128
128
|
|
129
|
-
flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.reserve'))
|
130
129
|
#format.html { redirect_to reserve_url(@reserve) }
|
131
|
-
format.html { redirect_to
|
130
|
+
format.html { redirect_to @reserve, :notice => t('controller.successfully_created', :model => t('activerecord.models.reserve')) }
|
132
131
|
format.json { render :json => @reserve, :status => :created, :location => reserve_url(@reserve) }
|
133
132
|
else
|
134
133
|
format.html { render :action => "new" }
|
@@ -168,8 +167,8 @@ class ReservesController < ApplicationController
|
|
168
167
|
else
|
169
168
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.reserve'))
|
170
169
|
end
|
171
|
-
format.html { redirect_to
|
172
|
-
format.json { head :
|
170
|
+
format.html { redirect_to @reserve }
|
171
|
+
format.json { head :no_content }
|
173
172
|
else
|
174
173
|
format.html { render :action => "edit" }
|
175
174
|
format.json { render :json => @reserve.errors, :status => :unprocessable_entity }
|
@@ -193,9 +192,8 @@ class ReservesController < ApplicationController
|
|
193
192
|
end
|
194
193
|
|
195
194
|
respond_to do |format|
|
196
|
-
|
197
|
-
format.
|
198
|
-
format.json { head :ok }
|
195
|
+
format.html { redirect_to reserves_url, :notice => t('controller.successfully_deleted', :model => t('activerecord.models.reserve')) }
|
196
|
+
format.json { head :no_content }
|
199
197
|
end
|
200
198
|
end
|
201
199
|
end
|
@@ -48,8 +48,7 @@ class UserCheckoutStatsController < ApplicationController
|
|
48
48
|
|
49
49
|
respond_to do |format|
|
50
50
|
if @user_checkout_stat.save
|
51
|
-
|
52
|
-
format.html { redirect_to(@user_checkout_stat) }
|
51
|
+
format.html { redirect_to @user_checkout_stat, :notice => t('controller.successfully_created', :model => t('activerecord.models.user_checkout_stat')) }
|
53
52
|
format.json { render :json => @user_checkout_stat, :status => :created, :location => @user_checkout_stat }
|
54
53
|
else
|
55
54
|
format.html { render :action => "new" }
|
@@ -63,9 +62,8 @@ class UserCheckoutStatsController < ApplicationController
|
|
63
62
|
def update
|
64
63
|
respond_to do |format|
|
65
64
|
if @user_checkout_stat.update_attributes(params[:user_checkout_stat])
|
66
|
-
|
67
|
-
format.
|
68
|
-
format.json { head :ok }
|
65
|
+
format.html { redirect_to @user_checkout_stat, :notice => t('controller.successfully_updated', :model => t('activerecord.models.user_checkout_stat')) }
|
66
|
+
format.json { head :no_content }
|
69
67
|
else
|
70
68
|
format.html { render :action => "edit" }
|
71
69
|
format.json { render :json => @user_checkout_stat.errors, :status => :unprocessable_entity }
|
@@ -79,8 +77,8 @@ class UserCheckoutStatsController < ApplicationController
|
|
79
77
|
@user_checkout_stat.destroy
|
80
78
|
|
81
79
|
respond_to do |format|
|
82
|
-
format.html { redirect_to
|
83
|
-
format.json { head :
|
80
|
+
format.html { redirect_to user_checkout_stats_url }
|
81
|
+
format.json { head :no_content }
|
84
82
|
end
|
85
83
|
end
|
86
84
|
end
|
@@ -65,8 +65,8 @@ class UserGroupHasCheckoutTypesController < ApplicationController
|
|
65
65
|
respond_to do |format|
|
66
66
|
if @user_group_has_checkout_type.update_attributes(params[:user_group_has_checkout_type])
|
67
67
|
flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.user_group_has_checkout_type'))
|
68
|
-
format.html { redirect_to
|
69
|
-
format.json { head :
|
68
|
+
format.html { redirect_to @user_group_has_checkout_type }
|
69
|
+
format.json { head :no_content }
|
70
70
|
else
|
71
71
|
prepare_options
|
72
72
|
format.html { render :action => "edit" }
|
@@ -81,8 +81,8 @@ class UserGroupHasCheckoutTypesController < ApplicationController
|
|
81
81
|
@user_group_has_checkout_type.destroy
|
82
82
|
|
83
83
|
respond_to do |format|
|
84
|
-
format.html { redirect_to
|
85
|
-
format.json { head :
|
84
|
+
format.html { redirect_to user_group_has_checkout_types_url }
|
85
|
+
format.json { head :no_content }
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -48,8 +48,7 @@ class UserReserveStatsController < ApplicationController
|
|
48
48
|
|
49
49
|
respond_to do |format|
|
50
50
|
if @user_reserve_stat.save
|
51
|
-
|
52
|
-
format.html { redirect_to(@user_reserve_stat) }
|
51
|
+
format.html { redirect_to @user_reserve_stat, :notice => t('controller.successfully_created', :model => t('activerecord.models.user_reserve_stat')) }
|
53
52
|
format.json { render :json => @user_reserve_stat, :status => :created, :location => @user_reserve_stat }
|
54
53
|
else
|
55
54
|
format.html { render :action => "new" }
|
@@ -63,9 +62,8 @@ class UserReserveStatsController < ApplicationController
|
|
63
62
|
def update
|
64
63
|
respond_to do |format|
|
65
64
|
if @user_reserve_stat.update_attributes(params[:user_reserve_stat])
|
66
|
-
|
67
|
-
format.
|
68
|
-
format.json { head :ok }
|
65
|
+
format.html { redirect_to @user_reserve_stat, :notice => t('controller.successfully_updated', :model => t('activerecord.models.user_reserve_stat')) }
|
66
|
+
format.json { head :no_content }
|
69
67
|
else
|
70
68
|
format.html { render :action => "edit" }
|
71
69
|
format.json { render :json => @user_reserve_stat.errors, :status => :unprocessable_entity }
|
@@ -79,8 +77,8 @@ class UserReserveStatsController < ApplicationController
|
|
79
77
|
@user_reserve_stat.destroy
|
80
78
|
|
81
79
|
respond_to do |format|
|
82
|
-
format.html { redirect_to
|
83
|
-
format.json { head :
|
80
|
+
format.html { redirect_to user_reserve_stats_url }
|
81
|
+
format.json { head :no_content }
|
84
82
|
end
|
85
83
|
end
|
86
84
|
end
|
data/app/models/checkout.rb
CHANGED
@@ -15,10 +15,13 @@ class UserGroupHasCheckoutType < ActiveRecord::Base
|
|
15
15
|
|
16
16
|
def create_lending_policy
|
17
17
|
self.checkout_type.items.find_each do |item|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
policy = LendingPolicy.where(:item_id => item.id, :user_group_id => user_group_id).select(:id).first
|
19
|
+
unless policy
|
20
|
+
sql = ['INSERT INTO lending_policies (item_id, user_group_id, loan_period, renewal, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?)', item.id, user_group_id, checkout_period, checkout_renewal_limit, Time.zone.now, Time.zone.now]
|
21
|
+
ActiveRecord::Base.connection.execute(
|
22
|
+
self.class.send(:sanitize_sql_array, sql)
|
23
|
+
)
|
24
|
+
end
|
22
25
|
end
|
23
26
|
end
|
24
27
|
|
@@ -12,8 +12,7 @@ class CreateLendingPolicies < ActiveRecord::Migration
|
|
12
12
|
|
13
13
|
t.timestamps
|
14
14
|
end
|
15
|
-
add_index :lending_policies, :item_id
|
16
|
-
add_index :lending_policies, :user_group_id
|
15
|
+
add_index :lending_policies, [:item_id, :user_group_id], :unique => true
|
17
16
|
end
|
18
17
|
|
19
18
|
def self.down
|
@@ -40,9 +40,8 @@ class ApplicationController < ActionController::Base
|
|
40
40
|
raise CanCan::AccessDenied
|
41
41
|
end
|
42
42
|
|
43
|
-
def
|
43
|
+
def get_user
|
44
44
|
@user = User.where(:username => params[:user_id]).first if params[:user_id]
|
45
|
-
#authorize! :show, @user if @user
|
46
45
|
end
|
47
46
|
|
48
47
|
def get_basket
|
@@ -62,6 +61,11 @@ class ApplicationController < ActionController::Base
|
|
62
61
|
@user_group = UserGroup.find(params[:user_group_id]) if params[:user_group_id]
|
63
62
|
end
|
64
63
|
|
64
|
+
def get_item
|
65
|
+
@item = Item.find(params[:item_id]) if params[:item_id]
|
66
|
+
authorize! :show, @item if @item
|
67
|
+
end
|
68
|
+
|
65
69
|
def set_locale
|
66
70
|
if params[:locale]
|
67
71
|
unless I18n.available_locales.include?(params[:locale].to_s.intern)
|
@@ -26,6 +26,7 @@ class Item < ActiveRecord::Base
|
|
26
26
|
integer :circulation_status_id
|
27
27
|
end
|
28
28
|
attr_accessor :use_restriction_id
|
29
|
+
attr_accessor :library_id, :manifestation_id
|
29
30
|
|
30
31
|
def set_circulation_status
|
31
32
|
self.circulation_status = CirculationStatus.where(:name => 'In Process').first if self.circulation_status.nil?
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -254,8 +254,7 @@ ActiveRecord::Schema.define(:version => 20120224094141) do
|
|
254
254
|
t.datetime "updated_at", :null => false
|
255
255
|
end
|
256
256
|
|
257
|
-
add_index "lending_policies", ["item_id"], :name => "
|
258
|
-
add_index "lending_policies", ["user_group_id"], :name => "index_lending_policies_on_user_group_id"
|
257
|
+
add_index "lending_policies", ["item_id", "user_group_id"], :name => "index_lending_policies_on_item_id_and_user_group_id", :unique => true
|
259
258
|
|
260
259
|
create_table "libraries", :force => true do |t|
|
261
260
|
t.integer "patron_id"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
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.14
|
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-
|
12
|
+
date: 2012-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70124183652540 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70124183652540
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: simple_form
|
27
|
-
requirement: &
|
27
|
+
requirement: &70124183652120 !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: *70124183652120
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: devise
|
38
|
-
requirement: &
|
38
|
+
requirement: &70124183651620 !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: *70124183651620
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: cancan
|
49
|
-
requirement: &
|
49
|
+
requirement: &70124183651200 !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: *70124183651200
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: validates_timeliness
|
60
|
-
requirement: &
|
60
|
+
requirement: &70124183650780 !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: *70124183650780
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: attribute_normalizer
|
71
|
-
requirement: &
|
71
|
+
requirement: &70124183699380 !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: *70124183699380
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: inherited_resources
|
82
|
-
requirement: &
|
82
|
+
requirement: &70124183698840 !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: *70124183698840
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: state_machine
|
93
|
-
requirement: &
|
93
|
+
requirement: &70124183698260 !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: *70124183698260
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: friendly_id
|
104
|
-
requirement: &
|
104
|
+
requirement: &70124183697680 !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: *70124183697680
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: sunspot_rails
|
115
|
-
requirement: &
|
115
|
+
requirement: &70124183697080 !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: *70124183697080
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: sunspot_solr
|
126
|
-
requirement: &
|
126
|
+
requirement: &70124183696280 !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: *70124183696280
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: will_paginate
|
137
|
-
requirement: &
|
137
|
+
requirement: &70124183695580 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ~>
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: '3.0'
|
143
143
|
type: :runtime
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70124183695580
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: acts_as_list
|
148
|
-
requirement: &
|
148
|
+
requirement: &70124183694220 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ~>
|
@@ -153,10 +153,10 @@ dependencies:
|
|
153
153
|
version: 0.1.5
|
154
154
|
type: :runtime
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *70124183694220
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: enju_message
|
159
|
-
requirement: &
|
159
|
+
requirement: &70124183693380 !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|
162
162
|
- - ~>
|
@@ -164,10 +164,10 @@ dependencies:
|
|
164
164
|
version: 0.0.10
|
165
165
|
type: :runtime
|
166
166
|
prerelease: false
|
167
|
-
version_requirements: *
|
167
|
+
version_requirements: *70124183693380
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: enju_event
|
170
|
-
requirement: &
|
170
|
+
requirement: &70124183692440 !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
173
173
|
- - ! '>='
|
@@ -175,10 +175,10 @@ dependencies:
|
|
175
175
|
version: 0.0.5
|
176
176
|
type: :runtime
|
177
177
|
prerelease: false
|
178
|
-
version_requirements: *
|
178
|
+
version_requirements: *70124183692440
|
179
179
|
- !ruby/object:Gem::Dependency
|
180
180
|
name: sqlite3
|
181
|
-
requirement: &
|
181
|
+
requirement: &70124183691500 !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: *70124183691500
|
190
190
|
- !ruby/object:Gem::Dependency
|
191
191
|
name: rspec-rails
|
192
|
-
requirement: &
|
192
|
+
requirement: &70124183688980 !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: *70124183688980
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
202
|
name: factory_girl_rails
|
203
|
-
requirement: &
|
203
|
+
requirement: &70124183687500 !ruby/object:Gem::Requirement
|
204
204
|
none: false
|
205
205
|
requirements:
|
206
206
|
- - ~>
|
@@ -208,10 +208,10 @@ dependencies:
|
|
208
208
|
version: '1.7'
|
209
209
|
type: :development
|
210
210
|
prerelease: false
|
211
|
-
version_requirements: *
|
211
|
+
version_requirements: *70124183687500
|
212
212
|
- !ruby/object:Gem::Dependency
|
213
213
|
name: sunspot-rails-tester
|
214
|
-
requirement: &
|
214
|
+
requirement: &70124183686700 !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: *70124183686700
|
223
223
|
description: Circulation management for Next-L Enju
|
224
224
|
email:
|
225
225
|
- tanabe@mwr.mediacom.keio.ac.jp
|
@@ -500,7 +500,6 @@ files:
|
|
500
500
|
- spec/dummy/config/locales/ja.yml
|
501
501
|
- spec/dummy/config/routes.rb
|
502
502
|
- spec/dummy/config.ru
|
503
|
-
- spec/dummy/db/development.sqlite3
|
504
503
|
- spec/dummy/db/migrate/001_create_patrons.rb
|
505
504
|
- spec/dummy/db/migrate/005_create_manifestations.rb
|
506
505
|
- spec/dummy/db/migrate/006_create_items.rb
|
@@ -555,12 +554,16 @@ files:
|
|
555
554
|
- spec/factories/checkout_stat_has_manifestation.rb
|
556
555
|
- spec/factories/checkout_stat_has_user.rb
|
557
556
|
- spec/factories/checkout_type.rb
|
557
|
+
- spec/factories/item.rb
|
558
|
+
- spec/factories/item_has_use_restriction.rb
|
559
|
+
- spec/factories/lending_policy.rb
|
558
560
|
- spec/factories/manifestation.rb
|
559
561
|
- spec/factories/manifestation_checkout_stat.rb
|
560
562
|
- spec/factories/manifestation_reserve_stat.rb
|
561
563
|
- spec/factories/reserve.rb
|
562
564
|
- spec/factories/reserve_stat_has_manifestation.rb
|
563
565
|
- spec/factories/reserve_stat_has_user.rb
|
566
|
+
- spec/factories/use_restriction.rb
|
564
567
|
- spec/factories/user.rb
|
565
568
|
- spec/factories/user_checkout_stat.rb
|
566
569
|
- spec/factories/user_group.rb
|
@@ -722,7 +725,6 @@ test_files:
|
|
722
725
|
- spec/dummy/config/locales/ja.yml
|
723
726
|
- spec/dummy/config/routes.rb
|
724
727
|
- spec/dummy/config.ru
|
725
|
-
- spec/dummy/db/development.sqlite3
|
726
728
|
- spec/dummy/db/migrate/001_create_patrons.rb
|
727
729
|
- spec/dummy/db/migrate/005_create_manifestations.rb
|
728
730
|
- spec/dummy/db/migrate/006_create_items.rb
|
@@ -777,12 +779,16 @@ test_files:
|
|
777
779
|
- spec/factories/checkout_stat_has_manifestation.rb
|
778
780
|
- spec/factories/checkout_stat_has_user.rb
|
779
781
|
- spec/factories/checkout_type.rb
|
782
|
+
- spec/factories/item.rb
|
783
|
+
- spec/factories/item_has_use_restriction.rb
|
784
|
+
- spec/factories/lending_policy.rb
|
780
785
|
- spec/factories/manifestation.rb
|
781
786
|
- spec/factories/manifestation_checkout_stat.rb
|
782
787
|
- spec/factories/manifestation_reserve_stat.rb
|
783
788
|
- spec/factories/reserve.rb
|
784
789
|
- spec/factories/reserve_stat_has_manifestation.rb
|
785
790
|
- spec/factories/reserve_stat_has_user.rb
|
791
|
+
- spec/factories/use_restriction.rb
|
786
792
|
- spec/factories/user.rb
|
787
793
|
- spec/factories/user_checkout_stat.rb
|
788
794
|
- spec/factories/user_group.rb
|
@@ -850,3 +856,4 @@ test_files:
|
|
850
856
|
- spec/spec_helper.rb
|
851
857
|
- spec/support/controller_macros.rb
|
852
858
|
- spec/support/devise.rb
|
859
|
+
has_rdoc:
|
File without changes
|