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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elibri_onix_dict (0.0.16)
4
+ elibri_onix_dict (0.0.18)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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 limitów
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 limit
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: '07'
5
- const_name: TIME_LIMITED
4
+ onix_code: '01'
5
+ const_name: PREVIEW
6
6
  name:
7
- en: time-limited license
8
- pl: licencja na określony czas
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: '09'
5
- const_name: DAYS
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: days
8
- pl: dni
14
+ en: percentage
15
+ pl: procent
@@ -1,7 +1,7 @@
1
1
  module Elibri
2
2
  module ONIX
3
3
  module Dict
4
- VERSION = "0.0.17"
4
+ VERSION = "0.0.18"
5
5
  Version = VERSION
6
6
  end
7
7
  end
@@ -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 '07', Elibri::ONIX::Dict::Release_3_0::EpubUsageType::TIME_LIMITED
15
- assert_equal '09', Elibri::ONIX::Dict::Release_3_0::EpubUsageUnit::DAYS
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: 61
4
+ hash: 59
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 17
10
- version: 0.0.17
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 Z
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.8.19
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