elibri_onix_dict 0.0.67 → 0.0.78

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elibri_onix_dict/cover_type.rb +7 -3
  3. data/lib/elibri_onix_dict/cover_types.yml +11 -11
  4. data/lib/elibri_onix_dict/onix_3_0/base.rb +18 -6
  5. data/lib/elibri_onix_dict/onix_3_0/serialized/EpubLicenseExpressionType.yml +8 -0
  6. data/lib/elibri_onix_dict/onix_3_0/serialized/EpubTechnicalProtection.yml +1 -15
  7. data/lib/elibri_onix_dict/onix_3_0/serialized/ExtentUnit.yml +8 -1
  8. data/lib/elibri_onix_dict/onix_3_0/serialized/LanguageCode.yml +60 -55
  9. data/lib/elibri_onix_dict/onix_3_0/serialized/NameIdentifier.yml +8 -0
  10. data/lib/elibri_onix_dict/onix_3_0/serialized/OtherTextType.yml +14 -0
  11. data/lib/elibri_onix_dict/onix_3_0/serialized/PriceTypeCode.yml +0 -7
  12. data/lib/elibri_onix_dict/onix_3_0/serialized/ProductClassificationType.yml +8 -1
  13. data/lib/elibri_onix_dict/onix_3_0/serialized/ProductFormCode.yml +10 -0
  14. data/lib/elibri_onix_dict/onix_3_0/serialized/ProductIDType.yml +6 -0
  15. data/lib/elibri_onix_dict/onix_3_0/serialized/ProductRelationType.yml +1 -8
  16. data/lib/elibri_onix_dict/onix_3_0/serialized/ResourceFileFeatureType.yml +15 -0
  17. data/lib/elibri_onix_dict/onix_3_0/serialized/ResourceIDType.yml +8 -0
  18. data/lib/elibri_onix_dict/onix_3_0/serialized/SubjectSchemeIdentifier.yml +8 -0
  19. data/lib/elibri_onix_dict/onix_3_0/serialized/SupplierRole.yml +7 -17
  20. data/lib/elibri_onix_dict/onix_3_0/serialized/UnpricedItemType.yml +8 -0
  21. data/lib/elibri_onix_dict/onix_3_0/serialized/WebsiteRole.yml +25 -0
  22. data/lib/elibri_onix_dict/version.rb +1 -1
  23. data/test/elibri_onix_dict_release_3_0_test.rb +6 -2
  24. data/test/product_cover_type_test.rb +16 -16
  25. metadata +8 -7
  26. data/lib/elibri_onix_dict/onix_3_0/serialized/ContentSourceType.yml +0 -29
  27. data/lib/elibri_onix_dict/onix_3_0/serialized/EpubUsageStatus.yml +0 -23
  28. data/lib/elibri_onix_dict/onix_3_0/serialized/EpubUsageType.yml +0 -8
  29. data/lib/elibri_onix_dict/onix_3_0/serialized/EpubUsageUnit.yml +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 708a06ad0d078aa784707204e3021ae405d65a7d99dbd7f6f1e0889d15825d4c
4
- data.tar.gz: 4e0d93304b80c1d183ede4b08833f676e47f4a4ae414d577aeb0a66e61a56a93
3
+ metadata.gz: 8696315a350a2cc53d74e9f0656db5165bfeb1a5e692a9ababff74caeadb563f
4
+ data.tar.gz: 2b797c34277ad2aef755fa877c9978ef93c4898f0bb51d5adcac846e81bab7b1
5
5
  SHA512:
6
- metadata.gz: 675761b2083176c77a5fb77a095954b584393ec23bc4d054063edbb07dccc170ad44e2fe65728a9e0455cb48a2e5278bf7638e95bf27cb472ce2bdc46a016c11
7
- data.tar.gz: 2cbf8ffd3cfa46c91649dad2e4668129ba7b0e10b7d64e6e426916f48e60b7d6eef752608f0403427fa1a9c54d7ef9446eb3f3b6b54d26bd0b3efcbd94112d53
6
+ metadata.gz: c8dc05e97d8acff2891c824e903d1712421072c333fd02ffdd66108f5444460b00647fcbc2b3377915c7019613f6ccb4700c2dd6fe147d7eaef88c896e8ce439
7
+ data.tar.gz: 40a4af433d342030369ff2ec0bd00b3b480876908d3ffc2cec10e88aadfe25193ed3241595d050b8c49eb89072994b10793dc9804c3f2d5507bbe9039af6fff0
@@ -8,23 +8,27 @@ module Elibri
8
8
 
9
9
  # id to wartość jaka będzie zapisana w polu cover_type_id dla produktu.
10
10
  # name to nazwa w obrębie Elibri
11
- attr_reader :id, :name, :product_form, :product_form_detail
11
+ attr_reader :id, :key, :product_form, :product_form_detail
12
12
 
13
13
 
14
14
  conf = File.expand_path(File.join(File.dirname(__FILE__), "cover_types.yml"))
15
- ALL = YAML::load_file(conf).sort_by(&:name)
15
+ ALL = YAML::load_file(conf)
16
16
 
17
17
  HARDBACK = 8
18
18
  PLASTIC = 6
19
19
  PAPERBACK = 4
20
20
 
21
+ def name
22
+ I18n::t("products.cover_type.#{key}")
23
+ end
24
+
21
25
  def self.find(cover_type_id)
22
26
  self.all.find {|cover_type| cover_type.id == cover_type_id }
23
27
  end
24
28
 
25
29
  def self.determine_cover_type(product_form, product_form_detail)
26
30
  matching_cover = all.find { |cover| cover.product_form == product_form && cover.product_form_detail == product_form_detail }
27
- matching_cover.name if matching_cover
31
+ I18n::t("products.cover_type.#{matching_cover.key}") if matching_cover
28
32
  end
29
33
 
30
34
  # Znajdź w słowniku typ okładki, którego nazwa jest najbardziej podobna do podanego stringu.
@@ -1,47 +1,47 @@
1
1
 
2
- ---
2
+ ---
3
3
  - !ruby/object:Elibri::ONIX::Dict::CoverType
4
4
  id: 1
5
- name: gąbka
5
+ key: foam
6
6
  product_form: BP
7
- product_form_detail:
7
+ product_form_detail:
8
8
  - !ruby/object:Elibri::ONIX::Dict::CoverType
9
9
  id: 4
10
- name: miękka
10
+ key: paperback
11
11
  product_form: BC
12
12
  product_form_detail:
13
13
  - !ruby/object:Elibri::ONIX::Dict::CoverType
14
14
  id: 5
15
- name: miękka ze skrzydełkami
15
+ key: paperback_with_flaps
16
16
  product_form: BC
17
17
  product_form_detail: B504
18
18
  - !ruby/object:Elibri::ONIX::Dict::CoverType
19
19
  id: 6
20
- name: plastikowa
20
+ key: plastic
21
21
  product_form: BB
22
22
  product_form_detail: B413
23
23
  - !ruby/object:Elibri::ONIX::Dict::CoverType
24
24
  id: 7
25
- name: skórzana
25
+ key: leather
26
26
  product_form: BG
27
27
  product_form_detail:
28
28
  - !ruby/object:Elibri::ONIX::Dict::CoverType
29
29
  id: 8
30
- name: twarda
30
+ key: hardcover
31
31
  product_form: BB
32
32
  product_form_detail:
33
33
  - !ruby/object:Elibri::ONIX::Dict::CoverType
34
34
  id: 9
35
- name: twarda z obwolutą
35
+ key: hardcover_with_dust_jacket
36
36
  product_form: BB
37
37
  product_form_detail: B501
38
38
  - !ruby/object:Elibri::ONIX::Dict::CoverType
39
39
  id: 10
40
- name: twarda lakierowana
40
+ key: laminated_hardcover
41
41
  product_form: BB
42
42
  product_form_detail: B415
43
43
  - !ruby/object:Elibri::ONIX::Dict::CoverType
44
44
  id: 11
45
- name: zintegrowana
45
+ key: flexibound
46
46
  product_form: BC
47
47
  product_form_detail: B412
@@ -7,26 +7,38 @@ module Elibri
7
7
  # Klasa podstawowa dla wszystkich słowników ONIX`a
8
8
  class Base
9
9
 
10
- attr_reader :onix_code, :name, :const_name
10
+ attr_reader :onix_code, :name, :const_name, :onix_doc
11
11
 
12
12
  # ruby-1.9.2-head > dict_item.name(:en)
13
- # => "author"
13
+ # => "author"
14
14
  def name(locale = :pl)
15
15
  @name[locale.to_s]
16
16
  end
17
17
 
18
+ def onix_doc
19
+ if @onix_doc.nil?
20
+ true
21
+ else
22
+ @onix_doc
23
+ end
24
+ end
25
+
26
+ def onix_doc?
27
+ onix_doc
28
+ end
29
+
18
30
  def method_missing(method_name, *args)
19
- if args.empty?
31
+ if args.empty?
20
32
  if method_name.to_s =~ /\?$/
21
33
  mn = method_name.to_s.gsub("?", "")
22
34
  if instance_variable_defined?("@#{mn}")
23
35
  value = instance_variable_get("@#{mn}")
24
36
  if value.is_a?(TrueClass) || value.is_a?(FalseClass)
25
37
  return value
26
- end
38
+ end
27
39
  end
28
40
  elsif instance_variable_defined?("@#{method_name}")
29
- return instance_variable_get("@#{method_name}")
41
+ return instance_variable_get("@#{method_name}")
30
42
  end
31
43
  end
32
44
  super
@@ -52,7 +64,7 @@ module Elibri
52
64
  self.all.reject {|dict_item| onix_codes.include?(dict_item.onix_code) }
53
65
  end
54
66
 
55
-
67
+
56
68
  end
57
69
 
58
70
 
