elibri_onix 0.1.8 → 0.1.9

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/elibri_onix.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{elibri_onix}
8
- s.version = "0.1.8"
8
+ s.version = "0.1.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marcin Urbanski"]
12
- s.date = %q{2011-11-21}
12
+ s.date = %q{2011-12-04}
13
13
  s.description = %q{EDItEUR ONIX format subset implementation used in Elibri publication system}
14
14
  s.email = %q{marcin@urbanski.vdl.pl}
15
15
  s.extra_rdoc_files = [
@@ -7,7 +7,7 @@ module Elibri
7
7
  include ROXML
8
8
 
9
9
  attr_accessor :elibri_dialect, :height, :width, :thickness, :weight, :ean, :isbn13, :number_of_pages, :duration,
10
- :file_size, :publisher_name, :imprint_name, :current_state, :reading_age_from, :reading_age_to,
10
+ :file_size, :publisher_name, :publisher_id, :imprint_name, :current_state, :reading_age_from, :reading_age_to,
11
11
  :table_of_contents, :description, :reviews, :excerpts, :series, :title, :subtitle, :collection_title,
12
12
  :collection_part, :full_title, :original_title, :trade_title, :parsed_publishing_date
13
13
 
@@ -165,6 +165,7 @@ module Elibri
165
165
  @duration = extents.find {|extent| extent.type_name == "duration" }.try(:value)
166
166
  @file_size = extents.find {|extent| extent.type_name == "file_size" }.try(:value)
167
167
  @publisher_name = publisher.name if publisher
168
+ @publisher_id = publisher.id if publisher
168
169
  @imprint_name = imprint.name if imprint
169
170
 
170
171
  @reading_age_from = audience_ranges.find {|ar| (ar.qualifier == "18") && (ar.precision == "03")}.try(:value)
@@ -14,7 +14,7 @@ module Elibri
14
14
  #występuje w tej chwili tylko 01 - główny wydawca
15
15
  xml_accessor :role, :from => 'PublishingRole'
16
16
  xml_accessor :name, :from => 'PublisherName'
17
-
17
+ xml_accessor :id, :from => 'IDValue', :in => 'PublisherIdentifier', :as => Fixnum
18
18
  end
19
19
 
20
20
  end
@@ -4,7 +4,7 @@ module Elibri
4
4
  module Version
5
5
  MAJOR = 0
6
6
  MINOR = 1
7
- PATCH = 8
7
+ PATCH = 9
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
10
10
  end
@@ -5,6 +5,7 @@ describe Elibri::ONIX::Release_3_0::ONIXMessage do
5
5
  it "should be able to parse publisher name" do
6
6
  product = load_fixture("onix_publisher_info_example.xml")
7
7
  assert_equal "G+J Gruner+Jahr Polska", product.publisher_name
8
+ assert_equal 14, product.publisher_id
8
9
  assert_equal "National Geographic", product.imprint_name
9
10
 
10
11
  end
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <ONIXMessage xmlns:elibri="http://elibri.com.pl/ns/extensions" release="3.0" xmlns="http://www.editeur.org/onix/3.0/reference">
2
+ <ONIXMessage xmlns="http://www.editeur.org/onix/3.0/reference" release="3.0" xmlns:elibri="http://elibri.com.pl/ns/extensions">
3
3
  <elibri:Dialect>3.0.1</elibri:Dialect>
4
4
  <Header>
5
5
  <Sender>
@@ -7,7 +7,7 @@
7
7
  <ContactName>Tomasz Meka</ContactName>
8
8
  <EmailAddress>kontakt@elibri.com.pl</EmailAddress>
9
9
  </Sender>
10
- <SentDateTime>20111111</SentDateTime>
10
+ <SentDateTime>20111204</SentDateTime>
11
11
  </Header>
12
12
  <Product>
13
13
  <RecordReference>fdb8fa072be774d97a97</RecordReference>
@@ -33,6 +33,11 @@
33
33
  </Imprint>
34
34
  <Publisher>
35
35
  <PublishingRole>01</PublishingRole>
36
+ <PublisherIdentifier>
37
+ <PublisherIDType>01</PublisherIDType>
38
+ <IDTypeName>ElibriPublisherCode</IDTypeName>
39
+ <IDValue>14</IDValue>
40
+ </PublisherIdentifier>
36
41
  <PublisherName>G+J Gruner+Jahr Polska</PublisherName>
37
42
  </Publisher>
38
43
  <PublishingStatus>04</PublishingStatus>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elibri_onix
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 8
10
- version: 0.1.8
9
+ - 9
10
+ version: 0.1.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcin Urbanski
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-21 00:00:00 +01:00
18
+ date: 2011-12-04 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency