elibri_onix_dict 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/elibri_onix_dict/onix_3_0/base.rb +4 -0
- data/lib/elibri_onix_dict/onix_3_0/serialized/EpubUsageStatus.yml +11 -3
- data/lib/elibri_onix_dict/onix_3_0/serialized/EpubUsageType.yml +4 -4
- data/lib/elibri_onix_dict/onix_3_0/serialized/EpubUsageUnit.yml +12 -5
- data/lib/elibri_onix_dict/version.rb +1 -1
- data/test/elibri_onix_dict_release_3_0_test.rb +2 -2
- metadata +7 -5
data/Gemfile.lock
CHANGED
@@ -42,6 +42,10 @@ module Elibri
|
|
42
42
|
self.const_get(:ALL) # Wartość stałej 'ALL' pobierz dynamicznie - z klasy pochodnej...
|
43
43
|
end
|
44
44
|
|
45
|
+
#zwróć wszyskie wartości o określonych const_names
|
46
|
+
def self.by_const_names(const_names)
|
47
|
+
self.all.find_all { |value| const_names.include?(value.const_name) }
|
48
|
+
end
|
45
49
|
|
46
50
|
# Zwróć listę wszystkich elementów słownika, poza tymi o kodach przekazanych jako argument
|
47
51
|
def self.all_except(*onix_codes)
|
@@ -1,15 +1,23 @@
|
|
1
|
-
|
1
|
+
#lista 146
|
2
2
|
---
|
3
3
|
- !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageStatus
|
4
4
|
onix_code: '01'
|
5
5
|
const_name: UNLIMITED
|
6
6
|
name:
|
7
7
|
en: unlimited
|
8
|
-
pl: bez
|
8
|
+
pl: bez ograniczeń
|
9
9
|
|
10
10
|
- !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageStatus
|
11
11
|
onix_code: '02'
|
12
12
|
const_name: LIMITED
|
13
13
|
name:
|
14
14
|
en: limited
|
15
|
-
pl: obowiązuje
|
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 +1,8 @@
|
|
1
1
|
|
2
2
|
---
|
3
3
|
- !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageType
|
4
|
-
onix_code: '
|
5
|
-
const_name:
|
4
|
+
onix_code: '01'
|
5
|
+
const_name: PREVIEW
|
6
6
|
name:
|
7
|
-
en:
|
8
|
-
pl:
|
7
|
+
en: preview before purchase
|
8
|
+
pl: udostępnij fragment przed kupnem
|
@@ -1,8 +1,15 @@
|
|
1
|
-
|
1
|
+
#lista 147
|
2
2
|
---
|
3
3
|
- !ruby/object:Elibri::ONIX::Dict::Release_3_0::EpubUsageUnit
|
4
|
-
onix_code: '
|
5
|
-
const_name:
|
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
|
6
13
|
name:
|
7
|
-
en:
|
8
|
-
pl:
|
14
|
+
en: percentage
|
15
|
+
pl: procent
|
@@ -11,8 +11,8 @@ describe Elibri::ONIX::Dict::Release_3_0 do
|
|
11
11
|
assert_equal 9, Elibri::ONIX::Dict::Release_3_0::ProductFormCode.all_except(['BA', 'EA']).size
|
12
12
|
assert_equal 'BA', Elibri::ONIX::Dict::Release_3_0::ProductFormCode::BOOK
|
13
13
|
assert_equal '02', Elibri::ONIX::Dict::Release_3_0::EpubUsageStatus::LIMITED
|
14
|
-
assert_equal '
|
15
|
-
assert_equal '
|
14
|
+
assert_equal '01', Elibri::ONIX::Dict::Release_3_0::EpubUsageType::PREVIEW
|
15
|
+
assert_equal '05', Elibri::ONIX::Dict::Release_3_0::EpubUsageUnit::PERCENTAGE
|
16
16
|
|
17
17
|
form = Elibri::ONIX::Dict::Release_3_0::ProductFormCode.find_by_onix_code('BA')
|
18
18
|
assert_equal 'książka', form.name
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elibri_onix_dict
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 59
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 18
|
10
|
+
version: 0.0.18
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Marcin Urbanski
|
@@ -15,7 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-04-05 00:00:00
|
18
|
+
date: 2012-04-05 00:00:00 +02:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: pry
|
@@ -140,6 +141,7 @@ files:
|
|
140
141
|
- test/elibri_onix_dict_release_3_0_test.rb
|
141
142
|
- test/elibri_onix_dict_test.rb
|
142
143
|
- test/helper.rb
|
144
|
+
has_rdoc: true
|
143
145
|
homepage: http://github.com/elibri/elibri_onix_dict
|
144
146
|
licenses:
|
145
147
|
- MIT
|
@@ -169,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
171
|
requirements: []
|
170
172
|
|
171
173
|
rubyforge_project:
|
172
|
-
rubygems_version: 1.
|
174
|
+
rubygems_version: 1.5.2
|
173
175
|
signing_key:
|
174
176
|
specification_version: 3
|
175
177
|
summary: EDItEUR ONIX format dictionary helpers used in eLibri publication system
|