@@ -0,0 +1,8 @@
1
+
2
+ ---
3
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubLicenseExpressionType
4
+ onix_code: '01'
5
+ const_name: HUMAN_READABLE
6
+ name:
7
+ en: human readable
8
+ pl: ogólnodostępny dokument
@@ -1,19 +1,5 @@
1
1
 
2
- ---
3
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubTechnicalProtection
4
- onix_code: '00'
5
- const_name: NONE
6
- name:
7
- en: none
8
- pl: brak
9
-
10
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubTechnicalProtection
11
- onix_code: '01'
12
- const_name: DRM
13
- name:
14
- en: DRM
15
- pl: DRM
16
-
2
+ ---
17
3
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubTechnicalProtection
18
4
  onix_code: '02'
19
5
  const_name: WATERMARK
@@ -1,44 +1,51 @@
1
1
 
2
- ---
2
+ ---
3
3
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ExtentUnit
4
4
  onix_code: '03'
5
5
  const_name: PAGES
6
+ onix_doc: true
6
7
  name:
7
8
  en: pages
8
9
  pl: strony
9
10
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ExtentUnit
10
11
  onix_code: '05'
11
12
  const_name: MINUTES
13
+ onix_doc: true
12
14
  name:
13
15
  en: minutes
14
16
  pl: minuty
15
17
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ExtentUnit
16
18
  onix_code: '19'
17
19
  const_name: MEGABYTES
20
+ onix_doc: true
18
21
  name:
19
22
  en: megabytes
20
23
  pl: megabajty
21
24
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ExtentUnit
22
25
  onix_code: '04'
23
26
  const_name: HOURS
27
+ onix_doc: false
24
28
  name:
25
29
  en: hours
26
30
  pl: godziny
27
31
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ExtentUnit
28
32
  onix_code: '16'
29
33
  const_name: HHHMMSS
34
+ onix_doc: false
30
35
  name:
31
36
  en: Hours minutes seconds
32
37
  pl: Godziny minuty sekundy
33
38
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ExtentUnit
34
39
  onix_code: '15'
35
40
  const_name: HHHMM
41
+ onix_doc: false
36
42
  name:
37
43
  en: Hours minutes
38
44
  pl: Godziny minuty
39
45
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ExtentUnit
40
46
  onix_code: '14'
41
47
  const_name: HHH
48
+ onix_doc: false
42
49
  name:
43
50
  en: hours
44
51
  pl: godziny
@@ -1,69 +1,69 @@
1
1
 
2
- ---
2
+ ---
3
3
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
4
4
  onix_code: afr
5
5
  name:
6
- en: afrikaans
7
- pl: afrikaans
6
+ en: afrikaans
7
+ pl: afrikaans
8
8
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
9
9
  onix_code: ara
10
10
  name:
11
- en: arabic
11
+ en: arabic
12
12
  pl: arabski
13
13
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
14
14
  onix_code: arm
15
15
  name:
16
- en: Armenian
16
+ en: Armenian
17
17
  pl: armeński
18
18
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
19
19
  onix_code: aze
20
20
  name:
21
- en: Azerbaijani
22
- pl: azerbejdżański
21
+ en: Azerbaijani
22
+ pl: azerbejdżański
23
23
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
24
24
  onix_code: bel
25
25
  name:
26
- en: Belarusian
26
+ en: Belarusian
27
27
  pl: białoruski
28
28
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
29
29
  onix_code: ben
30
30
  name:
31
- en: Bengali
31
+ en: Bengali
32
32
  pl: bengalski
33
33
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
34
34
  onix_code: bos
35
35
  name:
36
- en: Bosnian
36
+ en: Bosnian
37
37
  pl: bośniacki
38
38
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
39
39
  onix_code: bul
40
40
  name:
41
- en: Bulgarian
41
+ en: Bulgarian
42
42
  pl: bułgarski
43
43
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
44
44
  onix_code: che
45
45
  name:
46
- en: Chechen
46
+ en: Chechen
47
47
  pl: czeczeński
48
48
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
49
49
  onix_code: chi
50
50
  name:
51
- en: Chinese
51
+ en: Chinese
52
52
  pl: chiński
53
53
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
54
54
  onix_code: csb
55
55
  name:
56
- en: Kashubian
56
+ en: Kashubian
57
57
  pl: kaszubski
58
58
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
59
59
  onix_code: cze
60
60
  name:
61
- en: Czech
61
+ en: Czech
62
62
  pl: czeski
63
63
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
64
64
  onix_code: dan
65
65
  name:
66
- en: Danish
66
+ en: Danish
67
67
  pl: duński
68
68
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
69
69
  onix_code: dut
@@ -73,92 +73,92 @@
73
73
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
74
74
  onix_code: egy
75
75
  name:
76
- en: Egyptian
76
+ en: Egyptian
77
77
  pl: egipski
78
78
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
79
79
  onix_code: eng
80
80
  name:
81
- en: English
81
+ en: English
82
82
  pl: angielski
83
83
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
84
84
  onix_code: epo
