enju_biblio 0.3.14 → 0.3.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '088d27a989a71a9301fd1946a90d8c790720b2ecffa02bc2eef9d3a9c05a31bb'
4
- data.tar.gz: b946f1cd533e99b47cb6a799a3d0f167b597d6291ee864372354037dfc3ad050
3
+ metadata.gz: 660c814a7986218b1d0596fabc0a69380ef45868369876cab23146320cd23a7d
4
+ data.tar.gz: 7877f67fa317d44207e4dd6f03bfc15b4d50b92732079b21bb96c638c85fb10f
5
5
  SHA512:
6
- metadata.gz: 5815c72d545147d3048239c9c52749a1239ff73e06aa2fbc8e37014d8272b8d87b9dcd7c260b321512fd7bbc47d1383548abddff5bbfb5431c7f78aa7335cad4
7
- data.tar.gz: b4da9e3a16f2a498cd8b70478422fb37dd511a69cb3bb94252d53c3c7df9e2876006c45a843915d594424350eac2f0f41ae567107d04aa60f812f59656d658d2
6
+ metadata.gz: 8595968e7ada885d7d36691b4f250f3ecbe5bb03240317ab54e59da82cd13defe25f3cc04098fc6c315d8413bfc498eb91a0718118085bacaca62e727ae09ed4
7
+ data.tar.gz: 580969dc61c3aacbdacd8e0e062c88edd7467abe768c361852d296d82b39ef386d1b70df4b5302bd45175b8c10f6206563f4dac843526295d2a2ccaa008b4ac2
@@ -14,6 +14,10 @@ class Identifier < ApplicationRecord
14
14
  acts_as_list scope: :manifestation_id
15
15
  strip_attributes only: :body
16
16
 
17
+ after_destroy do
18
+ manifestation&.touch
19
+ end
20
+
17
21
  def check_identifier
18
22
  case identifier_type.try(:name)
19
23
  when 'isbn'
data/app/models/item.rb CHANGED
@@ -19,7 +19,7 @@ class Item < ApplicationRecord
19
19
  belongs_to :budget_type, optional: true
20
20
  has_one :accept, dependent: :destroy
21
21
  has_one :withdraw, dependent: :destroy
22
- has_many :item_custom_values, -> { joins(:item_custom_property).order(:position) }
22
+ has_many :item_custom_values, -> { joins(:item_custom_property).order(:position) }, dependent: :destroy
23
23
 
24
24
  belongs_to :shelf, counter_cache: true
25
25
  accepts_nested_attributes_for :item_custom_values, reject_if: :all_blank
@@ -109,6 +109,7 @@ class Item < ApplicationRecord
109
109
  item_identifier: item_identifier,
110
110
  binding_item_identifier: binding_item_identifier,
111
111
  call_number: call_number,
112
+ library: shelf&.library&.name,
112
113
  shelf: shelf&.name,
113
114
  item_note: note,
114
115
  accepted_at: accept&.created_at,
@@ -25,7 +25,7 @@ class Manifestation < ApplicationRecord
25
25
  belongs_to :required_role, class_name: 'Role', foreign_key: 'required_role_id'
26
26
  has_one :resource_import_result
27
27
  has_many :identifiers, dependent: :destroy
28
- has_many :manifestation_custom_values, -> { joins(:manifestation_custom_property).order(:position) }
28
+ has_many :manifestation_custom_values, -> { joins(:manifestation_custom_property).order(:position) }, dependent: :destroy
29
29
  accepts_nested_attributes_for :creators, allow_destroy: true, reject_if: :all_blank
30
30
  accepts_nested_attributes_for :contributors, allow_destroy: true, reject_if: :all_blank
31
31
  accepts_nested_attributes_for :publishers, allow_destroy: true, reject_if: :all_blank
@@ -584,7 +584,7 @@ class Manifestation < ApplicationRecord
584
584
  height: height,
585
585
  width: width,
586
586
  depth: depth,
587
- price: price,
587
+ manifestation_price: price,
588
588
  access_address: access_address,
589
589
  manifestation_required_role: required_role.name,
590
590
  abstract: abstract,
@@ -1,3 +1,3 @@
1
1
  module EnjuBiblio
2
- VERSION = "0.3.14".freeze
2
+ VERSION = "0.3.15".freeze
3
3
  end
@@ -4,7 +4,7 @@ manifestation_00001:
4
4
  language_id: 1
5
5
  updated_at: 2007-11-19 16:59:00.293393 +09:00
6
6
  original_title: "よくわかる最新Webサービス技術の基本と仕組み : 標準Webシステム技術とeコマース基盤技術入門"
7
- price:
7
+ price: 1980
8
8
  manifestation_identifier: 00001
9
9
  depth:
10
10
  date_of_publication:
@@ -160,6 +160,10 @@ describe Manifestation, solr: true do
160
160
  csv["dimensions"].compact.should_not be_empty
161
161
  csv["manifestation_memo"].compact.should be_empty
162
162
  csv["item_memo"].compact.should be_empty
163
+ expect(csv["manifestation_price"].compact.first).to eq "1980"
164
+ expect(csv["item_price"].compact.first).to eq nil
165
+ expect(csv["library"].compact.first).to eq "web"
166
+ expect(csv["shelf"].compact.first).to eq "web"
163
167
  end
164
168
 
165
169
  it "should export edition fields" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_biblio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.14
4
+ version: 0.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-19 00:00:00.000000000 Z
11
+ date: 2022-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_library
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.9
19
+ version: 0.3.11
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.9
26
+ version: 0.3.11
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: marc
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -128,56 +128,56 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.3.5
131
+ version: 1.3.6
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.3.5
138
+ version: 1.3.6
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: enju_subject
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.3.2
145
+ version: 0.3.4
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.3.2
152
+ version: 0.3.4
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: enju_inventory
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.3.0
159
+ version: 0.3.1
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.3.0
166
+ version: 0.3.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: enju_bookmark
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 0.3.1
173
+ version: 0.3.2
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 0.3.1
180
+ version: 0.3.2
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: enju_message
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -212,28 +212,28 @@ dependencies:
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: 0.3.2
215
+ version: 0.3.3
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: 0.3.2
222
+ version: 0.3.3
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: enju_oai
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: 0.3.0
229
+ version: 0.3.1
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: 0.3.0
236
+ version: 0.3.1
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: sqlite3
239
239
  requirement: !ruby/object:Gem::Requirement