85
85
  name:
86
- en: Esperanto
87
- pl: Esperanto
86
+ en: Esperanto
87
+ pl: Esperanto
88
88
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
89
89
  onix_code: fin
90
90
  name:
91
- en: Finnish
91
+ en: Finnish
92
92
  pl: fiński
93
93
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
94
94
  onix_code: fre
95
95
  name:
96
- en: French
96
+ en: French
97
97
  pl: francuski
98
98
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
99
99
  onix_code: ger
100
100
  name:
101
- en: German
101
+ en: German
102
102
  pl: niemiecki
103
103
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
104
104
  onix_code: gle
105
105
  name:
106
- en: Irish
106
+ en: Irish
107
107
  pl: irlandzki
108
108
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
109
109
  onix_code: heb
110
110
  name:
111
- en: Hebrew
111
+ en: Hebrew
112
112
  pl: hebrajski
113
113
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
114
114
  onix_code: hin
115
115
  name:
116
- en: Hindi
117
- pl: hindi
116
+ en: Hindi
117
+ pl: hindi
118
118
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
119
119
  onix_code: hrv
120
120
  name:
121
- en: Croatian
121
+ en: Croatian
122
122
  pl: chorwacki
123
123
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
124
124
  onix_code: hun
125
125
  name:
126
- en: Hungarian
126
+ en: Hungarian
127
127
  pl: węgierski
128
128
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
129
129
  onix_code: ira
130
130
  name:
131
- en: Iranian languages
131
+ en: Iranian languages
132
132
  pl: irański
133
133
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
134
134
  onix_code: ita
135
135
  name:
136
- en: Italian
136
+ en: Italian
137
137
  pl: włoski
138
138
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
139
139
  onix_code: jpn
140
140
  name:
141
- en: Japanese
141
+ en: Japanese
142
142
  pl: japoński
143
143
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
144
144
  onix_code: lat
145
145
  name:
146
- en: Latin
146
+ en: Latin
147
147
  pl: łaciński
148
148
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
149
149
  onix_code: lav
150
150
  name:
151
- en: Latvian
151
+ en: Latvian
152
152
  pl: łotewski
153
153
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
154
154
  onix_code: lit
155
155
  name:
156
- en: Lithuanian
156
+ en: Lithuanian
157
157
  pl: litewski
158
158
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
159
159
  onix_code: ltz
160
160
  name:
161
- en: Luxembourgish; Letzeburgesch
161
+ en: Luxembourgish; Letzeburgesch
162
162
  pl: luksemburski
163
163
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
164
164
  onix_code: mol
@@ -168,38 +168,38 @@
168
168
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
169
169
  onix_code: mon
170
170
  name:
171
- en: Mongolian
171
+ en: Mongolian
172
172
  pl: mongolski
173
173
 
174
174
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
175
175
  onix_code: nap
176
176
  name:
177
- en: Neapolitan
177
+ en: Neapolitan
178
178
  pl: neapolitański
179
179
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
180
180
  onix_code: nep
181
181
  name:
182
- en: Nepali
182
+ en: Nepali
183
183
  pl: nepalski
184
184
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
185
185
  onix_code: nor
186
186
  name:
187
- en: Norwegian
187
+ en: Norwegian
188
188
  pl: norweski
189
189
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
190
190
  onix_code: per
191
191
  name:
192
- en: Persian
192
+ en: Persian
193
193
  pl: perski
194
194
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
195
195
  onix_code: pol
196
196
  name:
197
- en: Polish
197
+ en: Polish
198
198
  pl: polski
199
199
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
200
200
  onix_code: por
201
201
  name:
202
- en: Portuguese
202
+ en: Portuguese
203
203
  pl: portugalski
204
204
 
205
205
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
@@ -211,57 +211,57 @@
211
211
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
212
212
  onix_code: rum
213
213
  name:
214
- en: Romanian
214
+ en: Romanian
215
215
  pl: rumuński
216
216
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
217
217
  onix_code: rus
218
218
  name:
219
- en: Russian
219
+ en: Russian
220
220
  pl: rosyjski
221
221
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
222
222
  onix_code: slo
223
223
  name:
224
- en: Slovak
225
- pl: słowacki
224
+ en: Slovak
225
+ pl: słowacki
226
226
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
227
227
  onix_code: slv
228
228
  name:
229
- en: Slovenian
229
+ en: Slovenian
230
230
  pl: słoweński
231
231
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
232
232
  onix_code: spa
233
233
  name:
234
- en: Spanish
234
+ en: Spanish
235
235
  pl: hiszpański
236
236
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
237
237
  onix_code: srp
238
238
  name:
239
- en: Serbian
239
+ en: Serbian
240
240
  pl: serbski
241
241
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
242
242
  onix_code: swe
243
243
  name:
244
- en: Swedish
244
+ en: Swedish
245
245
  pl: szwedzki
246
246
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
247
247
  onix_code: syr
248
248
  name:
249
- en: Syriac
249
+ en: Syriac
250
250
  pl: syryjski
251
251
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
252
252
  onix_code: tur
253
253
  name:
254
- en: Turkish
254
+ en: Turkish
255
255
  pl: turecki
256
256
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
257
257
  onix_code: ukr
258
258
  name:
259
- en: Ukrainian
259
+ en: Ukrainian
260
260
  pl: ukraiński
261
261
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
262
262
  onix_code: vie
263
263
  name:
264
- en: Vietnamese
264
+ en: Vietnamese
265
265
  pl: wietnamski
266
266
 
267
267
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
@@ -330,3 +330,8 @@
330
330
  en: Armenian
331
331
  pl: armeński
332
332
 
333
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::LanguageCode
334
+ onix_code: san
335
+ name:
336
+ en: Sanskrit
337
+ pl: sanskryt
@@ -0,0 +1,8 @@
1
+
2
+ ---
3
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::NameIdentifier
4
+ onix_code: '21'
5
+ const_name: ORCID
6
+ name:
7
+ en: ORCID
8
+ pl: ORCID
@@ -43,3 +43,17 @@
43
43
  en: short collection description
44
44
  pl: krótki opis cyklu (max. 350 znaków)
45
45
 
46
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::OtherTextType
47
+ onix_code: '20'
48
+ const_name: OPEN_ACCESS_STATEMENT
49
+ name:
50
+ en: open access statement
51
+ pl: deklaracja open access
52
+
53
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::OtherTextType
54
+ onix_code: '32'
55
+ const_name: LIST_OF_CONTENTS
56
+ name:
57
+ en: list of contents
58
+ pl: zawartość pudełka
59
+
@@ -6,10 +6,3 @@
6
6
  name:
7
7
  en: RRP including tax
8
8
  pl: sugerowana cena detaliczna brutto
9
-
10
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::PriceTypeCode
11
- onix_code: '01'
12
- const_name: RRP_WITHOUT_TAX
13
- name:
14
- en: RRP excluding tax
15
- pl: sugerowana cena detaliczna netto
@@ -1,5 +1,12 @@
1
1
 
2
- ---
2
+ ---
3
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ProductClassificationType
4
+ onix_code: '01'
5
+ const_name: CN
6
+ name:
7
+ en: WCO Harmonized System
8
+ pl: System WCO
9
+
3
10
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ProductClassificationType
4
11
  onix_code: '12'
5
12
  const_name: PKWIU
@@ -182,3 +182,13 @@
182
182
  digital: false
183
183
  carrier: druk
184
184
  mandatory_isbn: true
185
+
186
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ProductFormCode
187
+ onix_code: 'OPEN_ACCESS'
188
+ const_name: OPEN_ACCESS
189
+ name:
190
+ en: e-book open access
191
+ pl: e-book open access
192
+ digital: false
193
+ carrier: plik
194
+ mandatory_isbn: true
@@ -20,4 +20,10 @@
20
20
  en: ISBN-13
21
21
  pl: ISBN-13
22
22
 
23
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ProductIDType
24
+ onix_code: '06'
25
+ const_name: DOI
26
+ name:
27
+ en: DOI
28
+ pl: DOI
23
29
 
@@ -1,13 +1,6 @@
1
1
  #lista 51
2
2
 
3
- ---
4
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ProductRelationType
5
- onix_code: '23'
6
- const_name: SIMILAR_PRODUCTS
7
- name:
8
- en: products are similar
9
- pl: produkty są podobne (mogą zainteresować klienta)
10
-
3
+ ---
11
4
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ProductRelationType
12
5
  onix_code: '24'
13
6
  const_name: FACSIMILES
@@ -0,0 +1,15 @@
1
+ #lista 253
2
+ ---
3
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ResourceFileFeatureType
4
+ onix_code: '06'
5
+ const_name: MD5
6
+ name:
7
+ en: md5
8
+ pl: md5
9
+
10
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ResourceFileFeatureType
11
+ onix_code: '07'
12
+ const_name: EXACT_FILE_SIZE
13
+ name:
14
+ en: exact file size
15
+ pl: dokładny rozmiar pliku
@@ -0,0 +1,8 @@
1
+
2
+ ---
3
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ResourceIDType
4
+ onix_code: '01'
5
+ const_name: PROPRIETARY
6
+ name:
7
+ en: proprietary
8
+ pl: wewnętrzny identyfikator
@@ -1,5 +1,13 @@
1
1
 
2
2
  ---
3
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::SubjectSchemeIdentifier
4
+ onix_code: '20'
5
+ const_name: KEYWORDS
6
+ name:
7
+ en: keywords
8
+ pl: słowa kluczowe
9
+
10
+
3
11
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::SubjectSchemeIdentifier
4
12
  onix_code: '24'
5
13
  const_name: PROPRIETARY
@@ -1,26 +1,16 @@
1
1
 
2
- ---
2
+ ---
3
3
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::SupplierRole
4
4
  onix_code: '01'
5
5
  const_name: PUB_TO_RET
6
6
  name:
7
7
  en: publisher to retailers
8
8
  pl: sprzedaż wydawnictwa do detalu
9
+
9
10
  - !ruby/object:Elibri::ONIX::Dict::Release_3_0::SupplierRole
10
- onix_code: '02'
11
- const_name: PUB_EXL_DIST
12
- name:
13
- en: "publisher's exclusive distributor to retailers"
14
- pl: wyłączny dystrybutor wydawnictwa
15
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::SupplierRole
16
- onix_code: '03'
17
- const_name: PUB_NON_EXL_DIST
18
- name:
19
- en: "publisher's non-exclusive distributor to retailers"
20
- pl: dystrybutor wydawnictwa bez prawa wyłączności
21
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::SupplierRole
22
- onix_code: '04'
23
- const_name: WHOLESALER
11
+ onix_code: '11'
12
+ const_name: RETAIL_NON_EXL_DIST
24
13
  name:
25
- en: Wholesaler
26
- pl: hurtownia książek
14
+ en: Non-exclusive distributor to end-customers
15
+ pl: Dystrybutor do klientów końcowych
16
+
@@ -0,0 +1,8 @@
1
+
2
+ ---
3
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::UnpricedItemType
4
+ onix_code: '01'
5
+ const_name: FREE_OF_CHARGE
6
+ name:
7
+ en: free of charge
8
+ pl: bezpłatnie
@@ -0,0 +1,25 @@
1
+
2
+ ---
3
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::WebsiteRole
4
+ onix_code: '01'
5
+ const_name: PUBLISHER_WEBPAGE
6
+ name:
7
+ en: publisher's webpage
8
+ pl: strona www wydawnictwa
9
+
10
+ ---
11
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::WebsiteRole
12
+ onix_code: '02'
13
+ const_name: PUBLISHER_WEBPAGE_FOR_SPECIFIED_WORK
14
+ name:
15
+ en: publisher’s website for a specified work
16
+ pl: strona www wydawnictwa dotycząca określonej publikacji
17
+
18
+
19
+ - !ruby/object:Elibri::ONIX::Dict::Release_3_0::WebsiteRole
20
+ onix_code: '29'
21
+ const_name: FULL_CONTENT_LINK
22
+ name:
23
+ en: full content link
24
+ pl: link do pełnej treści książki
25
+
@@ -1,7 +1,7 @@
1
1
  module Elibri
2
2
  module ONIX
3
3
  module Dict
4
- VERSION = "0.0.67"
4
+ VERSION = "0.0.78"
5
5
  Version = VERSION
6
6
  end
7
7
  end
@@ -6,8 +6,8 @@ require 'helper'
6
6
  describe Elibri::ONIX::Dict::Release_3_0 do
7
7
 
8
8
  it "should be able to build classes on the fly from .yml files" do
9
- assert_equal 18, Elibri::ONIX::Dict::Release_3_0::ProductFormCode::ALL.size
10
- assert_equal 16, Elibri::ONIX::Dict::Release_3_0::ProductFormCode.all_except('BA', 'EA').size
9
+ assert_equal 19, Elibri::ONIX::Dict::Release_3_0::ProductFormCode::ALL.size
10
+ assert_equal 17, Elibri::ONIX::Dict::Release_3_0::ProductFormCode.all_except('BA', 'EA').size
11
11
  assert_equal 'BA', Elibri::ONIX::Dict::Release_3_0::ProductFormCode::BOOK
12
12
  assert_equal '02', Elibri::ONIX::Dict::Release_3_0::EpubUsageStatus::LIMITED
13
13
  assert_equal '01', Elibri::ONIX::Dict::Release_3_0::EpubUsageType::PREVIEW
@@ -25,6 +25,10 @@ describe Elibri::ONIX::Dict::Release_3_0 do
25
25
  assert !form.digital
26
26
  assert !form.digital?
27
27
 
28
+ form = Elibri::ONIX::Dict::Release_3_0::ProductFormCode.find_by_onix_code('OPEN_ACCESS')
29
+
30
+ assert !form.digital?
31
+
28
32
  assert_raises NoMethodError do
29
33
  form.physical
30
34
  end
@@ -4,34 +4,34 @@ require 'helper'
4
4
  describe Elibri::ONIX::Dict::CoverType do
5
5
 
6
6
  it "should be able to find most similar dict entry with specified string" do
7
- assert_equal 'miękka', Elibri::ONIX::Dict::CoverType.most_similar_to('mietka').name
8
- assert_equal 'miękka ze skrzydełkami', Elibri::ONIX::Dict::CoverType.most_similar_to('skrzydełkowa').name
9
- assert_equal 'skórzana', Elibri::ONIX::Dict::CoverType.most_similar_to('skórkowa').name
10
- assert_equal 'twarda', Elibri::ONIX::Dict::CoverType.most_similar_to('karton').name
7
+ #assert_equal 'miękka', Elibri::ONIX::Dict::CoverType.most_similar_to('mietka').name
8
+ #assert_equal 'miękka ze skrzydełkami', Elibri::ONIX::Dict::CoverType.most_similar_to('skrzydełkowa').name
9
+ #assert_equal 'skórzana', Elibri::ONIX::Dict::CoverType.most_similar_to('skórkowa').name
10
+ #assert_equal 'twarda', Elibri::ONIX::Dict::CoverType.most_similar_to('karton').name
11
11
  end
12
12
 
13
13
  it "should be able to return product_form and product_form_detail" do
14
14
  c1 = Elibri::ONIX::Dict::CoverType.find(1)
15
- assert_equal "gąbka", c1.name
15
+ assert_equal "foam", c1.key
16
16
  assert_equal "BP", c1.product_form
17
17
  assert_nil c1.product_form_detail
18
18
 
19
19
  c2 = Elibri::ONIX::Dict::CoverType.find(9)
20
- assert_equal "twarda z obwolutą", c2.name
20
+ assert_equal "hardcover_with_dust_jacket", c2.key
21
21
  assert_equal "BB", c2.product_form
22
22
  assert_equal "B501", c2.product_form_detail
23
23
  end
24
-
24
+
25
25
  it "should properly recognize cover types" do
26
- assert_equal "gąbka", Elibri::ONIX::Dict::CoverType.determine_cover_type("BP", nil)
27
- assert_equal "miękka", Elibri::ONIX::Dict::CoverType.determine_cover_type("BC", nil)
28
- assert_equal "miękka ze skrzydełkami", Elibri::ONIX::Dict::CoverType.determine_cover_type("BC", "B504")
29
- assert_equal "plastikowa", Elibri::ONIX::Dict::CoverType.determine_cover_type("BB", "B413")
30
- assert_equal "skórzana", Elibri::ONIX::Dict::CoverType.determine_cover_type("BG", nil)
31
- assert_equal "twarda", Elibri::ONIX::Dict::CoverType.determine_cover_type("BB", nil)
32
- assert_equal "twarda lakierowana", Elibri::ONIX::Dict::CoverType.determine_cover_type("BB", "B415")
33
- assert_equal "twarda z obwolutą", Elibri::ONIX::Dict::CoverType.determine_cover_type("BB", "B501")
34
- assert_equal "zintegrowana", Elibri::ONIX::Dict::CoverType.determine_cover_type("BC", "B412")
26
+ assert_equal "foam", Elibri::ONIX::Dict::CoverType.determine_cover_type("BP", nil)
27
+ assert_equal "paperback", Elibri::ONIX::Dict::CoverType.determine_cover_type("BC", nil)
28
+ assert_equal "paperback_with_flaps", Elibri::ONIX::Dict::CoverType.determine_cover_type("BC", "B504")
29
+ assert_equal "plastic", Elibri::ONIX::Dict::CoverType.determine_cover_type("BB", "B413")
30
+ assert_equal "leather", Elibri::ONIX::Dict::CoverType.determine_cover_type("BG", nil)
31
+ assert_equal "hardcover", Elibri::ONIX::Dict::CoverType.determine_cover_type("BB", nil)
32
+ assert_equal "laminated_hardcover", Elibri::ONIX::Dict::CoverType.determine_cover_type("BB", "B415")
33
+ assert_equal "hardcover_with_dust_jacket", Elibri::ONIX::Dict::CoverType.determine_cover_type("BB", "B501")
34
+ assert_equal "flexibound", Elibri::ONIX::Dict::CoverType.determine_cover_type("BC", "B412")
35
35
 
36
36
  #nieznana kombinacja
37
37
  assert_nil Elibri::ONIX::Dict::CoverType.determine_cover_type("BF", nil)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elibri_onix_dict
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.67
4
+ version: 0.0.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Urbanski
@@ -104,19 +104,17 @@ files:
104
104
  - lib/elibri_onix_dict/onix_3_0/serialized/CollectionType.yml
105
105
  - lib/elibri_onix_dict/onix_3_0/serialized/ContentAudience.yml
106
106
  - lib/elibri_onix_dict/onix_3_0/serialized/ContentDateRole.yml
107
- - lib/elibri_onix_dict/onix_3_0/serialized/ContentSourceType.yml
108
107
  - lib/elibri_onix_dict/onix_3_0/serialized/ContributorRole.yml
109
108
  - lib/elibri_onix_dict/onix_3_0/serialized/DateFormat.yml
110
109
  - lib/elibri_onix_dict/onix_3_0/serialized/EditionType.yml
110
+ - lib/elibri_onix_dict/onix_3_0/serialized/EpubLicenseExpressionType.yml
111
111
  - lib/elibri_onix_dict/onix_3_0/serialized/EpubTechnicalProtection.yml
112
- - lib/elibri_onix_dict/onix_3_0/serialized/EpubUsageStatus.yml
113
- - lib/elibri_onix_dict/onix_3_0/serialized/EpubUsageType.yml
114
- - lib/elibri_onix_dict/onix_3_0/serialized/EpubUsageUnit.yml
115
112
  - lib/elibri_onix_dict/onix_3_0/serialized/ExtentType.yml
116
113
  - lib/elibri_onix_dict/onix_3_0/serialized/ExtentUnit.yml
117
114
  - lib/elibri_onix_dict/onix_3_0/serialized/LanguageCode.yml
118
115
  - lib/elibri_onix_dict/onix_3_0/serialized/LanguageRole.yml
119
116
  - lib/elibri_onix_dict/onix_3_0/serialized/MeasureType.yml
117
+ - lib/elibri_onix_dict/onix_3_0/serialized/NameIdentifier.yml
120
118
  - lib/elibri_onix_dict/onix_3_0/serialized/NotificationType.yml
121
119
  - lib/elibri_onix_dict/onix_3_0/serialized/OtherTextType.yml
122
120
  - lib/elibri_onix_dict/onix_3_0/serialized/PricePositionOnProduct.yml
@@ -134,7 +132,9 @@ files:
134
132
  - lib/elibri_onix_dict/onix_3_0/serialized/PublishingDateRole.yml
135
133
  - lib/elibri_onix_dict/onix_3_0/serialized/PublishingStatusCode.yml
136
134
  - lib/elibri_onix_dict/onix_3_0/serialized/ResourceContentType.yml
135
+ - lib/elibri_onix_dict/onix_3_0/serialized/ResourceFileFeatureType.yml
137
136
  - lib/elibri_onix_dict/onix_3_0/serialized/ResourceForm.yml
137
+ - lib/elibri_onix_dict/onix_3_0/serialized/ResourceIDType.yml
138
138
  - lib/elibri_onix_dict/onix_3_0/serialized/ResourceMode.yml
139
139
  - lib/elibri_onix_dict/onix_3_0/serialized/ResourceVersionFeatureType.yml
140
140
  - lib/elibri_onix_dict/onix_3_0/serialized/SalesRestrictionType.yml
@@ -147,6 +147,8 @@ files:
147
147
  - lib/elibri_onix_dict/onix_3_0/serialized/TitleElementLevel.yml
148
148
  - lib/elibri_onix_dict/onix_3_0/serialized/TitleType.yml
149
149
  - lib/elibri_onix_dict/onix_3_0/serialized/UnnamedPersons.yml
150
+ - lib/elibri_onix_dict/onix_3_0/serialized/UnpricedItemType.yml
151
+ - lib/elibri_onix_dict/onix_3_0/serialized/WebsiteRole.yml
150
152
  - lib/elibri_onix_dict/releases.rb
151
153
  - lib/elibri_onix_dict/version.rb
152
154
  - test/elibri_onix_dict_release_3_0_test.rb
@@ -172,8 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
174
  - !ruby/object:Gem::Version
173
175
  version: '0'
174
176
  requirements: []
175
- rubyforge_project:
176
- rubygems_version: 2.7.7
177
+ rubygems_version: 3.0.1
177
178
  signing_key:
178
179
  specification_version: 4
179
180
  summary: EDItEUR ONIX format dictionary helpers used in eLibri publication system
@@ -1,29 +0,0 @@
1
-
2
- ---
3
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ContentSourceType
4
- onix_code: '01'
5
- const_name: PRINTED_MEDIA
6
- name:
7
- en: printed media
8
- pl: media drukowane
9
-
10
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ContentSourceType
11
- onix_code: '02'
12
- const_name: WEBSITE
13
- name:
14
- en: website
15
- pl: strona internetowa
16
-
17
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ContentSourceType
18
- onix_code: '03'
19
- const_name: RADIO
20
- name:
21
- en: radio
22
- pl: radio
23
-
24
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::ContentSourceType
25
- onix_code: '04'
26
- const_name: TV
27
- name:
28
- en: TV
29
- pl: telewizja
@@ -1,23 +0,0 @@
1
- #lista 146
2
- ---
3
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageStatus
4
- onix_code: '01'
5
- const_name: UNLIMITED
6
- name:
7
- en: unlimited
8
- pl: bez ograniczeń
9
-
10
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageStatus
11
- onix_code: '02'
12
- const_name: LIMITED
13
- name:
14
- en: limited
15
- pl: obowiązuje ograniczenie
16
-
17
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageStatus
18
- onix_code: '03'
19
- const_name: PROHIBITED
20
- name:
21
- en: prohibited
22
- pl: zabronione
23
-
@@ -1,8 +0,0 @@
1
-
2
- ---
3
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageType
4
- onix_code: '01'
5
- const_name: PREVIEW
6
- name:
7
- en: preview before purchase
8
- pl: udostępnij fragment przed kupnem
@@ -1,15 +0,0 @@
1
- #lista 147
2
- ---
3
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageUnit
4
- onix_code: '02'
5
- const_name: CHARACTERS
6
- name:
7
- en: characters
8
- pl: znaków
9
-
10
- - !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageUnit
11
- onix_code: '05'
12
- const_name: PERCENTAGE
13
- name:
14
- en: percentage
15
- pl: procent